@postrun/react 2.7.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.d.cts CHANGED
@@ -2,7 +2,7 @@ import * as react from 'react';
2
2
  import { ReactNode, CSSProperties } from 'react';
3
3
  import * as _tanstack_react_query from '@tanstack/react-query';
4
4
  import { QueryClient, QueryKey } from '@tanstack/react-query';
5
- import { PostrunClient, ListProfilesQuery, DiscoverableAccountList, Connection, ConnectionKind, ConnectionStatus, ListMediaQuery, ListPostsQuery, ConnectablePlatform, MediaResource, MediaTarget, Metadata, ComposePostInput, PostValidation, MediaKind, XPostVariant, XPoll as XPoll$1, LinkedInPostVariant, TikTokPostVariant, TikTokCreatorInfo, TikTokOptionsValue } from '@postrun/js';
5
+ import { PostrunClient, ListProfilesQuery, DiscoverableAccountList, Connection, ConnectionKind, ConnectionStatus, ListMediaQuery, ListPostsQuery, ConnectablePlatform, MediaResource, MediaTarget, Metadata, ComposePostInput, PostValidation, MediaKind, XPostVariant, XPoll as XPoll$1, LinkedInPostVariant, InstagramPostVariant, TikTokPostVariant, TikTokCreatorInfo, TikTokOptionsValue } from '@postrun/js';
6
6
  export { PostValidation, PostVariant, PostVariantError, TIKTOK_CAPTION_MAX, TikTokCreatorInfo, ValidationIssue, captionMaxFor } from '@postrun/js';
7
7
  import { TwitterComponents } from 'react-tweet';
8
8
 
@@ -1618,39 +1618,57 @@ declare function useTikTokCreatorInfo(connectionId: string | null): _tanstack_re
1618
1618
  }>, Error>;
1619
1619
 
1620
1620
  /**
1621
- * Public input types for the post-preview components. These describe data the
1622
- * CUSTOMER supplies for presentation — NOT shapes from our OpenAPI contract — so
1623
- * they are authored here rather than derived. The one value with a contract
1624
- * counterpart, a media asset's `kind`, IS derived from the SDK's `MediaKind`.
1621
+ * Public input types for the post-preview components.
1625
1622
  *
1626
- * Why author/media live outside the post schema: a connection stores only a
1627
- * cached account name (no avatar, no `@handle`, no verified flag), and a variant
1628
- * references media by id, not by pixels — at compose time the only pixels that
1629
- * exist are a local `File`.
1623
+ * Identity that our API DOES store on a `Connection` (`username`, `avatar_url`,
1624
+ * `profile_url`) is DERIVED from the SDK `Connection` type — never re-declared —
1625
+ * so a preview author can be built straight from a connection and can't drift.
1626
+ * Fields the API does NOT store (a verified badge, a display name distinct from
1627
+ * the handle, a LinkedIn headline) are presentation extras the customer supplies;
1628
+ * those are the documented backend gaps. Media `kind` derives from `MediaKind`;
1629
+ * pixels are still a `url`/`File` because a variant references media by id.
1630
1630
  */
