@select-org/post-components 2.0.0 → 2.1.1

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/index.d.ts CHANGED
@@ -47,8 +47,17 @@ interface PostCardProps {
47
47
  priority?: boolean;
48
48
  className?: string;
49
49
  }>;
50
+ /** Author's role in the group — drives the owner crown / admin shield badge. */
50
51
  isAdmin?: boolean;
52
+ /** Author's role in the group — drives the owner crown / admin shield badge. */
51
53
  isOwner?: boolean;
54
+ /**
55
+ * Whether the *viewer* is the post's author. Lets the author preview their own
56
+ * poll results before voting. Distinct from `isOwner` (which is the author's
57
+ * group role, for the badge) — pass it explicitly. When omitted, the author
58
+ * preview is simply off (the author sees results after voting, like anyone).
59
+ */
60
+ isPostOwner?: boolean;
52
61
  isPostPreview?: boolean;
53
62
  isPrivate?: boolean;
54
63
  membersCount?: number;
@@ -75,7 +84,7 @@ interface PostCardProps {
75
84
  onSend: (emoji: string) => void;
76
85
  }) => React.ReactNode;
77
86
  onNavigate?: (href: string, isInternal: boolean) => void;
78
- supportDeepviewDomain?: string;
87
+ supportDeepviewDomain?: string | string[];
79
88
  labels?: {
80
89
  cancelPost?: string;
81
90
  sending?: string;
@@ -122,6 +131,7 @@ interface PostHeaderProps {
122
131
  }) => string;
123
132
  isFeatured?: boolean;
124
133
  isPostPreview?: boolean;
134
+ isPostDetail?: boolean;
125
135
  isAdmin?: boolean;
126
136
  isOwner?: boolean;
127
137
  onErasePress?: () => void;
@@ -155,7 +165,12 @@ interface Props$a {
155
165
  hideEmailDescription?: boolean;
156
166
  isEmailPost?: boolean;
157
167
  onNavigate?: (href: string, isInternal: boolean) => void;
158
- supportDeepviewDomain?: string;
168
+ linkComponent?: React.ComponentType<{
169
+ href: string;
170
+ children: React.ReactNode;
171
+ className?: string;
172
+ }>;
173
+ supportDeepviewDomain?: string | string[];
159
174
  }
160
175
  declare const PostBody: React.FC<Props$a>;
161
176
 
@@ -168,6 +183,17 @@ interface PostFooterProps {
168
183
  footerLinkHref?: string;
169
184
  isSnoozed?: boolean;
170
185
  onSnoozeToggle?: () => void;
186
+ /**
187
+ * Custom link renderer (e.g. Next.js `<Link>`) for the comment and footer
188
+ * links. Falls back to a native `<a>`. Passing this is important inside SPAs:
189
+ * a native `<a>` triggers a full-page reload, whereas the consumer's router
190
+ * link performs a soft client-side navigation.
191
+ */
192
+ linkComponent?: React.ComponentType<{
193
+ href: string;
194
+ children: React.ReactNode;
195
+ className?: string;
196
+ }>;
171
197
  renderReactionTrigger?: (props: {
172
198
  onOpen: () => void;
173
199
  }) => React.ReactNode;
@@ -193,6 +219,13 @@ interface Props$9 {
193
219
  className?: string;
194
220
  }>;
195
221
  mediaItemStatuses?: Record<string, MediaUploadStatus>;
222
+ onNavigate?: (href: string, isInternal: boolean) => void;
223
+ linkComponent?: React.ComponentType<{
224
+ href: string;
225
+ children: React.ReactNode;
226
+ className?: string;
227
+ }>;
228
+ supportDeepviewDomain?: string | string[];
196
229
  }
197
230
  declare const PostItemsView: React.FC<Props$9>;
198
231
 
@@ -220,6 +253,13 @@ interface Props$6 {
220
253
  textItems: TextItemContent['items'];
221
254
  showFullText: boolean;
222
255
  isPostDetail: boolean;
256
+ onNavigate?: (href: string, isInternal: boolean) => void;
257
+ linkComponent?: React.ComponentType<{
258
+ href: string;
259
+ children: React.ReactNode;
260
+ className?: string;
261
+ }>;
262
+ supportDeepviewDomain?: string | string[];
223
263
  }
