@tryghost/activitypub 3.0.6 → 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-CFmbpqlr.mjs → index-BdcW7GlH.mjs} +20 -20
- package/dist/{index-CFmbpqlr.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-BJKUA7bK.mjs +0 -46030
- package/dist/index-BJKUA7bK.mjs.map +0 -1
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { v as F, w as T, x as _, y as E, b as x, z as H, G as V, d as W, j as e, L as R, I as $, N as p, J as v, K as w, P as z, M as f, h as G, A as J, S as t, B as c, O as i } from "./index-_vEj3NfZ.mjs";
|
|
2
|
+
import { T as K, a as O, b as N, c as g } from "./tabs-BZytpdZ9.mjs";
|
|
3
|
+
const X = () => {
|
|
4
|
+
const { data: d, isLoading: n } = F("index"), { data: u, isLoading: o } = T("index"), m = n ? Array(5).fill({ apId: "", name: "", handle: "", avatarUrl: "" }) : (d == null ? void 0 : d.pages.flatMap((s) => s.accounts)) ?? [], h = o ? Array(5).fill({ apId: "", name: "" }) : (u == null ? void 0 : u.pages.flatMap((s) => s.domains)) ?? [], I = _("index"), U = E("index"), [M, k] = x(/* @__PURE__ */ new Set()), B = H("index"), y = V("index"), [S, b] = x(/* @__PURE__ */ new Set()), [j, r] = x(null), L = W(), A = (s) => {
|
|
5
|
+
k((l) => {
|
|
6
|
+
const a = /* @__PURE__ */ new Set([...l]);
|
|
7
|
+
return a.add(s.apId), a;
|
|
8
|
+
}), U.mutate(s), i.success("User unblocked");
|
|
9
|
+
}, D = (s) => {
|
|
10
|
+
k((l) => {
|
|
11
|
+
const a = /* @__PURE__ */ new Set([...l]);
|
|
12
|
+
return a.delete(s.apId), a;
|
|
13
|
+
}), I.mutate(s), i.success("User blocked");
|
|
14
|
+
}, C = (s) => {
|
|
15
|
+
b((l) => {
|
|
16
|
+
const a = /* @__PURE__ */ new Set([...l]);
|
|
17
|
+
return a.add(s.url), a;
|
|
18
|
+
}), y.mutate({ url: s.url }), i.success("Domain unblocked");
|
|
19
|
+
}, P = (s) => {
|
|
20
|
+
b((l) => {
|
|
21
|
+
const a = /* @__PURE__ */ new Set([...l]);
|
|
22
|
+
return a.delete(s.url), a;
|
|
23
|
+
}), B.mutate({ url: s.url }), i.success("Domain blocked");
|
|
24
|
+
};
|
|
25
|
+
return /* @__PURE__ */ e.jsx(R, { children: /* @__PURE__ */ e.jsxs("div", { className: "mx-auto max-w-[620px] py-[min(4vh,48px)]", children: [
|
|
26
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex items-center justify-between gap-8", children: /* @__PURE__ */ e.jsx($, { children: "Moderation" }) }),
|
|
27
|
+
/* @__PURE__ */ e.jsx("div", { className: "mt-6", children: /* @__PURE__ */ e.jsxs(K, { defaultValue: "blocked_users", variant: "underline", children: [
|
|
28
|
+
/* @__PURE__ */ e.jsxs(O, { children: [
|
|
29
|
+
/* @__PURE__ */ e.jsx(N, { value: "blocked_users", children: "Blocked users" }),
|
|
30
|
+
/* @__PURE__ */ e.jsx(N, { value: "blocked_domains", children: "Blocked domains" })
|
|
31
|
+
] }),
|
|
32
|
+
/* @__PURE__ */ e.jsx(g, { className: "mt-2", value: "blocked_users", children: !n && m.length === 0 ? /* @__PURE__ */ e.jsxs(p, { children: [
|
|
33
|
+
/* @__PURE__ */ e.jsx(v, { children: /* @__PURE__ */ e.jsx(w, {}) }),
|
|
34
|
+
/* @__PURE__ */ e.jsx("div", { className: "mt-2 flex max-w-[400px] flex-col items-center gap-1 text-center", children: /* @__PURE__ */ e.jsx("p", { children: "When you block someone, they won't be able to follow you or interact with your content on the social web." }) })
|
|
35
|
+
] }) : m.map((s, l) => /* @__PURE__ */ e.jsx(z, { actor: s, isCurrentUser: !0, children: /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsxs(
|
|
36
|
+
f,
|
|
37
|
+
{
|
|
38
|
+
onClick: n ? void 0 : () => G(s.handle, L),
|
|
39
|
+
children: [
|
|
40
|
+
/* @__PURE__ */ e.jsx(
|
|
41
|
+
J,
|
|
42
|
+
{
|
|
43
|
+
author: {
|
|
44
|
+
icon: {
|
|
45
|
+
url: s.avatarUrl
|
|
46
|
+
},
|
|
47
|
+
name: s.name,
|
|
48
|
+
handle: s.handle
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
),
|
|
52
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex min-w-0 flex-col", children: [
|
|
53
|
+
/* @__PURE__ */ e.jsx("span", { className: "block truncate font-semibold text-black dark:text-white", children: n ? /* @__PURE__ */ e.jsx(t, { className: "w-24" }) : s.name }),
|
|
54
|
+
/* @__PURE__ */ e.jsx("span", { className: "block truncate text-sm text-gray-600", children: n ? /* @__PURE__ */ e.jsx(t, { className: "w-40" }) : s.handle })
|
|
55
|
+
] }),
|
|
56
|
+
M.has(s.apId) ? /* @__PURE__ */ e.jsx(
|
|
57
|
+
c,
|
|
58
|
+
{
|
|
59
|
+
className: "ml-auto min-w-[90px] text-red hover:!bg-red/5 hover:text-red-400",
|
|
60
|
+
variant: "outline",
|
|
61
|
+
onClick: (a) => {
|
|
62
|
+
a.stopPropagation(), D(s);
|
|
63
|
+
},
|
|
64
|
+
children: "Block"
|
|
65
|
+
}
|
|
66
|
+
) : n ? /* @__PURE__ */ e.jsx("div", { className: "ml-auto w-16", children: /* @__PURE__ */ e.jsx(t, {}) }) : /* @__PURE__ */ e.jsx(
|
|
67
|
+
c,
|
|
68
|
+
{
|
|
69
|
+
className: "ml-auto min-w-[90px]",
|
|
70
|
+
variant: "destructive",
|
|
71
|
+
onClick: (a) => {
|
|
72
|
+
a.stopPropagation(), A(s);
|
|
73
|
+
},
|
|
74
|
+
onMouseEnter: () => r(s.apId),
|
|
75
|
+
onMouseLeave: () => r(null),
|
|
76
|
+
children: j === s.apId ? "Unblock" : "Blocked"
|
|
77
|
+
}
|
|
78
|
+
)
|
|
79
|
+
]
|
|
80
|
+
}
|
|
81
|
+
) }) }, s.apId ? s.apId : `loading-${l}`)) }),
|
|
82
|
+
/* @__PURE__ */ e.jsx(g, { className: "mt-[11px]", value: "blocked_domains", children: !o && h.length === 0 ? /* @__PURE__ */ e.jsxs(p, { children: [
|
|
83
|
+
/* @__PURE__ */ e.jsx(v, { children: /* @__PURE__ */ e.jsx(w, {}) }),
|
|
84
|
+
/* @__PURE__ */ e.jsx("div", { className: "mt-2 flex max-w-[400px] flex-col items-center gap-1 text-center", children: /* @__PURE__ */ e.jsx("p", { children: "When you block a domain, all users from that domain won't be able to follow you or interact with your content." }) })
|
|
85
|
+
] }) : h.map((s, l) => /* @__PURE__ */ e.jsxs(f, { children: [
|
|
86
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex min-w-0 flex-col", children: /* @__PURE__ */ e.jsx("span", { className: "block truncate font-semibold text-black dark:text-white", children: o ? /* @__PURE__ */ e.jsx(t, { className: "w-48" }) : new URL(s.url).hostname }) }),
|
|
87
|
+
S.has(s.url) ? /* @__PURE__ */ e.jsx(
|
|
88
|
+
c,
|
|
89
|
+
{
|
|
90
|
+
className: "ml-auto min-w-[90px] text-red hover:!bg-red/5 hover:text-red-400",
|
|
91
|
+
variant: "outline",
|
|
92
|
+
onClick: () => P(s),
|
|
93
|
+
children: "Block"
|
|
94
|
+
}
|
|
95
|
+
) : o ? /* @__PURE__ */ e.jsx("div", { className: "ml-auto w-16", children: /* @__PURE__ */ e.jsx(t, {}) }) : /* @__PURE__ */ e.jsx(
|
|
96
|
+
c,
|
|
97
|
+
{
|
|
98
|
+
className: "ml-auto min-w-[90px]",
|
|
99
|
+
variant: "destructive",
|
|
100
|
+
onClick: () => C(s),
|
|
101
|
+
onMouseEnter: () => r(s.url),
|
|
102
|
+
onMouseLeave: () => r(null),
|
|
103
|
+
children: j === s.url ? "Unblock" : "Blocked"
|
|
104
|
+
}
|
|
105
|
+
)
|
|
106
|
+
] }, s.url ? s.url : `loading-${l}`)) })
|
|
107
|
+
] }) })
|
|
108
|
+
] }) });
|
|
109
|
+
};
|
|
110
|
+
export {
|
|
111
|
+
X as default
|
|
112
|
+
};
|
|
113
|
+
//# sourceMappingURL=moderation-KWQp9gQj.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"moderation-KWQp9gQj.mjs","sources":["../src/views/preferences/components/moderation.tsx"],"sourcesContent":["import APAvatar from '@components/global/ap-avatar';\nimport ActivityItem from '@components/activities/activity-item';\nimport Layout from '@components/layout';\nimport ProfilePreviewHoverCard from '@components/global/profile-preview-hover-card';\nimport React, {useState} from 'react';\nimport {Account} from '@src/api/activitypub';\nimport {Button, H2, LucideIcon, NoValueLabel, NoValueLabelIcon, Skeleton, Tabs, TabsContent, TabsList, TabsTrigger} from '@tryghost/shade';\nimport {handleProfileClick} from '@src/utils/handle-profile-click';\nimport {toast} from 'sonner';\nimport {useBlockDomainMutationForUser, useBlockMutationForUser, useBlockedAccountsForUser, useBlockedDomainsForUser, useUnblockDomainMutationForUser, useUnblockMutationForUser} from '@hooks/use-activity-pub-queries';\nimport {useNavigateWithBasePath} from '@src/hooks/use-navigate-with-base-path';\n\nconst Moderation: React.FC = () => {\n const {data: blockedAccountsData, isLoading: blockedAccountsLoading} = useBlockedAccountsForUser('index');\n const {data: blockedDomainsData, isLoading: blockedDomainsLoading} = useBlockedDomainsForUser('index');\n\n const blockedAccounts = blockedAccountsLoading\n ? Array(5).fill({apId: '', name: '', handle: '', avatarUrl: ''})\n : blockedAccountsData?.pages.flatMap(page => page.accounts) ?? [];\n const blockedDomains = blockedDomainsLoading\n ? Array(5).fill({apId: '', name: ''})\n : blockedDomainsData?.pages.flatMap(page => page.domains) ?? [];\n\n const blockMutation = useBlockMutationForUser('index');\n const unblockMutation = useUnblockMutationForUser('index');\n const [unblockedAccountIds, setUnblockedAccountIds] = useState<Set<string>>(new Set());\n\n const blockDomainMutation = useBlockDomainMutationForUser('index');\n const unblockDomainMutation = useUnblockDomainMutationForUser('index');\n const [unblockedDomainIds, setUnblockedDomainIds] = useState<Set<string>>(new Set());\n\n const [hoveredItemId, setHoveredItemId] = useState<string | null>(null);\n const navigate = useNavigateWithBasePath();\n\n const handleUnblock = (account: Account) => {\n setUnblockedAccountIds((prev) => {\n const newSet = new Set([...prev]);\n newSet.add(account.apId);\n return newSet;\n });\n\n unblockMutation.mutate(account);\n\n toast.success('User unblocked');\n };\n\n const handleBlock = (account: Account) => {\n setUnblockedAccountIds((prev) => {\n const newSet = new Set([...prev]);\n newSet.delete(account.apId);\n return newSet;\n });\n\n blockMutation.mutate(account);\n\n toast.success('User blocked');\n };\n\n const handleDomainUnblock = (domain: {url: string}) => {\n setUnblockedDomainIds((prev) => {\n const newSet = new Set([...prev]);\n newSet.add(domain.url);\n return newSet;\n });\n\n unblockDomainMutation.mutate({url: domain.url});\n\n toast.success('Domain unblocked');\n };\n\n const handleDomainBlock = (domain: {url: string}) => {\n setUnblockedDomainIds((prev) => {\n const newSet = new Set([...prev]);\n newSet.delete(domain.url);\n return newSet;\n });\n\n blockDomainMutation.mutate({url: domain.url});\n\n toast.success('Domain blocked');\n };\n\n return (\n <Layout>\n <div className='mx-auto max-w-[620px] py-[min(4vh,48px)]'>\n <div className='flex items-center justify-between gap-8'>\n <H2>Moderation</H2>\n </div>\n <div className='mt-6'>\n <Tabs defaultValue=\"blocked_users\" variant='underline'>\n <TabsList>\n <TabsTrigger value=\"blocked_users\">Blocked users</TabsTrigger>\n <TabsTrigger value=\"blocked_domains\">Blocked domains</TabsTrigger>\n </TabsList>\n <TabsContent className='mt-2' value=\"blocked_users\">\n {!blockedAccountsLoading && blockedAccounts.length === 0 ? (\n <NoValueLabel>\n <NoValueLabelIcon><LucideIcon.Ban /></NoValueLabelIcon>\n <div className='mt-2 flex max-w-[400px] flex-col items-center gap-1 text-center'>\n <p>When you block someone, they won't be able to follow you or interact with your content on the social web.</p>\n </div>\n </NoValueLabel>\n ) : (\n blockedAccounts.map((account, index) => (\n <ProfilePreviewHoverCard key={account.apId ? account.apId : `loading-${index}`} actor={account} isCurrentUser={true}>\n <div>\n <ActivityItem\n onClick={!blockedAccountsLoading ? () => handleProfileClick(account.handle, navigate) : undefined}\n >\n <APAvatar\n author={\n {\n icon: {\n url: account.avatarUrl\n },\n name: account.name,\n handle: account.handle\n }\n } />\n <div className='flex min-w-0 flex-col'>\n <span className='block truncate font-semibold text-black dark:text-white'>{!blockedAccountsLoading ? account.name : <Skeleton className='w-24' />}</span>\n <span className='block truncate text-sm text-gray-600'>{!blockedAccountsLoading ? account.handle : <Skeleton className='w-40' />}</span>\n </div>\n\n {unblockedAccountIds.has(account.apId) ? (\n <Button\n className='ml-auto min-w-[90px] text-red hover:!bg-red/5 hover:text-red-400'\n variant='outline'\n onClick={(e) => {\n e.stopPropagation();\n handleBlock(account);\n }}\n >\n Block\n </Button>\n ) : (\n !blockedAccountsLoading ?\n <Button\n className='ml-auto min-w-[90px]'\n variant='destructive'\n onClick={(e) => {\n e.stopPropagation();\n handleUnblock(account);\n }}\n onMouseEnter={() => setHoveredItemId(account.apId)}\n onMouseLeave={() => setHoveredItemId(null)}\n >\n {hoveredItemId === account.apId ? 'Unblock' : 'Blocked'}\n </Button> :\n <div className='ml-auto w-16'>\n <Skeleton />\n </div>\n )}\n </ActivityItem>\n </div>\n </ProfilePreviewHoverCard>\n ))\n )}\n </TabsContent>\n <TabsContent className='mt-[11px]' value=\"blocked_domains\">\n {!blockedDomainsLoading && blockedDomains.length === 0 ? (\n <NoValueLabel>\n <NoValueLabelIcon><LucideIcon.Ban /></NoValueLabelIcon>\n <div className='mt-2 flex max-w-[400px] flex-col items-center gap-1 text-center'>\n <p>When you block a domain, all users from that domain won't be able to follow you or interact with your content.</p>\n </div>\n </NoValueLabel>\n ) : (\n blockedDomains.map((domain, index) => (\n <ActivityItem key={domain.url ? domain.url : `loading-${index}`}>\n <div className='flex min-w-0 flex-col'>\n <span className='block truncate font-semibold text-black dark:text-white'>\n {!blockedDomainsLoading ? new URL(domain.url).hostname : <Skeleton className='w-48' />}\n </span>\n </div>\n\n {unblockedDomainIds.has(domain.url) ? (\n <Button\n className='ml-auto min-w-[90px] text-red hover:!bg-red/5 hover:text-red-400'\n variant='outline'\n onClick={() => handleDomainBlock(domain)}\n >\n Block\n </Button>\n ) : (\n !blockedDomainsLoading ?\n <Button\n className='ml-auto min-w-[90px]'\n variant='destructive'\n onClick={() => handleDomainUnblock(domain)}\n onMouseEnter={() => setHoveredItemId(domain.url)}\n onMouseLeave={() => setHoveredItemId(null)}\n >\n {hoveredItemId === domain.url ? 'Unblock' : 'Blocked'}\n </Button> :\n <div className='ml-auto w-16'>\n <Skeleton />\n </div>\n )}\n </ActivityItem>\n ))\n )}\n </TabsContent>\n </Tabs>\n </div>\n </div>\n </Layout>\n );\n};\n\nexport default Moderation;\n"],"names":["Moderation","blockedAccountsData","blockedAccountsLoading","useBlockedAccountsForUser","blockedDomainsData","blockedDomainsLoading","useBlockedDomainsForUser","blockedAccounts","page","blockedDomains","blockMutation","useBlockMutationForUser","unblockMutation","useUnblockMutationForUser","unblockedAccountIds","setUnblockedAccountIds","useState","blockDomainMutation","useBlockDomainMutationForUser","unblockDomainMutation","useUnblockDomainMutationForUser","unblockedDomainIds","setUnblockedDomainIds","hoveredItemId","setHoveredItemId","navigate","useNavigateWithBasePath","handleUnblock","account","prev","newSet","toast","handleBlock","handleDomainUnblock","domain","handleDomainBlock","jsx","Layout","jsxs","H2","Tabs","TabsList","TabsTrigger","TabsContent","NoValueLabel","NoValueLabelIcon","LucideIcon.Ban","index","ProfilePreviewHoverCard","ActivityItem","handleProfileClick","APAvatar","Skeleton","Button","e"],"mappings":";;AAYA,MAAMA,IAAuB,MAAM;AAC/B,QAAM,EAAC,MAAMC,GAAqB,WAAWC,EAAA,IAA0BC,EAA0B,OAAO,GAClG,EAAC,MAAMC,GAAoB,WAAWC,EAAA,IAAyBC,EAAyB,OAAO,GAE/FC,IAAkBL,IAClB,MAAM,CAAC,EAAE,KAAK,EAAC,MAAM,IAAI,MAAM,IAAI,QAAQ,IAAI,WAAW,IAAG,KAC7DD,KAAA,gBAAAA,EAAqB,MAAM,QAAQ,CAAAO,MAAQA,EAAK,cAAa,CAAA,GAC7DC,IAAiBJ,IACjB,MAAM,CAAC,EAAE,KAAK,EAAC,MAAM,IAAI,MAAM,IAAG,KAClCD,KAAA,gBAAAA,EAAoB,MAAM,QAAQ,OAAQI,EAAK,aAAY,CAAA,GAE3DE,IAAgBC,EAAwB,OAAO,GAC/CC,IAAkBC,EAA0B,OAAO,GACnD,CAACC,GAAqBC,CAAsB,IAAIC,EAAsB,oBAAI,KAAK,GAE/EC,IAAsBC,EAA8B,OAAO,GAC3DC,IAAwBC,EAAgC,OAAO,GAC/D,CAACC,GAAoBC,CAAqB,IAAIN,EAAsB,oBAAI,KAAK,GAE7E,CAACO,GAAeC,CAAgB,IAAIR,EAAwB,IAAI,GAChES,IAAWC,EAAA,GAEXC,IAAgB,CAACC,MAAqB;AACxC,IAAAb,EAAuB,CAACc,MAAS;AAC7B,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7D,CACH,EAAA,CAET;AAAA,IAAA,EAAA,CACJ,EAAA,CACJ;AAAA,EAAA,EAAA,CACJ,EAAA,CACJ;AAER;"}
|
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
import { u as G, a as ee, b as m, c as C, d as te, e as $, j as e, L as y, S as c, E as se, f as ne, P as ae, A as oe, g as le, r as ie, h as ce, F as j, R as re, i as R, k as de } from "./index-_vEj3NfZ.mjs";
|
|
2
|
+
import { u as xe, D as he, A as ue, S as U } from "./deleted-feed-item-Ct4Zc7u3.mjs";
|
|
3
|
+
import { H as me } from "./hash-B-J30lCU.mjs";
|
|
4
|
+
const p = () => /* @__PURE__ */ e.jsx("div", { className: "h-px w-full bg-gray-200 dark:bg-gray-950" }), pe = () => {
|
|
5
|
+
const { postId: z } = G(), { canGoBack: k } = ee(), [B, T] = m(/* @__PURE__ */ new Set()), [H, I] = m(/* @__PURE__ */ new Set()), [S, P] = m(/* @__PURE__ */ new Set()), [w, D] = m(!1), V = C(null), v = C(null), r = C(null), g = C(null), u = te(), {
|
|
6
|
+
threadParents: d,
|
|
7
|
+
post: n,
|
|
8
|
+
processedReplies: E,
|
|
9
|
+
isLoading: q,
|
|
10
|
+
loadMoreChildren: F,
|
|
11
|
+
loadMoreChildReplies: L,
|
|
12
|
+
hasMoreChildren: b,
|
|
13
|
+
hasMoreChildReplies: f
|
|
14
|
+
} = xe(decodeURIComponent(z ?? ""), { includeAncestors: !0 }), a = n == null ? void 0 : n.object, O = (a == null ? void 0 : a.replyCount) ?? 0, [M, W] = m(!1);
|
|
15
|
+
if ($(() => {
|
|
16
|
+
v.current && d.length > 0 && !M && (v.current.scrollIntoView({
|
|
17
|
+
behavior: "instant",
|
|
18
|
+
block: "start"
|
|
19
|
+
}), W(!0));
|
|
20
|
+
}, [d, M]), $(() => {
|
|
21
|
+
r.current && r.current.disconnect();
|
|
22
|
+
const t = document.querySelector("[data-scrollable-container]");
|
|
23
|
+
if (t)
|
|
24
|
+
return r.current = new IntersectionObserver(async (o) => {
|
|
25
|
+
if (o[0].isIntersecting && b && !w) {
|
|
26
|
+
D(!0);
|
|
27
|
+
try {
|
|
28
|
+
await F();
|
|
29
|
+
} catch (s) {
|
|
30
|
+
console.error("Failed to load more top-level replies:", s);
|
|
31
|
+
} finally {
|
|
32
|
+
D(!1);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}, {
|
|
36
|
+
root: t,
|
|
37
|
+
rootMargin: "200px"
|
|
38
|
+
}), g.current && r.current.observe(g.current), () => {
|
|
39
|
+
r.current && r.current.disconnect();
|
|
40
|
+
};
|
|
41
|
+
}, [b, w, F]), q)
|
|
42
|
+
return /* @__PURE__ */ e.jsx(y, { children: /* @__PURE__ */ e.jsxs("div", { className: "mx-auto flex max-w-[620px] flex-col items-center gap-3 pt-9 lg:px-8", children: [
|
|
43
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex w-full items-center gap-3", children: [
|
|
44
|
+
/* @__PURE__ */ e.jsx(c, { className: "size-10 rounded-full" }),
|
|
45
|
+
/* @__PURE__ */ e.jsxs("div", { className: "grow pt-1", children: [
|
|
46
|
+
/* @__PURE__ */ e.jsx(c, { className: "w-24" }),
|
|
47
|
+
/* @__PURE__ */ e.jsx(c, { className: "w-3/5" })
|
|
48
|
+
] })
|
|
49
|
+
] }),
|
|
50
|
+
/* @__PURE__ */ e.jsxs("div", { className: "mb-7 w-full", children: [
|
|
51
|
+
/* @__PURE__ */ e.jsx(c, {}),
|
|
52
|
+
/* @__PURE__ */ e.jsx(c, { className: "w-4/5" }),
|
|
53
|
+
/* @__PURE__ */ e.jsx(c, {})
|
|
54
|
+
] }),
|
|
55
|
+
/* @__PURE__ */ e.jsx(p, {}),
|
|
56
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex w-full items-center gap-3 py-3", children: [
|
|
57
|
+
/* @__PURE__ */ e.jsx(c, { className: "block size-full", containerClassName: "size-10 rounded-full overflow-hidden" }),
|
|
58
|
+
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
59
|
+
/* @__PURE__ */ e.jsx(c, { className: "w-52" }),
|
|
60
|
+
/* @__PURE__ */ e.jsx(c, { className: "w-28" })
|
|
61
|
+
] })
|
|
62
|
+
] }),
|
|
63
|
+
/* @__PURE__ */ e.jsx(p, {})
|
|
64
|
+
] }) });
|
|
65
|
+
if (!n)
|
|
66
|
+
return /* @__PURE__ */ e.jsx(y, { children: /* @__PURE__ */ e.jsx("div", { className: "mx-auto mt-4 flex w-full max-w-[620px] flex-col items-center", children: /* @__PURE__ */ e.jsxs(se, { children: [
|
|
67
|
+
/* @__PURE__ */ e.jsx(ne, { children: /* @__PURE__ */ e.jsx(me, {}) }),
|
|
68
|
+
/* @__PURE__ */ e.jsx("div", { children: "Error loading note." })
|
|
69
|
+
] }) }) });
|
|
70
|
+
function N() {
|
|
71
|
+
}
|
|
72
|
+
function J(t) {
|
|
73
|
+
T((o) => {
|
|
74
|
+
const s = new Set(o);
|
|
75
|
+
return s.has(t) ? s.delete(t) : (s.add(t), I((l) => {
|
|
76
|
+
const x = new Set(l);
|
|
77
|
+
return x.add(t), x;
|
|
78
|
+
})), s;
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
async function K(t, o) {
|
|
82
|
+
if (!S.has(t)) {
|
|
83
|
+
P((s) => new Set(s).add(t));
|
|
84
|
+
try {
|
|
85
|
+
L && await L(o);
|
|
86
|
+
} catch (s) {
|
|
87
|
+
console.error("Failed to load more replies for chain:", s);
|
|
88
|
+
} finally {
|
|
89
|
+
P((s) => {
|
|
90
|
+
const l = new Set(s);
|
|
91
|
+
return l.delete(t), l;
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
return /* @__PURE__ */ e.jsx(y, { children: /* @__PURE__ */ e.jsx("div", { className: "mx-auto flex h-full max-w-[620px] flex-col", children: /* @__PURE__ */ e.jsx("div", { className: "relative flex-1", children: /* @__PURE__ */ e.jsx("div", { className: "grow overflow-y-auto", children: /* @__PURE__ */ e.jsxs("div", { className: "mx-auto px-8 pb-10 pt-5 max-lg:px-0", children: [
|
|
97
|
+
!d.length && /* @__PURE__ */ e.jsx(ae, { actor: n.actor, isCurrentUser: n.object.authored, children: /* @__PURE__ */ e.jsxs("div", { className: `col-[2/3] mx-auto flex w-full cursor-pointer items-center gap-3 ${k ? "pt-10 max-md:pt-5" : "pt-5"}`, children: [
|
|
98
|
+
/* @__PURE__ */ e.jsx("div", { className: "relative z-10", children: /* @__PURE__ */ e.jsx(oe, { author: n.actor, showFollowButton: !n.object.authored && !n.actor.followedByMe }) }),
|
|
99
|
+
/* @__PURE__ */ e.jsxs("div", { className: "relative z-10 flex w-full min-w-0 cursor-pointer flex-col overflow-visible text-[1.5rem]", onClick: (t) => {
|
|
100
|
+
ce(n.actor, u, t);
|
|
101
|
+
}, children: [
|
|
102
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex w-full", children: /* @__PURE__ */ e.jsx("span", { className: "min-w-0 truncate whitespace-nowrap font-semibold hover:underline", children: n.actor.name }) }),
|
|
103
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex w-full", children: [
|
|
104
|
+
/* @__PURE__ */ e.jsx("span", { className: 'truncate text-gray-700 after:mx-1 after:font-normal after:text-gray-700 after:content-["·"]', children: le(n.actor) }),
|
|
105
|
+
/* @__PURE__ */ e.jsx("span", { className: "text-gray-700", children: ie(a, !a.authored) })
|
|
106
|
+
] })
|
|
107
|
+
] })
|
|
108
|
+
] }) }),
|
|
109
|
+
d.map((t) => t.object.type === "Tombstone" ? /* @__PURE__ */ e.jsx(he, { last: !1 }) : /* @__PURE__ */ e.jsx(
|
|
110
|
+
j,
|
|
111
|
+
{
|
|
112
|
+
actor: t.actor,
|
|
113
|
+
allowDelete: !1,
|
|
114
|
+
commentCount: t.object.replyCount ?? 0,
|
|
115
|
+
last: !1,
|
|
116
|
+
layout: "reply",
|
|
117
|
+
likeCount: t.object.likeCount ?? 0,
|
|
118
|
+
object: t.object,
|
|
119
|
+
repostCount: t.object.repostCount ?? 0,
|
|
120
|
+
type: "Note",
|
|
121
|
+
onClick: () => {
|
|
122
|
+
u(`/${t.object.type === "Article" ? "reader" : "notes"}/${encodeURIComponent(t.object.id)}`);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
)),
|
|
126
|
+
/* @__PURE__ */ e.jsx("div", { ref: v, className: `${k ? "scroll-mt-[12px]" : "scroll-mt-[124px]"}`, children: /* @__PURE__ */ e.jsxs("div", { className: `${d.length > 0 && "min-h-[calc(100vh-52px)]"}`, children: [
|
|
127
|
+
/* @__PURE__ */ e.jsx(
|
|
128
|
+
j,
|
|
129
|
+
{
|
|
130
|
+
actor: n.actor,
|
|
131
|
+
allowDelete: !1,
|
|
132
|
+
commentCount: O,
|
|
133
|
+
last: !0,
|
|
134
|
+
layout: "modal",
|
|
135
|
+
likeCount: a.likeCount ?? 0,
|
|
136
|
+
object: a,
|
|
137
|
+
repostCount: a.repostCount,
|
|
138
|
+
showHeader: d.length > 0,
|
|
139
|
+
showStats: !0,
|
|
140
|
+
type: "Note"
|
|
141
|
+
}
|
|
142
|
+
),
|
|
143
|
+
/* @__PURE__ */ e.jsx(
|
|
144
|
+
ue,
|
|
145
|
+
{
|
|
146
|
+
object: a
|
|
147
|
+
}
|
|
148
|
+
),
|
|
149
|
+
/* @__PURE__ */ e.jsx(p, {}),
|
|
150
|
+
/* @__PURE__ */ e.jsxs("div", { ref: V, children: [
|
|
151
|
+
E.map((t, o) => {
|
|
152
|
+
const s = o === E.length - 1, l = t.mainReply.id, x = B.has(l), Q = H.has(l), X = S.has(l), h = t.chain.length > 0;
|
|
153
|
+
return /* @__PURE__ */ e.jsxs(re.Fragment, { children: [
|
|
154
|
+
/* @__PURE__ */ e.jsx(
|
|
155
|
+
j,
|
|
156
|
+
{
|
|
157
|
+
actor: t.mainReply.actor,
|
|
158
|
+
allowDelete: t.mainReply.object.authored,
|
|
159
|
+
commentCount: t.mainReply.object.replyCount ?? 0,
|
|
160
|
+
isChainParent: h,
|
|
161
|
+
isPending: R(t.mainReply.id),
|
|
162
|
+
last: !h,
|
|
163
|
+
layout: "reply",
|
|
164
|
+
likeCount: t.mainReply.object.likeCount ?? 0,
|
|
165
|
+
object: t.mainReply.object,
|
|
166
|
+
parentId: a.id,
|
|
167
|
+
repostCount: t.mainReply.object.repostCount ?? 0,
|
|
168
|
+
type: "Note",
|
|
169
|
+
onClick: () => {
|
|
170
|
+
u(`/notes/${encodeURIComponent(t.mainReply.id)}`);
|
|
171
|
+
},
|
|
172
|
+
onDelete: N
|
|
173
|
+
}
|
|
174
|
+
),
|
|
175
|
+
h && t.chain[0] && /* @__PURE__ */ e.jsx(
|
|
176
|
+
j,
|
|
177
|
+
{
|
|
178
|
+
actor: t.chain[0].actor,
|
|
179
|
+
allowDelete: t.chain[0].object.authored,
|
|
180
|
+
commentCount: t.chain[0].object.replyCount ?? 0,
|
|
181
|
+
isChainContinuation: !0,
|
|
182
|
+
isPending: R(t.chain[0].id),
|
|
183
|
+
last: t.chain.length === 1,
|
|
184
|
+
layout: "reply",
|
|
185
|
+
likeCount: t.chain[0].object.likeCount ?? 0,
|
|
186
|
+
object: t.chain[0].object,
|
|
187
|
+
parentId: a.id,
|
|
188
|
+
repostCount: t.chain[0].object.repostCount ?? 0,
|
|
189
|
+
type: "Note",
|
|
190
|
+
onClick: () => {
|
|
191
|
+
u(`/notes/${encodeURIComponent(t.chain[0].id)}`);
|
|
192
|
+
},
|
|
193
|
+
onDelete: N
|
|
194
|
+
},
|
|
195
|
+
t.chain[0].id
|
|
196
|
+
),
|
|
197
|
+
h && x && t.chain.slice(1).map((i, Y) => {
|
|
198
|
+
const A = Y === t.chain.slice(1).length - 1, Z = f && f(o), _ = A && Z;
|
|
199
|
+
return /* @__PURE__ */ e.jsx(
|
|
200
|
+
j,
|
|
201
|
+
{
|
|
202
|
+
actor: i.actor,
|
|
203
|
+
allowDelete: i.object.authored,
|
|
204
|
+
commentCount: i.object.replyCount ?? 0,
|
|
205
|
+
isChainContinuation: !0,
|
|
206
|
+
isPending: R(i.id),
|
|
207
|
+
last: A && !_,
|
|
208
|
+
layout: "reply",
|
|
209
|
+
likeCount: i.object.likeCount ?? 0,
|
|
210
|
+
object: i.object,
|
|
211
|
+
parentId: a.id,
|
|
212
|
+
repostCount: i.object.repostCount ?? 0,
|
|
213
|
+
type: "Note",
|
|
214
|
+
onClick: () => {
|
|
215
|
+
u(`/notes/${encodeURIComponent(i.id)}`);
|
|
216
|
+
},
|
|
217
|
+
onDelete: N
|
|
218
|
+
},
|
|
219
|
+
i.id
|
|
220
|
+
);
|
|
221
|
+
}),
|
|
222
|
+
h && t.chain.length > 1 && !x && /* @__PURE__ */ e.jsx(
|
|
223
|
+
U,
|
|
224
|
+
{
|
|
225
|
+
variant: "expand",
|
|
226
|
+
onClick: () => J(l)
|
|
227
|
+
}
|
|
228
|
+
),
|
|
229
|
+
h && x && Q && f && f(o) && /* @__PURE__ */ e.jsx(
|
|
230
|
+
U,
|
|
231
|
+
{
|
|
232
|
+
loading: X,
|
|
233
|
+
variant: "loadMore",
|
|
234
|
+
onClick: () => K(l, o)
|
|
235
|
+
}
|
|
236
|
+
),
|
|
237
|
+
!s && /* @__PURE__ */ e.jsx(p, {})
|
|
238
|
+
] }, t.mainReply.id);
|
|
239
|
+
}),
|
|
240
|
+
w && /* @__PURE__ */ e.jsx("div", { className: "flex flex-col items-center justify-center text-center", children: /* @__PURE__ */ e.jsx(de, { size: "md" }) })
|
|
241
|
+
] }),
|
|
242
|
+
b && /* @__PURE__ */ e.jsx("div", { ref: g, className: "h-1" })
|
|
243
|
+
] }) })
|
|
244
|
+
] }) }) }) }) });
|
|
245
|
+
};
|
|
246
|
+
export {
|
|
247
|
+
pe as default
|
|
248
|
+
};
|
|
249
|
+
//# sourceMappingURL=note-CfQDRkeT.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"note-CfQDRkeT.mjs","sources":["../src/views/feed/note.tsx"],"sourcesContent":["import APAvatar from '@src/components/global/ap-avatar';\nimport APReplyBox from '@src/components/global/ap-reply-box';\nimport DeletedFeedItem from '@src/components/feed/deleted-feed-item';\nimport FeedItem from '@components/feed/feed-item';\nimport Layout from '@src/components/layout/layout';\nimport ProfilePreviewHoverCard from '@components/global/profile-preview-hover-card';\nimport React, {useEffect, useRef, useState} from 'react';\nimport ShowRepliesButton from '@src/components/global/show-replies-button';\nimport getUsername from '@src/utils/get-username';\nimport {Activity} from '@tryghost/admin-x-framework/api/activitypub';\nimport {EmptyViewIcon, EmptyViewIndicator} from '@src/components/global/empty-view-indicator';\nimport {LoadingIndicator, LucideIcon, Skeleton} from '@tryghost/shade';\nimport {handleProfileClick} from '@src/utils/handle-profile-click';\nimport {isPendingActivity} from '@src/utils/pending-activity';\nimport {renderTimestamp} from '@src/utils/render-timestamp';\nimport {useNavigateWithBasePath} from '@src/hooks/use-navigate-with-base-path';\nimport {useNavigationStack, useParams} from '@tryghost/admin-x-framework';\nimport {useReplyChainData} from '@hooks/use-reply-chain-data';\n\nconst FeedItemDivider: React.FC = () => (\n <div className=\"h-px w-full bg-gray-200 dark:bg-gray-950\"></div>\n);\n\nconst Note = () => {\n const {postId} = useParams();\n const {canGoBack} = useNavigationStack();\n\n const [expandedChains, setExpandedChains] = useState<Set<string>>(new Set());\n const [fullyExpandedChains, setFullyExpandedChains] = useState<Set<string>>(new Set());\n const [loadingChains, setLoadingChains] = useState<Set<string>>(new Set());\n const [isLoadingMoreTopLevelReplies, setIsLoadingMoreTopLevelReplies] = useState(false);\n const repliesRef = useRef<HTMLDivElement>(null);\n const postRef = useRef<HTMLDivElement>(null);\n const observerRef = useRef<IntersectionObserver | null>(null);\n const loadMoreRef = useRef<HTMLDivElement | null>(null);\n const navigate = useNavigateWithBasePath();\n\n const {\n threadParents,\n post: currentPost,\n processedReplies,\n isLoading,\n loadMoreChildren,\n loadMoreChildReplies,\n hasMoreChildren,\n hasMoreChildReplies\n } = useReplyChainData(decodeURIComponent(postId ?? ''), {includeAncestors: true});\n\n const object = currentPost?.object;\n\n const replyCount = object?.replyCount ?? 0;\n const [hasScrolledToPost, setHasScrolledToPost] = useState(false);\n\n useEffect(() => {\n if (postRef.current && threadParents.length > 0 && !hasScrolledToPost) {\n postRef.current.scrollIntoView({\n behavior: 'instant',\n block: 'start'\n });\n setHasScrolledToPost(true);\n }\n }, [threadParents, hasScrolledToPost]);\n\n useEffect(() => {\n if (observerRef.current) {\n observerRef.current.disconnect();\n }\n\n const container = document.querySelector('[data-scrollable-container]') as HTMLElement;\n if (!container) {\n return;\n }\n\n observerRef.current = new IntersectionObserver(async (entries) => {\n if (entries[0].isIntersecting && hasMoreChildren && !isLoadingMoreTopLevelReplies) {\n setIsLoadingMoreTopLevelReplies(true);\n try {\n await loadMoreChildren();\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error('Failed to load more top-level replies:', error);\n } finally {\n setIsLoadingMoreTopLevelReplies(false);\n }\n }\n }, {\n root: container,\n rootMargin: '200px'\n });\n\n if (loadMoreRef.current) {\n observerRef.current.observe(loadMoreRef.current);\n }\n\n return () => {\n if (observerRef.current) {\n observerRef.current.disconnect();\n }\n };\n }, [hasMoreChildren, isLoadingMoreTopLevelReplies, loadMoreChildren]);\n\n if (isLoading) {\n return (\n <Layout>\n <div className='mx-auto flex max-w-[620px] flex-col items-center gap-3 pt-9 lg:px-8'>\n <div className='flex w-full items-center gap-3'>\n <Skeleton className='size-10 rounded-full' />\n <div className='grow pt-1'>\n <Skeleton className='w-24' />\n <Skeleton className='w-3/5' />\n </div>\n </div>\n <div className='mb-7 w-full'>\n <Skeleton />\n <Skeleton className='w-4/5' />\n <Skeleton />\n </div>\n <FeedItemDivider />\n <div className='flex w-full items-center gap-3 py-3'>\n <Skeleton className='block size-full' containerClassName='size-10 rounded-full overflow-hidden' />\n <div>\n <Skeleton className='w-52' />\n <Skeleton className='w-28' />\n </div>\n </div>\n <FeedItemDivider />\n </div>\n </Layout>\n );\n }\n\n if (!currentPost) {\n return (\n <Layout>\n <div className='mx-auto mt-4 flex w-full max-w-[620px] flex-col items-center'>\n <EmptyViewIndicator>\n <EmptyViewIcon><LucideIcon.Hash /></EmptyViewIcon>\n <div>Error loading note.</div>\n </EmptyViewIndicator>\n </div>\n </Layout>\n );\n }\n\n function handleDelete() {\n // Reply count will be updated via cache invalidation\n }\n\n function toggleChain(chainId: string) {\n setExpandedChains((prev) => {\n const newSet = new Set(prev);\n if (newSet.has(chainId)) {\n newSet.delete(chainId);\n } else {\n newSet.add(chainId);\n setFullyExpandedChains((fullyExpanded) => {\n const newFullyExpanded = new Set(fullyExpanded);\n newFullyExpanded.add(chainId);\n return newFullyExpanded;\n });\n }\n return newSet;\n });\n }\n\n async function loadMoreForChain(chainId: string, childIndex: number) {\n if (loadingChains.has(chainId)) {\n return;\n }\n\n setLoadingChains(prev => new Set(prev).add(chainId));\n\n try {\n if (loadMoreChildReplies) {\n await loadMoreChildReplies(childIndex);\n }\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error('Failed to load more replies for chain:', error);\n } finally {\n setLoadingChains((prev) => {\n const newSet = new Set(prev);\n newSet.delete(chainId);\n return newSet;\n });\n }\n }\n\n return (\n <Layout>\n <div className='mx-auto flex h-full max-w-[620px] flex-col'>\n <div className='relative flex-1'>\n <div className='grow overflow-y-auto'>\n <div className={`mx-auto px-8 pb-10 pt-5 max-lg:px-0`}>\n {!threadParents.length &&\n <ProfilePreviewHoverCard actor={currentPost.actor} isCurrentUser={currentPost.object.authored}>\n <div className={`col-[2/3] mx-auto flex w-full cursor-pointer items-center gap-3 ${canGoBack ? 'pt-10 max-md:pt-5' : 'pt-5'}`}>\n <div className='relative z-10'>\n <APAvatar author={currentPost.actor} showFollowButton={!currentPost.object.authored && !currentPost.actor.followedByMe}/>\n </div>\n <div className='relative z-10 flex w-full min-w-0 cursor-pointer flex-col overflow-visible text-[1.5rem]' onClick={(e) => {\n handleProfileClick(currentPost.actor, navigate, e);\n }}>\n <div className='flex w-full'>\n <span className='min-w-0 truncate whitespace-nowrap font-semibold hover:underline'>{currentPost.actor.name}</span>\n </div>\n <div className='flex w-full'>\n <span className='truncate text-gray-700 after:mx-1 after:font-normal after:text-gray-700 after:content-[\"·\"]'>{getUsername(currentPost.actor)}</span>\n <span className='text-gray-700'>{renderTimestamp(object, !object.authored)}</span>\n </div>\n </div>\n </div>\n </ProfilePreviewHoverCard>\n }\n\n {threadParents.map((item) => {\n return (\n item.object.type === 'Tombstone' ? (\n <DeletedFeedItem last={false} />\n ) : (\n <FeedItem\n actor={item.actor}\n allowDelete={false}\n commentCount={item.object.replyCount ?? 0}\n last={false}\n layout='reply'\n likeCount={item.object.likeCount ?? 0}\n object={item.object}\n repostCount={item.object.repostCount ?? 0}\n type='Note'\n onClick={() => {\n navigate(`/${item.object.type === 'Article' ? 'reader' : 'notes'}/${encodeURIComponent(item.object.id)}`);\n }}\n />\n )\n );\n })}\n <div ref={postRef} className={`${canGoBack ? 'scroll-mt-[12px]' : 'scroll-mt-[124px]'}`}>\n <div className={`${threadParents.length > 0 && 'min-h-[calc(100vh-52px)]'}`}>\n <FeedItem\n actor={currentPost.actor}\n allowDelete={false}\n commentCount={replyCount}\n last={true}\n layout={'modal'}\n likeCount={object.likeCount ?? 0}\n object={object}\n repostCount={object.repostCount}\n showHeader={threadParents.length > 0}\n showStats={true}\n type='Note'\n />\n <APReplyBox\n object={object}\n />\n <FeedItemDivider />\n <div ref={repliesRef}>\n {\n processedReplies.map((replyGroup, groupIndex) => {\n const isLastGroup = groupIndex === processedReplies.length - 1;\n const chainId = replyGroup.mainReply.id;\n const isExpanded = expandedChains.has(chainId);\n const isFullyExpanded = fullyExpandedChains.has(chainId);\n const isChainLoading = loadingChains.has(chainId);\n const hasChain = replyGroup.chain.length > 0;\n\n return (\n <React.Fragment key={replyGroup.mainReply.id}>\n <FeedItem\n actor={replyGroup.mainReply.actor}\n allowDelete={replyGroup.mainReply.object.authored}\n commentCount={replyGroup.mainReply.object.replyCount ?? 0}\n isChainParent={hasChain}\n isPending={isPendingActivity(replyGroup.mainReply.id)}\n last={!hasChain}\n layout='reply'\n likeCount={replyGroup.mainReply.object.likeCount ?? 0}\n object={replyGroup.mainReply.object}\n parentId={object.id}\n repostCount={replyGroup.mainReply.object.repostCount ?? 0}\n type='Note'\n onClick={() => {\n navigate(`/notes/${encodeURIComponent(replyGroup.mainReply.id)}`);\n }}\n onDelete={handleDelete}\n />\n\n {hasChain && replyGroup.chain[0] && (\n <FeedItem\n key={replyGroup.chain[0].id}\n actor={replyGroup.chain[0].actor}\n allowDelete={replyGroup.chain[0].object.authored}\n commentCount={replyGroup.chain[0].object.replyCount ?? 0}\n isChainContinuation={true}\n isPending={isPendingActivity(replyGroup.chain[0].id)}\n last={replyGroup.chain.length === 1}\n layout='reply'\n likeCount={replyGroup.chain[0].object.likeCount ?? 0}\n object={replyGroup.chain[0].object}\n parentId={object.id}\n repostCount={replyGroup.chain[0].object.repostCount ?? 0}\n type='Note'\n onClick={() => {\n navigate(`/notes/${encodeURIComponent(replyGroup.chain[0].id)}`);\n }}\n onDelete={handleDelete}\n />\n )}\n\n {hasChain && isExpanded && replyGroup.chain.slice(1).map((chainItem: Activity, chainIndex: number) => {\n const isLastChainItem = chainIndex === replyGroup.chain.slice(1).length - 1;\n const hasMoreReplies = hasMoreChildReplies && hasMoreChildReplies(groupIndex);\n const shouldShowConnector = isLastChainItem && hasMoreReplies;\n\n return (\n <FeedItem\n key={chainItem.id}\n actor={chainItem.actor}\n allowDelete={chainItem.object.authored}\n commentCount={chainItem.object.replyCount ?? 0}\n isChainContinuation={true}\n isPending={isPendingActivity(chainItem.id)}\n last={isLastChainItem && !shouldShowConnector}\n layout='reply'\n likeCount={chainItem.object.likeCount ?? 0}\n object={chainItem.object}\n parentId={object.id}\n repostCount={chainItem.object.repostCount ?? 0}\n type='Note'\n onClick={() => {\n navigate(`/notes/${encodeURIComponent(chainItem.id)}`);\n }}\n onDelete={handleDelete}\n />\n );\n })}\n\n {hasChain && replyGroup.chain.length > 1 && !isExpanded && (\n <ShowRepliesButton\n variant='expand'\n onClick={() => toggleChain(chainId)}\n />\n )}\n\n {hasChain && isExpanded && isFullyExpanded && hasMoreChildReplies && hasMoreChildReplies(groupIndex) && (\n <ShowRepliesButton\n loading={isChainLoading}\n variant='loadMore'\n onClick={() => loadMoreForChain(chainId, groupIndex)}\n />\n )}\n\n {!isLastGroup && <FeedItemDivider />}\n </React.Fragment>\n );\n })\n }\n\n {isLoadingMoreTopLevelReplies && (\n <div className='flex flex-col items-center justify-center text-center'>\n <LoadingIndicator size='md' />\n </div>\n )}\n </div>\n\n {hasMoreChildren && <div ref={loadMoreRef} className='h-1'></div>}\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </Layout>\n );\n};\n\nexport default Note;\n"],"names":["FeedItemDivider","jsx","Note","postId","useParams","canGoBack","useNavigationStack","expandedChains","setExpandedChains","useState","fullyExpandedChains","setFullyExpandedChains","loadingChains","setLoadingChains","isLoadingMoreTopLevelReplies","setIsLoadingMoreTopLevelReplies","repliesRef","useRef","postRef","observerRef","loadMoreRef","navigate","useNavigateWithBasePath","threadParents","currentPost","processedReplies","isLoading","loadMoreChildren","loadMoreChildReplies","hasMoreChildren","hasMoreChildReplies","useReplyChainData","object","replyCount","hasScrolledToPost","setHasScrolledToPost","useEffect","container","entries","error","Layout","jsxs","Skeleton","EmptyViewIndicator","EmptyViewIcon","LucideIcon.Hash","handleDelete","toggleChain","chainId","prev","newSet","fullyExpanded","newFullyExpanded","loadMoreForChain","childIndex","ProfilePreviewHoverCard","APAvatar","e","handleProfileClick","getUsername","item","DeletedFeedItem","FeedItem","APReplyBox","replyGroup","groupIndex","isLastGroup","isExpanded","isFullyExpanded","isChainLoading","hasChain","React","isPendingActivity","chainItem","chainIndex","isLastChainItem","hasMoreReplies","shouldShowConnector","ShowRepliesButton","LoadingIndicator"],"mappings":";;;AAmBA,MAAMA,IAA4B,MAC9BC,gBAAAA,EAAAA,IAAC,OAAA,EAAI,WAAU,2CAAA,C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AA,CACJ,EAAA,CACJ;AAER;"}
|
|
@@ -0,0 +1,15 @@
|
|
|
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 c = [
|
|
9
|
+
["path", { d: "M20 18v-2a4 4 0 0 0-4-4H4", key: "5vmcpk" }],
|
|
10
|
+
["path", { d: "m9 17-5-5 5-5", key: "nvlc11" }]
|
|
11
|
+
], a = e("reply", c);
|
|
12
|
+
export {
|
|
13
|
+
a as R
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=reply-BrWarBVQ.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reply-BrWarBVQ.mjs","sources":["../../../node_modules/lucide-react/dist/esm/icons/reply.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 [\"path\", { d: \"M20 18v-2a4 4 0 0 0-4-4H4\", key: \"5vmcpk\" }],\n [\"path\", { d: \"m9 17-5-5 5-5\", key: \"nvlc11\" }]\n];\nconst Reply = createLucideIcon(\"reply\", __iconNode);\n\nexport { __iconNode, Reply as default };\n//# sourceMappingURL=reply.js.map\n"],"names":["__iconNode","Reply","createLucideIcon"],"mappings":";AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,IAAa;AAAA,EACjB,CAAC,QAAQ,EAAE,GAAG,6BAA6B,KAAK,SAAQ,CAAE;AAAA,EAC1D,CAAC,QAAQ,EAAE,GAAG,iBAAiB,KAAK,SAAQ,CAAE;AAChD,GACMC,IAAQC,EAAiB,SAASF,CAAU;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { ad as s, j as l, ae as v, s as m } from "./index-_vEj3NfZ.mjs";
|
|
2
|
+
var N = "Separator", n = "horizontal", u = ["horizontal", "vertical"], p = s((a, r) => {
|
|
3
|
+
const { decorative: t, orientation: o = n, ...i } = a, e = f(o) ? o : n, d = t ? { role: "none" } : { "aria-orientation": e === "vertical" ? e : void 0, role: "separator" };
|
|
4
|
+
return /* @__PURE__ */ l.jsx(
|
|
5
|
+
v.div,
|
|
6
|
+
{
|
|
7
|
+
"data-orientation": e,
|
|
8
|
+
...d,
|
|
9
|
+
...i,
|
|
10
|
+
ref: r
|
|
11
|
+
}
|
|
12
|
+
);
|
|
13
|
+
});
|
|
14
|
+
p.displayName = N;
|
|
15
|
+
function f(a) {
|
|
16
|
+
return u.includes(a);
|
|
17
|
+
}
|
|
18
|
+
var c = p;
|
|
19
|
+
const h = s(
|
|
20
|
+
({ className: a, orientation: r = "horizontal", decorative: t = !0, ...o }, i) => /* @__PURE__ */ l.jsx(
|
|
21
|
+
c,
|
|
22
|
+
{
|
|
23
|
+
ref: i,
|
|
24
|
+
className: m(
|
|
25
|
+
"shrink-0 bg-border",
|
|
26
|
+
r === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
|
|
27
|
+
a
|
|
28
|
+
),
|
|
29
|
+
decorative: t,
|
|
30
|
+
orientation: r,
|
|
31
|
+
...o
|
|
32
|
+
}
|
|
33
|
+
)
|
|
34
|
+
);
|
|
35
|
+
h.displayName = c.displayName;
|
|
36
|
+
export {
|
|
37
|
+
h as S
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=separator-nDV4oVPB.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"separator-nDV4oVPB.mjs","sources":["../../../node_modules/@radix-ui/react-separator/dist/index.mjs","../../shade/es/components/ui/separator.js"],"sourcesContent":["// src/separator.tsx\nimport * as React from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NAME = \"Separator\";\nvar DEFAULT_ORIENTATION = \"horizontal\";\nvar ORIENTATIONS = [\"horizontal\", \"vertical\"];\nvar Separator = React.forwardRef((props, forwardedRef) => {\n const { decorative, orientation: orientationProp = DEFAULT_ORIENTATION, ...domProps } = props;\n const orientation = isValidOrientation(orientationProp) ? orientationProp : DEFAULT_ORIENTATION;\n const ariaOrientation = orientation === \"vertical\" ? orientation : void 0;\n const semanticProps = decorative ? { role: \"none\" } : { \"aria-orientation\": ariaOrientation, role: \"separator\" };\n return /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-orientation\": orientation,\n ...semanticProps,\n ...domProps,\n ref: forwardedRef\n }\n );\n});\nSeparator.displayName = NAME;\nfunction isValidOrientation(orientation) {\n return ORIENTATIONS.includes(orientation);\n}\nvar Root = Separator;\nexport {\n Root,\n Separator\n};\n//# sourceMappingURL=index.mjs.map\n","import { jsx } from \"react/jsx-runtime\";\nimport * as React from \"react\";\nimport * as SeparatorPrimitive from \"@radix-ui/react-separator\";\nimport { cn } from \"../../lib/utils.js\";\nconst Separator = React.forwardRef(\n ({ className, orientation = \"horizontal\", decorative = true, ...props }, ref) => /* @__PURE__ */ jsx(\n SeparatorPrimitive.Root,\n {\n ref,\n className: cn(\n \"shrink-0 bg-border\",\n orientation === \"horizontal\" ? \"h-[1px] w-full\" : \"h-full w-[1px]\",\n className\n ),\n decorative,\n orientation,\n ...props\n }\n )\n);\nSeparator.displayName = SeparatorPrimitive.Root.displayName;\nexport {\n Separator\n};\n//# sourceMappingURL=separator.js.map\n"],"names":["NAME","DEFAULT_ORIENTATION","ORIENTATIONS","Separator","React.forwardRef","props","forwardedRef","decorative","orientationProp","domProps","orientation","isValidOrientation","semanticProps","jsx","Primitive","Root","className","ref","SeparatorPrimitive.Root","cn"],"mappings":";AAIA,IAAIA,IAAO,aACPC,IAAsB,cACtBC,IAAe,CAAC,cAAc,UAAU,GACxCC,IAAYC,EAAiB,CAACC,GAAOC,MAAiB;AACxD,QAAM,EAAE,YAAAC,GAAY,aAAaC,IAAkBP,GAAqB,GAAGQ,EAAQ,IAAKJ,GAClFK,IAAcC,EAAmBH,CAAe,IAAIA,IAAkBP,GAEtEW,IAAgBL,IAAa,EAAE,MAAM,WAAW,EAAE,oBADhCG,MAAgB,aAAaA,IAAc,QAC0B,MAAM,YAAW;AAC9G,SAAuBG,gBAAAA,EAAAA;AAAAA,IACrBC,EAAU;AAAA,IACV;AAAA,MACE,oBAAoBJ;AAAA,MACpB,GAAGE;AAAA,MACH,GAAGH;AAAA,MACH,KAAKH;AAAA,IACX;AAAA,EACA;AACA,CAAC;AACDH,EAAU,cAAcH;AACxB,SAASW,EAAmBD,GAAa;AACvC,SAAOR,EAAa,SAASQ,CAAW;AAC1C;AACA,IAAIK,IAAOZ;ACtBN,MAACA,IAAYC;AAAAA,EAChB,CAAC,EAAE,WAAAY,GAAW,aAAAN,IAAc,cAAc,YAAAH,IAAa,IAAM,GAAGF,KAASY,MAAwBJ,gBAAAA,EAAAA;AAAAA,IAC/FK;AAAAA,IACA;AAAA,MACE,KAAAD;AAAA,MACA,WAAWE;AAAA,QACT;AAAA,QACAT,MAAgB,eAAe,mBAAmB;AAAA,QAClDM;AAAA,MACR;AAAA,MACM,YAAAT;AAAA,MACA,aAAAG;AAAA,MACA,GAAGL;AAAA,IACT;AAAA,EACA;AACA;AACAF,EAAU,cAAce,EAAwB;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { b as f, d as p, j as e, H as b, D as m, m as u, B as v, n as y, o as N, p as k, C as j, q as S, s as C, t as E } from "./index-_vEj3NfZ.mjs";
|
|
2
|
+
import { E as D } from "./edit-profile-DVsYbpNY.mjs";
|
|
3
|
+
const z = ({ account: s, className: r = "" }) => {
|
|
4
|
+
const [h, t] = f(!1), a = p();
|
|
5
|
+
return /* @__PURE__ */ e.jsxs("div", { className: `flex flex-col ${r}`, children: [
|
|
6
|
+
/* @__PURE__ */ e.jsx(g, {}),
|
|
7
|
+
/* @__PURE__ */ e.jsxs(d, { children: [
|
|
8
|
+
/* @__PURE__ */ e.jsxs(c, { children: [
|
|
9
|
+
/* @__PURE__ */ e.jsx(o, { children: "Account" }),
|
|
10
|
+
/* @__PURE__ */ e.jsx(l, { children: "Edit your profile information and account details" })
|
|
11
|
+
] }),
|
|
12
|
+
/* @__PURE__ */ e.jsxs(m, { open: h, onOpenChange: t, children: [
|
|
13
|
+
/* @__PURE__ */ e.jsx(u, { children: /* @__PURE__ */ e.jsx(x, { children: /* @__PURE__ */ e.jsx(v, { variant: "secondary", children: "Edit profile" }) }) }),
|
|
14
|
+
/* @__PURE__ */ e.jsxs(y, { onOpenAutoFocus: (i) => i.preventDefault(), children: [
|
|
15
|
+
/* @__PURE__ */ e.jsx(N, { children: /* @__PURE__ */ e.jsx(k, { children: "Profile settings" }) }),
|
|
16
|
+
s && /* @__PURE__ */ e.jsx(D, { account: s, setIsEditingProfile: t })
|
|
17
|
+
] })
|
|
18
|
+
] })
|
|
19
|
+
] }),
|
|
20
|
+
/* @__PURE__ */ e.jsxs(d, { withHover: !0, onClick: () => a("/preferences/moderation"), children: [
|
|
21
|
+
/* @__PURE__ */ e.jsxs(c, { children: [
|
|
22
|
+
/* @__PURE__ */ e.jsx(o, { children: "Moderation" }),
|
|
23
|
+
/* @__PURE__ */ e.jsx(l, { children: "Manage blocked users and domains" })
|
|
24
|
+
] }),
|
|
25
|
+
/* @__PURE__ */ e.jsx(x, { className: "flex items-center gap-2", children: /* @__PURE__ */ e.jsx(j, { size: 20 }) })
|
|
26
|
+
] }),
|
|
27
|
+
/* @__PURE__ */ e.jsxs(d, { withHover: !0, onClick: () => a("/preferences/bluesky-sharing"), children: [
|
|
28
|
+
/* @__PURE__ */ e.jsxs(c, { children: [
|
|
29
|
+
/* @__PURE__ */ e.jsx(o, { children: "Bluesky sharing" }),
|
|
30
|
+
/* @__PURE__ */ e.jsx(l, { children: "Share content directly on Bluesky" })
|
|
31
|
+
] }),
|
|
32
|
+
/* @__PURE__ */ e.jsxs(x, { className: "flex items-center gap-2", children: [
|
|
33
|
+
s != null && s.blueskyEnabled ? /* @__PURE__ */ e.jsx("span", { className: "font-medium text-black", children: "On" }) : /* @__PURE__ */ e.jsx("span", { children: "Off" }),
|
|
34
|
+
/* @__PURE__ */ e.jsx(j, { size: 20 })
|
|
35
|
+
] })
|
|
36
|
+
] }),
|
|
37
|
+
/* @__PURE__ */ e.jsx(g, {}),
|
|
38
|
+
/* @__PURE__ */ e.jsxs(d, { href: "https://ghost.org/help/social-web/", withHover: !0, children: [
|
|
39
|
+
/* @__PURE__ */ e.jsxs(c, { children: [
|
|
40
|
+
/* @__PURE__ */ e.jsx(o, { children: "Help" }),
|
|
41
|
+
/* @__PURE__ */ e.jsx(l, { children: "Social web guides and support resources" })
|
|
42
|
+
] }),
|
|
43
|
+
/* @__PURE__ */ e.jsx(x, { children: /* @__PURE__ */ e.jsx(S, { size: 18 }) })
|
|
44
|
+
] })
|
|
45
|
+
] });
|
|
46
|
+
}, o = b, l = ({ children: s, className: r = "" }) => /* @__PURE__ */ e.jsx("span", { className: `text-sm text-gray-700 ${r}`, children: s }), c = ({ children: s, className: r = "" }) => /* @__PURE__ */ e.jsx("div", { className: `relative flex flex-col gap-0.5 ${r}`, children: s }), x = ({ children: s, className: r = "" }) => /* @__PURE__ */ e.jsx("div", { className: `relative text-gray-500 ${r}`, children: s }), d = ({ children: s, className: r = "", withHover: h = !1, to: t, href: a, onClick: i }) => {
|
|
47
|
+
const n = C("flex items-center justify-between py-3 gap-4", h ? "relative cursor-pointer before:absolute before:inset-x-[-16px] before:inset-y-[-1px] before:rounded-md before:bg-gray-50 before:opacity-0 before:transition-opacity before:will-change-[opacity] hover:z-10 hover:cursor-pointer hover:border-b-transparent hover:before:opacity-100 dark:before:bg-gray-950" : "", r);
|
|
48
|
+
return t ? /* @__PURE__ */ e.jsx(
|
|
49
|
+
E,
|
|
50
|
+
{
|
|
51
|
+
className: n,
|
|
52
|
+
to: t,
|
|
53
|
+
children: s
|
|
54
|
+
}
|
|
55
|
+
) : a ? /* @__PURE__ */ e.jsx(
|
|
56
|
+
"a",
|
|
57
|
+
{
|
|
58
|
+
className: n,
|
|
59
|
+
href: a,
|
|
60
|
+
rel: "noreferrer",
|
|
61
|
+
target: "_blank",
|
|
62
|
+
children: s
|
|
63
|
+
}
|
|
64
|
+
) : i ? /* @__PURE__ */ e.jsx(
|
|
65
|
+
"div",
|
|
66
|
+
{
|
|
67
|
+
className: n,
|
|
68
|
+
role: "button",
|
|
69
|
+
tabIndex: 0,
|
|
70
|
+
onClick: i,
|
|
71
|
+
children: s
|
|
72
|
+
}
|
|
73
|
+
) : /* @__PURE__ */ e.jsx("div", { className: n, children: s });
|
|
74
|
+
}, g = () => /* @__PURE__ */ e.jsx("hr", { className: "my-3 h-px border-0 bg-gray-200 dark:bg-gray-950" });
|
|
75
|
+
export {
|
|
76
|
+
x as S,
|
|
77
|
+
z as a
|
|
78
|
+
};
|
|
79
|
+
//# sourceMappingURL=settings-CCnMmVaW.mjs.map
|