@automattic/social-previews 3.1.4 → 3.2.0

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.mjs CHANGED
@@ -7,13 +7,15 @@ var baseDomain = (url) => {
7
7
  const slashIndex = withoutProtocol.indexOf("/");
8
8
  return slashIndex === -1 ? withoutProtocol : withoutProtocol.substring(0, slashIndex);
9
9
  };
10
- var shortEnough = (limit) => (title) => title.length <= limit ? title : false;
10
+ var codepointLength = (text) => Array.from(text).length;
11
+ var codepointSlice = (text, start, end) => Array.from(text).slice(start, end).join("");
12
+ var shortEnough = (limit) => (title) => codepointLength(title) <= limit ? title : false;
11
13
  var truncatedAtSpace = (lower, upper) => (fullTitle) => {
12
14
  const title = fullTitle.slice(0, upper);
13
15
  const lastSpace = title.lastIndexOf(" ");
14
16
  return lastSpace > lower && lastSpace < upper ? title.slice(0, lastSpace).concat("\u2026") : false;
15
17
  };
16
- var hardTruncation = (limit) => (title) => title.slice(0, limit).concat("\u2026");
18
+ var hardTruncation = (limit) => (title) => codepointSlice(title, 0, limit).concat("\u2026");
17
19
  var firstValid = (...predicates) => (a) => predicates.find((p) => false !== p(a))?.(a);