224
264
  declare const PostTextItem: React.FC<Props$6>;
225
265
 
@@ -227,6 +267,22 @@ interface Props$5 {
227
267
  sections: SectionItem$1[];
228
268
  isPostDetail: boolean;
229
269
  onCardPress: () => void;
270
+ onNavigate?: (href: string, isInternal: boolean) => void;
271
+ linkComponent?: React.ComponentType<{
272
+ href: string;
273
+ children: React.ReactNode;
274
+ className?: string;
275
+ }>;
276
+ supportDeepviewDomain?: string | string[];
277
+ imageComponent?: React.ComponentType<{
278
+ src: string;
279
+ alt: string;
280
+ fill?: boolean;
281
+ placeholder?: 'blur' | 'empty';
282
+ blurDataURL?: string;
283
+ priority?: boolean;
284
+ className?: string;
285
+ }>;
230
286
  }
231
287
  declare const PostSectionsView: React.FC<Props$5>;
232
288
 
@@ -236,6 +292,15 @@ interface Props$4 {
236
292
  username: string;
237
293
  url: string;
238
294
  };
295
+ imageComponent?: React.ComponentType<{
296
+ src: string;
297
+ alt: string;
298
+ fill?: boolean;
299
+ placeholder?: 'blur' | 'empty';
300
+ blurDataURL?: string;
301
+ priority?: boolean;
302
+ className?: string;
303
+ }>;
239
304
  }
240
305
  declare const PostSectionSourceInfoView: React.FC<Props$4>;
241
306
 
@@ -255,7 +320,7 @@ interface PostLinkItemProps {
255
320
  }>;
256
321
  onCloseClick?: () => void;
257
322
  type?: 'preview' | 'display';
258
- supportDeepviewDomain?: string;
323
+ supportDeepviewDomain?: string | string[];
259
324
  }
260
325
  declare const PostLinkItem: React.FC<PostLinkItemProps>;
261
326
 