1631
- /** The author identity rendered in an X preview header. */
1632
- interface XPreviewAuthor {
1633
- /** Display name, e.g. "Acme Studio". */
1631
+ /** The identity fields our `Connection` stores — the SDK-driven base every
1632
+ * preview author derives from (so the field names + nullability match the API). */
1633
+ type ConnectionIdentity = Pick<Connection, 'username' | 'avatar_url'>;
1634
+ /**
1635
+ * The author identity rendered in an X preview header. `username` (the `@handle`)
1636
+ * and `avatar_url` are DERIVED from the SDK `Connection`; `name` (the display
1637
+ * name) and `verified` are presentation extras our API doesn't store.
1638
+ */
1639
+ type XPreviewAuthor = ConnectionIdentity & {
1640
+ /** Display name, e.g. "Acme Studio". NOT on Connection — caller-supplied. */
1634
1641
  name: string;
1635
- /** Handle WITHOUT the leading `@`, e.g. "acmestudio". */
1636
- handle: string;
1637
- /** Avatar image URL. Omit for a neutral placeholder. */
1638
- avatarUrl?: string;
1639
- /** Show the verified badge. Default false. */
1642
+ /** Show the verified badge. NOT on Connection — caller-supplied. */
1640
1643
  verified?: boolean;
1641
- }
1642
- /** The author identity rendered in a LinkedIn preview header. LinkedIn shows a
1643
- * name + a one-line headline (role/tagline), not an `@handle`. */
1644
- interface LinkedInPreviewAuthor {
1645
- /** Display name, e.g. "Acme Studio". */
1644
+ };
1645
+ /**
1646
+ * The author identity rendered in a LinkedIn preview header. LinkedIn shows a
1647
+ * display `name` + a one-line `headline`. `username`/`avatar_url` are DERIVED
1648
+ * from the SDK `Connection`; `name`/`headline`/`verified` are presentation extras
1649
+ * our API doesn't store (LinkedIn's `username` is also documented as NULL today).
1650
+ */
1651
+ type LinkedInPreviewAuthor = ConnectionIdentity & {
1652
+ /** Display name, e.g. "Acme Studio". NOT on Connection — caller-supplied. */
1646
1653
  name: string;
1647
- /** One-line headline under the name, e.g. "Founder & CEO at Acme". */
1654
+ /** One-line headline under the name. NOT on Connection — caller-supplied. */
1648
1655
  headline?: string;
1649
- /** Avatar image URL. Omit for a neutral placeholder. */
1650
- avatarUrl?: string;
1651
- /** Show the verified badge. Default false. */
1656
+ /** Show the verified badge. NOT on Connection — caller-supplied. */
1652
1657
  verified?: boolean;
1653
- }
1658
+ };
1659
+ /**
1660
+ * The author identity rendered in an Instagram preview header. Instagram shows
1661
+ * the `username` (no separate display name) + an optional verified badge.
1662
+ *
1663
+ * `username` / `avatar_url` are DERIVED from the SDK `Connection` (`string | null`,
1664
+ * so build it straight from `useConnections()`). `verified` is a presentation
1665
+ * extra — our API does NOT store verified status on a connection (a backend gap),
1666
+ * so the customer supplies it (or omit it).
1667
+ */
1668
+ type InstagramPreviewAuthor = ConnectionIdentity & {
1669
+ /** Verified badge. NOT sourced from our Connection — presentation-only. */
1670
+ verified?: boolean;
1671
+ };
1654
1672
  /** The media kinds a social preview can render (documents are not previewable
1655
1673
  * here) — derived from the SDK's `MediaKind`, never re-listed. */
1656
1674
  type PreviewMediaKind = Extract<MediaKind, 'image' | 'video' | 'gif'>;