18
20
  var stripHtmlTags = (description, allowedTags = []) => {
19
21
  const pattern = new RegExp(`(<([^${allowedTags.join("")}>]+)>)`, "gi");
@@ -70,7 +72,7 @@ function preparePreviewText(text, options) {
70
72
  } = options;
71
73
  let result = stripHtmlTags(text);
72
74
  result = result.replaceAll(/(?:\s*[\n\r]){2,}/g, "\n\n");
73
- if (maxChars && result.length > maxChars) {
75
+ if (maxChars && codepointLength(result) > maxChars) {
74
76
  result = hardTruncation(maxChars)(result);
75
77
  }
76
78
  if (maxLines) {
@@ -212,7 +214,7 @@ var GoogleSearchPreview = ({
212
214
  // src/twitter-preview/card.tsx
213
215
  import clsx from "clsx";
214
216
  import { jsx as jsx5, jsxs as jsxs2 } from "react/jsx-runtime";
215
- var DESCRIPTION_LENGTH2 = 200;
217
+ var DESCRIPTION_LENGTH2 = 280;
216
218
  var twitterDescription = firstValid(
217
219
  shortEnough(DESCRIPTION_LENGTH2),
218
220
  hardTruncation(DESCRIPTION_LENGTH2)
@@ -361,12 +363,11 @@ var Sidebar = ({ profileImage, showThreadConnector }) => {
361
363
 
362
364
  // src/twitter-preview/text.tsx
363
365
  import { jsx as jsx12 } from "react/jsx-runtime";
364
- var Text = ({ text, url, retainUrl }) => {
366
+ var Text = ({ text }) => {
365
367
  if (!text) {
366
368
  return null;
367
369
  }
368
- const tweetText = url && !retainUrl && text.endsWith(url) ? text.substring(0, text.lastIndexOf(url)) : text;
369
- return /* @__PURE__ */ jsx12("div", { className: "twitter-preview__text", children: preparePreviewText(tweetText, { platform: "twitter" }) });
370
+ return /* @__PURE__ */ jsx12("div", { className: "twitter-preview__text", children: preparePreviewText(text, { platform: "twitter" }) });
370
371
  };
371
372
 
372
373
  // src/twitter-preview/post-preview.tsx
@@ -392,7 +393,7 @@ var TwitterPostPreview = ({
392
393
  /* @__PURE__ */ jsxs7("div", { className: "twitter-preview__main", children: [
393
394
  /* @__PURE__ */ jsx13(Header, { name, screenName, date }),
394
395
  /* @__PURE__ */ jsxs7("div", { className: "twitter-preview__content", children: [
395
- text ? /* @__PURE__ */ jsx13(Text, { text, url: url || "", retainUrl: hasMedia }) : null,
396
+ text ? /* @__PURE__ */ jsx13(Text, { text }) : null,
396
397
  hasMedia ? /* @__PURE__ */ jsx13(Media, { media }) : null,
397
398
  tweetUrl ? /* @__PURE__ */ jsx13(QuoteTweet, { tweetUrl }) : null,
398
399
  !hasMedia && url && /* @__PURE__ */ jsx13(
@@ -487,13 +488,54 @@ var TwitterPreviews = ({
487
488
  };
488
489
 
489
490
  // src/linkedin-preview/post-preview.tsx
490
- import { __ as __3, sprintf as sprintf2 } from "@wordpress/i18n";
491
+ import { __ as __4, sprintf as sprintf2 } from "@wordpress/i18n";
492
+
493
+ // src/shared/expandable-text/index.tsx
494
+ import { Button } from "@wordpress/components";
495
+ import { __ as __3 } from "@wordpress/i18n";
496
+ import { useReducer } from "react";
497
+ import { Fragment as Fragment2, jsx as jsx17, jsxs as jsxs9 } from "react/jsx-runtime";
498
+ var EXPAND_THRESHOLD_CHARS = 400;
499
+ function codepointLength2(text) {
500
+ return Array.from(text).length;
501
+ }
502
+ function truncateAtWordBoundary(text, limit) {
503
+ const codepoints = Array.from(text);
504
+ if (codepoints.length <= limit) {
505
+ return text;
506
+ }
507
+ const slice = codepoints.slice(0, limit).join("");
508
+ const lastSpace = slice.lastIndexOf(" ");
509
+ const cut = lastSpace > limit - 80 ? lastSpace : slice.length;
510
+ return slice.slice(0, cut);
511
+ }
512
+ function ExpandableText(props) {
513
+ const { text, children } = props;
514
+ const [expanded, toggle] = useReducer((state) => !state, false);
515
+ const stripped = stripHtmlTags(text);
516
+ if (codepointLength2(stripped) <= EXPAND_THRESHOLD_CHARS) {
517
+ return /* @__PURE__ */ jsx17(Fragment2, { children: children(text) });
518
+ }
519
+ if (expanded) {
520
+ return /* @__PURE__ */ jsxs9(Fragment2, { children: [
521
+ children(text),
522
+ " ",
523
+ /* @__PURE__ */ jsx17(Button, { variant: "link", className: "social-previews__expand-toggle", onClick: toggle, children: __3("See less", "social-previews") })
524
+ ] });
525
+ }
526
+ const truncated = truncateAtWordBoundary(stripped, EXPAND_THRESHOLD_CHARS);
527
+ return /* @__PURE__ */ jsxs9(Fragment2, { children: [
528
+ children(truncated),
529
+ "\u2026 ",
530
+ /* @__PURE__ */ jsx17(Button, { variant: "link", className: "social-previews__expand-toggle", onClick: toggle, children: __3("See more", "social-previews") })
531
+ ] });
532
+ }
491
533
 
492
534
  // src/linkedin-preview/constants.ts
493
- var FEED_TEXT_MAX_LENGTH = 550;
535
+ var FEED_TEXT_MAX_LENGTH = 3e3;
494
536
 
495
537
  // src/linkedin-preview/post-preview.tsx
496
- import { Fragment as Fragment2, jsx as jsx17, jsxs as jsxs9 } from "react/jsx-runtime";
538
+ import { Fragment as Fragment3, jsx as jsx18, jsxs as jsxs10 } from "react/jsx-runtime";
497
539
  function LinkedInPostPreview({
498
540
  articleReadTime = 5,
499
541
  image,
@@ -506,58 +548,58 @@ function LinkedInPostPreview({
506
548
  url
507
549
  }) {
508
550
  const hasMedia = !!media?.length;
509
- return /* @__PURE__ */ jsx17("div", { className: "linkedin-preview__wrapper", children: /* @__PURE__ */ jsxs9("section", { className: `linkedin-preview__container ${hasMedia ? "has-media" : ""}`, children: [
510
- /* @__PURE__ */ jsxs9("div", { className: "linkedin-preview__header", children: [
511
- /* @__PURE__ */ jsx17("div", { className: "linkedin-preview__header--avatar", children: /* @__PURE__ */ jsx17(AvatarWithFallback, { src: profileImage }) }),
512
- /* @__PURE__ */ jsxs9("div", { className: "linkedin-preview__header--profile", children: [
513
- /* @__PURE__ */ jsxs9("div", { className: "linkedin-preview__header--profile-info", children: [
514
- /* @__PURE__ */ jsx17("div", { className: "linkedin-preview__header--profile-name", children: name || __3("Account Name", "social-previews") }),
515
- /* @__PURE__ */ jsx17("span", { children: "\u2022" }),
516
- /* @__PURE__ */ jsx17("div", {
551
+ return /* @__PURE__ */ jsx18("div", { className: "linkedin-preview__wrapper", children: /* @__PURE__ */ jsxs10("section", { className: `linkedin-preview__container ${hasMedia ? "has-media" : ""}`, children: [
552
+ /* @__PURE__ */ jsxs10("div", { className: "linkedin-preview__header", children: [
553
+ /* @__PURE__ */ jsx18("div", { className: "linkedin-preview__header--avatar", children: /* @__PURE__ */ jsx18(AvatarWithFallback, { src: profileImage }) }),
554
+ /* @__PURE__ */ jsxs10("div", { className: "linkedin-preview__header--profile", children: [
555
+ /* @__PURE__ */ jsxs10("div", { className: "linkedin-preview__header--profile-info", children: [
556
+ /* @__PURE__ */ jsx18("div", { className: "linkedin-preview__header--profile-name", children: name || __4("Account Name", "social-previews") }),
557
+ /* @__PURE__ */ jsx18("span", { children: "\u2022" }),
558
+ /* @__PURE__ */ jsx18("div", {
517
559
  className: "linkedin-preview__header--profile-actor",
518
560
  // translators: refers to the actor level of the post being shared, e.g. "1st", "2nd", "3rd", etc.
519
- children: __3("1st", "social-previews")
561
+ children: __4("1st", "social-previews")
520
562
  })
521
563
  ] }),
522
- jobTitle ? /* @__PURE__ */ jsx17("div", { className: "linkedin-preview__header--profile-title", children: jobTitle }) : null,
523
- /* @__PURE__ */ jsxs9("div", { className: "linkedin-preview__header--profile-meta", children: [
524
- /* @__PURE__ */ jsx17("span", {
564
+ jobTitle ? /* @__PURE__ */ jsx18("div", { className: "linkedin-preview__header--profile-title", children: jobTitle }) : null,
565
+ /* @__PURE__ */ jsxs10("div", { className: "linkedin-preview__header--profile-meta", children: [
566
+ /* @__PURE__ */ jsx18("span", {
525
567
  // translators: refers to the time since the post was published, e.g. "1h"
526
- children: __3("1h", "social-previews")
568
+ children: __4("1h", "social-previews")
527
569
  }),
528
- /* @__PURE__ */ jsx17("span", { children: "\u2022" }),
529
- /* @__PURE__ */ jsx17("svg", { viewBox: "0 0 16 16", fill: "currentColor", width: "16", height: "16", focusable: "false", children: /* @__PURE__ */ jsx17("path", { d: "M8 1a7 7 0 107 7 7 7 0 00-7-7zM3 8a5 5 0 011-3l.55.55A1.5 1.5 0 015 6.62v1.07a.75.75 0 00.22.53l.56.56a.75.75 0 00.53.22H7v.69a.75.75 0 00.22.53l.56.56a.75.75 0 01.22.53V13a5 5 0 01-5-5zm6.24 4.83l2-2.46a.75.75 0 00.09-.8l-.58-1.16A.76.76 0 0010 8H7v-.19a.51.51 0 01.28-.45l.38-.19a.74.74 0 01.68 0L9 7.5l.38-.7a1 1 0 00.12-.48v-.85a.78.78 0 01.21-.53l1.07-1.09a5 5 0 01-1.54 9z" }) })
570
+ /* @__PURE__ */ jsx18("span", { children: "\u2022" }),
571
+ /* @__PURE__ */ jsx18("svg", { viewBox: "0 0 16 16", fill: "currentColor", width: "16", height: "16", focusable: "false", children: /* @__PURE__ */ jsx18("path", { d: "M8 1a7 7 0 107 7 7 7 0 00-7-7zM3 8a5 5 0 011-3l.55.55A1.5 1.5 0 015 6.62v1.07a.75.75 0 00.22.53l.56.56a.75.75 0 00.53.22H7v.69a.75.75 0 00.22.53l.56.56a.75.75 0 01.22.53V13a5 5 0 01-5-5zm6.24 4.83l2-2.46a.75.75 0 00.09-.8l-.58-1.16A.76.76 0 0010 8H7v-.19a.51.51 0 01.28-.45l.38-.19a.74.74 0 01.68 0L9 7.5l.38-.7a1 1 0 00.12-.48v-.85a.78.78 0 01.21-.53l1.07-1.09a5 5 0 01-1.54 9z" }) })
530
572
  ] })
531
573
  ] })
532
574
  ] }),
533
- /* @__PURE__ */ jsxs9("div", { className: "linkedin-preview__content", children: [
534
- description ? /* @__PURE__ */ jsxs9("div", { className: "linkedin-preview__caption", children: [
535
- /* @__PURE__ */ jsx17("span", { children: preparePreviewText(description, {
575
+ /* @__PURE__ */ jsxs10("div", { className: "linkedin-preview__content", children: [
576
+ description ? /* @__PURE__ */ jsxs10("div", { className: "linkedin-preview__caption", children: [
577
+ /* @__PURE__ */ jsx18("span", { children: /* @__PURE__ */ jsx18(ExpandableText, { text: description, children: (visibleText) => preparePreviewText(visibleText, {
536
578
  platform: "linkedin",
537
579
  maxChars: FEED_TEXT_MAX_LENGTH
538
- }) }),
539
- hasMedia && url && /* @__PURE__ */ jsxs9(Fragment2, { children: [
580
+ }) }) }),
581
+ hasMedia && url && !description.includes(url) && /* @__PURE__ */ jsxs10(Fragment3, { children: [
540
582
  " - ",
541
- /* @__PURE__ */ jsx17("a", { href: url, rel: "nofollow noopener noreferrer", target: "_blank", children: url })
583
+ /* @__PURE__ */ jsx18("a", { href: url, rel: "nofollow noopener noreferrer", target: "_blank", children: url })
542
584
  ] })
543
585
  ] }) : null,
544
- hasMedia ? /* @__PURE__ */ jsx17("div", { className: "linkedin-preview__media", children: media.map((mediaItem, index) => /* @__PURE__ */ jsx17(
586
+ hasMedia ? /* @__PURE__ */ jsx18("div", { className: "linkedin-preview__media", children: media.map((mediaItem, index) => /* @__PURE__ */ jsx18(
545
587
  "div",
546
588
  {
547
589
  className: "linkedin-preview__media-item",
548
- children: mediaItem.type.startsWith("video/") ? /* @__PURE__ */ jsx17("video", { controls: true, children: /* @__PURE__ */ jsx17("source", { src: mediaItem.url, type: mediaItem.type }) }) : /* @__PURE__ */ jsx17("img", { alt: mediaItem.alt || "", src: mediaItem.url })
590
+ children: mediaItem.type.startsWith("video/") ? /* @__PURE__ */ jsx18("video", { controls: true, children: /* @__PURE__ */ jsx18("source", { src: mediaItem.url, type: mediaItem.type }) }) : /* @__PURE__ */ jsx18("img", { alt: mediaItem.alt || "", src: mediaItem.url })
549
591
  },
550
592
  `linkedin-preview__media-item-${index}`
551
- )) }) : /* @__PURE__ */ jsxs9("article", { children: [
552
- image ? /* @__PURE__ */ jsx17("img", { className: "linkedin-preview__image", src: image, alt: "" }) : null,
553
- url ? /* @__PURE__ */ jsxs9("div", { className: "linkedin-preview__description", children: [
554
- /* @__PURE__ */ jsx17("h2", { className: "linkedin-preview__description--title", children: title || getTitleFromDescription(description) }),
555
- /* @__PURE__ */ jsxs9("div", { className: "linkedin-preview__description--meta", children: [
556
- /* @__PURE__ */ jsx17("span", { className: "linkedin-preview__description--url", children: baseDomain(url) }),
557
- /* @__PURE__ */ jsx17("span", { children: "\u2022" }),
558
- /* @__PURE__ */ jsx17("span", { children: sprintf2(
593
+ )) }) : /* @__PURE__ */ jsxs10("article", { children: [
594
+ image ? /* @__PURE__ */ jsx18("img", { className: "linkedin-preview__image", src: image, alt: "" }) : null,
595
+ url ? /* @__PURE__ */ jsxs10("div", { className: "linkedin-preview__description", children: [
596
+ /* @__PURE__ */ jsx18("h2", { className: "linkedin-preview__description--title", children: title || getTitleFromDescription(description) }),
597
+ /* @__PURE__ */ jsxs10("div", { className: "linkedin-preview__description--meta", children: [
598
+ /* @__PURE__ */ jsx18("span", { className: "linkedin-preview__description--url", children: baseDomain(url) }),
599
+ /* @__PURE__ */ jsx18("span", { children: "\u2022" }),
600
+ /* @__PURE__ */ jsx18("span", { children: sprintf2(
559
601
  // translators: %d is the number of minutes it takes to read the article
560
- __3("%d min read", "social-previews"),
602
+ __4("%d min read", "social-previews"),
561
603
  articleReadTime
562
604
  ) })
563
605
  ] })
@@ -568,9 +610,9 @@ function LinkedInPostPreview({
568
610
  }
569
611
 
570
612
  // src/linkedin-preview/link-preview.tsx
571
- import { jsx as jsx18 } from "react/jsx-runtime";
613
+ import { jsx as jsx19 } from "react/jsx-runtime";
572
614
  function LinkedInLinkPreview(props) {
573
- return /* @__PURE__ */ jsx18(
615
+ return /* @__PURE__ */ jsx19(
574
616
  LinkedInPostPreview,
575
617
  {
576
618
  name: "",
@@ -584,45 +626,45 @@ function LinkedInLinkPreview(props) {
584
626
  }
585
627
 
586
628
  // src/linkedin-preview/previews.tsx
587
- import { __ as __4 } from "@wordpress/i18n";
588
- import { jsx as jsx19, jsxs as jsxs10 } from "react/jsx-runtime";
629
+ import { __ as __5 } from "@wordpress/i18n";
630
+ import { jsx as jsx20, jsxs as jsxs11 } from "react/jsx-runtime";
589
631
  var LinkedInPreviews = ({
590
632
  headingLevel,
591
633
  hideLinkPreview,
592
634
  hidePostPreview,
593
635
  ...props
594
636
  }) => {
595
- return /* @__PURE__ */ jsxs10("div", { className: "social-preview linkedin-preview", children: [
596
- !hidePostPreview && /* @__PURE__ */ jsxs10("section", { className: "social-preview__section linkedin-preview__section", children: [
597
- /* @__PURE__ */ jsx19(section_heading_default, {
637
+ return /* @__PURE__ */ jsxs11("div", { className: "social-preview linkedin-preview", children: [
638
+ !hidePostPreview && /* @__PURE__ */ jsxs11("section", { className: "social-preview__section linkedin-preview__section", children: [
639
+ /* @__PURE__ */ jsx20(section_heading_default, {
598
640
  level: headingLevel,
599
641
  // translators: refers to a social post on LinkedIn
600
- children: __4("Your post", "social-previews")
642
+ children: __5("Your post", "social-previews")
601
643
  }),
602
- /* @__PURE__ */ jsx19("p", { className: "social-preview__section-desc", children: __4("This is what your social post will look like on LinkedIn:", "social-previews") }),
603
- /* @__PURE__ */ jsx19(LinkedInPostPreview, { ...props })
644
+ /* @__PURE__ */ jsx20("p", { className: "social-preview__section-desc", children: __5("This is what your social post will look like on LinkedIn:", "social-previews") }),
645
+ /* @__PURE__ */ jsx20(LinkedInPostPreview, { ...props })
604
646
  ] }),
605
- !hideLinkPreview && /* @__PURE__ */ jsxs10("section", { className: "social-preview__section linkedin-preview__section", children: [
606
- /* @__PURE__ */ jsx19(section_heading_default, {
647
+ !hideLinkPreview && /* @__PURE__ */ jsxs11("section", { className: "social-preview__section linkedin-preview__section", children: [
648
+ /* @__PURE__ */ jsx20(section_heading_default, {
607
649
  level: headingLevel,
608
650
  // translators: refers to a link to a LinkedIn post
609
- children: __4("Link preview", "social-previews")
651
+ children: __5("Link preview", "social-previews")
610
652
  }),
611
- /* @__PURE__ */ jsx19("p", { className: "social-preview__section-desc", children: __4(
653
+ /* @__PURE__ */ jsx20("p", { className: "social-preview__section-desc", children: __5(
612
654
  "This is what it will look like when someone shares the link to your WordPress post on LinkedIn.",
613
655
  "social-previews"
614
656
  ) }),
615
- /* @__PURE__ */ jsx19(LinkedInLinkPreview, { ...props, name: "", profileImage: "" })
657
+ /* @__PURE__ */ jsx20(LinkedInLinkPreview, { ...props, name: "", profileImage: "" })
616
658
  ] })
617
659
  ] });
618
660
  };
619
661
 
620
662
  // src/tumblr-preview/link-preview.tsx
621
- import { __ as __7 } from "@wordpress/i18n";
663
+ import { __ as __8 } from "@wordpress/i18n";
622
664
 
623
665
  // src/tumblr-preview/helpers.ts
624
666
  var TITLE_LENGTH2 = 1e3;
625
- var DESCRIPTION_LENGTH3 = 400;
667
+ var DESCRIPTION_LENGTH3 = 4096;
626
668
  var tumblrTitle = (text) => firstValid(
627
669
  shortEnough(TITLE_LENGTH2),
628
670
  hardTruncation(TITLE_LENGTH2)
@@ -647,109 +689,109 @@ var tumblrDescription = (text) => {
647
689
  };
648
690
 
649
691
  // src/tumblr-preview/post/actions/index.tsx
650
- import { __ as __5 } from "@wordpress/i18n";
692
+ import { __ as __6 } from "@wordpress/i18n";
651
693
 
652
694
  // src/tumblr-preview/post/icons/index.tsx
653
- import { jsx as jsx20, jsxs as jsxs11 } from "react/jsx-runtime";
695
+ import { jsx as jsx21, jsxs as jsxs12 } from "react/jsx-runtime";
654
696
  var TumblrPostIcon = ({ name }) => {
655
697
  let svg;
656
698
  switch (name) {
657
699
  case "blaze":
658
- svg = /* @__PURE__ */ jsx20("svg", { viewBox: "0 0 25 22", children: /* @__PURE__ */ jsx20("path", { d: "m7.5059-0.24414c-0.79843 0.057223-1.2169 0.88587-1.1635 1.6128-0.2266 2.0449-1.4898 3.8696-3.1975 4.9778-3.0182 2.414-4.2201 6.8066-2.8033 10.411 0.92417 2.4679 2.9589 4.5674 5.4768 5.3928 0.95914 0.16102 1.7233-0.94358 1.3074-1.8059-0.11578-0.51062-0.17482-0.96516-0.17845-1.487 1.0413 1.5607 2.5484 2.8986 4.341 3.4975 1.0396-0.0154 1.98-0.64458 2.8516-1.1608 3.3821-2.1786 4.9604-6.7097 3.6597-10.518-0.49144-1.4599-1.2948-2.8935-2.5028-3.8698-0.7512-0.45498-1.661 0.09677-1.9202 0.86038-0.12274 0.16822-0.70352 1.1955-0.6191 0.61976 0.25488-3.4397-1.6789-7.0066-4.8123-8.4958-0.14322-0.037843-0.292-0.049464-0.43945-0.035156zm1.0586 3.5605c1.8947 2.0016 2.2326 5.1984 0.89062 7.5879-0.38498 0.96148 0.71762 2.0063 1.6567 1.5681 1.4159-0.4624 2.6998-1.3259 3.6577-2.4665 1.6442 2.5888 1.1465 6.2819-1.0629 8.3379-0.62378 0.60782-1.3666 1.0945-2.1754 1.4179-1.9543-0.989-3.3534-3.0966-3.5625-5.3125-0.25636-1.0253-1.81-1.2013-2.2852-0.25781-0.75058 1.3054-1.1846 2.7948-1.2305 4.3008-2.2396-1.9852-2.8468-5.4435-1.4609-8.0527 0.58926-1.239 1.651-2.13 2.724-2.9329 1.2958-1.1271 2.2791-2.62 2.7682-4.2683l0.071578 0.069832z" }) });
700
+ svg = /* @__PURE__ */ jsx21("svg", { viewBox: "0 0 25 22", children: /* @__PURE__ */ jsx21("path", { d: "m7.5059-0.24414c-0.79843 0.057223-1.2169 0.88587-1.1635 1.6128-0.2266 2.0449-1.4898 3.8696-3.1975 4.9778-3.0182 2.414-4.2201 6.8066-2.8033 10.411 0.92417 2.4679 2.9589 4.5674 5.4768 5.3928 0.95914 0.16102 1.7233-0.94358 1.3074-1.8059-0.11578-0.51062-0.17482-0.96516-0.17845-1.487 1.0413 1.5607 2.5484 2.8986 4.341 3.4975 1.0396-0.0154 1.98-0.64458 2.8516-1.1608 3.3821-2.1786 4.9604-6.7097 3.6597-10.518-0.49144-1.4599-1.2948-2.8935-2.5028-3.8698-0.7512-0.45498-1.661 0.09677-1.9202 0.86038-0.12274 0.16822-0.70352 1.1955-0.6191 0.61976 0.25488-3.4397-1.6789-7.0066-4.8123-8.4958-0.14322-0.037843-0.292-0.049464-0.43945-0.035156zm1.0586 3.5605c1.8947 2.0016 2.2326 5.1984 0.89062 7.5879-0.38498 0.96148 0.71762 2.0063 1.6567 1.5681 1.4159-0.4624 2.6998-1.3259 3.6577-2.4665 1.6442 2.5888 1.1465 6.2819-1.0629 8.3379-0.62378 0.60782-1.3666 1.0945-2.1754 1.4179-1.9543-0.989-3.3534-3.0966-3.5625-5.3125-0.25636-1.0253-1.81-1.2013-2.2852-0.25781-0.75058 1.3054-1.1846 2.7948-1.2305 4.3008-2.2396-1.9852-2.8468-5.4435-1.4609-8.0527 0.58926-1.239 1.651-2.13 2.724-2.9329 1.2958-1.1271 2.2791-2.62 2.7682-4.2683l0.071578 0.069832z" }) });
659
701
  break;
660
702
  case "delete":
661
- svg = /* @__PURE__ */ jsxs11("svg", { viewBox: "0 0 14 17", children: [
662
- /* @__PURE__ */ jsx20("path", { d: "M12 5v9c.1.7-.3 1-1 1H3c-.5 0-.9-.3-1-1V5c0-.6-.4-1-1-1-.5 0-1 .4-1 1v9.5C0 16.1 1.4 17 3 17h8c1.8 0 3-.8 3-2.5V5c0-.6-.5-1-1-1-.6 0-1 .5-1 1z" }),
663
- /* @__PURE__ */ jsx20("path", { d: "M4 12s0 1 1 1 1-1 1-1V5c0-.5-.4-1-1-1-.5 0-1 .5-1 1v7zm4 0s0 1 1 1 1-1 1-1V5c0-.5-.4-1-1-1-.5 0-1 .5-1 1v7zm5-10c.5 0 1-.4 1-1 0-.5-.4-.9-1-1H1C.5.1 0 .5 0 1c0 .6.6 1 1.1 1H13z" })
703
+ svg = /* @__PURE__ */ jsxs12("svg", { viewBox: "0 0 14 17", children: [
704
+ /* @__PURE__ */ jsx21("path", { d: "M12 5v9c.1.7-.3 1-1 1H3c-.5 0-.9-.3-1-1V5c0-.6-.4-1-1-1-.5 0-1 .4-1 1v9.5C0 16.1 1.4 17 3 17h8c1.8 0 3-.8 3-2.5V5c0-.6-.5-1-1-1-.6 0-1 .5-1 1z" }),
705
+ /* @__PURE__ */ jsx21("path", { d: "M4 12s0 1 1 1 1-1 1-1V5c0-.5-.4-1-1-1-.5 0-1 .5-1 1v7zm4 0s0 1 1 1 1-1 1-1V5c0-.5-.4-1-1-1-.5 0-1 .5-1 1v7zm5-10c.5 0 1-.4 1-1 0-.5-.4-.9-1-1H1C.5.1 0 .5 0 1c0 .6.6 1 1.1 1H13z" })
664
706
  ] });
665
707
  break;
666
708
  case "edit":
667
- svg = /* @__PURE__ */ jsx20("svg", { viewBox: "0 0 17.6 17.6", children: /* @__PURE__ */ jsx20("path", { d: "M5.3 13.8l-2.1.7.7-2.1L10.3 6l1.4 1.4-6.4 6.4zm6.4-9.3l-1.4-1.4-1.4 1.4-6.7 6.7-.2.5-2 5.9 3.8-1.3 2.1-.7.4-.1.3-.3 7.8-7.8c.1 0-2.7-2.9-2.7-2.9zm5.6-1.4L14.5.3c-.4-.4-1-.4-1.4 0l-1.4 1.4L15.9 6l1.4-1.4c.4-.5.4-1.1 0-1.5" }) });
709
+ svg = /* @__PURE__ */ jsx21("svg", { viewBox: "0 0 17.6 17.6", children: /* @__PURE__ */ jsx21("path", { d: "M5.3 13.8l-2.1.7.7-2.1L10.3 6l1.4 1.4-6.4 6.4zm6.4-9.3l-1.4-1.4-1.4 1.4-6.7 6.7-.2.5-2 5.9 3.8-1.3 2.1-.7.4-.1.3-.3 7.8-7.8c.1 0-2.7-2.9-2.7-2.9zm5.6-1.4L14.5.3c-.4-.4-1-.4-1.4 0l-1.4 1.4L15.9 6l1.4-1.4c.4-.5.4-1.1 0-1.5" }) });
668
710
  break;
669
711
  case "share":
670
- svg = /* @__PURE__ */ jsx20("svg", { viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx20("path", { d: "M12.6173 1.07612C12.991 0.921338 13.4211 1.00689 13.7071 1.29289L22.7071 10.2929C23.0832 10.669 23.0991 11.2736 22.7433 11.669L13.7433 21.669C13.4663 21.9767 13.0283 22.082 12.6417 21.9336C12.2552 21.7853 12 21.414 12 21V16H11.5C7.31775 16 3.92896 18.2486 2.95256 21.3044C2.80256 21.7738 2.33292 22.064 1.84598 21.9881C1.35904 21.9122 1 21.4928 1 21V18.5C1 12.3162 5.88069 7.27245 12 7.01067V2C12 1.59554 12.2436 1.2309 12.6173 1.07612ZM14 4.41421V8C14 8.55228 13.5523 9 13 9H12.5C7.64534 9 3.64117 12.6414 3.06988 17.3419C5.09636 15.2366 8.18218 14 11.5 14H13C13.5523 14 14 14.4477 14 15V18.394L20.622 11.0362L14 4.41421Z" }) });
712
+ svg = /* @__PURE__ */ jsx21("svg", { viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx21("path", { d: "M12.6173 1.07612C12.991 0.921338 13.4211 1.00689 13.7071 1.29289L22.7071 10.2929C23.0832 10.669 23.0991 11.2736 22.7433 11.669L13.7433 21.669C13.4663 21.9767 13.0283 22.082 12.6417 21.9336C12.2552 21.7853 12 21.414 12 21V16H11.5C7.31775 16 3.92896 18.2486 2.95256 21.3044C2.80256 21.7738 2.33292 22.064 1.84598 21.9881C1.35904 21.9122 1 21.4928 1 21V18.5C1 12.3162 5.88069 7.27245 12 7.01067V2C12 1.59554 12.2436 1.2309 12.6173 1.07612ZM14 4.41421V8C14 8.55228 13.5523 9 13 9H12.5C7.64534 9 3.64117 12.6414 3.06988 17.3419C5.09636 15.2366 8.18218 14 11.5 14H13C13.5523 14 14 14.4477 14 15V18.394L20.622 11.0362L14 4.41421Z" }) });
671
713
  break;
672
714
  case "reply":
673
- svg = /* @__PURE__ */ jsx20("svg", { viewBox: "0 0 17 17", children: /* @__PURE__ */ jsx20("path", { d: "M8.7 0C4.1 0 .4 3.7.4 8.3c0 1.2.2 2.3.7 3.4-.2.6-.4 1.5-.7 2.5L0 15.8c-.2.7.5 1.4 1.2 1.2l1.6-.4 2.4-.7c1.1.5 2.2.7 3.4.7 4.6 0 8.3-3.7 8.3-8.3C17 3.7 13.3 0 8.7 0zM15 8.3c0 3.5-2.8 6.3-6.4 6.3-1.2 0-2.3-.3-3.2-.9l-3.2.9.9-3.2c-.5-.9-.9-2-.9-3.2.1-3.4 3-6.2 6.5-6.2S15 4.8 15 8.3z" }) });
715
+ svg = /* @__PURE__ */ jsx21("svg", { viewBox: "0 0 17 17", children: /* @__PURE__ */ jsx21("path", { d: "M8.7 0C4.1 0 .4 3.7.4 8.3c0 1.2.2 2.3.7 3.4-.2.6-.4 1.5-.7 2.5L0 15.8c-.2.7.5 1.4 1.2 1.2l1.6-.4 2.4-.7c1.1.5 2.2.7 3.4.7 4.6 0 8.3-3.7 8.3-8.3C17 3.7 13.3 0 8.7 0zM15 8.3c0 3.5-2.8 6.3-6.4 6.3-1.2 0-2.3-.3-3.2-.9l-3.2.9.9-3.2c-.5-.9-.9-2-.9-3.2.1-3.4 3-6.2 6.5-6.2S15 4.8 15 8.3z" }) });
674
716
  break;
675
717
  case "reblog":
676
- svg = /* @__PURE__ */ jsx20("svg", { viewBox: "0 0 17 18.1", children: /* @__PURE__ */ jsx20("path", { d: "M12.8.2c-.4-.4-.8-.2-.8.4v2H2c-2 0-2 2-2 2v5s0 1 1 1 1-1 1-1v-4c0-1 .5-1 1-1h9v2c0 .6.3.7.8.4L17 3.6 12.8.2zM4.2 17.9c.5.4.8.2.8-.3v-2h10c2 0 2-2 2-2v-5s0-1-1-1-1 1-1 1v4c0 1-.5 1-1 1H5v-2c0-.6-.3-.7-.8-.4L0 14.6l4.2 3.3z" }) });
718
+ svg = /* @__PURE__ */ jsx21("svg", { viewBox: "0 0 17 18.1", children: /* @__PURE__ */ jsx21("path", { d: "M12.8.2c-.4-.4-.8-.2-.8.4v2H2c-2 0-2 2-2 2v5s0 1 1 1 1-1 1-1v-4c0-1 .5-1 1-1h9v2c0 .6.3.7.8.4L17 3.6 12.8.2zM4.2 17.9c.5.4.8.2.8-.3v-2h10c2 0 2-2 2-2v-5s0-1-1-1-1 1-1 1v4c0 1-.5 1-1 1H5v-2c0-.6-.3-.7-.8-.4L0 14.6l4.2 3.3z" }) });
677
719
  break;
678
720
  case "like":
679
- svg = /* @__PURE__ */ jsx20("svg", { viewBox: "0 0 20 18", children: /* @__PURE__ */ jsx20("path", { d: "M14.658 0c-1.625 0-3.21.767-4.463 2.156-.06.064-.127.138-.197.225-.074-.085-.137-.159-.196-.225C8.547.766 6.966 0 5.35 0 4.215 0 3.114.387 2.162 1.117c-2.773 2.13-2.611 5.89-1.017 8.5 2.158 3.535 6.556 7.18 7.416 7.875A2.3 2.3 0 0 0 9.998 18c.519 0 1.028-.18 1.436-.508.859-.695 5.257-4.34 7.416-7.875 1.595-2.616 1.765-6.376-1-8.5C16.895.387 15.792 0 14.657 0h.001zm0 2.124c.645 0 1.298.208 1.916.683 1.903 1.461 1.457 4.099.484 5.695-1.973 3.23-6.16 6.7-6.94 7.331a.191.191 0 0 1-.241 0c-.779-.631-4.966-4.101-6.94-7.332-.972-1.595-1.4-4.233.5-5.694.619-.475 1.27-.683 1.911-.683 1.064 0 2.095.574 2.898 1.461.495.549 1.658 2.082 1.753 2.203.095-.12 1.259-1.654 1.752-2.203.8-.887 1.842-1.461 2.908-1.461h-.001z" }) });
721
+ svg = /* @__PURE__ */ jsx21("svg", { viewBox: "0 0 20 18", children: /* @__PURE__ */ jsx21("path", { d: "M14.658 0c-1.625 0-3.21.767-4.463 2.156-.06.064-.127.138-.197.225-.074-.085-.137-.159-.196-.225C8.547.766 6.966 0 5.35 0 4.215 0 3.114.387 2.162 1.117c-2.773 2.13-2.611 5.89-1.017 8.5 2.158 3.535 6.556 7.18 7.416 7.875A2.3 2.3 0 0 0 9.998 18c.519 0 1.028-.18 1.436-.508.859-.695 5.257-4.34 7.416-7.875 1.595-2.616 1.765-6.376-1-8.5C16.895.387 15.792 0 14.657 0h.001zm0 2.124c.645 0 1.298.208 1.916.683 1.903 1.461 1.457 4.099.484 5.695-1.973 3.23-6.16 6.7-6.94 7.331a.191.191 0 0 1-.241 0c-.779-.631-4.966-4.101-6.94-7.332-.972-1.595-1.4-4.233.5-5.694.619-.475 1.27-.683 1.911-.683 1.064 0 2.095.574 2.898 1.461.495.549 1.658 2.082 1.753 2.203.095-.12 1.259-1.654 1.752-2.203.8-.887 1.842-1.461 2.908-1.461h-.001z" }) });
680
722
  break;
681
723
  case "ellipsis":
682
- svg = /* @__PURE__ */ jsx20("svg", { viewBox: "0 0 17.5 3.9", children: /* @__PURE__ */ jsx20("path", { d: "M17.5 1.9c0 1.1-.9 1.9-1.9 1.9-1.1 0-1.9-.9-1.9-1.9S14.5 0 15.6 0c1 0 1.9.9 1.9 1.9m-6.8 0c0 1.1-.9 1.9-1.9 1.9-1.1.1-2-.8-2-1.9 0-1 .9-1.9 2-1.9s1.9.9 1.9 1.9m-6.8 0c0 1.1-.9 2-2 2-1 0-1.9-.9-1.9-2S.9 0 1.9 0c1.1 0 2 .9 2 1.9" }) });
724
+ svg = /* @__PURE__ */ jsx21("svg", { viewBox: "0 0 17.5 3.9", children: /* @__PURE__ */ jsx21("path", { d: "M17.5 1.9c0 1.1-.9 1.9-1.9 1.9-1.1 0-1.9-.9-1.9-1.9S14.5 0 15.6 0c1 0 1.9.9 1.9 1.9m-6.8 0c0 1.1-.9 1.9-1.9 1.9-1.1.1-2-.8-2-1.9 0-1 .9-1.9 2-1.9s1.9.9 1.9 1.9m-6.8 0c0 1.1-.9 2-2 2-1 0-1.9-.9-1.9-2S.9 0 1.9 0c1.1 0 2 .9 2 1.9" }) });
683
725
  break;
684
726
  }
685
- return /* @__PURE__ */ jsx20("span", { className: `tumblr-preview__post-icon tumblr-preview__post-icon-${name}`, children: svg });
727
+ return /* @__PURE__ */ jsx21("span", { className: `tumblr-preview__post-icon tumblr-preview__post-icon-${name}`, children: svg });
686
728
  };
687
729
  var icons_default = TumblrPostIcon;
688
730
 
689
731
  // src/tumblr-preview/post/actions/index.tsx
690
- import { jsx as jsx21, jsxs as jsxs12 } from "react/jsx-runtime";
691
- var TumblrPostActions = () => /* @__PURE__ */ jsxs12("div", { className: "tumblr-preview__post-actions", children: [
692
- /* @__PURE__ */ jsxs12("div", { className: "tumblr-preview__post-manage-actions", children: [
693
- /* @__PURE__ */ jsxs12("div", { className: "tumblr-preview__post-actions-blaze", children: [
694
- /* @__PURE__ */ jsx21(icons_default, { name: "blaze" }),
732
+ import { jsx as jsx22, jsxs as jsxs13 } from "react/jsx-runtime";
733
+ var TumblrPostActions = () => /* @__PURE__ */ jsxs13("div", { className: "tumblr-preview__post-actions", children: [
734
+ /* @__PURE__ */ jsxs13("div", { className: "tumblr-preview__post-manage-actions", children: [
735
+ /* @__PURE__ */ jsxs13("div", { className: "tumblr-preview__post-actions-blaze", children: [
736
+ /* @__PURE__ */ jsx22(icons_default, { name: "blaze" }),
695
737
  "\xA0Blaze"
696
738
  ] }),
697
- /* @__PURE__ */ jsx21("ul", { children: [
739
+ /* @__PURE__ */ jsx22("ul", { children: [
698
740
  {
699
741
  icon: "delete",
700
742
  // translators: "Delete" action on a Tumblr post
701
- label: __5("Delete", "social-previews")
743
+ label: __6("Delete", "social-previews")
702
744
  },
703
745
  {
704
746
  icon: "edit",
705
747
  // translators: "Edit" action on a Tumblr post
706
- label: __5("Edit", "social-previews")
748
+ label: __6("Edit", "social-previews")
707
749
  }
708
- ].map(({ icon, label }) => /* @__PURE__ */ jsx21("li", { "aria-label": label, children: /* @__PURE__ */ jsx21(icons_default, { name: icon }) }, icon)) })
750
+ ].map(({ icon, label }) => /* @__PURE__ */ jsx22("li", { "aria-label": label, children: /* @__PURE__ */ jsx22(icons_default, { name: icon }) }, icon)) })
709
751
  ] }),
710
- /* @__PURE__ */ jsxs12("div", { className: "tumblr-preview__post-social-actions", children: [
711
- /* @__PURE__ */ jsx21("div", {
752
+ /* @__PURE__ */ jsxs13("div", { className: "tumblr-preview__post-social-actions", children: [
753
+ /* @__PURE__ */ jsx22("div", {
712
754
  // translators: count of notes on a Tumblr post
713
- children: __5("0 notes", "social-previews")
755
+ children: __6("0 notes", "social-previews")
714
756
  }),
715
- /* @__PURE__ */ jsx21("ul", { children: [
757
+ /* @__PURE__ */ jsx22("ul", { children: [
716
758
  {
717
759
  icon: "share",
718
760
  // translators: "Share" action on a Tumblr post
719
- label: __5("Share", "social-previews")
761
+ label: __6("Share", "social-previews")
720
762
  },
721
763
  {
722
764
  icon: "reply",
723
765
  // translators: "Reply" action on a Tumblr post
724
- label: __5("Reply", "social-previews")
766
+ label: __6("Reply", "social-previews")
725
767
  },
726
768
  {
727
769
  icon: "reblog",
728
770
  // translators: "Reblog" action on a Tumblr post
729
- label: __5("Reblog", "social-previews")
771
+ label: __6("Reblog", "social-previews")
730
772
  },
731
773
  {
732
774
  icon: "like",
733
775
  // translators: "Like" action on a Tumblr post
734
- label: __5("Like", "social-previews")
776
+ label: __6("Like", "social-previews")
735
777
  }
736
- ].map(({ icon, label }) => /* @__PURE__ */ jsx21("li", { "aria-label": label, children: /* @__PURE__ */ jsx21(icons_default, { name: icon }) }, icon)) })
778
+ ].map(({ icon, label }) => /* @__PURE__ */ jsx22("li", { "aria-label": label, children: /* @__PURE__ */ jsx22(icons_default, { name: icon }) }, icon)) })
737
779
  ] })
738
780
  ] });
739
781
  var actions_default = TumblrPostActions;
740
782
 
741
783
  // src/tumblr-preview/post/header/index.tsx
742
- import { __ as __6 } from "@wordpress/i18n";
743
- import { jsx as jsx22, jsxs as jsxs13 } from "react/jsx-runtime";
744
- var TumblrPostHeader = ({ user }) => /* @__PURE__ */ jsxs13("div", { className: "tumblr-preview__post-header", children: [
745
- /* @__PURE__ */ jsx22("div", { className: "tumblr-preview__post-header-username", children: user?.displayName || // translators: username of a fictional Tumblr User
746
- __6("anonymous-user", "social-previews") }),
747
- /* @__PURE__ */ jsx22(icons_default, { name: "ellipsis" })
784
+ import { __ as __7 } from "@wordpress/i18n";
785
+ import { jsx as jsx23, jsxs as jsxs14 } from "react/jsx-runtime";
786
+ var TumblrPostHeader = ({ user }) => /* @__PURE__ */ jsxs14("div", { className: "tumblr-preview__post-header", children: [
787
+ /* @__PURE__ */ jsx23("div", { className: "tumblr-preview__post-header-username", children: user?.displayName || // translators: username of a fictional Tumblr User
788
+ __7("anonymous-user", "social-previews") }),
789
+ /* @__PURE__ */ jsx23(icons_default, { name: "ellipsis" })
748
790
  ] });
749
791
  var header_default = TumblrPostHeader;
750
792
 
751
793
  // src/tumblr-preview/link-preview.tsx
752
- import { jsx as jsx23, jsxs as jsxs14 } from "react/jsx-runtime";
794
+ import { jsx as jsx24, jsxs as jsxs15 } from "react/jsx-runtime";
753
795
  var TumblrLinkPreview = ({
754
796
  title,
755
797
  description,
@@ -758,36 +800,36 @@ var TumblrLinkPreview = ({
758
800
  url
759
801
  }) => {
760
802
  const avatarUrl = user?.avatarUrl;
761
- return /* @__PURE__ */ jsxs14("div", { className: "tumblr-preview__post", children: [
762
- avatarUrl && /* @__PURE__ */ jsx23("img", { className: "tumblr-preview__avatar", src: avatarUrl, alt: "" }),
763
- /* @__PURE__ */ jsxs14("div", { className: "tumblr-preview__card", children: [
764
- /* @__PURE__ */ jsx23(header_default, { user }),
765
- /* @__PURE__ */ jsxs14("div", { className: "tumblr-preview__window", children: [
766
- image && /* @__PURE__ */ jsxs14("div", { className: "tumblr-preview__window-top", children: [
767
- /* @__PURE__ */ jsx23("div", { className: "tumblr-preview__overlay", children: /* @__PURE__ */ jsx23("div", { className: "tumblr-preview__title", children: tumblrTitle(title) }) }),
768
- /* @__PURE__ */ jsx23(
803
+ return /* @__PURE__ */ jsxs15("div", { className: "tumblr-preview__post", children: [
804
+ avatarUrl && /* @__PURE__ */ jsx24("img", { className: "tumblr-preview__avatar", src: avatarUrl, alt: "" }),
805
+ /* @__PURE__ */ jsxs15("div", { className: "tumblr-preview__card", children: [
806
+ /* @__PURE__ */ jsx24(header_default, { user }),
807
+ /* @__PURE__ */ jsxs15("div", { className: "tumblr-preview__window", children: [
808
+ image && /* @__PURE__ */ jsxs15("div", { className: "tumblr-preview__window-top", children: [
809
+ /* @__PURE__ */ jsx24("div", { className: "tumblr-preview__overlay", children: /* @__PURE__ */ jsx24("div", { className: "tumblr-preview__title", children: tumblrTitle(title) }) }),
810
+ /* @__PURE__ */ jsx24(
769
811
  "img",
770
812
  {
771
813
  className: "tumblr-preview__image",
772
814
  src: image,
773
- alt: __7("Tumblr preview thumbnail", "social-previews")
815
+ alt: __8("Tumblr preview thumbnail", "social-previews")
774
816
  }
775
817
  )
776
818
  ] }),
777
- /* @__PURE__ */ jsxs14("div", { className: `tumblr-preview__window-bottom ${!image ? "is-full" : ""}`, children: [
778
- !image && /* @__PURE__ */ jsx23("div", { className: "tumblr-preview__title", children: tumblrTitle(title) }),
779
- description && image && /* @__PURE__ */ jsx23("div", { className: "tumblr-preview__description", children: tumblrDescription(description) }),
780
- url && /* @__PURE__ */ jsx23("div", { className: "tumblr-preview__site-name", children: baseDomain(url) })
819
+ /* @__PURE__ */ jsxs15("div", { className: `tumblr-preview__window-bottom ${!image ? "is-full" : ""}`, children: [
820
+ !image && /* @__PURE__ */ jsx24("div", { className: "tumblr-preview__title", children: tumblrTitle(title) }),
821
+ description && image && /* @__PURE__ */ jsx24("div", { className: "tumblr-preview__description", children: tumblrDescription(description) }),
822
+ url && /* @__PURE__ */ jsx24("div", { className: "tumblr-preview__site-name", children: baseDomain(url) })
781
823
  ] })
782
824
  ] }),
783
- /* @__PURE__ */ jsx23(actions_default, {})
825
+ /* @__PURE__ */ jsx24(actions_default, {})
784
826
  ] })
785
827
  ] });
786
828
  };
787
829
 
788
830
  // src/tumblr-preview/post-preview.tsx
789
- import { __ as __8 } from "@wordpress/i18n";
790
- import { jsx as jsx24, jsxs as jsxs15 } from "react/jsx-runtime";
831
+ import { __ as __9 } from "@wordpress/i18n";
832
+ import { jsx as jsx25, jsxs as jsxs16 } from "react/jsx-runtime";
791
833
  var TumblrPostPreview = ({
792
834
  title,
793
835
  description,
@@ -798,33 +840,33 @@ var TumblrPostPreview = ({
798
840
  }) => {
799
841
  const avatarUrl = user?.avatarUrl;
800
842
  const mediaItem = media?.[0];
801
- return /* @__PURE__ */ jsxs15("div", { className: "tumblr-preview__post", children: [
802
- /* @__PURE__ */ jsx24(AvatarWithFallback, { className: "tumblr-preview__avatar", src: avatarUrl }),
803
- /* @__PURE__ */ jsxs15("div", { className: "tumblr-preview__card", children: [
804
- /* @__PURE__ */ jsx24(header_default, { user }),
805
- /* @__PURE__ */ jsxs15("div", { className: "tumblr-preview__body", children: [
806
- title ? /* @__PURE__ */ jsx24("div", { className: "tumblr-preview__title", children: tumblrTitle(title) }) : null,
807
- description && /* @__PURE__ */ jsx24("div", { className: "tumblr-preview__description", children: preparePreviewText(tumblrDescription(description), {
843
+ return /* @__PURE__ */ jsxs16("div", { className: "tumblr-preview__post", children: [
844
+ /* @__PURE__ */ jsx25(AvatarWithFallback, { className: "tumblr-preview__avatar", src: avatarUrl }),
845
+ /* @__PURE__ */ jsxs16("div", { className: "tumblr-preview__card", children: [
846
+ /* @__PURE__ */ jsx25(header_default, { user }),
847
+ /* @__PURE__ */ jsxs16("div", { className: "tumblr-preview__body", children: [
848
+ title ? /* @__PURE__ */ jsx25("div", { className: "tumblr-preview__title", children: tumblrTitle(title) }) : null,
849
+ description && /* @__PURE__ */ jsx25("div", { className: "tumblr-preview__description", children: /* @__PURE__ */ jsx25(ExpandableText, { text: description, children: (visibleText) => preparePreviewText(tumblrDescription(visibleText), {
808
850
  platform: "tumblr"
809
- }) }),
810
- mediaItem ? /* @__PURE__ */ jsx24("div", { className: "tumblr-preview__media-item", children: mediaItem.type.startsWith("video/") ? /* @__PURE__ */ jsx24("video", { controls: true, className: "tumblr-preview__media--video", children: /* @__PURE__ */ jsx24("source", { src: mediaItem.url, type: mediaItem.type }) }) : /* @__PURE__ */ jsx24("img", { className: "tumblr-preview__image", src: mediaItem.url, alt: "" }) }) : image && /* @__PURE__ */ jsx24(
851
+ }) }) }),
852
+ mediaItem ? /* @__PURE__ */ jsx25("div", { className: "tumblr-preview__media-item", children: mediaItem.type.startsWith("video/") ? /* @__PURE__ */ jsx25("video", { controls: true, className: "tumblr-preview__media--video", children: /* @__PURE__ */ jsx25("source", { src: mediaItem.url, type: mediaItem.type }) }) : /* @__PURE__ */ jsx25("img", { className: "tumblr-preview__image", src: mediaItem.url, alt: "" }) }) : image && /* @__PURE__ */ jsx25(
811
853
  "img",
812
854
  {
813
855
  className: "tumblr-preview__image",
814
856
  src: image,
815
- alt: __8("Tumblr preview thumbnail", "social-previews")
857
+ alt: __9("Tumblr preview thumbnail", "social-previews")
816
858
  }
817
859
  ),
818
- /* @__PURE__ */ jsx24("a", { className: "tumblr-preview__url", href: url, target: "_blank", rel: "noreferrer", children: __8("View On WordPress", "social-previews") })
860
+ /* @__PURE__ */ jsx25("a", { className: "tumblr-preview__url", href: url, target: "_blank", rel: "noreferrer", children: __9("View On WordPress", "social-previews") })
819
861
  ] }),
820
- /* @__PURE__ */ jsx24(actions_default, {})
862
+ /* @__PURE__ */ jsx25(actions_default, {})
821
863
  ] })
822
864
  ] });
823
865
  };
824
866
 
825
867
  // src/tumblr-preview/previews.tsx
826
- import { __ as __9 } from "@wordpress/i18n";
827
- import { jsx as jsx25, jsxs as jsxs16 } from "react/jsx-runtime";
868
+ import { __ as __10 } from "@wordpress/i18n";
869
+ import { jsx as jsx26, jsxs as jsxs17 } from "react/jsx-runtime";
828
870
  var TumblrPreviews = ({
829
871
  headingLevel,
830
872
  hideLinkPreview,
@@ -832,36 +874,36 @@ var TumblrPreviews = ({
832
874
  ...props
833
875
  }) => {
834
876
  const hasMedia = !!props.media?.length;
835
- return /* @__PURE__ */ jsxs16("div", { className: "social-preview tumblr-preview", children: [
836
- !hidePostPreview && /* @__PURE__ */ jsxs16("section", { className: "social-preview__section tumblr-preview__section", children: [
837
- /* @__PURE__ */ jsx25(SectionHeading, {
877
+ return /* @__PURE__ */ jsxs17("div", { className: "social-preview tumblr-preview", children: [
878
+ !hidePostPreview && /* @__PURE__ */ jsxs17("section", { className: "social-preview__section tumblr-preview__section", children: [
879
+ /* @__PURE__ */ jsx26(SectionHeading, {
838
880
  level: headingLevel,
839
881
  // translators: refers to a social post on Tumblr
840
- children: __9("Your post", "social-previews")
882
+ children: __10("Your post", "social-previews")
841
883
  }),
842
- /* @__PURE__ */ jsx25("p", { className: "social-preview__section-desc", children: __9("This is what your social post will look like on Tumblr:", "social-previews") }),
843
- hasMedia ? /* @__PURE__ */ jsx25(TumblrPostPreview, { ...props }) : /* @__PURE__ */ jsx25(TumblrLinkPreview, { ...props })
884
+ /* @__PURE__ */ jsx26("p", { className: "social-preview__section-desc", children: __10("This is what your social post will look like on Tumblr:", "social-previews") }),
885
+ hasMedia ? /* @__PURE__ */ jsx26(TumblrPostPreview, { ...props }) : /* @__PURE__ */ jsx26(TumblrLinkPreview, { ...props })
844
886
  ] }),
845
- !hideLinkPreview && /* @__PURE__ */ jsxs16("section", { className: "social-preview__section tumblr-preview__section", children: [
846
- /* @__PURE__ */ jsx25(SectionHeading, {
887
+ !hideLinkPreview && /* @__PURE__ */ jsxs17("section", { className: "social-preview__section tumblr-preview__section", children: [
888
+ /* @__PURE__ */ jsx26(SectionHeading, {
847
889
  level: headingLevel,
848
890
  // translators: refers to a link on Tumblr
849
- children: __9("Link preview", "social-previews")
891
+ children: __10("Link preview", "social-previews")
850
892
  }),
851
- /* @__PURE__ */ jsx25("p", { className: "social-preview__section-desc", children: __9(
893
+ /* @__PURE__ */ jsx26("p", { className: "social-preview__section-desc", children: __10(
852
894
  "This is what it will look like when someone shares the link to your WordPress post on Tumblr.",
853
895
  "social-previews"
854
896
  ) }),
855
- /* @__PURE__ */ jsx25(TumblrLinkPreview, { ...props, user: void 0 })
897
+ /* @__PURE__ */ jsx26(TumblrLinkPreview, { ...props, user: void 0 })
856
898
  ] })
857
899
  ] });
858
900
  };
859
901
 
860
902
  // src/facebook-preview/previews.tsx
861
- import { __ as __14 } from "@wordpress/i18n";
903
+ import { __ as __15 } from "@wordpress/i18n";
862
904
 
863
905
  // src/facebook-preview/link-preview.tsx
864
- import { __ as __13 } from "@wordpress/i18n";
906
+ import { __ as __14 } from "@wordpress/i18n";
865
907
 
866
908
  // src/constants.ts
867
909
  var AUTO_SHARED_SOCIAL_POST_PREVIEW = "AUTO_SHARED_SOCIAL_POST_PREVIEW";
@@ -875,7 +917,7 @@ var PORTRAIT_MODE = "portrait";
875
917
  // src/facebook-preview/helpers.ts
876
918
  var TITLE_LENGTH3 = 110;
877
919
  var DESCRIPTION_LENGTH4 = 200;
878
- var CUSTOM_TEXT_LENGTH = 440;
920
+ var CUSTOM_TEXT_LENGTH = 63206;
879
921
  var facebookTitle = (text) => firstValid(
880
922
  shortEnough(TITLE_LENGTH3),
881
923
  hardTruncation(TITLE_LENGTH3)
@@ -886,11 +928,12 @@ var facebookDescription = (text) => firstValid(
886
928
  )(stripHtmlTags(text)) || "";
887
929
 
888
930
  // src/facebook-preview/custom-text.tsx
889
- import { jsx as jsx26, jsxs as jsxs17 } from "react/jsx-runtime";
931
+ import { jsx as jsx27, jsxs as jsxs18 } from "react/jsx-runtime";
890
932
  var CustomText = ({ text, url, forceUrlDisplay }) => {
891
933
  let postLink;
892
- if (forceUrlDisplay || hasTag(text, "a")) {
893
- postLink = /* @__PURE__ */ jsx26(
934
+ const showPostLink = hasTag(text, "a") || forceUrlDisplay && !!url && !text.includes(url);
935
+ if (showPostLink) {
936
+ postLink = /* @__PURE__ */ jsx27(
894
937
  "a",
895
938
  {
896
939
  className: "facebook-preview__custom-text-post-url",
@@ -901,18 +944,18 @@ var CustomText = ({ text, url, forceUrlDisplay }) => {
901
944
  }
902
945
  );
903
946
  }
904
- return /* @__PURE__ */ jsxs17("p", { className: "facebook-preview__custom-text", children: [
905
- /* @__PURE__ */ jsx26("span", { children: preparePreviewText(text, {
947
+ return /* @__PURE__ */ jsxs18("p", { className: "facebook-preview__custom-text", children: [
948
+ /* @__PURE__ */ jsx27("span", { children: /* @__PURE__ */ jsx27(ExpandableText, { text, children: (visibleText) => preparePreviewText(visibleText, {
906
949
  platform: "facebook",
907
950
  maxChars: CUSTOM_TEXT_LENGTH
908
- }) }),
951
+ }) }) }),
909
952
  postLink
910
953
  ] });
911
954
  };
912
955
  var custom_text_default = CustomText;
913
956
 
914
957
  // src/facebook-preview/hooks/use-image-hook.ts
915
- import { __ as __10 } from "@wordpress/i18n";
958
+ import { __ as __11 } from "@wordpress/i18n";
916
959
  import { useCallback as useCallback3, useState as useState3 } from "react";
917
960
  var useImage = ({ mode: initialMode }) => {
918
961
  const [mode, setMode] = useState3(initialMode);
@@ -932,7 +975,7 @@ var useImage = ({ mode: initialMode }) => {
932
975
  mode,
933
976
  isLoadingImage,
934
977
  {
935
- alt: __10("Facebook Preview Thumbnail", "social-previews"),
978
+ alt: __11("Facebook Preview Thumbnail", "social-previews"),
936
979
  onLoad,
937
980
  onError
938
981
  }
@@ -941,55 +984,55 @@ var useImage = ({ mode: initialMode }) => {
941
984
  var use_image_hook_default = useImage;
942
985
 
943
986
  // src/facebook-preview/post/actions/index.tsx
944
- import { __ as __11 } from "@wordpress/i18n";
987
+ import { __ as __12 } from "@wordpress/i18n";
945
988
 
946
989
  // src/facebook-preview/post/icons/index.tsx
947
- import { jsx as jsx27 } from "react/jsx-runtime";
948
- var FacebookPostIcon = ({ name }) => /* @__PURE__ */ jsx27("i", { className: `facebook-preview__post-icon facebook-preview__post-icon-${name}` });
990
+ import { jsx as jsx28 } from "react/jsx-runtime";
991
+ var FacebookPostIcon = ({ name }) => /* @__PURE__ */ jsx28("i", { className: `facebook-preview__post-icon facebook-preview__post-icon-${name}` });
949
992
  var icons_default2 = FacebookPostIcon;
950
993
 
951
994
  // src/facebook-preview/post/actions/index.tsx
952
- import { jsx as jsx28, jsxs as jsxs18 } from "react/jsx-runtime";
953
- var FacebookPostActions = () => /* @__PURE__ */ jsx28("ul", { className: "facebook-preview__post-actions", children: [
995
+ import { jsx as jsx29, jsxs as jsxs19 } from "react/jsx-runtime";
996
+ var FacebookPostActions = () => /* @__PURE__ */ jsx29("ul", { className: "facebook-preview__post-actions", children: [
954
997
  {
955
998
  icon: "like",
956
999
  // translators: Facebook "Like" action
957
- label: __11("Like", "social-previews")
1000
+ label: __12("Like", "social-previews")
958
1001
  },
959
1002
  {
960
1003
  icon: "comment",
961
1004
  // translators: Facebook "Comment" action
962
- label: __11("Comment", "social-previews")
1005
+ label: __12("Comment", "social-previews")
963
1006
  },
964
1007
  {
965
1008
  icon: "share",
966
1009
  // translators: Facebook "Share" action
967
- label: __11("Share", "social-previews")
1010
+ label: __12("Share", "social-previews")
968
1011
  }
969
- ].map(({ icon, label }) => /* @__PURE__ */ jsxs18("li", { children: [
970
- /* @__PURE__ */ jsx28(icons_default2, { name: icon }),
971
- /* @__PURE__ */ jsx28("span", { children: label })
1012
+ ].map(({ icon, label }) => /* @__PURE__ */ jsxs19("li", { children: [
1013
+ /* @__PURE__ */ jsx29(icons_default2, { name: icon }),
1014
+ /* @__PURE__ */ jsx29("span", { children: label })
972
1015
  ] }, icon)) });
973
1016
  var actions_default2 = FacebookPostActions;
974
1017
 
975
1018
  // src/facebook-preview/post/header/index.tsx
976
- import { __ as __12, _x } from "@wordpress/i18n";
977
- import { jsx as jsx29, jsxs as jsxs19 } from "react/jsx-runtime";
1019
+ import { __ as __13, _x } from "@wordpress/i18n";
1020
+ import { jsx as jsx30, jsxs as jsxs20 } from "react/jsx-runtime";
978
1021
  var FacebookPostHeader = ({ user, timeElapsed, hideOptions }) => {
979
- return /* @__PURE__ */ jsxs19("div", { className: "facebook-preview__post-header", children: [
980
- /* @__PURE__ */ jsxs19("div", { className: "facebook-preview__post-header-content", children: [
981
- /* @__PURE__ */ jsx29(
1022
+ return /* @__PURE__ */ jsxs20("div", { className: "facebook-preview__post-header", children: [
1023
+ /* @__PURE__ */ jsxs20("div", { className: "facebook-preview__post-header-content", children: [
1024
+ /* @__PURE__ */ jsx30(
982
1025
  AvatarWithFallback,
983
1026
  {
984
1027
  className: "facebook-preview__post-header-avatar",
985
1028
  src: user?.avatarUrl
986
1029
  }
987
1030
  ),
988
- /* @__PURE__ */ jsxs19("div", { children: [
989
- /* @__PURE__ */ jsx29("div", { className: "facebook-preview__post-header-name", children: user?.displayName || // translators: name of a fictional Facebook User
990
- __12("Anonymous User", "social-previews") }),
991
- /* @__PURE__ */ jsxs19("div", { className: "facebook-preview__post-header-share", children: [
992
- /* @__PURE__ */ jsx29("span", { className: "facebook-preview__post-header-time", children: timeElapsed ? __12(
1031
+ /* @__PURE__ */ jsxs20("div", { children: [
1032
+ /* @__PURE__ */ jsx30("div", { className: "facebook-preview__post-header-name", children: user?.displayName || // translators: name of a fictional Facebook User
1033
+ __13("Anonymous User", "social-previews") }),
1034
+ /* @__PURE__ */ jsxs20("div", { className: "facebook-preview__post-header-share", children: [
1035
+ /* @__PURE__ */ jsx30("span", { className: "facebook-preview__post-header-time", children: timeElapsed ? __13(
993
1036
  // translators: short version of `1 hour`
994
1037
  "1h",
995
1038
  "social-previews"
@@ -999,18 +1042,18 @@ var FacebookPostHeader = ({ user, timeElapsed, hideOptions }) => {
999
1042
  "",
1000
1043
  "social-previews"
1001
1044
  ) }),
1002
- /* @__PURE__ */ jsx29("span", { className: "facebook-preview__post-header-dot", "aria-hidden": "true", children: "\xB7" }),
1003
- /* @__PURE__ */ jsx29(icons_default2, { name: "public" })
1045
+ /* @__PURE__ */ jsx30("span", { className: "facebook-preview__post-header-dot", "aria-hidden": "true", children: "\xB7" }),
1046
+ /* @__PURE__ */ jsx30(icons_default2, { name: "public" })
1004
1047
  ] })
1005
1048
  ] })
1006
1049
  ] }),
1007
- !hideOptions && /* @__PURE__ */ jsx29("div", { className: "facebook-preview__post-header-more" })
1050
+ !hideOptions && /* @__PURE__ */ jsx30("div", { className: "facebook-preview__post-header-more" })
1008
1051
  ] });
1009
1052
  };
1010
1053
  var header_default2 = FacebookPostHeader;
1011
1054
 
1012
1055
  // src/facebook-preview/link-preview.tsx
1013
- import { jsx as jsx30, jsxs as jsxs20 } from "react/jsx-runtime";
1056
+ import { jsx as jsx31, jsxs as jsxs21 } from "react/jsx-runtime";
1014
1057
  var FacebookLinkPreview = ({
1015
1058
  url,
1016
1059
  title,
@@ -1026,48 +1069,48 @@ var FacebookLinkPreview = ({
1026
1069
  const isArticle = type === TYPE_ARTICLE;
1027
1070
  const portraitMode = isArticle && !image || mode === PORTRAIT_MODE;
1028
1071
  const modeClass = `is-${portraitMode ? "portrait" : "landscape"}`;
1029
- return /* @__PURE__ */ jsxs20("div", { className: "facebook-preview__post", children: [
1030
- /* @__PURE__ */ jsx30(header_default2, { user }),
1031
- /* @__PURE__ */ jsxs20("div", { className: "facebook-preview__content", children: [
1032
- customText && /* @__PURE__ */ jsx30(custom_text_default, { text: customText, url }),
1033
- /* @__PURE__ */ jsxs20(
1072
+ return /* @__PURE__ */ jsxs21("div", { className: "facebook-preview__post", children: [
1073
+ /* @__PURE__ */ jsx31(header_default2, { user }),
1074
+ /* @__PURE__ */ jsxs21("div", { className: "facebook-preview__content", children: [
1075
+ customText && /* @__PURE__ */ jsx31(custom_text_default, { text: customText, url }),
1076
+ /* @__PURE__ */ jsxs21(
1034
1077
  "div",
1035
1078
  {
1036
1079
  className: `facebook-preview__body ${modeClass} ${image && isLoadingImage ? "is-loading" : ""}`,
1037
1080
  children: [
1038
- (image || isArticle) && /* @__PURE__ */ jsx30(
1081
+ (image || isArticle) && /* @__PURE__ */ jsx31(
1039
1082
  "div",
1040
1083
  {
1041
1084
  className: `facebook-preview__image ${image ? "" : "is-empty"} ${modeClass}`,
1042
- children: image && /* @__PURE__ */ jsx30("img", { src: image, ...imgProps })
1085
+ children: image && /* @__PURE__ */ jsx31("img", { src: image, ...imgProps })
1043
1086
  }
1044
1087
  ),
1045
- /* @__PURE__ */ jsx30("div", { className: "facebook-preview__text", children: /* @__PURE__ */ jsxs20("div", { className: "facebook-preview__text-wrapper", children: [
1046
- /* @__PURE__ */ jsx30("div", { className: "facebook-preview__url", children: baseDomain(url) }),
1047
- /* @__PURE__ */ jsx30("div", { className: "facebook-preview__title", children: facebookTitle(title) || baseDomain(url) }),
1048
- /* @__PURE__ */ jsxs20(
1088
+ /* @__PURE__ */ jsx31("div", { className: "facebook-preview__text", children: /* @__PURE__ */ jsxs21("div", { className: "facebook-preview__text-wrapper", children: [
1089
+ /* @__PURE__ */ jsx31("div", { className: "facebook-preview__url", children: baseDomain(url) }),
1090
+ /* @__PURE__ */ jsx31("div", { className: "facebook-preview__title", children: facebookTitle(title) || baseDomain(url) }),
1091
+ /* @__PURE__ */ jsxs21(
1049
1092
  "div",
1050
1093
  {
1051
1094
  className: `facebook-preview__description ${compactDescription ? "is-compact" : ""}`,
1052
1095
  children: [
1053
1096
  description && facebookDescription(description),
1054
1097
  isArticle && !description && // translators: Default description for a Facebook post
1055
- __13("Visit the post for more.", "social-previews")
1098
+ __14("Visit the post for more.", "social-previews")
1056
1099
  ]
1057
1100
  }
1058
1101
  ),
1059
- /* @__PURE__ */ jsx30("div", { className: "facebook-preview__info", children: /* @__PURE__ */ jsx30(icons_default2, { name: "info" }) })
1102
+ /* @__PURE__ */ jsx31("div", { className: "facebook-preview__info", children: /* @__PURE__ */ jsx31(icons_default2, { name: "info" }) })
1060
1103
  ] }) })
1061
1104
  ]
1062
1105
  }
1063
1106
  )
1064
1107
  ] }),
1065
- /* @__PURE__ */ jsx30(actions_default2, {})
1108
+ /* @__PURE__ */ jsx31(actions_default2, {})
1066
1109
  ] });
1067
1110
  };
1068
1111
 
1069
1112
  // src/facebook-preview/link-preview-details.tsx
1070
- import { jsx as jsx31, jsxs as jsxs21 } from "react/jsx-runtime";
1113
+ import { jsx as jsx32, jsxs as jsxs22 } from "react/jsx-runtime";
1071
1114
  var LinkPreviewDetails = ({
1072
1115
  url,
1073
1116
  customImage,
@@ -1077,25 +1120,25 @@ var LinkPreviewDetails = ({
1077
1120
  }) => {
1078
1121
  const [mode, isLoadingImage, imgProps] = use_image_hook_default({ mode: imageMode });
1079
1122
  const modeClass = `is-${mode === PORTRAIT_MODE ? "portrait" : "landscape"}`;
1080
- return /* @__PURE__ */ jsxs21("div", { className: "facebook-preview__post", children: [
1081
- /* @__PURE__ */ jsx31(header_default2, { user: void 0 }),
1082
- /* @__PURE__ */ jsx31("div", { className: "facebook-preview__content", children: /* @__PURE__ */ jsxs21(
1123
+ return /* @__PURE__ */ jsxs22("div", { className: "facebook-preview__post", children: [
1124
+ /* @__PURE__ */ jsx32(header_default2, { user: void 0 }),
1125
+ /* @__PURE__ */ jsx32("div", { className: "facebook-preview__content", children: /* @__PURE__ */ jsxs22(
1083
1126
  "div",
1084
1127
  {
1085
1128
  className: `facebook-preview__window ${modeClass} ${customImage && isLoadingImage ? "is-loading" : ""}`,
1086
1129
  children: [
1087
- /* @__PURE__ */ jsx31("div", { className: `facebook-preview__custom-image ${modeClass}`, children: /* @__PURE__ */ jsx31("img", { src: customImage, ...imgProps }) }),
1088
- /* @__PURE__ */ jsx31(header_default2, { user, timeElapsed: true, hideOptions: true }),
1089
- customText && /* @__PURE__ */ jsx31(custom_text_default, { text: customText, url, forceUrlDisplay: true })
1130
+ /* @__PURE__ */ jsx32("div", { className: `facebook-preview__custom-image ${modeClass}`, children: /* @__PURE__ */ jsx32("img", { src: customImage, ...imgProps }) }),
1131
+ /* @__PURE__ */ jsx32(header_default2, { user, timeElapsed: true, hideOptions: true }),
1132
+ customText && /* @__PURE__ */ jsx32(custom_text_default, { text: customText, url, forceUrlDisplay: true })
1090
1133
  ]
1091
1134
  }
1092
1135
  ) }),
1093
- /* @__PURE__ */ jsx31(actions_default2, {})
1136
+ /* @__PURE__ */ jsx32(actions_default2, {})
1094
1137
  ] });
1095
1138
  };
1096
1139
 
1097
1140
  // src/facebook-preview/post-preview.tsx
1098
- import { jsx as jsx32, jsxs as jsxs22 } from "react/jsx-runtime";
1141
+ import { jsx as jsx33, jsxs as jsxs23 } from "react/jsx-runtime";
1099
1142
  var FacebookPostPreview = ({
1100
1143
  url,
1101
1144
  user,
@@ -1105,25 +1148,25 @@ var FacebookPostPreview = ({
1105
1148
  }) => {
1106
1149
  const [mode] = use_image_hook_default({ mode: imageMode });
1107
1150
  const modeClass = `is-${mode === PORTRAIT_MODE ? "portrait" : "landscape"}`;
1108
- return /* @__PURE__ */ jsxs22("div", { className: "facebook-preview__post", children: [
1109
- /* @__PURE__ */ jsx32(header_default2, { user }),
1110
- /* @__PURE__ */ jsxs22("div", { className: "facebook-preview__content", children: [
1111
- customText && /* @__PURE__ */ jsx32(custom_text_default, { text: customText, url, forceUrlDisplay: true }),
1112
- /* @__PURE__ */ jsx32("div", { className: "facebook-preview__body", children: media ? /* @__PURE__ */ jsx32("div", { className: `facebook-preview__media ${modeClass}`, children: media.map((mediaItem, index) => /* @__PURE__ */ jsx32(
1151
+ return /* @__PURE__ */ jsxs23("div", { className: "facebook-preview__post", children: [
1152
+ /* @__PURE__ */ jsx33(header_default2, { user }),
1153
+ /* @__PURE__ */ jsxs23("div", { className: "facebook-preview__content", children: [
1154
+ customText && /* @__PURE__ */ jsx33(custom_text_default, { text: customText, url, forceUrlDisplay: true }),
1155
+ /* @__PURE__ */ jsx33("div", { className: "facebook-preview__body", children: media ? /* @__PURE__ */ jsx33("div", { className: `facebook-preview__media ${modeClass}`, children: media.map((mediaItem, index) => /* @__PURE__ */ jsx33(
1113
1156
  "div",
1114
1157
  {
1115
1158
  className: `facebook-preview__media-item ${modeClass}`,
1116
- children: mediaItem.type.startsWith("video/") ? /* @__PURE__ */ jsx32("video", { controls: true, children: /* @__PURE__ */ jsx32("source", { src: mediaItem.url, type: mediaItem.type }) }) : /* @__PURE__ */ jsx32("img", { alt: mediaItem.alt || "", src: mediaItem.url })
1159
+ children: mediaItem.type.startsWith("video/") ? /* @__PURE__ */ jsx33("video", { controls: true, children: /* @__PURE__ */ jsx33("source", { src: mediaItem.url, type: mediaItem.type }) }) : /* @__PURE__ */ jsx33("img", { alt: mediaItem.alt || "", src: mediaItem.url })
1117
1160
  },
1118
1161
  `facebook-preview__media-item-${index}`
1119
1162
  )) }) : null })
1120
1163
  ] }),
1121
- /* @__PURE__ */ jsx32(actions_default2, {})
1164
+ /* @__PURE__ */ jsx33(actions_default2, {})
1122
1165
  ] });
1123
1166
  };
1124
1167
 
1125
1168
  // src/facebook-preview/previews.tsx
1126
- import { jsx as jsx33, jsxs as jsxs23 } from "react/jsx-runtime";
1169
+ import { jsx as jsx34, jsxs as jsxs24 } from "react/jsx-runtime";
1127
1170
  var FacebookPreviews = ({
1128
1171
  headingLevel,
1129
1172
  hideLinkPreview,
@@ -1132,36 +1175,36 @@ var FacebookPreviews = ({
1132
1175
  }) => {
1133
1176
  const hasMedia = !!props.media?.length;
1134
1177
  const hasCustomImage = !!props.customImage;
1135
- return /* @__PURE__ */ jsxs23("div", { className: "social-preview facebook-preview", children: [
1136
- !hidePostPreview && /* @__PURE__ */ jsxs23("section", { className: "social-preview__section facebook-preview__section", children: [
1137
- /* @__PURE__ */ jsx33(section_heading_default, {
1178
+ return /* @__PURE__ */ jsxs24("div", { className: "social-preview facebook-preview", children: [
1179
+ !hidePostPreview && /* @__PURE__ */ jsxs24("section", { className: "social-preview__section facebook-preview__section", children: [
1180
+ /* @__PURE__ */ jsx34(section_heading_default, {
1138
1181
  level: headingLevel,
1139
1182
  // translators: refers to a social post on Facebook
1140
- children: __14("Your post", "social-previews")
1183
+ children: __15("Your post", "social-previews")
1141
1184
  }),
1142
- /* @__PURE__ */ jsx33("p", { className: "social-preview__section-desc", children: __14("This is what your social post will look like on Facebook:", "social-previews") }),
1143
- hasMedia ? /* @__PURE__ */ jsx33(FacebookPostPreview, { ...props }) : /* @__PURE__ */ jsx33(FacebookLinkPreview, { ...props })
1185
+ /* @__PURE__ */ jsx34("p", { className: "social-preview__section-desc", children: __15("This is what your social post will look like on Facebook:", "social-previews") }),
1186
+ hasMedia ? /* @__PURE__ */ jsx34(FacebookPostPreview, { ...props }) : /* @__PURE__ */ jsx34(FacebookLinkPreview, { ...props })
1144
1187
  ] }),
1145
- !hideLinkPreview && /* @__PURE__ */ jsxs23("section", { className: "social-preview__section facebook-preview__section", children: [
1146
- /* @__PURE__ */ jsx33(section_heading_default, {
1188
+ !hideLinkPreview && /* @__PURE__ */ jsxs24("section", { className: "social-preview__section facebook-preview__section", children: [
1189
+ /* @__PURE__ */ jsx34(section_heading_default, {
1147
1190
  level: headingLevel,
1148
1191
  // translators: refers to a link to a Facebook post
1149
- children: __14("Link preview", "social-previews")
1192
+ children: __15("Link preview", "social-previews")
1150
1193
  }),
1151
- /* @__PURE__ */ jsx33("p", { className: "social-preview__section-desc", children: __14(
1194
+ /* @__PURE__ */ jsx34("p", { className: "social-preview__section-desc", children: __15(
1152
1195
  "This is what it will look like when someone shares the link to your WordPress post on Facebook.",
1153
1196
  "social-previews"
1154
1197
  ) }),
1155
- hasCustomImage ? /* @__PURE__ */ jsx33(LinkPreviewDetails, { ...props }) : /* @__PURE__ */ jsx33(FacebookLinkPreview, { ...props, compactDescription: true, customText: "", user: void 0 })
1198
+ hasCustomImage ? /* @__PURE__ */ jsx34(LinkPreviewDetails, { ...props }) : /* @__PURE__ */ jsx34(FacebookLinkPreview, { ...props, compactDescription: true, customText: "", user: void 0 })
1156
1199
  ] })
1157
1200
  ] });
1158
1201
  };
1159
1202
 
1160
1203
  // src/mastodon-preview/post/actions/index.tsx
1161
- import { jsx as jsx34, jsxs as jsxs24 } from "react/jsx-runtime";
1162
- var MastodonPostActions = () => /* @__PURE__ */ jsxs24("div", { className: "mastodon-preview__post-actions", children: [
1163
- /* @__PURE__ */ jsxs24("div", { children: [
1164
- /* @__PURE__ */ jsx34(
1204
+ import { jsx as jsx35, jsxs as jsxs25 } from "react/jsx-runtime";
1205
+ var MastodonPostActions = () => /* @__PURE__ */ jsxs25("div", { className: "mastodon-preview__post-actions", children: [
1206
+ /* @__PURE__ */ jsxs25("div", { children: [
1207
+ /* @__PURE__ */ jsx35(
1165
1208
  "svg",
1166
1209
  {
1167
1210
  xmlns: "http://www.w3.org/2000/svg",
@@ -1169,13 +1212,13 @@ var MastodonPostActions = () => /* @__PURE__ */ jsxs24("div", { className: "mast
1169
1212
  viewBox: "0 -960 960 960",
1170
1213
  width: "24",
1171
1214
  "aria-hidden": "true",
1172
- children: /* @__PURE__ */ jsx34("path", { d: "M760-200v-160q0-50-35-85t-85-35H273l144 144-57 56-240-240 240-240 57 56-144 144h367q83 0 141.5 58.5T840-360v160h-80Z" })
1215
+ children: /* @__PURE__ */ jsx35("path", { d: "M760-200v-160q0-50-35-85t-85-35H273l144 144-57 56-240-240 240-240 57 56-144 144h367q83 0 141.5 58.5T840-360v160h-80Z" })
1173
1216
  }
1174
1217
  ),
1175
1218
  "\xA0",
1176
- /* @__PURE__ */ jsx34("span", { children: 0 })
1219
+ /* @__PURE__ */ jsx35("span", { children: 0 })
1177
1220
  ] }),
1178
- /* @__PURE__ */ jsx34("div", { children: /* @__PURE__ */ jsx34(
1221
+ /* @__PURE__ */ jsx35("div", { children: /* @__PURE__ */ jsx35(
1179
1222
  "svg",
1180
1223
  {
1181
1224
  xmlns: "http://www.w3.org/2000/svg",
@@ -1183,10 +1226,10 @@ var MastodonPostActions = () => /* @__PURE__ */ jsxs24("div", { className: "mast
1183
1226
  viewBox: "0 -960 960 960",
1184
1227
  width: "24",
1185
1228
  "aria-hidden": "true",
1186
- children: /* @__PURE__ */ jsx34("path", { d: "M280-80 120-240l160-160 56 58-62 62h406v-160h80v240H274l62 62-56 58Zm-80-440v-240h486l-62-62 56-58 160 160-160 160-56-58 62-62H280v160h-80Z" })
1229
+ children: /* @__PURE__ */ jsx35("path", { d: "M280-80 120-240l160-160 56 58-62 62h406v-160h80v240H274l62 62-56 58Zm-80-440v-240h486l-62-62 56-58 160 160-160 160-56-58 62-62H280v160h-80Z" })
1187
1230
  }
1188
1231
  ) }),
1189
- /* @__PURE__ */ jsx34("div", { children: /* @__PURE__ */ jsx34(
1232
+ /* @__PURE__ */ jsx35("div", { children: /* @__PURE__ */ jsx35(
1190
1233
  "svg",
1191
1234
  {
1192
1235
  xmlns: "http://www.w3.org/2000/svg",
@@ -1194,10 +1237,10 @@ var MastodonPostActions = () => /* @__PURE__ */ jsxs24("div", { className: "mast
1194
1237
  viewBox: "0 -960 960 960",
1195
1238
  width: "24",
1196
1239
  "aria-hidden": "true",
1197
- children: /* @__PURE__ */ jsx34("path", { d: "m354-287 126-76 126 77-33-144 111-96-146-13-58-136-58 135-146 13 111 97-33 143ZM233-120l65-281L80-590l288-25 112-265 112 265 288 25-218 189 65 281-247-149-247 149Zm247-350Z" })
1240
+ children: /* @__PURE__ */ jsx35("path", { d: "m354-287 126-76 126 77-33-144 111-96-146-13-58-136-58 135-146 13 111 97-33 143ZM233-120l65-281L80-590l288-25 112-265 112 265 288 25-218 189 65 281-247-149-247 149Zm247-350Z" })
1198
1241
  }
1199
1242
  ) }),
1200
- /* @__PURE__ */ jsx34("div", { children: /* @__PURE__ */ jsx34(
1243
+ /* @__PURE__ */ jsx35("div", { children: /* @__PURE__ */ jsx35(
1201
1244
  "svg",
1202
1245
  {
1203
1246
  xmlns: "http://www.w3.org/2000/svg",
@@ -1205,10 +1248,10 @@ var MastodonPostActions = () => /* @__PURE__ */ jsxs24("div", { className: "mast
1205
1248
  viewBox: "0 -960 960 960",
1206
1249
  width: "24",
1207
1250
  "aria-hidden": "true",
1208
- children: /* @__PURE__ */ jsx34("path", { d: "M200-120v-640q0-33 23.5-56.5T280-840h400q33 0 56.5 23.5T760-760v640L480-240 200-120Zm80-122 200-86 200 86v-518H280v518Zm0-518h400-400Z" })
1251
+ children: /* @__PURE__ */ jsx35("path", { d: "M200-120v-640q0-33 23.5-56.5T280-840h400q33 0 56.5 23.5T760-760v640L480-240 200-120Zm80-122 200-86 200 86v-518H280v518Zm0-518h400-400Z" })
1209
1252
  }
1210
1253
  ) }),
1211
- /* @__PURE__ */ jsx34("div", { children: /* @__PURE__ */ jsx34(
1254
+ /* @__PURE__ */ jsx35("div", { children: /* @__PURE__ */ jsx35(
1212
1255
  "svg",
1213
1256
  {
1214
1257
  xmlns: "http://www.w3.org/2000/svg",
@@ -1216,14 +1259,14 @@ var MastodonPostActions = () => /* @__PURE__ */ jsxs24("div", { className: "mast
1216
1259
  viewBox: "0 -960 960 960",
1217
1260
  width: "24",
1218
1261
  "aria-hidden": "true",
1219
- children: /* @__PURE__ */ jsx34("path", { d: "M240-400q-33 0-56.5-23.5T160-480q0-33 23.5-56.5T240-560q33 0 56.5 23.5T320-480q0 33-23.5 56.5T240-400Zm240 0q-33 0-56.5-23.5T400-480q0-33 23.5-56.5T480-560q33 0 56.5 23.5T560-480q0 33-23.5 56.5T480-400Zm240 0q-33 0-56.5-23.5T640-480q0-33 23.5-56.5T720-560q33 0 56.5 23.5T800-480q0 33-23.5 56.5T720-400Z" })
1262
+ children: /* @__PURE__ */ jsx35("path", { d: "M240-400q-33 0-56.5-23.5T160-480q0-33 23.5-56.5T240-560q33 0 56.5 23.5T320-480q0 33-23.5 56.5T240-400Zm240 0q-33 0-56.5-23.5T400-480q0-33 23.5-56.5T480-560q33 0 56.5 23.5T560-480q0 33-23.5 56.5T480-400Zm240 0q-33 0-56.5-23.5T640-480q0-33 23.5-56.5T720-560q33 0 56.5 23.5T800-480q0 33-23.5 56.5T720-400Z" })
1220
1263
  }
1221
1264
  ) })
1222
1265
  ] });
1223
1266
  var actions_default3 = MastodonPostActions;
1224
1267
 
1225
1268
  // src/mastodon-preview/post/card/index.tsx
1226
- import { __ as __15 } from "@wordpress/i18n";
1269
+ import { __ as __16 } from "@wordpress/i18n";
1227
1270
  import clsx3 from "clsx";
1228
1271
 
1229
1272
  // src/mastodon-preview/constants.ts
@@ -1233,6 +1276,7 @@ var DEFAULT_MASTODON_INSTANCE = "mastodon.social";
1233
1276
  var TITLE_LENGTH4 = 200;
1234
1277
  var BODY_LENGTH = 500;
1235
1278
  var URL_LENGTH2 = 30;
1279
+ var BODY_CHAR_LIMIT = BODY_LENGTH - URL_LENGTH2;
1236
1280
  var ADDRESS_PATTERN = /^@([^@]*)@([^@]*)$/i;
1237
1281
  var mastodonTitle = (text) => firstValid(
1238
1282
  shortEnough(TITLE_LENGTH4),
@@ -1256,7 +1300,7 @@ var getMastodonAddressDetails = (address) => {
1256
1300
  };
1257
1301
 
1258
1302
  // src/mastodon-preview/post/card/index.tsx
1259
- import { jsx as jsx35, jsxs as jsxs25 } from "react/jsx-runtime";
1303
+ import { jsx as jsx36, jsxs as jsxs26 } from "react/jsx-runtime";
1260
1304
  var MastodonPostCard = ({
1261
1305
  siteName,
1262
1306
  title,
@@ -1265,14 +1309,14 @@ var MastodonPostCard = ({
1265
1309
  image,
1266
1310
  customImage
1267
1311
  }) => {
1268
- return /* @__PURE__ */ jsxs25("div", { className: clsx3("mastodon-preview__card", { "has-image": image }), children: [
1269
- /* @__PURE__ */ jsx35("div", { className: "mastodon-preview__card-img", children: image || customImage ? /* @__PURE__ */ jsx35(
1312
+ return /* @__PURE__ */ jsxs26("div", { className: clsx3("mastodon-preview__card", { "has-image": image }), children: [
1313
+ /* @__PURE__ */ jsx36("div", { className: "mastodon-preview__card-img", children: image || customImage ? /* @__PURE__ */ jsx36(
1270
1314
  "img",
1271
1315
  {
1272
1316
  src: image || customImage,
1273
- alt: __15("Mastodon preview thumbnail", "social-previews")
1317
+ alt: __16("Mastodon preview thumbnail", "social-previews")
1274
1318
  }
1275
- ) : /* @__PURE__ */ jsx35("div", { className: "mastodon-preview__card-img--fallback", children: /* @__PURE__ */ jsx35(
1319
+ ) : /* @__PURE__ */ jsx36("div", { className: "mastodon-preview__card-img--fallback", children: /* @__PURE__ */ jsx36(
1276
1320
  "svg",
1277
1321
  {
1278
1322
  xmlns: "http://www.w3.org/2000/svg",
@@ -1280,25 +1324,25 @@ var MastodonPostCard = ({
1280
1324
  viewBox: "0 -960 960 960",
1281
1325
  width: "24",
1282
1326
  "aria-hidden": "true",
1283
- children: /* @__PURE__ */ jsx35("path", { d: "M320-240h320v-80H320v80Zm0-160h320v-80H320v80ZM240-80q-33 0-56.5-23.5T160-160v-640q0-33 23.5-56.5T240-880h320l240 240v480q0 33-23.5 56.5T720-80H240Zm280-520h200L520-800v200Z" })
1327
+ children: /* @__PURE__ */ jsx36("path", { d: "M320-240h320v-80H320v80Zm0-160h320v-80H320v80ZM240-80q-33 0-56.5-23.5T160-160v-640q0-33 23.5-56.5T240-880h320l240 240v480q0 33-23.5 56.5T720-80H240Zm280-520h200L520-800v200Z" })
1284
1328
  }
1285
1329
  ) }) }),
1286
- /* @__PURE__ */ jsxs25("div", { className: "mastodon-preview__card-text", children: [
1287
- /* @__PURE__ */ jsx35("span", { className: "mastodon-preview__card-site", children: siteName || baseDomain(url) }),
1288
- /* @__PURE__ */ jsx35("span", { className: "mastodon-preview__card-title", children: mastodonTitle(title) || getTitleFromDescription(description) }),
1289
- /* @__PURE__ */ jsx35("span", { className: "mastodon-preview__card-description", children: stripHtmlTags(description) })
1330
+ /* @__PURE__ */ jsxs26("div", { className: "mastodon-preview__card-text", children: [
1331
+ /* @__PURE__ */ jsx36("span", { className: "mastodon-preview__card-site", children: siteName || baseDomain(url) }),
1332
+ /* @__PURE__ */ jsx36("span", { className: "mastodon-preview__card-title", children: mastodonTitle(title) || getTitleFromDescription(description) }),
1333
+ /* @__PURE__ */ jsx36("span", { className: "mastodon-preview__card-description", children: stripHtmlTags(description) })
1290
1334
  ] })
1291
1335
  ] });
1292
1336
  };
1293
1337
  var card_default = MastodonPostCard;
1294
1338
 
1295
1339
  // src/mastodon-preview/post/header/index.tsx
1296
- import { __ as __16 } from "@wordpress/i18n";
1340
+ import { __ as __17 } from "@wordpress/i18n";
1297
1341
 
1298
1342
  // src/mastodon-preview/post/icons/index.tsx
1299
- import { jsx as jsx36 } from "react/jsx-runtime";
1343
+ import { jsx as jsx37 } from "react/jsx-runtime";
1300
1344
  function GlobeIcon2() {
1301
- return /* @__PURE__ */ jsx36(
1345
+ return /* @__PURE__ */ jsx37(
1302
1346
  "svg",
1303
1347
  {
1304
1348
  xmlns: "http://www.w3.org/2000/svg",
@@ -1306,26 +1350,26 @@ function GlobeIcon2() {
1306
1350
  viewBox: "0 -960 960 960",
1307
1351
  width: "15",
1308
1352
  role: "img",
1309
- children: /* @__PURE__ */ jsx36("path", { d: "M480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm-40-82v-78q-33 0-56.5-23.5T360-320v-40L168-552q-3 18-5.5 36t-2.5 36q0 121 79.5 212T440-162Zm276-102q20-22 36-47.5t26.5-53q10.5-27.5 16-56.5t5.5-59q0-98-54.5-179T600-776v16q0 33-23.5 56.5T520-680h-80v80q0 17-11.5 28.5T400-560h-80v80h240q17 0 28.5 11.5T600-440v120h40q26 0 47 15.5t29 40.5Z" })
1353
+ children: /* @__PURE__ */ jsx37("path", { d: "M480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm-40-82v-78q-33 0-56.5-23.5T360-320v-40L168-552q-3 18-5.5 36t-2.5 36q0 121 79.5 212T440-162Zm276-102q20-22 36-47.5t26.5-53q10.5-27.5 16-56.5t5.5-59q0-98-54.5-179T600-776v16q0 33-23.5 56.5T520-680h-80v80q0 17-11.5 28.5T400-560h-80v80h240q17 0 28.5 11.5T600-440v120h40q26 0 47 15.5t29 40.5Z" })
1310
1354
  }
1311
1355
  );
1312
1356
  }
1313
1357
 
1314
1358
  // src/mastodon-preview/post/header/index.tsx
1315
- import { jsx as jsx37, jsxs as jsxs26 } from "react/jsx-runtime";
1359
+ import { jsx as jsx38, jsxs as jsxs27 } from "react/jsx-runtime";
1316
1360
  var MastodonPostHeader = ({ user }) => {
1317
1361
  const { displayName, address, avatarUrl } = user || {};
1318
- return /* @__PURE__ */ jsxs26("div", { className: "mastodon-preview__post-header", children: [
1319
- /* @__PURE__ */ jsxs26("div", { className: "mastodon-preview__post-header-user", children: [
1320
- /* @__PURE__ */ jsx37(AvatarWithFallback, { className: "mastodon-preview__post-avatar", src: avatarUrl }),
1321
- /* @__PURE__ */ jsxs26("div", { children: [
1322
- /* @__PURE__ */ jsx37("div", { className: "mastodon-preview__post-header-displayname", children: displayName || // translators: username of a fictional Mastodon User
1323
- __16("anonymous-user", "social-previews") }),
1324
- /* @__PURE__ */ jsx37("div", { className: "mastodon-preview__post-header-username", children: address?.replace(`@${DEFAULT_MASTODON_INSTANCE}`, "") || "@username" })
1362
+ return /* @__PURE__ */ jsxs27("div", { className: "mastodon-preview__post-header", children: [
1363
+ /* @__PURE__ */ jsxs27("div", { className: "mastodon-preview__post-header-user", children: [
1364
+ /* @__PURE__ */ jsx38(AvatarWithFallback, { className: "mastodon-preview__post-avatar", src: avatarUrl }),
1365
+ /* @__PURE__ */ jsxs27("div", { children: [
1366
+ /* @__PURE__ */ jsx38("div", { className: "mastodon-preview__post-header-displayname", children: displayName || // translators: username of a fictional Mastodon User
1367
+ __17("anonymous-user", "social-previews") }),
1368
+ /* @__PURE__ */ jsx38("div", { className: "mastodon-preview__post-header-username", children: address?.replace(`@${DEFAULT_MASTODON_INSTANCE}`, "") || "@username" })
1325
1369
  ] })
1326
1370
  ] }),
1327
- /* @__PURE__ */ jsxs26("div", { className: "mastodon-preview__post-header-audience", children: [
1328
- /* @__PURE__ */ jsx37(GlobeIcon2, {}),
1371
+ /* @__PURE__ */ jsxs27("div", { className: "mastodon-preview__post-header-audience", children: [
1372
+ /* @__PURE__ */ jsx38(GlobeIcon2, {}),
1329
1373
  formatMastodonDate(/* @__PURE__ */ new Date())
1330
1374
  ] })
1331
1375
  ] });
@@ -1333,13 +1377,13 @@ var MastodonPostHeader = ({ user }) => {
1333
1377
  var header_default3 = MastodonPostHeader;
1334
1378
 
1335
1379
  // src/mastodon-preview/link-preview.tsx
1336
- import { jsx as jsx38, jsxs as jsxs27 } from "react/jsx-runtime";
1380
+ import { jsx as jsx39, jsxs as jsxs28 } from "react/jsx-runtime";
1337
1381
  var MastodonLinkPreview = (props) => {
1338
1382
  const { user } = props;
1339
- return /* @__PURE__ */ jsxs27("div", { className: "mastodon-preview__post", children: [
1340
- /* @__PURE__ */ jsx38(header_default3, { user }),
1341
- /* @__PURE__ */ jsx38(card_default, { ...props, customImage: "" }),
1342
- /* @__PURE__ */ jsx38(actions_default3, {})
1383
+ return /* @__PURE__ */ jsxs28("div", { className: "mastodon-preview__post", children: [
1384
+ /* @__PURE__ */ jsx39(header_default3, { user }),
1385
+ /* @__PURE__ */ jsx39(card_default, { ...props, customImage: "" }),
1386
+ /* @__PURE__ */ jsx39(actions_default3, {})
1343
1387
  ] });
1344
1388
  };
1345
1389
 
@@ -1347,7 +1391,7 @@ var MastodonLinkPreview = (props) => {
1347
1391
  import clsx4 from "clsx";
1348
1392
 
1349
1393
  // src/mastodon-preview/post/body/index.tsx
1350
- import { Fragment as Fragment3, jsx as jsx39, jsxs as jsxs28 } from "react/jsx-runtime";
1394
+ import { Fragment as Fragment4, jsx as jsx40, jsxs as jsxs29 } from "react/jsx-runtime";
1351
1395
  var MastonPostBody = (props) => {
1352
1396
  const { title, description, customText, url, user, children } = props;
1353
1397
  const instance = user?.address ? getMastodonAddressDetails(user.address).instance : "";
@@ -1357,96 +1401,96 @@ var MastonPostBody = (props) => {
1357
1401
  };
1358
1402
  let bodyTxt;
1359
1403
  if (customText) {
1360
- bodyTxt = /* @__PURE__ */ jsx39("p", { children: mastodonBody(customText, options) });
1404
+ bodyTxt = /* @__PURE__ */ jsx40("p", { children: /* @__PURE__ */ jsx40(ExpandableText, { text: customText, children: (visibleText) => mastodonBody(visibleText, options) }) });
1361
1405
  } else if (description) {
1362
1406
  if (title) {
1363
1407
  const renderedTitle = stripHtmlTags(title);
1364
1408
  options.offset = renderedTitle.length;
1365
- bodyTxt = /* @__PURE__ */ jsxs28(Fragment3, { children: [
1366
- /* @__PURE__ */ jsx39("p", { children: renderedTitle }),
1367
- /* @__PURE__ */ jsx39("p", { children: mastodonBody(description, options) })
1409
+ bodyTxt = /* @__PURE__ */ jsxs29(Fragment4, { children: [
1410
+ /* @__PURE__ */ jsx40("p", { children: renderedTitle }),
1411
+ /* @__PURE__ */ jsx40("p", { children: /* @__PURE__ */ jsx40(ExpandableText, { text: description, children: (visibleText) => mastodonBody(visibleText, options) }) })
1368
1412
  ] });
1369
1413
  } else {
1370
- bodyTxt = /* @__PURE__ */ jsx39("p", { children: mastodonBody(description, options) });
1414
+ bodyTxt = /* @__PURE__ */ jsx40("p", { children: /* @__PURE__ */ jsx40(ExpandableText, { text: description, children: (visibleText) => mastodonBody(visibleText, options) }) });
1371
1415
  }
1372
1416
  } else {
1373
- bodyTxt = /* @__PURE__ */ jsx39("p", { children: mastodonBody(title, options) });
1417
+ bodyTxt = /* @__PURE__ */ jsx40("p", { children: mastodonBody(title, options) });
1374
1418
  }
1375
- return /* @__PURE__ */ jsxs28("div", { className: "mastodon-preview__body", children: [
1419
+ return /* @__PURE__ */ jsxs29("div", { className: "mastodon-preview__body", children: [
1376
1420
  bodyTxt,
1377
- /* @__PURE__ */ jsx39("a", { href: url, target: "_blank", rel: "noreferrer noopener", children: mastodonUrl(url.replace(/^https?:\/\//, "")) }),
1421
+ /* @__PURE__ */ jsx40("a", { href: url, target: "_blank", rel: "noreferrer noopener", children: mastodonUrl(url.replace(/^https?:\/\//, "")) }),
1378
1422
  children
1379
1423
  ] });
1380
1424
  };
1381
1425
  var body_default = MastonPostBody;
1382
1426
 
1383
1427
  // src/mastodon-preview/post-preview.tsx
1384
- import { jsx as jsx40, jsxs as jsxs29 } from "react/jsx-runtime";
1428
+ import { jsx as jsx41, jsxs as jsxs30 } from "react/jsx-runtime";
1385
1429
  var MastodonPostPreview = (props) => {
1386
1430
  const { user, media } = props;
1387
- return /* @__PURE__ */ jsxs29("div", { className: "mastodon-preview__post", children: [
1388
- /* @__PURE__ */ jsx40(header_default3, { user }),
1389
- /* @__PURE__ */ jsx40(body_default, { ...props, children: media?.length ? /* @__PURE__ */ jsx40("div", { className: clsx4("mastodon-preview__media", { "as-grid": media.length > 1 }), children: media.map((mediaItem, index) => /* @__PURE__ */ jsx40(
1431
+ return /* @__PURE__ */ jsxs30("div", { className: "mastodon-preview__post", children: [
1432
+ /* @__PURE__ */ jsx41(header_default3, { user }),
1433
+ /* @__PURE__ */ jsx41(body_default, { ...props, children: media?.length ? /* @__PURE__ */ jsx41("div", { className: clsx4("mastodon-preview__media", { "as-grid": media.length > 1 }), children: media.map((mediaItem, index) => /* @__PURE__ */ jsx41(
1390
1434
  "div",
1391
1435
  {
1392
1436
  className: "mastodon-preview__media-item",
1393
- children: mediaItem.type.startsWith("video/") ? /* @__PURE__ */ jsx40("video", { controls: true, children: /* @__PURE__ */ jsx40("source", { src: mediaItem.url, type: mediaItem.type }) }) : /* @__PURE__ */ jsx40("img", { alt: mediaItem.alt || "", src: mediaItem.url })
1437
+ children: mediaItem.type.startsWith("video/") ? /* @__PURE__ */ jsx41("video", { controls: true, children: /* @__PURE__ */ jsx41("source", { src: mediaItem.url, type: mediaItem.type }) }) : /* @__PURE__ */ jsx41("img", { alt: mediaItem.alt || "", src: mediaItem.url })
1394
1438
  },
1395
1439
  `mastodon-preview__media-item-${index}`
1396
1440
  )) }) : null }),
1397
- !media?.length ? /* @__PURE__ */ jsx40(card_default, { ...props }) : null,
1398
- /* @__PURE__ */ jsx40(actions_default3, {})
1441
+ !media?.length ? /* @__PURE__ */ jsx41(card_default, { ...props }) : null,
1442
+ /* @__PURE__ */ jsx41(actions_default3, {})
1399
1443
  ] });
1400
1444
  };
1401
1445
 
1402
1446
  // src/mastodon-preview/previews.tsx
1403
- import { __ as __17 } from "@wordpress/i18n";
1404
- import { jsx as jsx41, jsxs as jsxs30 } from "react/jsx-runtime";
1447
+ import { __ as __18 } from "@wordpress/i18n";
1448
+ import { jsx as jsx42, jsxs as jsxs31 } from "react/jsx-runtime";
1405
1449
  var MastodonPreviews = ({
1406
1450
  headingLevel,
1407
1451
  hidePostPreview,
1408
1452
  hideLinkPreview,
1409
1453
  ...props
1410
1454
  }) => {
1411
- return /* @__PURE__ */ jsxs30("div", { className: "social-preview mastodon-preview", children: [
1412
- !hidePostPreview && /* @__PURE__ */ jsxs30("section", { className: "social-preview__section mastodon-preview__section", children: [
1413
- /* @__PURE__ */ jsx41(SectionHeading, {
1455
+ return /* @__PURE__ */ jsxs31("div", { className: "social-preview mastodon-preview", children: [
1456
+ !hidePostPreview && /* @__PURE__ */ jsxs31("section", { className: "social-preview__section mastodon-preview__section", children: [
1457
+ /* @__PURE__ */ jsx42(SectionHeading, {
1414
1458
  level: headingLevel,
1415
1459
  // translators: refers to a social post on Mastodon
1416
- children: __17("Your post", "social-previews")
1460
+ children: __18("Your post", "social-previews")
1417
1461
  }),
1418
- /* @__PURE__ */ jsx41("p", { className: "social-preview__section-desc", children: __17("This is what your social post will look like on Mastodon:", "social-previews") }),
1419
- /* @__PURE__ */ jsx41(MastodonPostPreview, { ...props })
1462
+ /* @__PURE__ */ jsx42("p", { className: "social-preview__section-desc", children: __18("This is what your social post will look like on Mastodon:", "social-previews") }),
1463
+ /* @__PURE__ */ jsx42(MastodonPostPreview, { ...props })
1420
1464
  ] }),
1421
- !hideLinkPreview && /* @__PURE__ */ jsxs30("section", { className: "social-preview__section mastodon-preview__section", children: [
1422
- /* @__PURE__ */ jsx41(SectionHeading, {
1465
+ !hideLinkPreview && /* @__PURE__ */ jsxs31("section", { className: "social-preview__section mastodon-preview__section", children: [
1466
+ /* @__PURE__ */ jsx42(SectionHeading, {
1423
1467
  level: headingLevel,
1424
1468
  // translators: refers to a link to a Mastodon post
1425
- children: __17("Link preview", "social-previews")
1469
+ children: __18("Link preview", "social-previews")
1426
1470
  }),
1427
- /* @__PURE__ */ jsx41("p", { className: "social-preview__section-desc", children: __17(
1471
+ /* @__PURE__ */ jsx42("p", { className: "social-preview__section-desc", children: __18(
1428
1472
  "This is what it will look like when someone shares the link to your WordPress post on Mastodon.",
1429
1473
  "social-previews"
1430
1474
  ) }),
1431
- /* @__PURE__ */ jsx41(MastodonLinkPreview, { ...props, user: void 0 })
1475
+ /* @__PURE__ */ jsx42(MastodonLinkPreview, { ...props, user: void 0 })
1432
1476
  ] })
1433
1477
  ] });
1434
1478
  };
1435
1479
 
1436
1480
  // src/nextdoor-preview/post-preview.tsx
1437
- import { __ as __19 } from "@wordpress/i18n";
1481
+ import { __ as __20 } from "@wordpress/i18n";
1438
1482
  import clsx5 from "clsx";
1439
1483
 
1440
1484
  // src/nextdoor-preview/constants.ts
1441
- var FEED_TEXT_MAX_LENGTH2 = 500;
1485
+ var FEED_TEXT_MAX_LENGTH2 = 65e3;
1442
1486
 
1443
1487
  // src/nextdoor-preview/footer-actions.tsx
1444
- import { __ as __18 } from "@wordpress/i18n";
1488
+ import { __ as __19 } from "@wordpress/i18n";
1445
1489
 
1446
1490
  // src/nextdoor-preview/icons/comment-icon.tsx
1447
- import { jsx as jsx42 } from "react/jsx-runtime";
1491
+ import { jsx as jsx43 } from "react/jsx-runtime";
1448
1492
  function CommentIcon() {
1449
- return /* @__PURE__ */ jsx42("svg", { width: "20", height: "20", fill: "none", viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ jsx42(
1493
+ return /* @__PURE__ */ jsx43("svg", { width: "20", height: "20", fill: "none", viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ jsx43(
1450
1494
  "path",
1451
1495
  {
1452
1496
  fill: "currentColor",
@@ -1458,9 +1502,9 @@ function CommentIcon() {
1458
1502
  }
1459
1503
 
1460
1504
  // src/nextdoor-preview/icons/like-icon.tsx
1461
- import { jsx as jsx43 } from "react/jsx-runtime";
1505
+ import { jsx as jsx44 } from "react/jsx-runtime";
1462
1506
  function LikeIcon() {
1463
- return /* @__PURE__ */ jsx43("svg", { width: "20", height: "20", fill: "none", viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ jsx43(
1507
+ return /* @__PURE__ */ jsx44("svg", { width: "20", height: "20", fill: "none", viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ jsx44(
1464
1508
  "path",
1465
1509
  {
1466
1510
  fill: "currentColor",
@@ -1472,9 +1516,9 @@ function LikeIcon() {
1472
1516
  }
1473
1517
 
1474
1518
  // src/nextdoor-preview/icons/share-icon.tsx
1475
- import { jsx as jsx44 } from "react/jsx-runtime";
1519
+ import { jsx as jsx45 } from "react/jsx-runtime";
1476
1520
  function ShareIcon() {
1477
- return /* @__PURE__ */ jsx44("svg", { width: "20", height: "20", fill: "none", viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ jsx44(
1521
+ return /* @__PURE__ */ jsx45("svg", { width: "20", height: "20", fill: "none", viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ jsx45(
1478
1522
  "path",
1479
1523
  {
1480
1524
  fill: "currentColor",
@@ -1486,28 +1530,28 @@ function ShareIcon() {
1486
1530
  }
1487
1531
 
1488
1532
  // src/nextdoor-preview/footer-actions.tsx
1489
- import { jsx as jsx45, jsxs as jsxs31 } from "react/jsx-runtime";
1533
+ import { jsx as jsx46, jsxs as jsxs32 } from "react/jsx-runtime";
1490
1534
  function FooterActions() {
1491
- return /* @__PURE__ */ jsxs31("div", { className: "nextdoor-preview__footer--actions", children: [
1492
- /* @__PURE__ */ jsxs31("div", { className: "nextdoor-preview__footer--actions-item", children: [
1493
- /* @__PURE__ */ jsx45(LikeIcon, {}),
1494
- /* @__PURE__ */ jsx45("span", { children: __18("Like", "social-previews") })
1535
+ return /* @__PURE__ */ jsxs32("div", { className: "nextdoor-preview__footer--actions", children: [
1536
+ /* @__PURE__ */ jsxs32("div", { className: "nextdoor-preview__footer--actions-item", children: [
1537
+ /* @__PURE__ */ jsx46(LikeIcon, {}),
1538
+ /* @__PURE__ */ jsx46("span", { children: __19("Like", "social-previews") })
1495
1539
  ] }),
1496
- /* @__PURE__ */ jsxs31("div", { className: "nextdoor-preview__footer--actions-item", children: [
1497
- /* @__PURE__ */ jsx45(CommentIcon, {}),
1498
- /* @__PURE__ */ jsx45("span", { children: __18("Comment", "social-previews") })
1540
+ /* @__PURE__ */ jsxs32("div", { className: "nextdoor-preview__footer--actions-item", children: [
1541
+ /* @__PURE__ */ jsx46(CommentIcon, {}),
1542
+ /* @__PURE__ */ jsx46("span", { children: __19("Comment", "social-previews") })
1499
1543
  ] }),
1500
- /* @__PURE__ */ jsxs31("div", { className: "nextdoor-preview__footer--actions-item", children: [
1501
- /* @__PURE__ */ jsx45(ShareIcon, {}),
1502
- /* @__PURE__ */ jsx45("span", { children: __18("Share", "social-previews") })
1544
+ /* @__PURE__ */ jsxs32("div", { className: "nextdoor-preview__footer--actions-item", children: [
1545
+ /* @__PURE__ */ jsx46(ShareIcon, {}),
1546
+ /* @__PURE__ */ jsx46("span", { children: __19("Share", "social-previews") })
1503
1547
  ] })
1504
1548
  ] });
1505
1549
  }
1506
1550
 
1507
1551
  // src/nextdoor-preview/icons/chevron-icon.tsx
1508
- import { jsx as jsx46 } from "react/jsx-runtime";
1552
+ import { jsx as jsx47 } from "react/jsx-runtime";
1509
1553
  function ChevronIcon() {
1510
- return /* @__PURE__ */ jsx46("svg", { width: "20", height: "20", viewBox: "0 0 20 20", "aria-hidden": "true", children: /* @__PURE__ */ jsx46(
1554
+ return /* @__PURE__ */ jsx47("svg", { width: "20", height: "20", viewBox: "0 0 20 20", "aria-hidden": "true", children: /* @__PURE__ */ jsx47(
1511
1555
  "path",
1512
1556
  {
1513
1557
  fill: "#dfe1e4",
@@ -1518,9 +1562,9 @@ function ChevronIcon() {
1518
1562
  }
1519
1563
 
1520
1564
  // src/nextdoor-preview/icons/default-image.tsx
1521
- import { jsx as jsx47, jsxs as jsxs32 } from "react/jsx-runtime";
1565
+ import { jsx as jsx48, jsxs as jsxs33 } from "react/jsx-runtime";
1522
1566
  function DefaultImage() {
1523
- return /* @__PURE__ */ jsx47("div", { className: "nextdoor-preview__default-image", children: /* @__PURE__ */ jsxs32(
1567
+ return /* @__PURE__ */ jsx48("div", { className: "nextdoor-preview__default-image", children: /* @__PURE__ */ jsxs33(
1524
1568
  "svg",
1525
1569
  {
1526
1570
  width: "24",
@@ -1530,14 +1574,14 @@ function DefaultImage() {
1530
1574
  "aria-hidden": "true",
1531
1575
  color: "#055c00",
1532
1576
  children: [
1533
- /* @__PURE__ */ jsx47(
1577
+ /* @__PURE__ */ jsx48(
1534
1578
  "path",
1535
1579
  {
1536
1580
  fill: "currentColor",
1537
1581
  d: "M13.207 5.207c1.51-1.51 4.076-1.51 5.586 0 1.51 1.51 1.51 4.076 0 5.586l-2.1 2.1c-1.51 1.51-4.077 1.51-5.586 0a1 1 0 1 0-1.414 1.414c2.29 2.29 6.123 2.29 8.414 0l2.1-2.1c2.29-2.29 2.29-6.124 0-8.414s-6.124-2.29-8.414 0l-.7.7a1 1 0 0 0 1.414 1.414l.7-.7Z"
1538
1582
  }
1539
1583
  ),
1540
- /* @__PURE__ */ jsx47(
1584
+ /* @__PURE__ */ jsx48(
1541
1585
  "path",
1542
1586
  {
1543
1587
  fill: "currentColor",
@@ -1550,9 +1594,9 @@ function DefaultImage() {
1550
1594
  }
1551
1595
 
1552
1596
  // src/nextdoor-preview/icons/globe-icon.tsx
1553
- import { jsx as jsx48 } from "react/jsx-runtime";
1597
+ import { jsx as jsx49 } from "react/jsx-runtime";
1554
1598
  function GlobeIcon3() {
1555
- return /* @__PURE__ */ jsx48("svg", { width: "14", height: "14", fill: "none", viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ jsx48(
1599
+ return /* @__PURE__ */ jsx49("svg", { width: "14", height: "14", fill: "none", viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ jsx49(
1556
1600
  "path",
1557
1601
  {
1558
1602
  fill: "currentColor",
@@ -1564,7 +1608,7 @@ function GlobeIcon3() {
1564
1608
  }
1565
1609
 
1566
1610
  // src/nextdoor-preview/post-preview.tsx
1567
- import { Fragment as Fragment4, jsx as jsx49, jsxs as jsxs33 } from "react/jsx-runtime";
1611
+ import { Fragment as Fragment5, jsx as jsx50, jsxs as jsxs34 } from "react/jsx-runtime";
1568
1612
  function NextdoorPostPreview({
1569
1613
  image,
1570
1614
  name,
@@ -1576,67 +1620,67 @@ function NextdoorPostPreview({
1576
1620
  url
1577
1621
  }) {
1578
1622
  const hasMedia = !!media?.length;
1579
- return /* @__PURE__ */ jsx49("div", { className: "nextdoor-preview__wrapper", children: /* @__PURE__ */ jsx49("section", { className: `nextdoor-preview__container ${hasMedia ? "has-media" : ""}`, children: /* @__PURE__ */ jsxs33("div", { className: "nextdoor-preview__content", children: [
1580
- /* @__PURE__ */ jsxs33("div", { className: "nextdoor-preview__header", children: [
1581
- /* @__PURE__ */ jsx49("div", { className: "nextdoor-preview__header--avatar", children: /* @__PURE__ */ jsx49(AvatarWithFallback, { src: profileImage }) }),
1582
- /* @__PURE__ */ jsxs33("div", { className: "nextdoor-preview__header--details", children: [
1583
- /* @__PURE__ */ jsx49("div", { className: "nextdoor-preview__header--name", children: name || __19("Account Name", "social-previews") }),
1584
- /* @__PURE__ */ jsxs33("div", { className: "nextdoor-preview__header--meta", children: [
1585
- /* @__PURE__ */ jsx49("span", { children: neighborhood || __19("Neighborhood", "social-previews") }),
1586
- /* @__PURE__ */ jsx49("span", { children: "\u2022" }),
1587
- /* @__PURE__ */ jsx49("span", { children: formatNextdoorDate(Date.now()) }),
1588
- /* @__PURE__ */ jsx49("span", { children: "\u2022" }),
1589
- /* @__PURE__ */ jsx49(GlobeIcon3, {})
1623
+ return /* @__PURE__ */ jsx50("div", { className: "nextdoor-preview__wrapper", children: /* @__PURE__ */ jsx50("section", { className: `nextdoor-preview__container ${hasMedia ? "has-media" : ""}`, children: /* @__PURE__ */ jsxs34("div", { className: "nextdoor-preview__content", children: [
1624
+ /* @__PURE__ */ jsxs34("div", { className: "nextdoor-preview__header", children: [
1625
+ /* @__PURE__ */ jsx50("div", { className: "nextdoor-preview__header--avatar", children: /* @__PURE__ */ jsx50(AvatarWithFallback, { src: profileImage }) }),
1626
+ /* @__PURE__ */ jsxs34("div", { className: "nextdoor-preview__header--details", children: [
1627
+ /* @__PURE__ */ jsx50("div", { className: "nextdoor-preview__header--name", children: name || __20("Account Name", "social-previews") }),
1628
+ /* @__PURE__ */ jsxs34("div", { className: "nextdoor-preview__header--meta", children: [
1629
+ /* @__PURE__ */ jsx50("span", { children: neighborhood || __20("Neighborhood", "social-previews") }),
1630
+ /* @__PURE__ */ jsx50("span", { children: "\u2022" }),
1631
+ /* @__PURE__ */ jsx50("span", { children: formatNextdoorDate(Date.now()) }),
1632
+ /* @__PURE__ */ jsx50("span", { children: "\u2022" }),
1633
+ /* @__PURE__ */ jsx50(GlobeIcon3, {})
1590
1634
  ] })
1591
1635
  ] })
1592
1636
  ] }),
1593
- /* @__PURE__ */ jsxs33("div", { className: "nextdoor-preview__body", children: [
1594
- description ? /* @__PURE__ */ jsxs33("div", { className: "nextdoor-preview__caption", children: [
1595
- /* @__PURE__ */ jsx49("span", { children: preparePreviewText(description, {
1637
+ /* @__PURE__ */ jsxs34("div", { className: "nextdoor-preview__body", children: [
1638
+ description ? /* @__PURE__ */ jsxs34("div", { className: "nextdoor-preview__caption", children: [
1639
+ /* @__PURE__ */ jsx50("span", { children: /* @__PURE__ */ jsx50(ExpandableText, { text: description, children: (visibleText) => preparePreviewText(visibleText, {
1596
1640
  platform: "nextdoor",
1597
1641
  maxChars: FEED_TEXT_MAX_LENGTH2
1598
- }) }),
1599
- !hasMedia && url && /* @__PURE__ */ jsxs33(Fragment4, { children: [
1600
- /* @__PURE__ */ jsx49("br", {}),
1601
- /* @__PURE__ */ jsx49("br", {}),
1602
- /* @__PURE__ */ jsx49("a", { href: url, rel: "nofollow noopener noreferrer", target: "_blank", children: url })
1642
+ }) }) }),
1643
+ !hasMedia && url && !description.includes(url) && /* @__PURE__ */ jsxs34(Fragment5, { children: [
1644
+ /* @__PURE__ */ jsx50("br", {}),
1645
+ /* @__PURE__ */ jsx50("br", {}),
1646
+ /* @__PURE__ */ jsx50("a", { href: url, rel: "nofollow noopener noreferrer", target: "_blank", children: url })
1603
1647
  ] })
1604
1648
  ] }) : null,
1605
- hasMedia ? /* @__PURE__ */ jsx49("div", { className: "nextdoor-preview__media", children: media.map((mediaItem, index) => {
1606
- return /* @__PURE__ */ jsx49(
1649
+ hasMedia ? /* @__PURE__ */ jsx50("div", { className: "nextdoor-preview__media", children: media.map((mediaItem, index) => {
1650
+ return /* @__PURE__ */ jsx50(
1607
1651
  "div",
1608
1652
  {
1609
1653
  className: "nextdoor-preview__media-item",
1610
- children: mediaItem?.type?.startsWith("video/") ? /* @__PURE__ */ jsx49("video", { controls: true, children: /* @__PURE__ */ jsx49("source", { src: mediaItem.url, type: mediaItem.type }) }) : /* @__PURE__ */ jsx49("img", { alt: mediaItem.alt || "", src: mediaItem.url })
1654
+ children: mediaItem?.type?.startsWith("video/") ? /* @__PURE__ */ jsx50("video", { controls: true, children: /* @__PURE__ */ jsx50("source", { src: mediaItem.url, type: mediaItem.type }) }) : /* @__PURE__ */ jsx50("img", { alt: mediaItem.alt || "", src: mediaItem.url })
1611
1655
  },
1612
1656
  `nextdoor-preview__media-item-${index}`
1613
1657
  );
1614
1658
  }) }) : null,
1615
- /* @__PURE__ */ jsxs33(
1659
+ /* @__PURE__ */ jsxs34(
1616
1660
  "article",
1617
1661
  {
1618
1662
  className: clsx5("nextdoor-preview__card", {
1619
1663
  "small-preview": !image || hasMedia
1620
1664
  }),
1621
1665
  children: [
1622
- image ? /* @__PURE__ */ jsx49("img", { className: "nextdoor-preview__image", src: image, alt: "" }) : /* @__PURE__ */ jsx49(DefaultImage, {}),
1623
- url ? /* @__PURE__ */ jsxs33("div", { className: "nextdoor-preview__description", children: [
1624
- /* @__PURE__ */ jsx49("h2", { className: "nextdoor-preview__description--title", children: title || getTitleFromDescription(description) }),
1625
- /* @__PURE__ */ jsx49("span", { className: "nextdoor-preview__description--url", children: baseDomain(url) })
1666
+ image ? /* @__PURE__ */ jsx50("img", { className: "nextdoor-preview__image", src: image, alt: "" }) : /* @__PURE__ */ jsx50(DefaultImage, {}),
1667
+ url ? /* @__PURE__ */ jsxs34("div", { className: "nextdoor-preview__description", children: [
1668
+ /* @__PURE__ */ jsx50("h2", { className: "nextdoor-preview__description--title", children: title || getTitleFromDescription(description) }),
1669
+ /* @__PURE__ */ jsx50("span", { className: "nextdoor-preview__description--url", children: baseDomain(url) })
1626
1670
  ] }) : null,
1627
- hasMedia ? /* @__PURE__ */ jsx49("div", { className: "nextdoor-preview__card--chevron-wrapper", children: /* @__PURE__ */ jsx49(ChevronIcon, {}) }) : null
1671
+ hasMedia ? /* @__PURE__ */ jsx50("div", { className: "nextdoor-preview__card--chevron-wrapper", children: /* @__PURE__ */ jsx50(ChevronIcon, {}) }) : null
1628
1672
  ]
1629
1673
  }
1630
1674
  )
1631
1675
  ] }),
1632
- /* @__PURE__ */ jsx49("div", { className: "nextdoor-preview__footer", children: /* @__PURE__ */ jsx49(FooterActions, {}) })
1676
+ /* @__PURE__ */ jsx50("div", { className: "nextdoor-preview__footer", children: /* @__PURE__ */ jsx50(FooterActions, {}) })
1633
1677
  ] }) }) });
1634
1678
  }
1635
1679
 
1636
1680
  // src/nextdoor-preview/link-preview.tsx
1637
- import { jsx as jsx50 } from "react/jsx-runtime";
1681
+ import { jsx as jsx51 } from "react/jsx-runtime";
1638
1682
  function NextdoorLinkPreview(props) {
1639
- return /* @__PURE__ */ jsx50(
1683
+ return /* @__PURE__ */ jsx51(
1640
1684
  NextdoorPostPreview,
1641
1685
  {
1642
1686
  name: "",
@@ -1650,35 +1694,35 @@ function NextdoorLinkPreview(props) {
1650
1694
  }
1651
1695
 
1652
1696
  // src/nextdoor-preview/previews.tsx
1653
- import { __ as __20 } from "@wordpress/i18n";
1654
- import { jsx as jsx51, jsxs as jsxs34 } from "react/jsx-runtime";
1697
+ import { __ as __21 } from "@wordpress/i18n";
1698
+ import { jsx as jsx52, jsxs as jsxs35 } from "react/jsx-runtime";
1655
1699
  var NextdoorPreviews = ({
1656
1700
  headingLevel,
1657
1701
  hideLinkPreview,
1658
1702
  hidePostPreview,
1659
1703
  ...props
1660
1704
  }) => {
1661
- return /* @__PURE__ */ jsxs34("div", { className: "social-preview nextdoor-preview", children: [
1662
- !hidePostPreview && /* @__PURE__ */ jsxs34("section", { className: "social-preview__section nextdoor-preview__section", children: [
1663
- /* @__PURE__ */ jsx51(section_heading_default, {
1705
+ return /* @__PURE__ */ jsxs35("div", { className: "social-preview nextdoor-preview", children: [
1706
+ !hidePostPreview && /* @__PURE__ */ jsxs35("section", { className: "social-preview__section nextdoor-preview__section", children: [
1707
+ /* @__PURE__ */ jsx52(section_heading_default, {
1664
1708
  level: headingLevel,
1665
1709
  // translators: refers to a social post on Nextdoor
1666
- children: __20("Your post", "social-previews")
1710
+ children: __21("Your post", "social-previews")
1667
1711
  }),
1668
- /* @__PURE__ */ jsx51("p", { className: "social-preview__section-desc", children: __20("This is what your social post will look like on Nextdoor:", "social-previews") }),
1669
- /* @__PURE__ */ jsx51(NextdoorPostPreview, { ...props })
1712
+ /* @__PURE__ */ jsx52("p", { className: "social-preview__section-desc", children: __21("This is what your social post will look like on Nextdoor:", "social-previews") }),
1713
+ /* @__PURE__ */ jsx52(NextdoorPostPreview, { ...props })
1670
1714
  ] }),
1671
- !hideLinkPreview && /* @__PURE__ */ jsxs34("section", { className: "social-preview__section nextdoor-preview__section", children: [
1672
- /* @__PURE__ */ jsx51(section_heading_default, {
1715
+ !hideLinkPreview && /* @__PURE__ */ jsxs35("section", { className: "social-preview__section nextdoor-preview__section", children: [
1716
+ /* @__PURE__ */ jsx52(section_heading_default, {
1673
1717
  level: headingLevel,
1674
1718
  // translators: refers to a link to a Nextdoor post
1675
- children: __20("Link preview", "social-previews")
1719
+ children: __21("Link preview", "social-previews")
1676
1720
  }),
1677
- /* @__PURE__ */ jsx51("p", { className: "social-preview__section-desc", children: __20(
1721
+ /* @__PURE__ */ jsx52("p", { className: "social-preview__section-desc", children: __21(
1678
1722
  "This is what it will look like when someone shares the link to your WordPress post on Nextdoor.",
1679
1723
  "social-previews"
1680
1724
  ) }),
1681
- /* @__PURE__ */ jsx51(NextdoorLinkPreview, { ...props, name: "", profileImage: "" })
1725
+ /* @__PURE__ */ jsx52(NextdoorLinkPreview, { ...props, name: "", profileImage: "" })
1682
1726
  ] })
1683
1727
  ] });
1684
1728
  };
@@ -1687,10 +1731,10 @@ var NextdoorPreviews = ({
1687
1731
  import clsx6 from "clsx";
1688
1732
 
1689
1733
  // src/bluesky-preview/post/actions/index.tsx
1690
- import { jsx as jsx52, jsxs as jsxs35 } from "react/jsx-runtime";
1691
- var BlueskyPostActions = () => /* @__PURE__ */ jsxs35("div", { className: "bluesky-preview__post-actions", children: [
1692
- /* @__PURE__ */ jsxs35("div", { children: [
1693
- /* @__PURE__ */ jsx52(
1734
+ import { jsx as jsx53, jsxs as jsxs36 } from "react/jsx-runtime";
1735
+ var BlueskyPostActions = () => /* @__PURE__ */ jsxs36("div", { className: "bluesky-preview__post-actions", children: [
1736
+ /* @__PURE__ */ jsxs36("div", { children: [
1737
+ /* @__PURE__ */ jsx53(
1694
1738
  "svg",
1695
1739
  {
1696
1740
  fill: "none",
@@ -1699,7 +1743,7 @@ var BlueskyPostActions = () => /* @__PURE__ */ jsxs35("div", { className: "blues
1699
1743
  height: "18",
1700
1744
  style: { color: "rgb(111, 134, 159)" },
1701
1745
  "aria-hidden": "true",
1702
- children: /* @__PURE__ */ jsx52(
1746
+ children: /* @__PURE__ */ jsx53(
1703
1747
  "path",
1704
1748
  {
1705
1749
  fill: "hsl(211, 20%, 53%)",
@@ -1710,10 +1754,10 @@ var BlueskyPostActions = () => /* @__PURE__ */ jsxs35("div", { className: "blues
1710
1754
  )
1711
1755
  }
1712
1756
  ),
1713
- /* @__PURE__ */ jsx52("span", { children: 0 })
1757
+ /* @__PURE__ */ jsx53("span", { children: 0 })
1714
1758
  ] }),
1715
- /* @__PURE__ */ jsxs35("div", { children: [
1716
- /* @__PURE__ */ jsx52(
1759
+ /* @__PURE__ */ jsxs36("div", { children: [
1760
+ /* @__PURE__ */ jsx53(
1717
1761
  "svg",
1718
1762
  {
1719
1763
  fill: "none",
@@ -1722,7 +1766,7 @@ var BlueskyPostActions = () => /* @__PURE__ */ jsxs35("div", { className: "blues
1722
1766
  height: "18",
1723
1767
  style: { color: "rgb(111, 134, 159)" },
1724
1768
  "aria-hidden": "true",
1725
- children: /* @__PURE__ */ jsx52(
1769
+ children: /* @__PURE__ */ jsx53(
1726
1770
  "path",
1727
1771
  {
1728
1772
  fill: "hsl(211, 20%, 53%)",
@@ -1733,10 +1777,10 @@ var BlueskyPostActions = () => /* @__PURE__ */ jsxs35("div", { className: "blues
1733
1777
  )
1734
1778
  }
1735
1779
  ),
1736
- /* @__PURE__ */ jsx52("span", { children: 0 })
1780
+ /* @__PURE__ */ jsx53("span", { children: 0 })
1737
1781
  ] }),
1738
- /* @__PURE__ */ jsxs35("div", { children: [
1739
- /* @__PURE__ */ jsx52(
1782
+ /* @__PURE__ */ jsxs36("div", { children: [
1783
+ /* @__PURE__ */ jsx53(
1740
1784
  "svg",
1741
1785
  {
1742
1786
  fill: "none",
@@ -1745,7 +1789,7 @@ var BlueskyPostActions = () => /* @__PURE__ */ jsxs35("div", { className: "blues
1745
1789
  height: "18",
1746
1790
  style: { color: "rgb(111, 134, 159)" },
1747
1791
  "aria-hidden": "true",
1748
- children: /* @__PURE__ */ jsx52(
1792
+ children: /* @__PURE__ */ jsx53(
1749
1793
  "path",
1750
1794
  {
1751
1795
  fill: "hsl(211, 20%, 53%)",
@@ -1756,9 +1800,9 @@ var BlueskyPostActions = () => /* @__PURE__ */ jsxs35("div", { className: "blues
1756
1800
  )
1757
1801
  }
1758
1802
  ),
1759
- /* @__PURE__ */ jsx52("span", { children: 0 })
1803
+ /* @__PURE__ */ jsx53("span", { children: 0 })
1760
1804
  ] }),
1761
- /* @__PURE__ */ jsx52("div", { children: /* @__PURE__ */ jsx52("svg", { fill: "none", viewBox: "0 0 24 24", width: "20", height: "20", "aria-hidden": "true", children: /* @__PURE__ */ jsx52(
1805
+ /* @__PURE__ */ jsx53("div", { children: /* @__PURE__ */ jsx53("svg", { fill: "none", viewBox: "0 0 24 24", width: "20", height: "20", "aria-hidden": "true", children: /* @__PURE__ */ jsx53(
1762
1806
  "path",
1763
1807
  {
1764
1808
  fill: "hsl(211, 20%, 53%)",
@@ -1774,28 +1818,30 @@ var actions_default4 = BlueskyPostActions;
1774
1818
  var TITLE_LENGTH5 = 200;
1775
1819
  var BODY_LENGTH2 = 300;
1776
1820
  var URL_LENGTH3 = 40;
1821
+ var BODY_CHAR_LIMIT2 = BODY_LENGTH2 - URL_LENGTH3;
1777
1822
  var blueskyTitle = (text) => firstValid(
1778
1823
  shortEnough(TITLE_LENGTH5),
1779
1824
  hardTruncation(TITLE_LENGTH5)
1780
1825
  )(stripHtmlTags(text)) || "";
1781
1826
  var blueskyBody = (text, options = {}) => {
1782
- const { offset = 0 } = options;
1827
+ const { offset = 0, reserveUrlSpace = true } = options;
1783
1828
  return preparePreviewText(text, {
1784
1829
  platform: "bluesky",
1785
- maxChars: BODY_LENGTH2 - URL_LENGTH3 - offset
1830
+ maxChars: BODY_LENGTH2 - (reserveUrlSpace ? URL_LENGTH3 : 0) - offset
1786
1831
  });
1787
1832
  };
1788
1833
  var blueskyUrl = (text) => firstValid(shortEnough(URL_LENGTH3), hardTruncation(URL_LENGTH3))(stripHtmlTags(text)) || "";
1789
1834
 
1790
1835
  // src/bluesky-preview/post/body/index.tsx
1791
- import { Fragment as Fragment5, jsx as jsx53, jsxs as jsxs36 } from "react/jsx-runtime";
1836
+ import { Fragment as Fragment6, jsx as jsx54, jsxs as jsxs37 } from "react/jsx-runtime";
1792
1837
  var BlueskyPostBody = ({ customText, url, children, appendUrl }) => {
1793
- return /* @__PURE__ */ jsxs36("div", { className: "bluesky-preview__body", children: [
1794
- customText ? /* @__PURE__ */ jsxs36(Fragment5, { children: [
1795
- /* @__PURE__ */ jsx53("div", { children: blueskyBody(customText) }),
1796
- appendUrl && url ? /* @__PURE__ */ jsxs36(Fragment5, { children: [
1797
- /* @__PURE__ */ jsx53("br", {}),
1798
- /* @__PURE__ */ jsx53("a", { href: url, target: "_blank", rel: "noreferrer noopener", children: blueskyUrl(url.replace(/^https?:\/\//, "")) })
1838
+ const showUrl = appendUrl && !!url && !customText?.includes(url);
1839
+ return /* @__PURE__ */ jsxs37("div", { className: "bluesky-preview__body", children: [
1840
+ customText ? /* @__PURE__ */ jsxs37(Fragment6, { children: [
1841
+ /* @__PURE__ */ jsx54("div", { children: blueskyBody(customText, { reserveUrlSpace: showUrl }) }),
1842
+ showUrl ? /* @__PURE__ */ jsxs37(Fragment6, { children: [
1843
+ /* @__PURE__ */ jsx54("br", {}),
1844
+ /* @__PURE__ */ jsx54("a", { href: url, target: "_blank", rel: "noreferrer noopener", children: blueskyUrl(url.replace(/^https?:\/\//, "")) })
1799
1845
  ] }) : null
1800
1846
  ] }) : null,
1801
1847
  children
@@ -1804,35 +1850,35 @@ var BlueskyPostBody = ({ customText, url, children, appendUrl }) => {
1804
1850
  var body_default2 = BlueskyPostBody;
1805
1851
 
1806
1852
  // src/bluesky-preview/post/card/index.tsx
1807
- import { jsx as jsx54, jsxs as jsxs37 } from "react/jsx-runtime";
1853
+ import { jsx as jsx55, jsxs as jsxs38 } from "react/jsx-runtime";
1808
1854
  var BlueskyPostCard = ({ title, description, url, image }) => {
1809
- return /* @__PURE__ */ jsxs37("div", { className: "bluesky-preview__card", children: [
1810
- image ? /* @__PURE__ */ jsx54("div", { className: "bluesky-preview__card-image", children: /* @__PURE__ */ jsx54("img", { src: image, alt: "" }) }) : null,
1811
- /* @__PURE__ */ jsxs37("div", { className: "bluesky-preview__card-text", children: [
1812
- /* @__PURE__ */ jsx54("div", { className: "bluesky-preview__card-site", children: baseDomain(url) }),
1813
- /* @__PURE__ */ jsx54("div", { className: "bluesky-preview__card-title", children: blueskyTitle(title) || getTitleFromDescription(description) }),
1814
- /* @__PURE__ */ jsx54("div", { className: "bluesky-preview__card-description", children: stripHtmlTags(description) })
1855
+ return /* @__PURE__ */ jsxs38("div", { className: "bluesky-preview__card", children: [
1856
+ image ? /* @__PURE__ */ jsx55("div", { className: "bluesky-preview__card-image", children: /* @__PURE__ */ jsx55("img", { src: image, alt: "" }) }) : null,
1857
+ /* @__PURE__ */ jsxs38("div", { className: "bluesky-preview__card-text", children: [
1858
+ /* @__PURE__ */ jsx55("div", { className: "bluesky-preview__card-site", children: baseDomain(url) }),
1859
+ /* @__PURE__ */ jsx55("div", { className: "bluesky-preview__card-title", children: blueskyTitle(title) || getTitleFromDescription(description) }),
1860
+ /* @__PURE__ */ jsx55("div", { className: "bluesky-preview__card-description", children: stripHtmlTags(description) })
1815
1861
  ] })
1816
1862
  ] });
1817
1863
  };
1818
1864
  var card_default2 = BlueskyPostCard;
1819
1865
 
1820
1866
  // src/bluesky-preview/post/header/index.tsx
1821
- import { __ as __21, _x as _x2 } from "@wordpress/i18n";
1822
- import { jsx as jsx55, jsxs as jsxs38 } from "react/jsx-runtime";
1867
+ import { __ as __22, _x as _x2 } from "@wordpress/i18n";
1868
+ import { jsx as jsx56, jsxs as jsxs39 } from "react/jsx-runtime";
1823
1869
  var BlueskyPostHeader = ({ user }) => {
1824
1870
  const { displayName, address } = user || {};
1825
1871
  let handle = address || "username.bsky.social";
1826
1872
  if (!handle.startsWith("@")) {
1827
1873
  handle = "@" + handle;
1828
1874
  }
1829
- return /* @__PURE__ */ jsxs38("div", { className: "bluesky-preview__post-header", children: [
1830
- /* @__PURE__ */ jsxs38("div", { className: "bluesky-preview__post-header-user", children: [
1831
- /* @__PURE__ */ jsx55("span", { className: "bluesky-preview__post-header--displayname", children: displayName || __21("Account name", "social-previews") }),
1832
- /* @__PURE__ */ jsx55("span", { className: "bluesky-preview__post-header--username", children: handle })
1875
+ return /* @__PURE__ */ jsxs39("div", { className: "bluesky-preview__post-header", children: [
1876
+ /* @__PURE__ */ jsxs39("div", { className: "bluesky-preview__post-header-user", children: [
1877
+ /* @__PURE__ */ jsx56("span", { className: "bluesky-preview__post-header--displayname", children: displayName || __22("Account name", "social-previews") }),
1878
+ /* @__PURE__ */ jsx56("span", { className: "bluesky-preview__post-header--username", children: handle })
1833
1879
  ] }),
1834
- /* @__PURE__ */ jsx55("div", { className: "bluesky-preview__post-header--separator", children: "\xB7" }),
1835
- /* @__PURE__ */ jsx55("div", { className: "bluesky-preview__post-header--date", children: _x2(
1880
+ /* @__PURE__ */ jsx56("div", { className: "bluesky-preview__post-header--separator", children: "\xB7" }),
1881
+ /* @__PURE__ */ jsx56("div", { className: "bluesky-preview__post-header--date", children: _x2(
1836
1882
  "1h",
1837
1883
  'refers to the time since the post was published, e.g. "1h"',
1838
1884
  "social-previews"
@@ -1842,76 +1888,76 @@ var BlueskyPostHeader = ({ user }) => {
1842
1888
  var header_default4 = BlueskyPostHeader;
1843
1889
 
1844
1890
  // src/bluesky-preview/post/sidebar/index.tsx
1845
- import { jsx as jsx56 } from "react/jsx-runtime";
1891
+ import { jsx as jsx57 } from "react/jsx-runtime";
1846
1892
  var BlueskyPostSidebar = ({ user }) => {
1847
1893
  const { avatarUrl } = user || {};
1848
- return /* @__PURE__ */ jsx56("div", { className: "bluesky-preview__post-sidebar", children: /* @__PURE__ */ jsx56("div", { className: "bluesky-preview__post-sidebar-user", children: /* @__PURE__ */ jsx56(AvatarWithFallback, { className: "bluesky-preview__post-avatar", src: avatarUrl }) }) });
1894
+ return /* @__PURE__ */ jsx57("div", { className: "bluesky-preview__post-sidebar", children: /* @__PURE__ */ jsx57("div", { className: "bluesky-preview__post-sidebar-user", children: /* @__PURE__ */ jsx57(AvatarWithFallback, { className: "bluesky-preview__post-avatar", src: avatarUrl }) }) });
1849
1895
  };
1850
1896
 
1851
1897
  // src/bluesky-preview/post-preview.tsx
1852
- import { jsx as jsx57, jsxs as jsxs39 } from "react/jsx-runtime";
1898
+ import { jsx as jsx58, jsxs as jsxs40 } from "react/jsx-runtime";
1853
1899
  var BlueskyPostPreview = (props) => {
1854
1900
  const { user, media, appendUrl } = props;
1855
- return /* @__PURE__ */ jsxs39("div", { className: "bluesky-preview__post", children: [
1856
- /* @__PURE__ */ jsx57(BlueskyPostSidebar, { user }),
1857
- /* @__PURE__ */ jsxs39("div", { children: [
1858
- /* @__PURE__ */ jsx57(header_default4, { user }),
1859
- /* @__PURE__ */ jsx57(body_default2, { ...props, appendUrl: appendUrl ?? Boolean(media?.length), children: media?.length ? /* @__PURE__ */ jsx57("div", { className: clsx6("bluesky-preview__media", { "as-grid": media.length > 1 }), children: media.map((mediaItem, index) => /* @__PURE__ */ jsx57(
1901
+ return /* @__PURE__ */ jsxs40("div", { className: "bluesky-preview__post", children: [
1902
+ /* @__PURE__ */ jsx58(BlueskyPostSidebar, { user }),
1903
+ /* @__PURE__ */ jsxs40("div", { children: [
1904
+ /* @__PURE__ */ jsx58(header_default4, { user }),
1905
+ /* @__PURE__ */ jsx58(body_default2, { ...props, appendUrl: appendUrl ?? Boolean(media?.length), children: media?.length ? /* @__PURE__ */ jsx58("div", { className: clsx6("bluesky-preview__media", { "as-grid": media.length > 1 }), children: media.map((mediaItem, index) => /* @__PURE__ */ jsx58(
1860
1906
  "div",
1861
1907
  {
1862
1908
  className: "bluesky-preview__media-item",
1863
- children: mediaItem.type.startsWith("video/") ? /* @__PURE__ */ jsx57("video", { controls: true, children: /* @__PURE__ */ jsx57("source", { src: mediaItem.url, type: mediaItem.type }) }) : /* @__PURE__ */ jsx57("img", { alt: mediaItem.alt || "", src: mediaItem.url })
1909
+ children: mediaItem.type.startsWith("video/") ? /* @__PURE__ */ jsx58("video", { controls: true, children: /* @__PURE__ */ jsx58("source", { src: mediaItem.url, type: mediaItem.type }) }) : /* @__PURE__ */ jsx58("img", { alt: mediaItem.alt || "", src: mediaItem.url })
1864
1910
  },
1865
1911
  `bluesky-preview__media-item-${index}`
1866
1912
  )) }) : null }),
1867
- !media?.length ? /* @__PURE__ */ jsx57(card_default2, { ...props }) : null,
1868
- /* @__PURE__ */ jsx57(actions_default4, {})
1913
+ !media?.length ? /* @__PURE__ */ jsx58(card_default2, { ...props }) : null,
1914
+ /* @__PURE__ */ jsx58(actions_default4, {})
1869
1915
  ] })
1870
1916
  ] });
1871
1917
  };
1872
1918
 
1873
1919
  // src/bluesky-preview/link-preview.tsx
1874
- import { jsx as jsx58 } from "react/jsx-runtime";
1920
+ import { jsx as jsx59 } from "react/jsx-runtime";
1875
1921
  var BlueskyLinkPreview = (props) => {
1876
- return /* @__PURE__ */ jsx58(BlueskyPostPreview, { ...props, user: void 0, media: void 0, customText: "" });
1922
+ return /* @__PURE__ */ jsx59(BlueskyPostPreview, { ...props, user: void 0, media: void 0, customText: "" });
1877
1923
  };
1878
1924
 
1879
1925
  // src/bluesky-preview/previews.tsx
1880
- import { __ as __22 } from "@wordpress/i18n";
1881
- import { jsx as jsx59, jsxs as jsxs40 } from "react/jsx-runtime";
1926
+ import { __ as __23 } from "@wordpress/i18n";
1927
+ import { jsx as jsx60, jsxs as jsxs41 } from "react/jsx-runtime";
1882
1928
  var BlueskyPreviews = ({
1883
1929
  headingLevel,
1884
1930
  hidePostPreview,
1885
1931
  hideLinkPreview,
1886
1932
  ...props
1887
1933
  }) => {
1888
- return /* @__PURE__ */ jsxs40("div", { className: "social-preview bluesky-preview", children: [
1889
- !hidePostPreview && /* @__PURE__ */ jsxs40("section", { className: "social-preview__section bluesky-preview__section", children: [
1890
- /* @__PURE__ */ jsx59(SectionHeading, {
1934
+ return /* @__PURE__ */ jsxs41("div", { className: "social-preview bluesky-preview", children: [
1935
+ !hidePostPreview && /* @__PURE__ */ jsxs41("section", { className: "social-preview__section bluesky-preview__section", children: [
1936
+ /* @__PURE__ */ jsx60(SectionHeading, {
1891
1937
  level: headingLevel,
1892
1938
  // translators: refers to a social post on Bluesky
1893
- children: __22("Your post", "social-previews")
1939
+ children: __23("Your post", "social-previews")
1894
1940
  }),
1895
- /* @__PURE__ */ jsx59("p", { className: "social-preview__section-desc", children: __22("This is what your social post will look like on Bluesky:", "social-previews") }),
1896
- /* @__PURE__ */ jsx59(BlueskyPostPreview, { ...props })
1941
+ /* @__PURE__ */ jsx60("p", { className: "social-preview__section-desc", children: __23("This is what your social post will look like on Bluesky:", "social-previews") }),
1942
+ /* @__PURE__ */ jsx60(BlueskyPostPreview, { ...props })
1897
1943
  ] }),
1898
- !hideLinkPreview && /* @__PURE__ */ jsxs40("section", { className: "social-preview__section bluesky-preview__section", children: [
1899
- /* @__PURE__ */ jsx59(SectionHeading, {
1944
+ !hideLinkPreview && /* @__PURE__ */ jsxs41("section", { className: "social-preview__section bluesky-preview__section", children: [
1945
+ /* @__PURE__ */ jsx60(SectionHeading, {
1900
1946
  level: headingLevel,
1901
1947
  // translators: refers to a link to a Bluesky post
1902
- children: __22("Link preview", "social-previews")
1948
+ children: __23("Link preview", "social-previews")
1903
1949
  }),
1904
- /* @__PURE__ */ jsx59("p", { className: "social-preview__section-desc", children: __22(
1950
+ /* @__PURE__ */ jsx60("p", { className: "social-preview__section-desc", children: __23(
1905
1951
  "This is what it will look like when someone shares the link to your WordPress post on Bluesky.",
1906
1952
  "social-previews"
1907
1953
  ) }),
1908
- /* @__PURE__ */ jsx59(BlueskyLinkPreview, { ...props })
1954
+ /* @__PURE__ */ jsx60(BlueskyLinkPreview, { ...props })
1909
1955
  ] })
1910
1956
  ] });
1911
1957
  };
1912
1958
 
1913
1959
  // src/threads-preview/link-preview.tsx
1914
- import { __ as __25 } from "@wordpress/i18n";
1960
+ import { __ as __26 } from "@wordpress/i18n";
1915
1961
 
1916
1962
  // src/threads-preview/card.tsx
1917
1963
  import clsx7 from "clsx";
@@ -1925,32 +1971,32 @@ var threadsTitle = (text) => firstValid(
1925
1971
  )(stripHtmlTags(text)) || "";
1926
1972
 
1927
1973
  // src/threads-preview/card.tsx
1928
- import { jsx as jsx60, jsxs as jsxs41 } from "react/jsx-runtime";
1974
+ import { jsx as jsx61, jsxs as jsxs42 } from "react/jsx-runtime";
1929
1975
  var Card2 = ({ image, title, url }) => {
1930
1976
  const cardClassNames = clsx7({
1931
1977
  "threads-preview__card-has-image": !!image
1932
1978
  });
1933
- return /* @__PURE__ */ jsx60("div", { className: "threads-preview__card", children: /* @__PURE__ */ jsxs41("div", { className: cardClassNames, children: [
1934
- image && /* @__PURE__ */ jsx60("img", { className: "threads-preview__card-image", src: image, alt: "" }),
1935
- /* @__PURE__ */ jsxs41("div", { className: "threads-preview__card-body", children: [
1936
- /* @__PURE__ */ jsx60("div", { className: "threads-preview__card-url", children: baseDomain(url || "") }),
1937
- /* @__PURE__ */ jsx60("div", { className: "threads-preview__card-title", children: threadsTitle(title) })
1979
+ return /* @__PURE__ */ jsx61("div", { className: "threads-preview__card", children: /* @__PURE__ */ jsxs42("div", { className: cardClassNames, children: [
1980
+ image && /* @__PURE__ */ jsx61("img", { className: "threads-preview__card-image", src: image, alt: "" }),
1981
+ /* @__PURE__ */ jsxs42("div", { className: "threads-preview__card-body", children: [
1982
+ /* @__PURE__ */ jsx61("div", { className: "threads-preview__card-url", children: baseDomain(url || "") }),
1983
+ /* @__PURE__ */ jsx61("div", { className: "threads-preview__card-title", children: threadsTitle(title) })
1938
1984
  ] })
1939
1985
  ] }) });
1940
1986
  };
1941
1987
 
1942
1988
  // src/threads-preview/footer.tsx
1943
- import { jsx as jsx61, jsxs as jsxs42 } from "react/jsx-runtime";
1989
+ import { jsx as jsx62, jsxs as jsxs43 } from "react/jsx-runtime";
1944
1990
  var Footer2 = () => {
1945
- return /* @__PURE__ */ jsxs42("div", { className: "threads-preview__footer", children: [
1946
- /* @__PURE__ */ jsx61("span", { className: "threads-preview__icon--like", children: /* @__PURE__ */ jsx61("svg", { role: "img", viewBox: "0 0 18 18", children: /* @__PURE__ */ jsx61(
1991
+ return /* @__PURE__ */ jsxs43("div", { className: "threads-preview__footer", children: [
1992
+ /* @__PURE__ */ jsx62("span", { className: "threads-preview__icon--like", children: /* @__PURE__ */ jsx62("svg", { role: "img", viewBox: "0 0 18 18", children: /* @__PURE__ */ jsx62(
1947
1993
  "path",
1948
1994
  {
1949
1995
  d: "M1.34375 7.53125L1.34375 7.54043C1.34374 8.04211 1.34372 8.76295 1.6611 9.65585C1.9795 10.5516 2.60026 11.5779 3.77681 12.7544C5.59273 14.5704 7.58105 16.0215 8.33387 16.5497C8.73525 16.8313 9.26573 16.8313 9.66705 16.5496C10.4197 16.0213 12.4074 14.5703 14.2232 12.7544C15.3997 11.5779 16.0205 10.5516 16.3389 9.65585C16.6563 8.76296 16.6563 8.04211 16.6562 7.54043V7.53125C16.6562 5.23466 15.0849 3.25 12.6562 3.25C11.5214 3.25 10.6433 3.78244 9.99228 4.45476C9.59009 4.87012 9.26356 5.3491 9 5.81533C8.73645 5.3491 8.40991 4.87012 8.00772 4.45476C7.35672 3.78244 6.47861 3.25 5.34375 3.25C2.9151 3.25 1.34375 5.23466 1.34375 7.53125Z",
1950
1996
  strokeWidth: "1.25"
1951
1997
  }
1952
1998
  ) }) }),
1953
- /* @__PURE__ */ jsx61("span", { className: "threads-preview__icon--reply", children: /* @__PURE__ */ jsx61("svg", { role: "img", viewBox: "0 0 18 18", children: /* @__PURE__ */ jsx61(
1999
+ /* @__PURE__ */ jsx62("span", { className: "threads-preview__icon--reply", children: /* @__PURE__ */ jsx62("svg", { role: "img", viewBox: "0 0 18 18", children: /* @__PURE__ */ jsx62(
1954
2000
  "path",
1955
2001
  {
1956
2002
  d: "M15.376 13.2177L16.2861 16.7955L12.7106 15.8848C12.6781 15.8848 12.6131 15.8848 12.5806 15.8848C11.3779 16.5678 9.94767 16.8931 8.41995 16.7955C4.94194 16.5353 2.08152 13.7381 1.72397 10.2578C1.2689 5.63919 5.13697 1.76863 9.75264 2.22399C13.2307 2.58177 16.0261 5.41151 16.2861 8.92429C16.4161 10.453 16.0586 11.8841 15.376 13.0876C15.376 13.1526 15.376 13.1852 15.376 13.2177Z",
@@ -1958,12 +2004,12 @@ var Footer2 = () => {
1958
2004
  strokeWidth: "1.25"
1959
2005
  }
1960
2006
  ) }) }),
1961
- /* @__PURE__ */ jsx61("span", { className: "threads-preview__icon--repost", children: /* @__PURE__ */ jsxs42("svg", { role: "img", viewBox: "0 0 18 18", children: [
1962
- /* @__PURE__ */ jsx61("path", { d: "M6.41256 1.23531C6.6349 0.971277 7.02918 0.937481 7.29321 1.15982L9.96509 3.40982C10.1022 3.52528 10.1831 3.69404 10.1873 3.87324C10.1915 4.05243 10.1186 4.2248 9.98706 4.34656L7.31518 6.81971C7.06186 7.05419 6.66643 7.03892 6.43196 6.7856C6.19748 6.53228 6.21275 6.13685 6.46607 5.90237L7.9672 4.51289H5.20312C3.68434 4.51289 2.45312 5.74411 2.45312 7.26289V9.51289V11.7629C2.45312 13.2817 3.68434 14.5129 5.20312 14.5129C5.5483 14.5129 5.82812 14.7927 5.82812 15.1379C5.82812 15.4831 5.5483 15.7629 5.20312 15.7629C2.99399 15.7629 1.20312 13.972 1.20312 11.7629V9.51289V7.26289C1.20312 5.05375 2.99399 3.26289 5.20312 3.26289H7.85002L6.48804 2.11596C6.22401 1.89362 6.19021 1.49934 6.41256 1.23531Z" }),
1963
- /* @__PURE__ */ jsx61("path", { d: "M11.5874 17.7904C11.3651 18.0545 10.9708 18.0883 10.7068 17.8659L8.03491 15.6159C7.89781 15.5005 7.81687 15.3317 7.81267 15.1525C7.80847 14.9733 7.8814 14.801 8.01294 14.6792L10.6848 12.206C10.9381 11.9716 11.3336 11.9868 11.568 12.2402C11.8025 12.4935 11.7872 12.8889 11.5339 13.1234L10.0328 14.5129H12.7969C14.3157 14.5129 15.5469 13.2816 15.5469 11.7629V9.51286V7.26286C15.5469 5.74408 14.3157 4.51286 12.7969 4.51286C12.4517 4.51286 12.1719 4.23304 12.1719 3.88786C12.1719 3.54269 12.4517 3.26286 12.7969 3.26286C15.006 3.26286 16.7969 5.05373 16.7969 7.26286V9.51286V11.7629C16.7969 13.972 15.006 15.7629 12.7969 15.7629H10.15L11.512 16.9098C11.776 17.1321 11.8098 17.5264 11.5874 17.7904Z" })
2007
+ /* @__PURE__ */ jsx62("span", { className: "threads-preview__icon--repost", children: /* @__PURE__ */ jsxs43("svg", { role: "img", viewBox: "0 0 18 18", children: [
2008
+ /* @__PURE__ */ jsx62("path", { d: "M6.41256 1.23531C6.6349 0.971277 7.02918 0.937481 7.29321 1.15982L9.96509 3.40982C10.1022 3.52528 10.1831 3.69404 10.1873 3.87324C10.1915 4.05243 10.1186 4.2248 9.98706 4.34656L7.31518 6.81971C7.06186 7.05419 6.66643 7.03892 6.43196 6.7856C6.19748 6.53228 6.21275 6.13685 6.46607 5.90237L7.9672 4.51289H5.20312C3.68434 4.51289 2.45312 5.74411 2.45312 7.26289V9.51289V11.7629C2.45312 13.2817 3.68434 14.5129 5.20312 14.5129C5.5483 14.5129 5.82812 14.7927 5.82812 15.1379C5.82812 15.4831 5.5483 15.7629 5.20312 15.7629C2.99399 15.7629 1.20312 13.972 1.20312 11.7629V9.51289V7.26289C1.20312 5.05375 2.99399 3.26289 5.20312 3.26289H7.85002L6.48804 2.11596C6.22401 1.89362 6.19021 1.49934 6.41256 1.23531Z" }),
2009
+ /* @__PURE__ */ jsx62("path", { d: "M11.5874 17.7904C11.3651 18.0545 10.9708 18.0883 10.7068 17.8659L8.03491 15.6159C7.89781 15.5005 7.81687 15.3317 7.81267 15.1525C7.80847 14.9733 7.8814 14.801 8.01294 14.6792L10.6848 12.206C10.9381 11.9716 11.3336 11.9868 11.568 12.2402C11.8025 12.4935 11.7872 12.8889 11.5339 13.1234L10.0328 14.5129H12.7969C14.3157 14.5129 15.5469 13.2816 15.5469 11.7629V9.51286V7.26286C15.5469 5.74408 14.3157 4.51286 12.7969 4.51286C12.4517 4.51286 12.1719 4.23304 12.1719 3.88786C12.1719 3.54269 12.4517 3.26286 12.7969 3.26286C15.006 3.26286 16.7969 5.05373 16.7969 7.26286V9.51286V11.7629C16.7969 13.972 15.006 15.7629 12.7969 15.7629H10.15L11.512 16.9098C11.776 17.1321 11.8098 17.5264 11.5874 17.7904Z" })
1964
2010
  ] }) }),
1965
- /* @__PURE__ */ jsx61("span", { className: "threads-preview__icon--share", children: /* @__PURE__ */ jsxs42("svg", { role: "img", viewBox: "0 0 18 18", children: [
1966
- /* @__PURE__ */ jsx61(
2011
+ /* @__PURE__ */ jsx62("span", { className: "threads-preview__icon--share", children: /* @__PURE__ */ jsxs43("svg", { role: "img", viewBox: "0 0 18 18", children: [
2012
+ /* @__PURE__ */ jsx62(
1967
2013
  "path",
1968
2014
  {
1969
2015
  d: "M15.6097 4.09082L6.65039 9.11104",
@@ -1971,7 +2017,7 @@ var Footer2 = () => {
1971
2017
  strokeWidth: "1.25"
1972
2018
  }
1973
2019
  ),
1974
- /* @__PURE__ */ jsx61(
2020
+ /* @__PURE__ */ jsx62(
1975
2021
  "path",
1976
2022
  {
1977
2023
  d: "M7.79128 14.439C8.00463 15.3275 8.11131 15.7718 8.33426 15.932C8.52764 16.071 8.77617 16.1081 9.00173 16.0318C9.26179 15.9438 9.49373 15.5501 9.95761 14.7628L15.5444 5.2809C15.8883 4.69727 16.0603 4.40546 16.0365 4.16566C16.0159 3.95653 15.9071 3.76612 15.7374 3.64215C15.5428 3.5 15.2041 3.5 14.5267 3.5H3.71404C2.81451 3.5 2.36474 3.5 2.15744 3.67754C1.97758 3.83158 1.88253 4.06254 1.90186 4.29856C1.92415 4.57059 2.24363 4.88716 2.88259 5.52032L6.11593 8.7243C6.26394 8.87097 6.33795 8.94431 6.39784 9.02755C6.451 9.10144 6.4958 9.18101 6.53142 9.26479C6.57153 9.35916 6.59586 9.46047 6.64451 9.66309L7.79128 14.439Z",
@@ -1984,20 +2030,20 @@ var Footer2 = () => {
1984
2030
  };
1985
2031
 
1986
2032
  // src/threads-preview/header.tsx
1987
- import { __ as __23 } from "@wordpress/i18n";
1988
- import { jsx as jsx62, jsxs as jsxs43 } from "react/jsx-runtime";
2033
+ import { __ as __24 } from "@wordpress/i18n";
2034
+ import { jsx as jsx63, jsxs as jsxs44 } from "react/jsx-runtime";
1989
2035
  var Header2 = ({ name, date }) => {
1990
2036
  const postDate = date || /* @__PURE__ */ new Date();
1991
- return /* @__PURE__ */ jsxs43("div", { className: "threads-preview__header", children: [
1992
- /* @__PURE__ */ jsx62("span", { className: "threads-preview__name", children: name || __23("Account Name", "social-previews") }),
1993
- /* @__PURE__ */ jsx62("time", { className: "threads-preview__date", dateTime: postDate.toISOString(), children: formatThreadsDate(postDate) })
2037
+ return /* @__PURE__ */ jsxs44("div", { className: "threads-preview__header", children: [
2038
+ /* @__PURE__ */ jsx63("span", { className: "threads-preview__name", children: name || __24("Account Name", "social-previews") }),
2039
+ /* @__PURE__ */ jsx63("time", { className: "threads-preview__date", dateTime: postDate.toISOString(), children: formatThreadsDate(postDate) })
1994
2040
  ] });
1995
2041
  };
1996
2042
 
1997
2043
  // src/threads-preview/media.tsx
1998
2044
  import clsx8 from "clsx";
1999
- import { Fragment as Fragment6 } from "react";
2000
- import { jsx as jsx63 } from "react/jsx-runtime";
2045
+ import { Fragment as Fragment7 } from "react";
2046
+ import { jsx as jsx64 } from "react/jsx-runtime";
2001
2047
  var Media2 = ({ media }) => {
2002
2048
  const filteredMedia = media.filter(
2003
2049
  (mediaItem) => mediaItem.type.startsWith("image/") || mediaItem.type.startsWith("video/")
@@ -2021,27 +2067,27 @@ var Media2 = ({ media }) => {
2021
2067
  "threads-preview__media",
2022
2068
  "threads-preview__media-children-" + filteredMedia.length
2023
2069
  ]);
2024
- return /* @__PURE__ */ jsx63("div", { className: mediaClasses, children: filteredMedia.map((mediaItem, index) => /* @__PURE__ */ jsx63(Fragment6, { children: isVideo ? /* @__PURE__ */ jsx63("video", { controls: true, children: /* @__PURE__ */ jsx63("source", { src: mediaItem.url, type: mediaItem.type }) }) : /* @__PURE__ */ jsx63("img", { alt: mediaItem.alt || "", src: mediaItem.url }) }, `threads-preview__media-item-${index}`)) });
2070
+ return /* @__PURE__ */ jsx64("div", { className: mediaClasses, children: filteredMedia.map((mediaItem, index) => /* @__PURE__ */ jsx64(Fragment7, { children: isVideo ? /* @__PURE__ */ jsx64("video", { controls: true, children: /* @__PURE__ */ jsx64("source", { src: mediaItem.url, type: mediaItem.type }) }) : /* @__PURE__ */ jsx64("img", { alt: mediaItem.alt || "", src: mediaItem.url }) }, `threads-preview__media-item-${index}`)) });
2025
2071
  };
2026
2072
 
2027
2073
  // src/threads-preview/sidebar.tsx
2028
- import { __ as __24 } from "@wordpress/i18n";
2029
- import { jsx as jsx64, jsxs as jsxs44 } from "react/jsx-runtime";
2074
+ import { __ as __25 } from "@wordpress/i18n";
2075
+ import { jsx as jsx65, jsxs as jsxs45 } from "react/jsx-runtime";
2030
2076
  var Sidebar2 = ({ profileImage, showThreadConnector }) => {
2031
- return /* @__PURE__ */ jsxs44("div", { className: "threads-preview__sidebar", children: [
2032
- /* @__PURE__ */ jsx64("div", { className: "threads-preview__profile-image", children: /* @__PURE__ */ jsx64(
2077
+ return /* @__PURE__ */ jsxs45("div", { className: "threads-preview__sidebar", children: [
2078
+ /* @__PURE__ */ jsx65("div", { className: "threads-preview__profile-image", children: /* @__PURE__ */ jsx65(
2033
2079
  AvatarWithFallback,
2034
2080
  {
2035
- alt: __24("Threads profile image", "social-previews"),
2081
+ alt: __25("Threads profile image", "social-previews"),
2036
2082
  src: profileImage
2037
2083
  }
2038
2084
  ) }),
2039
- showThreadConnector && /* @__PURE__ */ jsx64("div", { className: "threads-preview__connector" })
2085
+ showThreadConnector && /* @__PURE__ */ jsx65("div", { className: "threads-preview__connector" })
2040
2086
  ] });
2041
2087
  };
2042
2088
 
2043
2089
  // src/threads-preview/post-preview.tsx
2044
- import { jsx as jsx65, jsxs as jsxs45 } from "react/jsx-runtime";
2090
+ import { jsx as jsx66, jsxs as jsxs46 } from "react/jsx-runtime";
2045
2091
  var ThreadsPostPreview = ({
2046
2092
  caption,
2047
2093
  date,
@@ -2055,33 +2101,33 @@ var ThreadsPostPreview = ({
2055
2101
  }) => {
2056
2102
  const hasMedia = !!media?.length;
2057
2103
  const displayAsCard = url && image && !hasMedia;
2058
- return /* @__PURE__ */ jsx65("div", { className: "threads-preview__wrapper", children: /* @__PURE__ */ jsxs45("div", { className: "threads-preview__container", children: [
2059
- /* @__PURE__ */ jsx65(Sidebar2, { profileImage, showThreadConnector }),
2060
- /* @__PURE__ */ jsxs45("div", { className: "threads-preview__main", children: [
2061
- /* @__PURE__ */ jsx65(Header2, { name, date }),
2062
- /* @__PURE__ */ jsxs45("div", { className: "threads-preview__content", children: [
2063
- caption ? /* @__PURE__ */ jsx65("div", { className: "threads-preview__text", children: preparePreviewText(caption, {
2104
+ return /* @__PURE__ */ jsx66("div", { className: "threads-preview__wrapper", children: /* @__PURE__ */ jsxs46("div", { className: "threads-preview__container", children: [
2105
+ /* @__PURE__ */ jsx66(Sidebar2, { profileImage, showThreadConnector }),
2106
+ /* @__PURE__ */ jsxs46("div", { className: "threads-preview__main", children: [
2107
+ /* @__PURE__ */ jsx66(Header2, { name, date }),
2108
+ /* @__PURE__ */ jsxs46("div", { className: "threads-preview__content", children: [
2109
+ caption ? /* @__PURE__ */ jsx66("div", { className: "threads-preview__text", children: /* @__PURE__ */ jsx66(ExpandableText, { text: caption, children: (visibleText) => preparePreviewText(visibleText, {
2064
2110
  platform: "threads",
2065
2111
  maxChars: CAPTION_MAX_CHARS
2066
- }) }) : null,
2067
- hasMedia ? /* @__PURE__ */ jsx65(Media2, { media }) : null,
2068
- displayAsCard ? /* @__PURE__ */ jsx65(Card2, { image, title: title || "", url }) : null
2112
+ }) }) }) : null,
2113
+ hasMedia ? /* @__PURE__ */ jsx66(Media2, { media }) : null,
2114
+ displayAsCard ? /* @__PURE__ */ jsx66(Card2, { image, title: title || "", url }) : null
2069
2115
  ] }),
2070
- /* @__PURE__ */ jsx65(Footer2, {})
2116
+ /* @__PURE__ */ jsx66(Footer2, {})
2071
2117
  ] })
2072
2118
  ] }) });
2073
2119
  };
2074
2120
 
2075
2121
  // src/threads-preview/link-preview.tsx
2076
- import { jsx as jsx66 } from "react/jsx-runtime";
2122
+ import { jsx as jsx67 } from "react/jsx-runtime";
2077
2123
  var ThreadsLinkPreview = (props) => {
2078
2124
  if (!props.image) {
2079
- return /* @__PURE__ */ jsx66("p", { className: "social-preview__section-desc", children: __25(
2125
+ return /* @__PURE__ */ jsx67("p", { className: "social-preview__section-desc", children: __26(
2080
2126
  "Threads link preview requires an image to be set for the post. Please add an image to see the preview.",
2081
2127
  "social-previews"
2082
2128
  ) });
2083
2129
  }
2084
- return /* @__PURE__ */ jsx66(
2130
+ return /* @__PURE__ */ jsx67(
2085
2131
  ThreadsPostPreview,
2086
2132
  {
2087
2133
  ...props,
@@ -2092,8 +2138,8 @@ var ThreadsLinkPreview = (props) => {
2092
2138
  };
2093
2139
 
2094
2140
  // src/threads-preview/previews.tsx
2095
- import { __ as __26 } from "@wordpress/i18n";
2096
- import { Fragment as Fragment7, jsx as jsx67, jsxs as jsxs46 } from "react/jsx-runtime";
2141
+ import { __ as __27 } from "@wordpress/i18n";
2142
+ import { Fragment as Fragment8, jsx as jsx68, jsxs as jsxs47 } from "react/jsx-runtime";
2097
2143
  var ThreadsPreviews = ({
2098
2144
  headingLevel,
2099
2145
  hideLinkPreview,
@@ -2103,17 +2149,17 @@ var ThreadsPreviews = ({
2103
2149
  if (!posts?.length) {
2104
2150
  return null;
2105
2151
  }
2106
- return /* @__PURE__ */ jsxs46("div", { className: "social-preview threads-preview", children: [
2107
- !hidePostPreview && /* @__PURE__ */ jsxs46("section", { className: "social-preview__section threads-preview__section", children: [
2108
- /* @__PURE__ */ jsx67(section_heading_default, {
2152
+ return /* @__PURE__ */ jsxs47("div", { className: "social-preview threads-preview", children: [
2153
+ !hidePostPreview && /* @__PURE__ */ jsxs47("section", { className: "social-preview__section threads-preview__section", children: [
2154
+ /* @__PURE__ */ jsx68(section_heading_default, {
2109
2155
  level: headingLevel,
2110
2156
  // translators: refers to a social post on Threads
2111
- children: __26("Your post", "social-previews")
2157
+ children: __27("Your post", "social-previews")
2112
2158
  }),
2113
- /* @__PURE__ */ jsx67("p", { className: "social-preview__section-desc", children: __26("This is what your social post will look like on Threads:", "social-previews") }),
2159
+ /* @__PURE__ */ jsx68("p", { className: "social-preview__section-desc", children: __27("This is what your social post will look like on Threads:", "social-previews") }),
2114
2160
  posts.map((post, index) => {
2115
2161
  const isLast = index + 1 === posts.length;
2116
- return /* @__PURE__ */ jsx67(
2162
+ return /* @__PURE__ */ jsx68(
2117
2163
  ThreadsPostPreview,
2118
2164
  {
2119
2165
  ...post,
@@ -2123,19 +2169,19 @@ var ThreadsPreviews = ({
2123
2169
  );
2124
2170
  })
2125
2171
  ] }),
2126
- !hideLinkPreview ? /* @__PURE__ */ jsxs46("section", { className: "social-preview__section threads-preview__section", children: [
2127
- /* @__PURE__ */ jsx67(section_heading_default, {
2172
+ !hideLinkPreview ? /* @__PURE__ */ jsxs47("section", { className: "social-preview__section threads-preview__section", children: [
2173
+ /* @__PURE__ */ jsx68(section_heading_default, {
2128
2174
  level: headingLevel,
2129
2175
  // translators: refers to a link to a Threads post
2130
- children: __26("Link preview", "social-previews")
2176
+ children: __27("Link preview", "social-previews")
2131
2177
  }),
2132
- posts[0].image ? /* @__PURE__ */ jsxs46(Fragment7, { children: [
2133
- /* @__PURE__ */ jsx67("p", { className: "social-preview__section-desc", children: __26(
2178
+ posts[0].image ? /* @__PURE__ */ jsxs47(Fragment8, { children: [
2179
+ /* @__PURE__ */ jsx68("p", { className: "social-preview__section-desc", children: __27(
2134
2180
  "This is what it will look like when someone shares the link to your WordPress post on Threads.",
2135
2181
  "social-previews"
2136
2182
  ) }),
2137
- /* @__PURE__ */ jsx67(ThreadsLinkPreview, { ...posts[0], name: "", profileImage: "" })
2138
- ] }) : /* @__PURE__ */ jsx67("p", { className: "social-preview__section-desc", children: __26(
2183
+ /* @__PURE__ */ jsx68(ThreadsLinkPreview, { ...posts[0], name: "", profileImage: "" })
2184
+ ] }) : /* @__PURE__ */ jsx68("p", { className: "social-preview__section-desc", children: __27(
2139
2185
  "Threads link preview requires an image to be set for the post. Please add an image to see the preview.",
2140
2186
  "social-previews"
2141
2187
  ) })
@@ -2144,15 +2190,15 @@ var ThreadsPreviews = ({
2144
2190
  };
2145
2191
 
2146
2192
  // src/instagram-preview/post-preview.tsx
2147
- import { __ as __27 } from "@wordpress/i18n";
2193
+ import { __ as __28 } from "@wordpress/i18n";
2148
2194
 
2149
2195
  // src/instagram-preview/constants.tsx
2150
- var FEED_TEXT_MAX_LENGTH3 = 520;
2196
+ var FEED_TEXT_MAX_LENGTH3 = 2200;
2151
2197
 
2152
2198
  // src/instagram-preview/icons/bookmark.tsx
2153
- import { jsx as jsx68 } from "react/jsx-runtime";
2199
+ import { jsx as jsx69 } from "react/jsx-runtime";
2154
2200
  var Bookmark = () => {
2155
- return /* @__PURE__ */ jsx68(
2201
+ return /* @__PURE__ */ jsx69(
2156
2202
  "svg",
2157
2203
  {
2158
2204
  color: "rgb(38, 38, 38)",
@@ -2161,7 +2207,7 @@ var Bookmark = () => {
2161
2207
  role: "img",
2162
2208
  viewBox: "0 0 24 24",
2163
2209
  width: "24",
2164
- children: /* @__PURE__ */ jsx68(
2210
+ children: /* @__PURE__ */ jsx69(
2165
2211
  "polygon",
2166
2212
  {
2167
2213
  fill: "none",
@@ -2177,9 +2223,9 @@ var Bookmark = () => {
2177
2223
  };
2178
2224
 
2179
2225
  // src/instagram-preview/icons/comment.tsx
2180
- import { jsx as jsx69 } from "react/jsx-runtime";
2226
+ import { jsx as jsx70 } from "react/jsx-runtime";
2181
2227
  var Comment = () => {
2182
- return /* @__PURE__ */ jsx69(
2228
+ return /* @__PURE__ */ jsx70(
2183
2229
  "svg",
2184
2230
  {
2185
2231
  color: "rgb(38, 38, 38)",
@@ -2188,7 +2234,7 @@ var Comment = () => {
2188
2234
  role: "img",
2189
2235
  viewBox: "0 0 24 24",
2190
2236
  width: "24",
2191
- children: /* @__PURE__ */ jsx69(
2237
+ children: /* @__PURE__ */ jsx70(
2192
2238
  "path",
2193
2239
  {
2194
2240
  d: "M20.656 17.008a9.993 9.993 0 1 0-3.59 3.615L22 22Z",
@@ -2203,9 +2249,9 @@ var Comment = () => {
2203
2249
  };
2204
2250
 
2205
2251
  // src/instagram-preview/icons/heart.tsx
2206
- import { jsx as jsx70 } from "react/jsx-runtime";
2252
+ import { jsx as jsx71 } from "react/jsx-runtime";
2207
2253
  var Heart = () => {
2208
- return /* @__PURE__ */ jsx70(
2254
+ return /* @__PURE__ */ jsx71(
2209
2255
  "svg",
2210
2256
  {
2211
2257
  color: "rgb(38, 38, 38)",
@@ -2214,16 +2260,16 @@ var Heart = () => {
2214
2260
  role: "img",
2215
2261
  viewBox: "0 0 24 24",
2216
2262
  width: "24",
2217
- children: /* @__PURE__ */ jsx70("path", { d: "M16.792 3.904A4.989 4.989 0 0 1 21.5 9.122c0 3.072-2.652 4.959-5.197 7.222-2.512 2.243-3.865 3.469-4.303 3.752-.477-.309-2.143-1.823-4.303-3.752C5.141 14.072 2.5 12.167 2.5 9.122a4.989 4.989 0 0 1 4.708-5.218 4.21 4.21 0 0 1 3.675 1.941c.84 1.175.98 1.763 1.12 1.763s.278-.588 1.11-1.766a4.17 4.17 0 0 1 3.679-1.938m0-2a6.04 6.04 0 0 0-4.797 2.127 6.052 6.052 0 0 0-4.787-2.127A6.985 6.985 0 0 0 .5 9.122c0 3.61 2.55 5.827 5.015 7.97.283.246.569.494.853.747l1.027.918a44.998 44.998 0 0 0 3.518 3.018 2 2 0 0 0 2.174 0 45.263 45.263 0 0 0 3.626-3.115l.922-.824c.293-.26.59-.519.885-.774 2.334-2.025 4.98-4.32 4.98-7.94a6.985 6.985 0 0 0-6.708-7.218Z" })
2263
+ children: /* @__PURE__ */ jsx71("path", { d: "M16.792 3.904A4.989 4.989 0 0 1 21.5 9.122c0 3.072-2.652 4.959-5.197 7.222-2.512 2.243-3.865 3.469-4.303 3.752-.477-.309-2.143-1.823-4.303-3.752C5.141 14.072 2.5 12.167 2.5 9.122a4.989 4.989 0 0 1 4.708-5.218 4.21 4.21 0 0 1 3.675 1.941c.84 1.175.98 1.763 1.12 1.763s.278-.588 1.11-1.766a4.17 4.17 0 0 1 3.679-1.938m0-2a6.04 6.04 0 0 0-4.797 2.127 6.052 6.052 0 0 0-4.787-2.127A6.985 6.985 0 0 0 .5 9.122c0 3.61 2.55 5.827 5.015 7.97.283.246.569.494.853.747l1.027.918a44.998 44.998 0 0 0 3.518 3.018 2 2 0 0 0 2.174 0 45.263 45.263 0 0 0 3.626-3.115l.922-.824c.293-.26.59-.519.885-.774 2.334-2.025 4.98-4.32 4.98-7.94a6.985 6.985 0 0 0-6.708-7.218Z" })
2218
2264
  }
2219
2265
  );
2220
2266
  };
2221
2267
 
2222
2268
  // src/instagram-preview/icons/menu.tsx
2223
- import { jsx as jsx71, jsxs as jsxs47 } from "react/jsx-runtime";
2269
+ import { jsx as jsx72, jsxs as jsxs48 } from "react/jsx-runtime";
2224
2270
  var Menu = () => {
2225
- return /* @__PURE__ */ jsxs47("svg", { width: "17", height: "5", viewBox: "0 0 17 5", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
2226
- /* @__PURE__ */ jsx71(
2271
+ return /* @__PURE__ */ jsxs48("svg", { width: "17", height: "5", viewBox: "0 0 17 5", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
2272
+ /* @__PURE__ */ jsx72(
2227
2273
  "path",
2228
2274
  {
2229
2275
  d: "M2.11865 3.5C2.67094 3.5 3.11865 3.05228 3.11865 2.5C3.11865 1.94772 2.67094 1.5 2.11865 1.5C1.56637 1.5 1.11865 1.94772 1.11865 2.5C1.11865 3.05228 1.56637 3.5 2.11865 3.5Z",
@@ -2232,7 +2278,7 @@ var Menu = () => {
2232
2278
  strokeWidth: "2"
2233
2279
  }
2234
2280
  ),
2235
- /* @__PURE__ */ jsx71(
2281
+ /* @__PURE__ */ jsx72(
2236
2282
  "path",
2237
2283
  {
2238
2284
  d: "M8.55933 3.5C9.11161 3.5 9.55933 3.05228 9.55933 2.5C9.55933 1.94772 9.11161 1.5 8.55933 1.5C8.00704 1.5 7.55933 1.94772 7.55933 2.5C7.55933 3.05228 8.00704 3.5 8.55933 3.5Z",
@@ -2241,7 +2287,7 @@ var Menu = () => {
2241
2287
  strokeWidth: "2"
2242
2288
  }
2243
2289
  ),
2244
- /* @__PURE__ */ jsx71(
2290
+ /* @__PURE__ */ jsx72(
2245
2291
  "path",
2246
2292
  {
2247
2293
  d: "M15 3.5C15.5523 3.5 16 3.05228 16 2.5C16 1.94772 15.5523 1.5 15 1.5C14.4477 1.5 14 1.94772 14 2.5C14 3.05228 14.4477 3.5 15 3.5Z",
@@ -2254,9 +2300,9 @@ var Menu = () => {
2254
2300
  };
2255
2301
 
2256
2302
  // src/instagram-preview/icons/share.tsx
2257
- import { jsx as jsx72, jsxs as jsxs48 } from "react/jsx-runtime";
2303
+ import { jsx as jsx73, jsxs as jsxs49 } from "react/jsx-runtime";
2258
2304
  var Share = () => {
2259
- return /* @__PURE__ */ jsxs48(
2305
+ return /* @__PURE__ */ jsxs49(
2260
2306
  "svg",
2261
2307
  {
2262
2308
  color: "rgb(38, 38, 38)",
@@ -2266,7 +2312,7 @@ var Share = () => {
2266
2312
  viewBox: "0 0 24 24",
2267
2313
  width: "24",
2268
2314
  children: [
2269
- /* @__PURE__ */ jsx72(
2315
+ /* @__PURE__ */ jsx73(
2270
2316
  "line",
2271
2317
  {
2272
2318
  fill: "none",
@@ -2279,7 +2325,7 @@ var Share = () => {
2279
2325
  y2: "10.083"
2280
2326
  }
2281
2327
  ),
2282
- /* @__PURE__ */ jsx72(
2328
+ /* @__PURE__ */ jsx73(
2283
2329
  "polygon",
2284
2330
  {
2285
2331
  fill: "none",
@@ -2295,7 +2341,7 @@ var Share = () => {
2295
2341
  };
2296
2342
 
2297
2343
  // src/instagram-preview/post-preview.tsx
2298
- import { Fragment as Fragment8, jsx as jsx73, jsxs as jsxs49 } from "react/jsx-runtime";
2344
+ import { Fragment as Fragment9, jsx as jsx74, jsxs as jsxs50 } from "react/jsx-runtime";
2299
2345
  function InstagramPostPreview({
2300
2346
  image,
2301
2347
  media,
@@ -2306,63 +2352,63 @@ function InstagramPostPreview({
2306
2352
  }) {
2307
2353
  const username = name || "username";
2308
2354
  const mediaItem = media?.[0];
2309
- return /* @__PURE__ */ jsx73("div", { className: "instagram-preview__wrapper", children: /* @__PURE__ */ jsxs49("section", { className: "instagram-preview__container", children: [
2310
- /* @__PURE__ */ jsxs49("div", { className: "instagram-preview__header", children: [
2311
- /* @__PURE__ */ jsx73("div", { className: "instagram-preview__header--avatar", children: /* @__PURE__ */ jsx73(AvatarWithFallback, { src: profileImage }) }),
2312
- /* @__PURE__ */ jsxs49("div", { className: "instagram-preview__header--profile", children: [
2313
- /* @__PURE__ */ jsx73("div", { className: "instagram-preview__header--profile-name", children: username }),
2314
- /* @__PURE__ */ jsx73("div", { className: "instagram-preview__header--profile-menu", children: /* @__PURE__ */ jsx73(Menu, {}) })
2355
+ return /* @__PURE__ */ jsx74("div", { className: "instagram-preview__wrapper", children: /* @__PURE__ */ jsxs50("section", { className: "instagram-preview__container", children: [
2356
+ /* @__PURE__ */ jsxs50("div", { className: "instagram-preview__header", children: [
2357
+ /* @__PURE__ */ jsx74("div", { className: "instagram-preview__header--avatar", children: /* @__PURE__ */ jsx74(AvatarWithFallback, { src: profileImage }) }),
2358
+ /* @__PURE__ */ jsxs50("div", { className: "instagram-preview__header--profile", children: [
2359
+ /* @__PURE__ */ jsx74("div", { className: "instagram-preview__header--profile-name", children: username }),
2360
+ /* @__PURE__ */ jsx74("div", { className: "instagram-preview__header--profile-menu", children: /* @__PURE__ */ jsx74(Menu, {}) })
2315
2361
  ] })
2316
2362
  ] }),
2317
- /* @__PURE__ */ jsx73("div", { className: "instagram-preview__media", children: mediaItem ? /* @__PURE__ */ jsx73("div", { className: "instagram-preview__media-item", children: mediaItem.type.startsWith("video/") ? /* @__PURE__ */ jsx73("video", { controls: false, className: "instagram-preview__media--video", children: /* @__PURE__ */ jsx73("source", { src: mediaItem.url, type: mediaItem.type }) }) : /* @__PURE__ */ jsx73("img", { className: "instagram-preview__media--image", src: mediaItem.url, alt: "" }) }) : /* @__PURE__ */ jsx73("img", { className: "instagram-preview__media--image", src: image, alt: "" }) }),
2318
- /* @__PURE__ */ jsxs49("div", { className: "instagram-preview__content", children: [
2319
- /* @__PURE__ */ jsxs49("section", { className: "instagram-preview__content--actions", children: [
2320
- /* @__PURE__ */ jsxs49("div", { className: "instagram-preview__content--actions-primary", children: [
2321
- /* @__PURE__ */ jsx73(Heart, {}),
2322
- /* @__PURE__ */ jsx73(Comment, {}),
2323
- /* @__PURE__ */ jsx73(Share, {})
2363
+ /* @__PURE__ */ jsx74("div", { className: "instagram-preview__media", children: mediaItem ? /* @__PURE__ */ jsx74("div", { className: "instagram-preview__media-item", children: mediaItem.type.startsWith("video/") ? /* @__PURE__ */ jsx74("video", { controls: false, className: "instagram-preview__media--video", children: /* @__PURE__ */ jsx74("source", { src: mediaItem.url, type: mediaItem.type }) }) : /* @__PURE__ */ jsx74("img", { className: "instagram-preview__media--image", src: mediaItem.url, alt: "" }) }) : /* @__PURE__ */ jsx74("img", { className: "instagram-preview__media--image", src: image, alt: "" }) }),
2364
+ /* @__PURE__ */ jsxs50("div", { className: "instagram-preview__content", children: [
2365
+ /* @__PURE__ */ jsxs50("section", { className: "instagram-preview__content--actions", children: [
2366
+ /* @__PURE__ */ jsxs50("div", { className: "instagram-preview__content--actions-primary", children: [
2367
+ /* @__PURE__ */ jsx74(Heart, {}),
2368
+ /* @__PURE__ */ jsx74(Comment, {}),
2369
+ /* @__PURE__ */ jsx74(Share, {})
2324
2370
  ] }),
2325
- /* @__PURE__ */ jsx73("div", { className: "instagram-preview__content--actions-secondary", children: /* @__PURE__ */ jsx73(Bookmark, {}) })
2371
+ /* @__PURE__ */ jsx74("div", { className: "instagram-preview__content--actions-secondary", children: /* @__PURE__ */ jsx74(Bookmark, {}) })
2326
2372
  ] }),
2327
- /* @__PURE__ */ jsxs49("div", { className: "instagram-preview__content--body", children: [
2328
- /* @__PURE__ */ jsx73("div", { className: "instagram-preview__content--name", children: username }),
2373
+ /* @__PURE__ */ jsxs50("div", { className: "instagram-preview__content--body", children: [
2374
+ /* @__PURE__ */ jsx74("div", { className: "instagram-preview__content--name", children: username }),
2329
2375
  "\xA0",
2330
- caption ? /* @__PURE__ */ jsxs49("div", { className: "instagram-preview__content--text", children: [
2331
- preparePreviewText(caption, {
2376
+ caption ? /* @__PURE__ */ jsxs50("div", { className: "instagram-preview__content--text", children: [
2377
+ /* @__PURE__ */ jsx74(ExpandableText, { text: caption, children: (visibleText) => preparePreviewText(visibleText, {
2332
2378
  platform: "instagram",
2333
2379
  maxChars: FEED_TEXT_MAX_LENGTH3
2334
- }),
2335
- media && url && /* @__PURE__ */ jsxs49(Fragment8, { children: [
2336
- /* @__PURE__ */ jsx73("br", {}),
2337
- /* @__PURE__ */ jsx73("br", {}),
2380
+ }) }),
2381
+ media && url && !caption.includes(url) && /* @__PURE__ */ jsxs50(Fragment9, { children: [
2382
+ /* @__PURE__ */ jsx74("br", {}),
2383
+ /* @__PURE__ */ jsx74("br", {}),
2338
2384
  url
2339
2385
  ] })
2340
2386
  ] }) : null
2341
2387
  ] }),
2342
- /* @__PURE__ */ jsx73("div", { className: "instagram-preview__content--footer", children: /* @__PURE__ */ jsx73("span", { children: __27("View one comment", "social-previews") }) })
2388
+ /* @__PURE__ */ jsx74("div", { className: "instagram-preview__content--footer", children: /* @__PURE__ */ jsx74("span", { children: __28("View one comment", "social-previews") }) })
2343
2389
  ] })
2344
2390
  ] }) });
2345
2391
  }
2346
2392
 
2347
2393
  // src/instagram-preview/previews.tsx
2348
- import { __ as __28 } from "@wordpress/i18n";
2349
- import { jsx as jsx74, jsxs as jsxs50 } from "react/jsx-runtime";
2394
+ import { __ as __29 } from "@wordpress/i18n";
2395
+ import { jsx as jsx75, jsxs as jsxs51 } from "react/jsx-runtime";
2350
2396
  var InstagramPreviews = ({
2351
2397
  headingLevel,
2352
2398
  hidePostPreview,
2353
2399
  ...props
2354
2400
  }) => {
2355
- return /* @__PURE__ */ jsx74("div", { className: "social-preview instagram-preview", children: !hidePostPreview && /* @__PURE__ */ jsxs50("section", { className: "social-preview__section instagram-preview__section", children: [
2356
- /* @__PURE__ */ jsx74(section_heading_default, {
2401
+ return /* @__PURE__ */ jsx75("div", { className: "social-preview instagram-preview", children: !hidePostPreview && /* @__PURE__ */ jsxs51("section", { className: "social-preview__section instagram-preview__section", children: [
2402
+ /* @__PURE__ */ jsx75(section_heading_default, {
2357
2403
  level: headingLevel,
2358
2404
  // translators: refers to a social post on Instagram
2359
- children: __28("Your post", "social-previews")
2405
+ children: __29("Your post", "social-previews")
2360
2406
  }),
2361
- /* @__PURE__ */ jsx74("p", { className: "social-preview__section-desc", children: __28(
2407
+ /* @__PURE__ */ jsx75("p", { className: "social-preview__section-desc", children: __29(
2362
2408
  "This is what your social post will look like on Instagram:",
2363
2409
  "social-previews"
2364
2410
  ) }),
2365
- /* @__PURE__ */ jsx74(InstagramPostPreview, { ...props })
2411
+ /* @__PURE__ */ jsx75(InstagramPostPreview, { ...props })
2366
2412
  ] }) });
2367
2413
  };
2368
2414
  export {