@@ -306,7 +371,12 @@ interface AutoLinkProps {
306
371
  text: string;
307
372
  mentionData?: MentionData[];
308
373
  onNavigate?: (href: string, isInternal: boolean) => void;
309
- supportDeepviewDomain?: string;
374
+ linkComponent?: React.ComponentType<{
375
+ href: string;
376
+ children: React.ReactNode;
377
+ className?: string;
378
+ }>;
379
+ supportDeepviewDomain?: string | string[];
310
380
  phone?: any;
311
381
  email?: any;
312
382
  stripPrefix?: boolean;
@@ -315,7 +385,7 @@ interface AutoLinkProps {
315
385
  className?: string;
316
386
  }
317
387
  declare const AutoLink: {
318
- ({ text: textProp, mentionData, onNavigate, supportDeepviewDomain, phone, email, stripPrefix, style, mentionClassName: mentionClassNameProp, className, }: AutoLinkProps): React.JSX.Element | null;
388
+ ({ text: textProp, mentionData, onNavigate, linkComponent, supportDeepviewDomain, phone, email, stripPrefix, style, mentionClassName: mentionClassNameProp, className, }: AutoLinkProps): React.JSX.Element | null;
319
389
  truncate: (text: string, { truncate: len, truncateChars, truncateLocation }?: TruncateOptions) => string;
320
390
  };
321
391
 
package/dist/index.js CHANGED
@@ -241,6 +241,7 @@ var PostHeader = ({
241
241
  translate,
242
242
  isFeatured = false,
243
243
  isPostPreview = false,
244
+ isPostDetail = false,
244
245
  isAdmin = false,
245
246
  isOwner = false,
246
247
  onErasePress,
@@ -283,7 +284,7 @@ var PostHeader = ({
283
284
  LinkComponent,
284
285
  {
285
286
  href: groupHref,
286
- className: "text-action-primary font-medium hover:underline cursor-pointer bg-transparent border-none p-0",
287
+ className: "text-action-primary font-medium no-underline hover:underline cursor-pointer bg-transparent border-none p-0",
287
288
  children: [
288
289
  "#",
289
290
  group.name
@@ -294,7 +295,7 @@ var PostHeader = ({
294
295
  {
295
296
  href: groupHref,
296
297
  onClick: (e) => e.stopPropagation(),
297
- className: "text-action-primary font-medium hover:underline cursor-pointer bg-transparent border-none p-0",
298
+ className: "text-action-primary font-medium no-underline hover:underline cursor-pointer bg-transparent border-none p-0",
298
299
  title: group.name,
299
300
  "aria-label": `View group ${group.name}`,
300
301
  children: [
@@ -328,7 +329,7 @@ var PostHeader = ({
328
329
  ),
329
330
  /* @__PURE__ */ jsxs("section", { className: "flex flex-1 flex-col justify-center min-w-0", children: [
330
331
  /* @__PURE__ */ jsx2("section", { className: "flex items-baseline justify-between gap-2", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5 min-w-0", children: [
331
- /* @__PURE__ */ jsx2("div", { className: "font-semibold text-foreground truncate", children: authorNameNode }),
332
+ isPostDetail ? /* @__PURE__ */ jsx2("h2", { className: "font-semibold text-foreground truncate", children: authorNameNode }) : /* @__PURE__ */ jsx2("div", { className: "font-semibold text-foreground truncate", children: authorNameNode }),
332
333
  isFeatured && /* @__PURE__ */ jsx2(
333
334
  "svg",
334
335
  {
@@ -479,7 +480,8 @@ var checkMentionDataIndex = (mentionData = [], copyMentionData = [], body = "")
479
480
  };
480
481
  var isLinkInternal = (url, supportDeepviewDomain) => {
481
482
  if (!url) return false;
482
- return supportDeepviewDomain.length > 0 && url.includes(supportDeepviewDomain);
483
+ const domains = Array.isArray(supportDeepviewDomain) ? supportDeepviewDomain : supportDeepviewDomain ? [supportDeepviewDomain] : [];
484
+ return domains.some((d) => d.length > 0 && url.includes(d));
483
485
  };
484
486
  var getUrl = (match, phone) => {
485
487
  const type = match.getType();
@@ -523,6 +525,7 @@ var AutoLink = ({
523
525
  text: textProp,
524
526
  mentionData = [],
525
527
  onNavigate,
528
+ linkComponent,
526
529
  supportDeepviewDomain = "",
527
530
  phone = true,
528
531
  email = true,
@@ -572,7 +575,7 @@ var AutoLink = ({
572
575
  const renderLink = useCallback(
573
576
  (text, match, index) => {
574
577
  const [url] = getUrl(match, phone);
575
- if (supportDeepviewDomain && url.includes(supportDeepviewDomain)) {
578
+ if (isLinkInternal(url, supportDeepviewDomain)) {
576
579
  const internal = true;
577
580
  return /* @__PURE__ */ jsx3(
578
581
  "a",
@@ -596,10 +599,25 @@ var AutoLink = ({
596
599
  const renderMentionData = useCallback(
597
600
  (fmData, key) => {
598
601
  const href = fmData.type === MENTION_TYPE.HASHTAG ? `/groups/${fmData.data.selectId}` : `/users/${fmData.data.selectId || fmData.data.id}`;
602
+ const className2 = `no-underline hover:underline context-menu-ios-disable cursor-pointer ${mentionClassName}`;
603
+ if (linkComponent) {
604
+ const LinkComponent = linkComponent;
605
+ return /* @__PURE__ */ jsx3(
606
+ "span",
607
+ {
608
+ onClick: (e) => {
609
+ e.stopPropagation();
610
+ e.nativeEvent.stopImmediatePropagation();
611
+ },
612
+ children: /* @__PURE__ */ jsx3(LinkComponent, { href, className: className2, children: fmData.name })
613
+ },
614
+ key + fmData.index
615
+ );
616
+ }
599
617
  return /* @__PURE__ */ jsx3(
600
618
  "a",
601
619
  {
602
- className: `context-menu-ios-disable cursor-pointer ${mentionClassName}`,
620
+ className: className2,
603
621
  href,
604
622
  onClick: (e) => {
605
623
  e.stopPropagation();
@@ -611,7 +629,7 @@ var AutoLink = ({
611
629
  key + fmData.index
612
630
  );
613
631
  },
614
- [mentionClassName, handleNavigate]
632
+ [mentionClassName, handleNavigate, linkComponent]
615
633
  );
616
634
  const renderTextNodes = useCallback(() => {
617
635
  let text = textProp;
@@ -1009,6 +1027,7 @@ var PostBody = ({
1009
1027
  hideEmailDescription = false,
1010
1028
  isEmailPost = false,
1011
1029
  onNavigate,
1030
+ linkComponent,
1012
1031
  supportDeepviewDomain
1013
1032
  }) => {
1014
1033
  const { plain, html, truncatedPlain, mentionData } = textContent;
@@ -1069,6 +1088,7 @@ var PostBody = ({
1069
1088
  text: displayText,
1070
1089
  mentionData,
1071
1090
  onNavigate,
1091
+ linkComponent,
1072
1092
  supportDeepviewDomain,
1073
1093
  className: "whitespace-normal px-4 pb-4 leading-relaxed text-gray-800",
1074
1094
  style: {
@@ -1102,6 +1122,7 @@ var PostBody = ({
1102
1122
  text: displayText,
1103
1123
  mentionData,
1104
1124
  onNavigate,
1125
+ linkComponent,
1105
1126
  supportDeepviewDomain,
1106
1127
  className: "whitespace-normal leading-relaxed text-gray-600 line-clamp-3",
1107
1128
  style: { whiteSpace: "pre-wrap", wordBreak: "break-word" }
@@ -1442,7 +1463,7 @@ var MediaView = ({
1442
1463
  return /* @__PURE__ */ jsx8(
1443
1464
  "div",
1444
1465
  {
1445
- onClick: handleLightbox,
1466
+ onClick: onCardPress,
1446
1467
  className: textViewClass,
1447
1468
  style: {
1448
1469
  backgroundColor: item.option_color
@@ -1828,7 +1849,13 @@ var PostPollView_default = PostPollView;
1828
1849
 
1829
1850
  // src/components/PostTextItem.tsx
1830
1851
  import { jsx as jsx14 } from "react/jsx-runtime";
1831
- var PostTextItem = ({ textItems, showFullText }) => {
1852
+ var PostTextItem = ({
1853
+ textItems,
1854
+ showFullText,
1855
+ onNavigate,
1856
+ linkComponent,
1857
+ supportDeepviewDomain
1858
+ }) => {
1832
1859
  return /* @__PURE__ */ jsx14("div", { className: "flex-1", children: /* @__PURE__ */ jsx14("div", { children: textItems.map((item, index) => {
1833
1860
  const text = "text" in item ? item.text ?? "" : "";
1834
1861
  const key = "key" in item ? item.key : index;
@@ -1838,6 +1865,9 @@ var PostTextItem = ({ textItems, showFullText }) => {
1838
1865
  {
1839
1866
  text: showFullText ? text : TruncateText(text, 300),
1840
1867
  mentionData,
1868
+ onNavigate,
1869
+ linkComponent,
1870
+ supportDeepviewDomain,
1841
1871
  className: "whitespace-normal px-4 pb-4 leading-relaxed text-gray-800",
1842
1872
  style: {
1843
1873
  whiteSpace: "pre-wrap",
@@ -1862,7 +1892,8 @@ var getHostFromUrl = (url) => {
1862
1892
  }
1863
1893
  };
1864
1894
  var getLinkRel = (host, supportDeepviewDomain = "") => {
1865
- const isInternal = supportDeepviewDomain.length > 0 && host.includes(supportDeepviewDomain);
1895
+ const domains = Array.isArray(supportDeepviewDomain) ? supportDeepviewDomain : supportDeepviewDomain ? [supportDeepviewDomain] : [];
1896
+ const isInternal = domains.some((d) => d.length > 0 && host.includes(d));
1866
1897
  return isInternal ? "noreferrer" : "noreferrer nofollow";
1867
1898
  };
1868
1899
  var PostLinkItem = ({
@@ -2226,7 +2257,10 @@ var PostItemsView = ({
2226
2257
  parentId,
2227
2258
  isCommentScope,
2228
2259
  imageComponent,
2229
- mediaItemStatuses
2260
+ mediaItemStatuses,
2261
+ onNavigate,
2262
+ linkComponent,
2263
+ supportDeepviewDomain
2230
2264
  }) => {
2231
2265
  if (!primaryContent) return null;
2232
2266
  switch (primaryContent.type) {
@@ -2258,7 +2292,8 @@ var PostItemsView = ({
2258
2292
  type: "linkItem"
2259
2293
  }
2260
2294
  ],
2261
- imageComponent
2295
+ imageComponent,
2296
+ supportDeepviewDomain
2262
2297
  }
2263
2298
  );
2264
2299
  case "media":
@@ -2278,7 +2313,10 @@ var PostItemsView = ({
2278
2313
  {
2279
2314
  textItems: primaryContent.items,
2280
2315
  showFullText: isPostDetail,
2281
- isPostDetail
2316
+ isPostDetail,
2317
+ onNavigate,
2318
+ linkComponent,
2319
+ supportDeepviewDomain
2282
2320
  }
2283
2321
  );
2284
2322
  default:
@@ -2354,20 +2392,27 @@ var contentTypeConstants = {
2354
2392
  };
2355
2393
 
2356
2394
  // src/components/PostSectionSourceInfoView.tsx
2395
+ import { Avatar as Avatar2, AvatarImage as AvatarImage2, AvatarFallback as AvatarFallback2 } from "@select-org/ui";
2357
2396
  import { jsx as jsx20, jsxs as jsxs11 } from "react/jsx-runtime";
2358
- var PostSectionSourceInfoView = ({ sourceInfo }) => {
2397
+ var PostSectionSourceInfoView = ({
2398
+ sourceInfo,
2399
+ imageComponent
2400
+ }) => {
2359
2401
  if (!sourceInfo) {
2360
2402
  return null;
2361
2403
  }
2362
2404
  return /* @__PURE__ */ jsx20("div", { className: "mx-4 mb-3 mt-3 border-b border-gray-100 pb-3", children: /* @__PURE__ */ jsxs11("div", { className: "flex flex-row items-center", children: [
2363
- /* @__PURE__ */ jsx20("div", { className: "size-7 shrink-0 rounded-full overflow-hidden border border-border-subtle bg-muted flex items-center justify-center", children: sourceInfo.avatar ? /* @__PURE__ */ jsx20(
2364
- "img",
2365
- {
2366
- src: sourceInfo.avatar,
2367
- alt: sourceInfo.username,
2368
- className: "size-full object-cover"
2369
- }
2370
- ) : /* @__PURE__ */ jsx20("span", { className: "text-xs font-semibold text-muted-foreground", children: sourceInfo.username?.charAt(0)?.toUpperCase() ?? "?" }) }),
2405
+ /* @__PURE__ */ jsxs11(Avatar2, { size: "sm", className: "shrink-0 ring-1 ring-border-subtle", children: [
2406
+ /* @__PURE__ */ jsx20(
2407
+ AvatarImage2,
2408
+ {
2409
+ src: sourceInfo.avatar,
2410
+ alt: sourceInfo.username,
2411
+ imageComponent
2412
+ }
2413
+ ),
2414
+ /* @__PURE__ */ jsx20(AvatarFallback2, { name: sourceInfo.username, className: "text-xs" })
2415
+ ] }),
2371
2416
  /* @__PURE__ */ jsxs11("div", { className: "ml-2 flex-col justify-center flex", children: [
2372
2417
  /* @__PURE__ */ jsx20("div", { className: "text-sm font-semibold text-foreground leading-none", children: sourceInfo.username }),
2373
2418
  /* @__PURE__ */ jsx20("div", { className: "text-xs text-muted-foreground mt-1 leading-none", children: sourceInfo.url })
@@ -2381,7 +2426,11 @@ import { jsx as jsx21, jsxs as jsxs12 } from "react/jsx-runtime";
2381
2426
  var PostSectionsView = ({
2382
2427
  sections,
2383
2428
  isPostDetail,
2384
- onCardPress
2429
+ onCardPress,
2430
+ onNavigate,
2431
+ linkComponent,
2432
+ supportDeepviewDomain,
2433
+ imageComponent
2385
2434
  }) => {
2386
2435
  const renderSectionItem = useCallback3(
2387
2436
  (section, index) => {
@@ -2396,14 +2445,23 @@ var PostSectionsView = ({
2396
2445
  whiteSpace: "pre-wrap",
2397
2446
  wordBreak: "break-word"
2398
2447
  },
2399
- mentionData: data.mentionData
2448
+ mentionData: data.mentionData,
2449
+ onNavigate,
2450
+ linkComponent,
2451
+ supportDeepviewDomain
2400
2452
  },
2401
2453
  `${index} - ${data.body}`
2402
2454
  );
2403
2455
  }
2404
2456
  if (type === contentTypeConstants.NEW_POST_MEDIA) {
2405
2457
  return /* @__PURE__ */ jsxs12("div", { className: "my-3", children: [
2406
- data.sourceInfo && /* @__PURE__ */ jsx21(PostSectionSourceInfoView_default, { sourceInfo: data.sourceInfo }),
2458
+ data.sourceInfo && /* @__PURE__ */ jsx21(
2459
+ PostSectionSourceInfoView_default,
2460
+ {
2461
+ sourceInfo: data.sourceInfo,
2462
+ imageComponent
2463
+ }
2464
+ ),
2407
2465
  data.body && /* @__PURE__ */ jsx21(
2408
2466
  AutoLink_default,
2409
2467
  {
@@ -2413,7 +2471,10 @@ var PostSectionsView = ({
2413
2471
  whiteSpace: "pre-wrap",
2414
2472
  wordBreak: "break-word"
2415
2473
  },
2416
- mentionData: data.mentionData
2474
+ mentionData: data.mentionData,
2475
+ onNavigate,
2476
+ linkComponent,
2477
+ supportDeepviewDomain
2417
2478
  },
2418
2479
  `${index} - ${data.body}`
2419
2480
  ),
@@ -2429,7 +2490,7 @@ var PostSectionsView = ({
2429
2490
  }
2430
2491
  return null;
2431
2492
  },
2432
- [isPostDetail, onCardPress]
2493
+ [isPostDetail, onCardPress, onNavigate, supportDeepviewDomain, imageComponent]
2433
2494
  );
2434
2495
  if (!sections || sections.length === 0) {
2435
2496
  return null;
@@ -2453,6 +2514,7 @@ var PostFooter = ({
2453
2514
  footerLinkHref = "/",
2454
2515
  isSnoozed = false,
2455
2516
  onSnoozeToggle,
2517
+ linkComponent: LinkComponent,
2456
2518
  renderReactionTrigger,
2457
2519
  renderReactionModal
2458
2520
  }) => {
@@ -2512,7 +2574,18 @@ var PostFooter = ({
2512
2574
  }
2513
2575
  }) })
2514
2576
  ] }),
2515
- /* @__PURE__ */ jsx22("div", { className: "relative flex items-center ml-auto", children: postHref ? /* @__PURE__ */ jsxs13(
2577
+ /* @__PURE__ */ jsx22("div", { className: "relative flex items-center ml-auto", children: postHref ? LinkComponent ? /* @__PURE__ */ jsxs13(
2578
+ LinkComponent,
2579
+ {
2580
+ href: postHref,
2581
+ className: cn(commentButtonClass, "no-underline"),
2582
+ children: [
2583
+ /* @__PURE__ */ jsx22(AppIcon, { name: "messageCircleMore", "aria-hidden": "true" }),
2584
+ /* @__PURE__ */ jsx22("span", { className: "sr-only", children: commentAriaLabel }),
2585
+ commentBadge
2586
+ ]
2587
+ }
2588
+ ) : /* @__PURE__ */ jsxs13(
2516
2589
  "a",
2517
2590
  {
2518
2591
  href: postHref,
@@ -2530,14 +2603,10 @@ var PostFooter = ({
2530
2603
  /* @__PURE__ */ jsx22(AppIcon, { name: "messageCircleMore", "aria-hidden": "true" }),
2531
2604
  commentBadge
2532
2605
  ] }) }),
2533
- showFooterLink && /* @__PURE__ */ jsx22("section", { className: "flex justify-center -mx-5 -mb-2.5 mt-2.5", children: /* @__PURE__ */ jsx22(
2534
- "a",
2535
- {
2536
- href: footerLinkHref,
2537
- className: "bg-action-primary/5 hover:bg-action-primary/10 transition-colors w-full text-center py-3 text-sm font-medium text-action-primary no-underline rounded-b-xl border-t border-action-primary/10",
2538
- children: footerLinkLabel
2539
- }
2540
- ) })
2606
+ showFooterLink && /* @__PURE__ */ (() => {
2607
+ const footerLinkClass = "bg-action-primary/5 hover:bg-action-primary/10 transition-colors w-full text-center py-3 text-sm font-medium text-action-primary no-underline rounded-b-xl border-t border-action-primary/10";
2608
+ return /* @__PURE__ */ jsx22("section", { className: "flex justify-center -mx-5 -mb-2.5 mt-2.5", children: LinkComponent ? /* @__PURE__ */ jsx22(LinkComponent, { href: footerLinkHref, className: footerLinkClass, children: footerLinkLabel }) : /* @__PURE__ */ jsx22("a", { href: footerLinkHref, className: footerLinkClass, children: footerLinkLabel }) });
2609
+ })()
2541
2610
  ] });
2542
2611
  };
2543
2612
  var PostFooter_default = PostFooter;
@@ -2758,6 +2827,7 @@ var PostCard = ({
2758
2827
  imageComponent,
2759
2828
  isAdmin,
2760
2829
  isOwner,
2830
+ isPostOwner,
2761
2831
  isPostPreview,
2762
2832
  isPrivate,
2763
2833
  membersCount,
@@ -2891,6 +2961,7 @@ var PostCard = ({
2891
2961
  postType: post.postType,
2892
2962
  isFeatured: post.isFeatured,
2893
2963
  isPostPreview,
2964
+ isPostDetail,
2894
2965
  isAdmin,
2895
2966
  isOwner,
2896
2967
  isPrivate,
@@ -2916,6 +2987,7 @@ var PostCard = ({
2916
2987
  isEmailPost,
2917
2988
  hideEmailDescription: isEmailPost && !isPostDetail && resolvedContent.primaryContent?.type === "media",
2918
2989
  onNavigate,
2990
+ linkComponent,
2919
2991
  supportDeepviewDomain
2920
2992
  }
2921
2993
  ),
@@ -2925,7 +2997,11 @@ var PostCard = ({
2925
2997
  sections: resolvedContent.sections.sections,
2926
2998
  isPostDetail,
2927
2999
  onCardPress: onCardPress ?? (() => {
2928
- })
3000
+ }),
3001
+ onNavigate,
3002
+ linkComponent,
3003
+ supportDeepviewDomain,
3004
+ imageComponent
2929
3005
  }
2930
3006
  ),
2931
3007
  /* @__PURE__ */ jsx25(
@@ -2937,11 +3013,14 @@ var PostCard = ({
2937
3013
  }),
2938
3014
  onVotePress: onVotePress ?? (() => {
2939
3015
  }),
2940
- isPostOwner: isOwner,
3016
+ isPostOwner,
2941
3017
  parentId: post.context_id,
2942
3018
  isCommentScope: false,
2943
3019
  imageComponent,
2944
- mediaItemStatuses
3020
+ mediaItemStatuses,
3021
+ onNavigate,
3022
+ linkComponent,
3023
+ supportDeepviewDomain
2945
3024
  }
2946
3025
  ),
2947
3026
  /* @__PURE__ */ jsx25(
@@ -2966,6 +3045,7 @@ var PostCard = ({
2966
3045
  showFooterLink,
2967
3046
  footerLinkLabel,
2968
3047
  footerLinkHref,
3048
+ linkComponent,
2969
3049
  renderReactionTrigger,
2970
3050
  renderReactionModal
2971
3051
  }