@@ -1708,7 +1726,8 @@ interface XPostPreviewProps {
1708
1726
  quotedTweet?: XPreviewQuotedTweet;
1709
1727
  /** The replied-to account's handle (our schema only stores the parent id). */
1710
1728
  replyToHandle?: string;
1711
- /** Color scheme. `auto` (default) inherits the host's theme. */
1729
+ /** Color scheme. `auto` (default) follows the OS color scheme (light/dark) —
1730
+ * the same resolution every Postrun preview card uses. */
1712
1731
  theme?: 'light' | 'dark' | 'auto';
1713
1732
  /** Show the static action row (icons, no counts). Default true. */
1714
1733
  showActions?: boolean;
@@ -1727,7 +1746,7 @@ interface XPostPreviewProps {
1727
1746
  * preview. Fully customizable: restyle via `className`/`style` (CSS variables)
1728
1747
  * or swap internals via `components`; theme light/dark/auto.
1729
1748
  */
1730
- declare function XPostPreviewImpl({ variant, author, media, quotedTweet, replyToHandle, theme, showActions, className, style, components, }: XPostPreviewProps): react.JSX.Element;
1749
+ declare function XPostPreviewImpl({ variant, author, media, quotedTweet, replyToHandle, theme, showActions, className, style, components: componentsProp, }: XPostPreviewProps): react.JSX.Element;
1731
1750
  /** Memoized: re-renders only when its props change (the resolved-media hook
1732
1751
  * already absorbs unstable media arrays). */
1733
1752
  declare const XPostPreview: react.MemoExoticComponent<typeof XPostPreviewImpl>;
@@ -1744,11 +1763,14 @@ interface XPollProps {
1744
1763
  declare function XPoll({ poll }: XPollProps): react.JSX.Element;
1745
1764
 
1746
1765
  /**
1747
- * LinkedIn preview theming. Unlike the X preview (which inherits react-tweet's
1748
- * CSS), we own the LinkedIn card, so we expose a small set of CSS custom
1749
- * properties on the wrapper. The resolved palette sets their default values;
1750
- * a customer can override any of them via `style`/`className`. Components read
1751
- * `var(--pr-li-*)`, so restyling needs no fork.
1766
+ * LinkedIn preview theming. We own the card, so we expose CSS custom properties
1767
+ * on the wrapper; components read `var(--pr-li-*)`.
1768
+ *
1769
+ * `auto` follows the OS color scheme the SAME way every card does (X via
1770
+ * react-tweet's `@media (prefers-color-scheme)`): the vars use the CSS
1771
+ * `light-dark()` function and the card sets `color-scheme` (`light dark` for auto,
1772
+ * else the explicit scheme). This resolves in CSS — instant, SSR-safe, no
1773
+ * JS-after-mount flash — so all previews agree on what `auto` means.
1752
1774
  */
1753
1775
  type LinkedInTheme = 'light' | 'dark' | 'auto';
1754
1776
 
@@ -1834,6 +1856,63 @@ interface DocumentCardProps {
1834
1856
  }
1835
1857
  declare function DocumentCard({ document, cover }: DocumentCardProps): react.JSX.Element;
1836
1858
 
1859
+ /**
1860
+ * Instagram feed-card theming. We own the card, so we expose CSS custom
1861
+ * properties on the wrapper; components read `var(--pr-ig-*)`.
1862
+ *
1863
+ * `auto` follows the OS color scheme the SAME way every card does (X via
1864
+ * react-tweet's `@media (prefers-color-scheme)`): the vars use the CSS
1865
+ * `light-dark()` function and the card sets `color-scheme` (`light dark` for auto,
1866
+ * else the explicit scheme). This resolves in CSS — instant, SSR-safe, no
1867
+ * JS-after-mount flash — so all previews agree on what `auto` means.
1868
+ */
1869
+ type InstagramTheme = 'light' | 'dark' | 'auto';
1870
+
1871
+ /**
1872
+ * A faithful, schema-driven preview of how an Instagram post will look, rendered
1873
+ * straight from a Postrun Instagram variant. Covers everything the API supports:
1874
+ * a **feed** post (single image / carousel) and a **reel** (9:16 video). Identity
1875
+ * is SDK-driven (`author` derives from `Connection`); creator details (username,
1876
+ * avatar, verified, collaborators) and the audio label come from the variant +
1877
+ * author. Feed themes light/dark/`auto`; the reel is always dark.
1878
+ *
1879
+ * Clean-room (there's no package to "buy" — Instagram's embed only renders
1880
+ * already-published posts), referencing the real IG feed + Postiz.
1881
+ */
1882
+ interface InstagramPostPreviewProps {
1883
+ /** The Instagram variant from our schema — the content source, untouched. */
1884
+ variant: InstagramPostVariant;
1885
+ /** Author identity (SDK-driven; `verified` is a presentation extra). */
1886
+ author: InstagramPreviewAuthor;
1887
+ /** Resolved media pixels (processed URLs or compose-time File blobs). */
1888
+ media?: PreviewMedia[];
1889
+ /** Color scheme for the feed card. `auto` (default) follows the OS. */
1890
+ theme?: InstagramTheme;
1891
+ className?: string;
1892
+ style?: CSSProperties;
1893
+ }
1894
+ declare function InstagramPostPreviewImpl({ variant, author, media, theme, className, style, }: InstagramPostPreviewProps): react.JSX.Element;
1895
+ /** Memoized: the resolved-media hook absorbs unstable media arrays. */
1896
+ declare const InstagramPostPreview: react.MemoExoticComponent<typeof InstagramPostPreviewImpl>;
1897
+
1898
+ interface ReelPreviewProps {
1899
+ author: InstagramPreviewAuthor;
1900
+ body: string;
1901
+ media: readonly ResolvedMedia[];
1902
+ /** The reel's audio label (`settings.audio_name`); defaults to "Original audio". */
1903
+ audioName?: string;
1904
+ className?: string;
1905
+ style?: CSSProperties;
1906
+ }
1907
+ /**
1908
+ * An Instagram Reel preview — the 9:16 vertical card: full-bleed video, the
1909
+ * username/verified + caption overlaid bottom-left, an audio row ("♪ <audio>"),
1910
+ * and the right action rail (like/comment/share/save/more — no fabricated
1911
+ * counts). Always dark, like the real Reels surface. The caption uses the shared
1912
+ * `ExpandableText` fold so the full text is readable (no silent truncation).
1913
+ */
1914
+ declare function ReelPreview({ author, body, media, audioName, className, style, }: ReelPreviewProps): react.JSX.Element;
1915
+
1837
1916
  /**
1838
1917
  * Public props for the TikTok post preview — a faithful render of how a post will
1839
1918
  * look on TikTok, driven straight from our Post object plus the live creator info
@@ -1865,7 +1944,8 @@ declare const TikTokPostPreview: react.MemoExoticComponent<typeof TikTokPostPrev
1865
1944
  * (TikTok's video surface is always dark), so only the panel adapts. We expose a
1866
1945
  * small set of CSS custom properties on the panel root; controls read
1867
1946
  * `var(--pr-tt-*)`, so a customer can restyle via `style`/`className` without a
1868
- * fork. Mirrors the LinkedIn preview's theme approach.
1947
+ * fork. `auto` follows the OS color scheme via CSS `light-dark()` — the same way
1948
+ * every preview card resolves `auto`.
1869
1949
  */
1870
1950
  type TikTokTheme = 'light' | 'dark' | 'auto';
1871
1951
 
@@ -1966,4 +2046,4 @@ declare function Declaration({ brandedContent }: {
1966
2046
  brandedContent: boolean;
1967
2047
  }): react.JSX.Element;
1968
2048
 
1969
- export { ArticleCard, type ArticleCardProps, AudienceSelect, type CalendarFilters, CommercialDisclosure, Connect, type ConnectErrorReason, type ConnectOutcome, type ConnectProps, type ConnectRenderApi, type ConnectState, type ConnectionsFilter, Declaration, type DiscoverableAccount, DocumentCard, type DocumentCardProps, type InfiniteList, InteractionToggles, LinkedInPostPreview, type LinkedInPostPreviewProps, type LinkedInPreviewAuthor, type LiveOptions, type MediaUploadItem, type MediaUploadOptions, type MediaUploadStatus, Poll, type PollProps, type PostrunContextValue, PostrunProvider, type PostrunProviderProps, type PreviewMedia, type PreviewMediaKind, TikTokCaptionField, type TikTokCaptionFieldProps, TikTokPostPreview, type TikTokPostPreviewProps, TikTokPublishPanel, type TikTokPublishPanelProps, type TikTokTheme, UploadError, type UseConnectParams, type UseConnectResult, type UseMediaUploadOptions, type UseMediaUploadResult, XPoll, type XPollProps, XPostPreview, type XPostPreviewProps, type XPreviewAuthor, type XPreviewMedia, type XPreviewQuotedTweet, connectionKeys, mediaKeys, postKeys, profileKeys, tiktokKeys, toPreviewMedia, useCalendar, useConnect, useConnection, useConnections, useCreatePost, useCreateProfile, useDeleteMedia, useDeletePost, useDeleteProfile, useDisconnect, useDiscoverableAccounts, useInfiniteList, useMedia, useMediaInfinite, useMediaList, useMediaUpload, usePost, usePostrun, usePosts, usePostsInfinite, useProfile, useProfiles, useProfilesInfinite, useSelectAccount, useTikTokCreatorInfo, useUpdateMedia, useUpdatePost, useUpdateProfile, useValidatePost };
2049
+ export { ArticleCard, type ArticleCardProps, AudienceSelect, type CalendarFilters, CommercialDisclosure, Connect, type ConnectErrorReason, type ConnectOutcome, type ConnectProps, type ConnectRenderApi, type ConnectState, type ConnectionIdentity, type ConnectionsFilter, Declaration, type DiscoverableAccount, DocumentCard, type DocumentCardProps, type InfiniteList, InstagramPostPreview, type InstagramPostPreviewProps, type InstagramPreviewAuthor, type InstagramTheme, InteractionToggles, LinkedInPostPreview, type LinkedInPostPreviewProps, type LinkedInPreviewAuthor, type LiveOptions, type MediaUploadItem, type MediaUploadOptions, type MediaUploadStatus, Poll, type PollProps, type PostrunContextValue, PostrunProvider, type PostrunProviderProps, type PreviewMedia, type PreviewMediaKind, ReelPreview, type ReelPreviewProps, type ResolvedMedia, TikTokCaptionField, type TikTokCaptionFieldProps, TikTokPostPreview, type TikTokPostPreviewProps, TikTokPublishPanel, type TikTokPublishPanelProps, type TikTokTheme, UploadError, type UseConnectParams, type UseConnectResult, type UseMediaUploadOptions, type UseMediaUploadResult, XPoll, type XPollProps, XPostPreview, type XPostPreviewProps, type XPreviewAuthor, type XPreviewMedia, type XPreviewQuotedTweet, connectionKeys, mediaKeys, postKeys, profileKeys, tiktokKeys, toPreviewMedia, useCalendar, useConnect, useConnection, useConnections, useCreatePost, useCreateProfile, useDeleteMedia, useDeletePost, useDeleteProfile, useDisconnect, useDiscoverableAccounts, useInfiniteList, useMedia, useMediaInfinite, useMediaList, useMediaUpload, usePost, usePostrun, usePosts, usePostsInfinite, useProfile, useProfiles, useProfilesInfinite, useSelectAccount, useTikTokCreatorInfo, useUpdateMedia, useUpdatePost, useUpdateProfile, useValidatePost };
package/dist/index.d.ts CHANGED
@@ -2,7 +2,7 @@ import * as react from 'react';
2
2
  import { ReactNode, CSSProperties } from 'react';
3
3
  import * as _tanstack_react_query from '@tanstack/react-query';
4
4
  import { QueryClient, QueryKey } from '@tanstack/react-query';
5
- import { PostrunClient, ListProfilesQuery, DiscoverableAccountList, Connection, ConnectionKind, ConnectionStatus, ListMediaQuery, ListPostsQuery, ConnectablePlatform, MediaResource, MediaTarget, Metadata, ComposePostInput, PostValidation, MediaKind, XPostVariant, XPoll as XPoll$1, LinkedInPostVariant, TikTokPostVariant, TikTokCreatorInfo, TikTokOptionsValue } from '@postrun/js';
5
+ import { PostrunClient, ListProfilesQuery, DiscoverableAccountList, Connection, ConnectionKind, ConnectionStatus, ListMediaQuery, ListPostsQuery, ConnectablePlatform, MediaResource, MediaTarget, Metadata, ComposePostInput, PostValidation, MediaKind, XPostVariant, XPoll as XPoll$1, LinkedInPostVariant, InstagramPostVariant, TikTokPostVariant, TikTokCreatorInfo, TikTokOptionsValue } from '@postrun/js';
6
6
  export { PostValidation, PostVariant, PostVariantError, TIKTOK_CAPTION_MAX, TikTokCreatorInfo, ValidationIssue, captionMaxFor } from '@postrun/js';
7
7
  import { TwitterComponents } from 'react-tweet';
8
8
 
@@ -1618,39 +1618,57 @@ declare function useTikTokCreatorInfo(connectionId: string | null): _tanstack_re
1618
1618
  }>, Error>;
1619
1619
 
1620
1620
  /**
1621
- * Public input types for the post-preview components. These describe data the
1622
- * CUSTOMER supplies for presentation — NOT shapes from our OpenAPI contract — so
1623
- * they are authored here rather than derived. The one value with a contract
1624
- * counterpart, a media asset's `kind`, IS derived from the SDK's `MediaKind`.
1621
+ * Public input types for the post-preview components.
1625
1622
  *
1626
- * Why author/media live outside the post schema: a connection stores only a
1627
- * cached account name (no avatar, no `@handle`, no verified flag), and a variant
1628
- * references media by id, not by pixels — at compose time the only pixels that
1629
- * exist are a local `File`.
1623
+ * Identity that our API DOES store on a `Connection` (`username`, `avatar_url`,
1624
+ * `profile_url`) is DERIVED from the SDK `Connection` type — never re-declared —
1625
+ * so a preview author can be built straight from a connection and can't drift.
1626
+ * Fields the API does NOT store (a verified badge, a display name distinct from
1627
+ * the handle, a LinkedIn headline) are presentation extras the customer supplies;
1628
+ * those are the documented backend gaps. Media `kind` derives from `MediaKind`;
1629
+ * pixels are still a `url`/`File` because a variant references media by id.
1630
1630
  */
1631
- /** The author identity rendered in an X preview header. */
1632
- interface XPreviewAuthor {
1633
- /** Display name, e.g. "Acme Studio". */
1631
+ /** The identity fields our `Connection` stores — the SDK-driven base every
1632
+ * preview author derives from (so the field names + nullability match the API). */
1633
+ type ConnectionIdentity = Pick<Connection, 'username' | 'avatar_url'>;
1634
+ /**
1635
+ * The author identity rendered in an X preview header. `username` (the `@handle`)
1636
+ * and `avatar_url` are DERIVED from the SDK `Connection`; `name` (the display
1637
+ * name) and `verified` are presentation extras our API doesn't store.
1638
+ */
1639
+ type XPreviewAuthor = ConnectionIdentity & {
1640
+ /** Display name, e.g. "Acme Studio". NOT on Connection — caller-supplied. */
1634
1641
  name: string;
1635
- /** Handle WITHOUT the leading `@`, e.g. "acmestudio". */
1636
- handle: string;
1637
- /** Avatar image URL. Omit for a neutral placeholder. */
1638
- avatarUrl?: string;
1639
- /** Show the verified badge. Default false. */
1642
+ /** Show the verified badge. NOT on Connection — caller-supplied. */
1640
1643
  verified?: boolean;
1641
- }
1642
- /** The author identity rendered in a LinkedIn preview header. LinkedIn shows a
1643
- * name + a one-line headline (role/tagline), not an `@handle`. */
1644
- interface LinkedInPreviewAuthor {
1645
- /** Display name, e.g. "Acme Studio". */
1644
+ };
1645
+ /**
1646
+ * The author identity rendered in a LinkedIn preview header. LinkedIn shows a
1647
+ * display `name` + a one-line `headline`. `username`/`avatar_url` are DERIVED
1648
+ * from the SDK `Connection`; `name`/`headline`/`verified` are presentation extras
1649
+ * our API doesn't store (LinkedIn's `username` is also documented as NULL today).
1650
+ */
1651
+ type LinkedInPreviewAuthor = ConnectionIdentity & {
1652
+ /** Display name, e.g. "Acme Studio". NOT on Connection — caller-supplied. */
1646
1653
  name: string;
1647
- /** One-line headline under the name, e.g. "Founder & CEO at Acme". */
1654
+ /** One-line headline under the name. NOT on Connection — caller-supplied. */
1648
1655
  headline?: string;
1649
- /** Avatar image URL. Omit for a neutral placeholder. */
1650
- avatarUrl?: string;
1651
- /** Show the verified badge. Default false. */
1656
+ /** Show the verified badge. NOT on Connection — caller-supplied. */
1652
1657
  verified?: boolean;
1653
- }
1658
+ };
1659
+ /**
1660
+ * The author identity rendered in an Instagram preview header. Instagram shows
1661
+ * the `username` (no separate display name) + an optional verified badge.
1662
+ *
1663
+ * `username` / `avatar_url` are DERIVED from the SDK `Connection` (`string | null`,
1664
+ * so build it straight from `useConnections()`). `verified` is a presentation
1665
+ * extra — our API does NOT store verified status on a connection (a backend gap),
1666
+ * so the customer supplies it (or omit it).
1667
+ */
1668
+ type InstagramPreviewAuthor = ConnectionIdentity & {
1669
+ /** Verified badge. NOT sourced from our Connection — presentation-only. */
1670
+ verified?: boolean;
1671
+ };
1654
1672
  /** The media kinds a social preview can render (documents are not previewable
1655
1673
  * here) — derived from the SDK's `MediaKind`, never re-listed. */
1656
1674
  type PreviewMediaKind = Extract<MediaKind, 'image' | 'video' | 'gif'>;
@@ -1708,7 +1726,8 @@ interface XPostPreviewProps {
1708
1726
  quotedTweet?: XPreviewQuotedTweet;
1709
1727
  /** The replied-to account's handle (our schema only stores the parent id). */
1710
1728
  replyToHandle?: string;
1711
- /** Color scheme. `auto` (default) inherits the host's theme. */
1729
+ /** Color scheme. `auto` (default) follows the OS color scheme (light/dark) —
1730
+ * the same resolution every Postrun preview card uses. */
1712
1731
  theme?: 'light' | 'dark' | 'auto';
1713
1732
  /** Show the static action row (icons, no counts). Default true. */
1714
1733
  showActions?: boolean;
@@ -1727,7 +1746,7 @@ interface XPostPreviewProps {
1727
1746
  * preview. Fully customizable: restyle via `className`/`style` (CSS variables)
1728
1747
  * or swap internals via `components`; theme light/dark/auto.
1729
1748
  */
1730
- declare function XPostPreviewImpl({ variant, author, media, quotedTweet, replyToHandle, theme, showActions, className, style, components, }: XPostPreviewProps): react.JSX.Element;
1749
+ declare function XPostPreviewImpl({ variant, author, media, quotedTweet, replyToHandle, theme, showActions, className, style, components: componentsProp, }: XPostPreviewProps): react.JSX.Element;
1731
1750
  /** Memoized: re-renders only when its props change (the resolved-media hook
1732
1751
  * already absorbs unstable media arrays). */
1733
1752
  declare const XPostPreview: react.MemoExoticComponent<typeof XPostPreviewImpl>;
@@ -1744,11 +1763,14 @@ interface XPollProps {
1744
1763
  declare function XPoll({ poll }: XPollProps): react.JSX.Element;
1745
1764
 
1746
1765
  /**
1747
- * LinkedIn preview theming. Unlike the X preview (which inherits react-tweet's
1748
- * CSS), we own the LinkedIn card, so we expose a small set of CSS custom
1749
- * properties on the wrapper. The resolved palette sets their default values;
1750
- * a customer can override any of them via `style`/`className`. Components read
1751
- * `var(--pr-li-*)`, so restyling needs no fork.
1766
+ * LinkedIn preview theming. We own the card, so we expose CSS custom properties
1767
+ * on the wrapper; components read `var(--pr-li-*)`.
1768
+ *
1769
+ * `auto` follows the OS color scheme the SAME way every card does (X via
1770
+ * react-tweet's `@media (prefers-color-scheme)`): the vars use the CSS
1771
+ * `light-dark()` function and the card sets `color-scheme` (`light dark` for auto,
1772
+ * else the explicit scheme). This resolves in CSS — instant, SSR-safe, no
1773
+ * JS-after-mount flash — so all previews agree on what `auto` means.
1752
1774
  */
1753
1775
  type LinkedInTheme = 'light' | 'dark' | 'auto';
1754
1776
 
@@ -1834,6 +1856,63 @@ interface DocumentCardProps {
1834
1856
  }
1835
1857
  declare function DocumentCard({ document, cover }: DocumentCardProps): react.JSX.Element;
1836
1858
 
1859
+ /**
1860
+ * Instagram feed-card theming. We own the card, so we expose CSS custom
1861
+ * properties on the wrapper; components read `var(--pr-ig-*)`.
1862
+ *
1863
+ * `auto` follows the OS color scheme the SAME way every card does (X via
1864
+ * react-tweet's `@media (prefers-color-scheme)`): the vars use the CSS
1865
+ * `light-dark()` function and the card sets `color-scheme` (`light dark` for auto,
1866
+ * else the explicit scheme). This resolves in CSS — instant, SSR-safe, no
1867
+ * JS-after-mount flash — so all previews agree on what `auto` means.
1868
+ */
1869
+ type InstagramTheme = 'light' | 'dark' | 'auto';
1870
+
1871
+ /**
1872
+ * A faithful, schema-driven preview of how an Instagram post will look, rendered
1873
+ * straight from a Postrun Instagram variant. Covers everything the API supports:
1874
+ * a **feed** post (single image / carousel) and a **reel** (9:16 video). Identity
1875
+ * is SDK-driven (`author` derives from `Connection`); creator details (username,
1876
+ * avatar, verified, collaborators) and the audio label come from the variant +
1877
+ * author. Feed themes light/dark/`auto`; the reel is always dark.
1878
+ *
1879
+ * Clean-room (there's no package to "buy" — Instagram's embed only renders
1880
+ * already-published posts), referencing the real IG feed + Postiz.
1881
+ */
1882
+ interface InstagramPostPreviewProps {
1883
+ /** The Instagram variant from our schema — the content source, untouched. */
1884
+ variant: InstagramPostVariant;
1885
+ /** Author identity (SDK-driven; `verified` is a presentation extra). */
1886
+ author: InstagramPreviewAuthor;
1887
+ /** Resolved media pixels (processed URLs or compose-time File blobs). */
1888
+ media?: PreviewMedia[];
1889
+ /** Color scheme for the feed card. `auto` (default) follows the OS. */
1890
+ theme?: InstagramTheme;
1891
+ className?: string;
1892
+ style?: CSSProperties;
1893
+ }
1894
+ declare function InstagramPostPreviewImpl({ variant, author, media, theme, className, style, }: InstagramPostPreviewProps): react.JSX.Element;
1895
+ /** Memoized: the resolved-media hook absorbs unstable media arrays. */
1896
+ declare const InstagramPostPreview: react.MemoExoticComponent<typeof InstagramPostPreviewImpl>;
1897
+
1898
+ interface ReelPreviewProps {
1899
+ author: InstagramPreviewAuthor;
1900
+ body: string;
1901
+ media: readonly ResolvedMedia[];
1902
+ /** The reel's audio label (`settings.audio_name`); defaults to "Original audio". */
1903
+ audioName?: string;
1904
+ className?: string;
1905
+ style?: CSSProperties;
1906
+ }
1907
+ /**
1908
+ * An Instagram Reel preview — the 9:16 vertical card: full-bleed video, the
1909
+ * username/verified + caption overlaid bottom-left, an audio row ("♪ <audio>"),
1910
+ * and the right action rail (like/comment/share/save/more — no fabricated
1911
+ * counts). Always dark, like the real Reels surface. The caption uses the shared
1912
+ * `ExpandableText` fold so the full text is readable (no silent truncation).
1913
+ */
1914
+ declare function ReelPreview({ author, body, media, audioName, className, style, }: ReelPreviewProps): react.JSX.Element;
1915
+
1837
1916
  /**
1838
1917
  * Public props for the TikTok post preview — a faithful render of how a post will
1839
1918
  * look on TikTok, driven straight from our Post object plus the live creator info
@@ -1865,7 +1944,8 @@ declare const TikTokPostPreview: react.MemoExoticComponent<typeof TikTokPostPrev
1865
1944
  * (TikTok's video surface is always dark), so only the panel adapts. We expose a
1866
1945
  * small set of CSS custom properties on the panel root; controls read
1867
1946
  * `var(--pr-tt-*)`, so a customer can restyle via `style`/`className` without a
1868
- * fork. Mirrors the LinkedIn preview's theme approach.
1947
+ * fork. `auto` follows the OS color scheme via CSS `light-dark()` — the same way
1948
+ * every preview card resolves `auto`.
1869
1949
  */
1870
1950
  type TikTokTheme = 'light' | 'dark' | 'auto';
1871
1951
 
@@ -1966,4 +2046,4 @@ declare function Declaration({ brandedContent }: {
1966
2046
  brandedContent: boolean;
1967
2047
  }): react.JSX.Element;
1968
2048
 
1969
- export { ArticleCard, type ArticleCardProps, AudienceSelect, type CalendarFilters, CommercialDisclosure, Connect, type ConnectErrorReason, type ConnectOutcome, type ConnectProps, type ConnectRenderApi, type ConnectState, type ConnectionsFilter, Declaration, type DiscoverableAccount, DocumentCard, type DocumentCardProps, type InfiniteList, InteractionToggles, LinkedInPostPreview, type LinkedInPostPreviewProps, type LinkedInPreviewAuthor, type LiveOptions, type MediaUploadItem, type MediaUploadOptions, type MediaUploadStatus, Poll, type PollProps, type PostrunContextValue, PostrunProvider, type PostrunProviderProps, type PreviewMedia, type PreviewMediaKind, TikTokCaptionField, type TikTokCaptionFieldProps, TikTokPostPreview, type TikTokPostPreviewProps, TikTokPublishPanel, type TikTokPublishPanelProps, type TikTokTheme, UploadError, type UseConnectParams, type UseConnectResult, type UseMediaUploadOptions, type UseMediaUploadResult, XPoll, type XPollProps, XPostPreview, type XPostPreviewProps, type XPreviewAuthor, type XPreviewMedia, type XPreviewQuotedTweet, connectionKeys, mediaKeys, postKeys, profileKeys, tiktokKeys, toPreviewMedia, useCalendar, useConnect, useConnection, useConnections, useCreatePost, useCreateProfile, useDeleteMedia, useDeletePost, useDeleteProfile, useDisconnect, useDiscoverableAccounts, useInfiniteList, useMedia, useMediaInfinite, useMediaList, useMediaUpload, usePost, usePostrun, usePosts, usePostsInfinite, useProfile, useProfiles, useProfilesInfinite, useSelectAccount, useTikTokCreatorInfo, useUpdateMedia, useUpdatePost, useUpdateProfile, useValidatePost };
2049
+ export { ArticleCard, type ArticleCardProps, AudienceSelect, type CalendarFilters, CommercialDisclosure, Connect, type ConnectErrorReason, type ConnectOutcome, type ConnectProps, type ConnectRenderApi, type ConnectState, type ConnectionIdentity, type ConnectionsFilter, Declaration, type DiscoverableAccount, DocumentCard, type DocumentCardProps, type InfiniteList, InstagramPostPreview, type InstagramPostPreviewProps, type InstagramPreviewAuthor, type InstagramTheme, InteractionToggles, LinkedInPostPreview, type LinkedInPostPreviewProps, type LinkedInPreviewAuthor, type LiveOptions, type MediaUploadItem, type MediaUploadOptions, type MediaUploadStatus, Poll, type PollProps, type PostrunContextValue, PostrunProvider, type PostrunProviderProps, type PreviewMedia, type PreviewMediaKind, ReelPreview, type ReelPreviewProps, type ResolvedMedia, TikTokCaptionField, type TikTokCaptionFieldProps, TikTokPostPreview, type TikTokPostPreviewProps, TikTokPublishPanel, type TikTokPublishPanelProps, type TikTokTheme, UploadError, type UseConnectParams, type UseConnectResult, type UseMediaUploadOptions, type UseMediaUploadResult, XPoll, type XPollProps, XPostPreview, type XPostPreviewProps, type XPreviewAuthor, type XPreviewMedia, type XPreviewQuotedTweet, connectionKeys, mediaKeys, postKeys, profileKeys, tiktokKeys, toPreviewMedia, useCalendar, useConnect, useConnection, useConnections, useCreatePost, useCreateProfile, useDeleteMedia, useDeletePost, useDeleteProfile, useDisconnect, useDiscoverableAccounts, useInfiniteList, useMedia, useMediaInfinite, useMediaList, useMediaUpload, usePost, usePostrun, usePosts, usePostsInfinite, useProfile, useProfiles, useProfilesInfinite, useSelectAccount, useTikTokCreatorInfo, useUpdateMedia, useUpdatePost, useUpdateProfile, useValidatePost };