@postrun/react 2.8.0 → 2.9.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.cjs CHANGED
@@ -1125,6 +1125,38 @@ var ACTIONS = [
1125
1125
  function XPreviewActions() {
1126
1126
  return /* @__PURE__ */ jsxRuntime.jsx("div", { style: ROW, children: ACTIONS.map(({ label, Icon: Icon2 }) => /* @__PURE__ */ jsxRuntime.jsx(Icon2, { size: 18, "aria-label": label, role: "img" }, label)) });
1127
1127
  }
1128
+ function twitterMediaUrl(src) {
1129
+ try {
1130
+ const url = new URL(src);
1131
+ const extension = url.pathname.split(".").pop();
1132
+ if (!extension) {
1133
+ return src;
1134
+ }
1135
+ url.pathname = url.pathname.replace(`.${extension}`, "");
1136
+ url.searchParams.set("format", extension);
1137
+ url.searchParams.set("name", "small");
1138
+ return url.toString();
1139
+ } catch {
1140
+ return src;
1141
+ }
1142
+ }
1143
+ function rawSrcLookup(...lists) {
1144
+ const map = /* @__PURE__ */ new Map();
1145
+ for (const list of lists) {
1146
+ for (const item of list) {
1147
+ const poster = item.posterSrc ?? item.src;
1148
+ map.set(twitterMediaUrl(item.src), item.src);
1149
+ map.set(twitterMediaUrl(poster), poster);
1150
+ }
1151
+ }
1152
+ return map;
1153
+ }
1154
+ function makeRawMediaImg(rawBySrc) {
1155
+ return function RawMediaImg(props) {
1156
+ const raw = typeof props.src === "string" ? rawBySrc.get(props.src) ?? props.src : props.src;
1157
+ return /* @__PURE__ */ jsxRuntime.jsx("img", { ...props, src: raw });
1158
+ };
1159
+ }
1128
1160
  var {
1129
1161
  extractCashtagsWithIndices,
1130
1162
  extractHashtagsWithIndices,
@@ -1175,9 +1207,12 @@ function buildUser(author) {
1175
1207
  return {
1176
1208
  id_str: "",
1177
1209
  name: author.name,
1178
- profile_image_url_https: author.avatarUrl ?? PLACEHOLDER_AVATAR,
1210
+ profile_image_url_https: author.avatar_url ?? PLACEHOLDER_AVATAR,
1179
1211
  profile_image_shape: "Circle",
1180
- screen_name: author.handle,
1212
+ // `username`/`avatar_url` derive from the SDK Connection and are nullable.
1213
+ screen_name: author.username ?? "",
1214
+ // Legacy (pre-X-era) verification flag — always false for organic posts; the
1215
+ // X Blue checkmark rides on `is_blue_verified`.
1181
1216
  verified: false,
1182
1217
  is_blue_verified: verified
1183
1218
  };
@@ -1240,7 +1275,11 @@ function buildQuoted(quote, hasQuoteId) {
1240
1275
  if (!quote && !hasQuoteId) {
1241
1276
  return void 0;
1242
1277
  }
1243
- const author = quote?.author ?? { name: "Quoted post", handle: "" };
1278
+ const author = quote?.author ?? {
1279
+ name: "Quoted post",
1280
+ username: "",
1281
+ avatar_url: null
1282
+ };
1244
1283
  const body = quote?.body ?? "";
1245
1284
  const media = quote?.media ?? [];
1246
1285
  return {
@@ -1306,7 +1345,7 @@ function XPostPreviewImpl({
1306
1345
  showActions = true,
1307
1346
  className,
1308
1347
  style,
1309
- components
1348
+ components: componentsProp
1310
1349
  }) {
1311
1350
  const resolvedMedia = useResolvedMedia(
1312
1351
  media,
@@ -1314,6 +1353,15 @@ function XPostPreviewImpl({
1314
1353
  altSignatureOf(variant.media)
1315
1354
  );
1316
1355
  const resolvedQuotedMedia = useResolvedMedia(quotedTweet?.media, void 0, "");
1356
+ const components = react.useMemo(
1357
+ () => ({
1358
+ MediaImg: makeRawMediaImg(
1359
+ rawSrcLookup(resolvedMedia, resolvedQuotedMedia)
1360
+ ),
1361
+ ...componentsProp
1362
+ }),
1363
+ [resolvedMedia, resolvedQuotedMedia, componentsProp]
1364
+ );
1317
1365
  const tweet = react.useMemo(() => {
1318
1366
  const resolvedQuoted = quotedTweet ? {
1319
1367
  author: quotedTweet.author,
@@ -1368,14 +1416,15 @@ var LI_VAR = {
1368
1416
  function varRef(name) {
1369
1417
  return `var(${name})`;
1370
1418
  }
1419
+ var PALETTE_VARS = {
1420
+ [LI_VAR.bg]: "light-dark(#ffffff, #1b1f23)",
1421
+ [LI_VAR.text]: "light-dark(rgba(0,0,0,0.9), rgba(255,255,255,0.9))",
1422
+ [LI_VAR.muted]: "light-dark(rgba(0,0,0,0.6), rgba(255,255,255,0.6))",
1423
+ [LI_VAR.border]: "light-dark(rgba(0,0,0,0.08), rgba(255,255,255,0.15))",
1424
+ [LI_VAR.accent]: "light-dark(rgb(10,102,194), rgb(112,181,249))"
1425
+ };
1371
1426
  function paletteVars() {
1372
- return {
1373
- [LI_VAR.bg]: "light-dark(#ffffff, #1b1f23)",
1374
- [LI_VAR.text]: "light-dark(rgba(0,0,0,0.9), rgba(255,255,255,0.9))",
1375
- [LI_VAR.muted]: "light-dark(rgba(0,0,0,0.6), rgba(255,255,255,0.6))",
1376
- [LI_VAR.border]: "light-dark(rgba(0,0,0,0.08), rgba(255,255,255,0.15))",
1377
- [LI_VAR.accent]: "light-dark(rgb(10,102,194), rgb(112,181,249))"
1378
- };
1427
+ return PALETTE_VARS;
1379
1428
  }
1380
1429
  function colorSchemeFor(theme) {
1381
1430
  return theme === "auto" ? "light dark" : theme;
@@ -1521,7 +1570,7 @@ function Header({ author, visibility, time = "Now" }) {
1521
1570
  /* @__PURE__ */ jsxRuntime.jsx(
1522
1571
  "img",
1523
1572
  {
1524
- src: author.avatarUrl ?? PLACEHOLDER_AVATAR2,
1573
+ src: author.avatar_url ?? PLACEHOLDER_AVATAR2,
1525
1574
  alt: "",
1526
1575
  width: 48,
1527
1576
  height: 48,
@@ -1620,7 +1669,6 @@ function Tile({
1620
1669
  overlay ? /* @__PURE__ */ jsxRuntime.jsx(
1621
1670
  "div",
1622
1671
  {
1623
- "aria-hidden": false,
1624
1672
  style: {
1625
1673
  position: "absolute",
1626
1674
  inset: 0,
@@ -1791,7 +1839,18 @@ function linkify(text, colors, mentionNames) {
1791
1839
  );
1792
1840
  } else if (token.startsWith("#")) {
1793
1841
  nodes.push(
1794
- /* @__PURE__ */ jsxRuntime.jsx("a", { href: "#", style: linkStyle(colors.accent), children: token }, key++)
1842
+ // Preview-only hashtag: no real destination, so prevent the host SPA from
1843
+ // navigating / scrolling to top on click.
1844
+ /* @__PURE__ */ jsxRuntime.jsx(
1845
+ "a",
1846
+ {
1847
+ href: "#",
1848
+ style: linkStyle(colors.accent),
1849
+ onClick: (e) => e.preventDefault(),
1850
+ children: token
1851
+ },
1852
+ key++
1853
+ )
1795
1854
  );
1796
1855
  } else {
1797
1856
  nodes.push(
@@ -1809,32 +1868,41 @@ function PostBody({ text, mentionNames = [], colors }) {
1809
1868
  const [expanded, setExpanded] = react.useState(false);
1810
1869
  const isLong = text.length > FOLD_CHARS;
1811
1870
  const shown = isLong && !expanded ? truncateAtWord(text, FOLD_CHARS) : text;
1871
+ const nodes = react.useMemo(
1872
+ () => linkify(shown, colors, mentionNames),
1873
+ [shown, colors, mentionNames]
1874
+ );
1875
+ const toggleStyle2 = {
1876
+ background: "none",
1877
+ border: "none",
1878
+ padding: 0,
1879
+ cursor: "pointer",
1880
+ color: colors.muted,
1881
+ fontWeight: 600,
1882
+ fontSize: 14
1883
+ };
1812
1884
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: BODY_STYLE, children: [
1813
- linkify(shown, colors, mentionNames),
1814
- isLong && !expanded ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1815
- "\u2026",
1816
- " ",
1885
+ nodes,
1886
+ isLong ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1887
+ !expanded ? "\u2026 " : " ",
1817
1888
  /* @__PURE__ */ jsxRuntime.jsx(
1818
1889
  "button",
1819
1890
  {
1820
1891
  type: "button",
1821
- onClick: () => setExpanded(true),
1822
- style: {
1823
- background: "none",
1824
- border: "none",
1825
- padding: 0,
1826
- cursor: "pointer",
1827
- color: colors.muted,
1828
- fontWeight: 600,
1829
- fontSize: 14
1830
- },
1831
- children: "more"
1892
+ "aria-expanded": expanded,
1893
+ onClick: () => setExpanded((v) => !v),
1894
+ style: toggleStyle2,
1895
+ children: expanded ? "see less" : "more"
1832
1896
  }
1833
1897
  )
1834
1898
  ] }) : null
1835
1899
  ] });
1836
1900
  }
1837
1901
  var FONT_STACK = '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif';
1902
+ var BODY_COLORS = {
1903
+ accent: varRef(LI_VAR.accent),
1904
+ muted: varRef(LI_VAR.muted)
1905
+ };
1838
1906
  function LinkedInPostPreviewImpl({
1839
1907
  variant,
1840
1908
  author,
@@ -1851,11 +1919,10 @@ function LinkedInPostPreviewImpl({
1851
1919
  altSignatureOf(variant.media)
1852
1920
  );
1853
1921
  const visibility = variant.settings?.visibility ?? "PUBLIC";
1854
- const mentionNames = (variant.settings?.mentions ?? []).map((m) => m.name);
1855
- const bodyColors = {
1856
- accent: varRef(LI_VAR.accent),
1857
- muted: varRef(LI_VAR.muted)
1858
- };
1922
+ const mentionNames = react.useMemo(
1923
+ () => (variant.settings?.mentions ?? []).map((m) => m.name),
1924
+ [variant.settings?.mentions]
1925
+ );
1859
1926
  const cardStyle5 = {
1860
1927
  ...paletteVars(),
1861
1928
  colorScheme: colorSchemeFor(theme),
@@ -1875,7 +1942,7 @@ function LinkedInPostPreviewImpl({
1875
1942
  {
1876
1943
  text: variant.body,
1877
1944
  mentionNames,
1878
- colors: bodyColors
1945
+ colors: BODY_COLORS
1879
1946
  }
1880
1947
  ) }) : null,
1881
1948
  renderContent(variant, resolvedMedia),
@@ -1911,14 +1978,15 @@ var IG_VAR = {
1911
1978
  function varRef2(name) {
1912
1979
  return `var(${name})`;
1913
1980
  }
1981
+ var PALETTE_VARS2 = {
1982
+ [IG_VAR.bg]: "light-dark(#ffffff, #000000)",
1983
+ [IG_VAR.text]: "light-dark(#000000, #f5f5f5)",
1984
+ [IG_VAR.muted]: "light-dark(#737373, #a8a8a8)",
1985
+ [IG_VAR.border]: "light-dark(#dbdbdb, #262626)",
1986
+ [IG_VAR.accent]: "light-dark(#00376b, #e0f1ff)"
1987
+ };
1914
1988
  function paletteVars2() {
1915
- return {
1916
- [IG_VAR.bg]: "light-dark(#ffffff, #000000)",
1917
- [IG_VAR.text]: "light-dark(#000000, #f5f5f5)",
1918
- [IG_VAR.muted]: "light-dark(#737373, #a8a8a8)",
1919
- [IG_VAR.border]: "light-dark(#dbdbdb, #262626)",
1920
- [IG_VAR.accent]: "light-dark(#00376b, #e0f1ff)"
1921
- };
1989
+ return PALETTE_VARS2;
1922
1990
  }
1923
1991
  function colorSchemeFor2(theme) {
1924
1992
  return theme === "auto" ? "light dark" : theme;
@@ -1959,7 +2027,14 @@ function ExpandableText({
1959
2027
  if (!el || expanded) {
1960
2028
  return;
1961
2029
  }
1962
- setOverflowing(el.scrollHeight > el.clientHeight + 1);
2030
+ const measure = () => setOverflowing(el.scrollHeight > el.clientHeight + 1);
2031
+ measure();
2032
+ if (typeof ResizeObserver === "undefined") {
2033
+ return;
2034
+ }
2035
+ const ro = new ResizeObserver(measure);
2036
+ ro.observe(el);
2037
+ return () => ro.disconnect();
1963
2038
  }, [expanded, children]);
1964
2039
  const textStyle = expanded ? FULL : { ...FULL, ...clampStyle(lines) };
1965
2040
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { style, children: [
@@ -2013,10 +2088,10 @@ function Caption({
2013
2088
  toggleColor: varRef2(IG_VAR.muted),
2014
2089
  style: wrapStyle3,
2015
2090
  children: [
2016
- /* @__PURE__ */ jsxRuntime.jsxs("span", { style: { fontWeight: 600 }, children: [
2091
+ username ? /* @__PURE__ */ jsxRuntime.jsxs("span", { style: { fontWeight: 600 }, children: [
2017
2092
  username,
2018
2093
  " "
2019
- ] }),
2094
+ ] }) : null,
2020
2095
  parts.map(
2021
2096
  (part, i) => IS_TOKEN.test(part) ? /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: varRef2(IG_VAR.accent) }, children: part }, i) : /* @__PURE__ */ jsxRuntime.jsx("span", { children: part }, i)
2022
2097
  )
@@ -2059,7 +2134,7 @@ function Carousel({ media }) {
2059
2134
  };
2060
2135
  }, [emblaApi, sync]);
2061
2136
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: frameStyle, children: [
2062
- /* @__PURE__ */ jsxRuntime.jsx("div", { ref: emblaRef, style: { position: "absolute", inset: 0, overflow: "hidden" }, children: /* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "flex", height: "100%" }, children: media.map((item, i) => /* @__PURE__ */ jsxRuntime.jsx("div", { style: slideStyle, children: /* @__PURE__ */ jsxRuntime.jsx(Tile2, { item }) }, `${item.src}-${i}`)) }) }),
2137
+ /* @__PURE__ */ jsxRuntime.jsx("div", { ref: emblaRef, style: { position: "absolute", inset: 0, overflow: "hidden" }, children: /* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "flex", height: "100%" }, children: media.map((item) => /* @__PURE__ */ jsxRuntime.jsx("div", { style: slideStyle, children: /* @__PURE__ */ jsxRuntime.jsx(Tile2, { item }) }, item.src)) }) }),
2063
2138
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: pillStyle, children: [
2064
2139
  selected + 1,
2065
2140
  "/",
@@ -2070,7 +2145,7 @@ function Carousel({ media }) {
2070
2145
  {
2071
2146
  style: { ...dotStyle, opacity: i === selected ? 1 : 0.5 }
2072
2147
  },
2073
- `dot-${item.src}-${i}`
2148
+ `dot-${item.src}`
2074
2149
  )) })
2075
2150
  ] });
2076
2151
  }
@@ -2200,7 +2275,7 @@ function ReelPreview({
2200
2275
  style
2201
2276
  }) {
2202
2277
  const first = media[0];
2203
- const username = author.username ?? "";
2278
+ const username = author.username;
2204
2279
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className, style: { ...cardStyle3, ...style }, children: [
2205
2280
  first ? first.kind === "video" ? /* @__PURE__ */ jsxRuntime.jsx(
2206
2281
  "video",
@@ -2217,10 +2292,18 @@ function ReelPreview({
2217
2292
  /* @__PURE__ */ jsxRuntime.jsx("div", { style: scrimStyle }),
2218
2293
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: infoStyle, children: [
2219
2294
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: authorRowStyle, children: [
2220
- /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontWeight: 600, fontSize: 14 }, children: username }),
2295
+ username ? /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontWeight: 600, fontSize: 14 }, children: username }) : null,
2221
2296
  author.verified ? /* @__PURE__ */ jsxRuntime.jsx(md.MdVerified, { size: 13, "aria-label": "Verified", role: "img", style: { color: "#fff" } }) : null
2222
2297
  ] }),
2223
- body ? /* @__PURE__ */ jsxRuntime.jsx("div", { style: captionStyle, children: body }) : null,
2298
+ body ? /* @__PURE__ */ jsxRuntime.jsx(
2299
+ ExpandableText,
2300
+ {
2301
+ lines: 2,
2302
+ toggleColor: "rgba(255,255,255,0.7)",
2303
+ style: captionStyle,
2304
+ children: body
2305
+ }
2306
+ ) : null,
2224
2307
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: audioStyle, children: [
2225
2308
  /* @__PURE__ */ jsxRuntime.jsx(md.MdMusicNote, { size: 14, "aria-hidden": true }),
2226
2309
  /* @__PURE__ */ jsxRuntime.jsx("span", { children: audioName ?? "Original audio" })
@@ -2276,11 +2359,7 @@ var authorRowStyle = {
2276
2359
  };
2277
2360
  var captionStyle = {
2278
2361
  fontSize: 13,
2279
- lineHeight: 1.35,
2280
- display: "-webkit-box",
2281
- WebkitLineClamp: 2,
2282
- WebkitBoxOrient: "vertical",
2283
- overflow: "hidden"
2362
+ lineHeight: 1.35
2284
2363
  };
2285
2364
  var audioStyle = {
2286
2365
  display: "flex",
@@ -2313,7 +2392,7 @@ function InstagramPostPreviewImpl({
2313
2392
  altSignatureOf(variant.media)
2314
2393
  );
2315
2394
  const settings = variant.settings;
2316
- const isReel = variant.post_type === "reel" || settings?.media_type === "REELS";
2395
+ const isReel = variant.post_type === "reel";
2317
2396
  if (isReel) {
2318
2397
  return /* @__PURE__ */ jsxRuntime.jsx(
2319
2398
  ReelPreview,
@@ -2344,7 +2423,7 @@ function InstagramPostPreviewImpl({
2344
2423
  /* @__PURE__ */ jsxRuntime.jsx(Header2, { author, collaborators }),
2345
2424
  /* @__PURE__ */ jsxRuntime.jsx(FeedMedia, { media: resolvedMedia }),
2346
2425
  /* @__PURE__ */ jsxRuntime.jsx(Actions, {}),
2347
- variant.body ? /* @__PURE__ */ jsxRuntime.jsx("div", { style: { paddingBottom: 12 }, children: /* @__PURE__ */ jsxRuntime.jsx(Caption, { username: author.username ?? "", body: variant.body }) }) : null
2426
+ variant.body ? /* @__PURE__ */ jsxRuntime.jsx("div", { style: { paddingBottom: 12 }, children: /* @__PURE__ */ jsxRuntime.jsx(Caption, { username: author.username, body: variant.body }) }) : null
2348
2427
  ] });
2349
2428
  }
2350
2429
  var InstagramPostPreview = react.memo(InstagramPostPreviewImpl);
@@ -2421,10 +2500,12 @@ function EmptyMedia() {
2421
2500
  }
2422
2501
  function ProcessingMedia() {
2423
2502
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: emptyStyle, children: [
2503
+ /* @__PURE__ */ jsxRuntime.jsx("style", { children: SHIMMER_KEYFRAME }),
2424
2504
  /* @__PURE__ */ jsxRuntime.jsx("div", { style: shimmerStyle }),
2425
2505
  /* @__PURE__ */ jsxRuntime.jsx("span", { style: { position: "relative", zIndex: 1 }, children: "Processing media\u2026" })
2426
2506
  ] });
2427
2507
  }
2508
+ var SHIMMER_KEYFRAME = `@keyframes pr-tt-shimmer{0%{background-position:-200% 0}100%{background-position:200% 0}}`;
2428
2509
  var coverStyle3 = {
2429
2510
  position: "absolute",
2430
2511
  inset: 0,
@@ -2742,14 +2823,15 @@ var TT_VAR = {
2742
2823
  function varRef3(name) {
2743
2824
  return `var(${name})`;
2744
2825
  }
2826
+ var PALETTE_VARS3 = {
2827
+ [TT_VAR.text]: "light-dark(rgba(0,0,0,0.9), rgba(255,255,255,0.92))",
2828
+ [TT_VAR.muted]: "light-dark(rgba(0,0,0,0.55), #8a8a92)",
2829
+ [TT_VAR.border]: "light-dark(rgba(0,0,0,0.12), rgba(255,255,255,0.14))",
2830
+ [TT_VAR.accent]: "#fe2c55",
2831
+ [TT_VAR.switchOff]: "light-dark(rgba(0,0,0,0.18), rgba(255,255,255,0.22))"
2832
+ };
2745
2833
  function paletteVars3() {
2746
- return {
2747
- [TT_VAR.text]: "light-dark(rgba(0,0,0,0.9), rgba(255,255,255,0.92))",
2748
- [TT_VAR.muted]: "light-dark(rgba(0,0,0,0.55), #8a8a92)",
2749
- [TT_VAR.border]: "light-dark(rgba(0,0,0,0.12), rgba(255,255,255,0.14))",
2750
- [TT_VAR.accent]: "#fe2c55",
2751
- [TT_VAR.switchOff]: "light-dark(rgba(0,0,0,0.18), rgba(255,255,255,0.22))"
2752
- };
2834
+ return PALETTE_VARS3;
2753
2835
  }
2754
2836
  function colorSchemeFor3(theme) {
2755
2837
  return theme === "auto" ? "light dark" : theme;
@@ -2765,11 +2847,17 @@ function Row({
2765
2847
  control,
2766
2848
  htmlFor
2767
2849
  }) {
2850
+ const text = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2851
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: 14 }, children: label }),
2852
+ sublabel ? /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: 12, color: MUTED2 }, children: sublabel }) : null
2853
+ ] });
2854
+ const textStyle = {
2855
+ display: "flex",
2856
+ flexDirection: "column",
2857
+ gap: 2
2858
+ };
2768
2859
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: rowStyle3, children: [
2769
- /* @__PURE__ */ jsxRuntime.jsxs("label", { htmlFor, style: { display: "flex", flexDirection: "column", gap: 2 }, children: [
2770
- /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: 14 }, children: label }),
2771
- sublabel ? /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: 12, color: MUTED2 }, children: sublabel }) : null
2772
- ] }),
2860
+ htmlFor ? /* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor, style: textStyle, children: text }) : /* @__PURE__ */ jsxRuntime.jsx("span", { style: textStyle, children: text }),
2773
2861
  control
2774
2862
  ] });
2775
2863
  }
@@ -2891,7 +2979,6 @@ function AudienceSelect({
2891
2979
  value,
2892
2980
  onChange
2893
2981
  }) {
2894
- const id = react.useId();
2895
2982
  const options = js.audiencePrivacyOptions(creatorInfo.privacy_options, value);
2896
2983
  const unselected = js.audienceUnselected(value);
2897
2984
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: [
@@ -2899,7 +2986,7 @@ function AudienceSelect({
2899
2986
  /* @__PURE__ */ jsxRuntime.jsxs(
2900
2987
  "select",
2901
2988
  {
2902
- id,
2989
+ "aria-label": "Who can view this post",
2903
2990
  value: value.privacy_level ?? "",
2904
2991
  onChange: (e) => onChange({
2905
2992
  ...value,