@postrun/react 2.8.0 → 2.10.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 +265 -107
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +35 -28
- package/dist/index.d.ts +35 -28
- package/dist/index.js +266 -108
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -1631,29 +1631,31 @@ declare function useTikTokCreatorInfo(connectionId: string | null): _tanstack_re
|
|
|
1631
1631
|
/** The identity fields our `Connection` stores — the SDK-driven base every
|
|
1632
1632
|
* preview author derives from (so the field names + nullability match the API). */
|
|
1633
1633
|
type ConnectionIdentity = Pick<Connection, 'username' | 'avatar_url'>;
|
|
1634
|
-
/**
|
|
1635
|
-
|
|
1636
|
-
|
|
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. */
|
|
1637
1641
|
name: string;
|
|
1638
|
-
/**
|
|
1639
|
-
handle: string;
|
|
1640
|
-
/** Avatar image URL. Omit for a neutral placeholder. */
|
|
1641
|
-
avatarUrl?: string;
|
|
1642
|
-
/** Show the verified badge. Default false. */
|
|
1642
|
+
/** Show the verified badge. NOT on Connection — caller-supplied. */
|
|
1643
1643
|
verified?: boolean;
|
|
1644
|
-
}
|
|
1645
|
-
/**
|
|
1646
|
-
*
|
|
1647
|
-
|
|
1648
|
-
|
|
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. */
|
|
1649
1653
|
name: string;
|
|
1650
|
-
/** One-line headline under the name
|
|
1654
|
+
/** One-line headline under the name. NOT on Connection — caller-supplied. */
|
|
1651
1655
|
headline?: string;
|
|
1652
|
-
/**
|
|
1653
|
-
avatarUrl?: string;
|
|
1654
|
-
/** Show the verified badge. Default false. */
|
|
1656
|
+
/** Show the verified badge. NOT on Connection — caller-supplied. */
|
|
1655
1657
|
verified?: boolean;
|
|
1656
|
-
}
|
|
1658
|
+
};
|
|
1657
1659
|
/**
|
|
1658
1660
|
* The author identity rendered in an Instagram preview header. Instagram shows
|
|
1659
1661
|
* the `username` (no separate display name) + an optional verified badge.
|
|
@@ -1744,7 +1746,7 @@ interface XPostPreviewProps {
|
|
|
1744
1746
|
* preview. Fully customizable: restyle via `className`/`style` (CSS variables)
|
|
1745
1747
|
* or swap internals via `components`; theme light/dark/auto.
|
|
1746
1748
|
*/
|
|
1747
|
-
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;
|
|
1748
1750
|
/** Memoized: re-renders only when its props change (the resolved-media hook
|
|
1749
1751
|
* already absorbs unstable media arrays). */
|
|
1750
1752
|
declare const XPostPreview: react.MemoExoticComponent<typeof XPostPreviewImpl>;
|
|
@@ -1893,20 +1895,25 @@ declare function InstagramPostPreviewImpl({ variant, author, media, theme, class
|
|
|
1893
1895
|
/** Memoized: the resolved-media hook absorbs unstable media arrays. */
|
|
1894
1896
|
declare const InstagramPostPreview: react.MemoExoticComponent<typeof InstagramPostPreviewImpl>;
|
|
1895
1897
|
|
|
1896
|
-
|
|
1897
|
-
* An Instagram Reel preview — the 9:16 vertical card: full-bleed video, the
|
|
1898
|
-
* username/verified + caption overlaid bottom-left, an audio row ("♪ <audio>"),
|
|
1899
|
-
* and the right action rail (like/comment/share/save/more — no fabricated
|
|
1900
|
-
* counts). Always dark, like the real Reels surface.
|
|
1901
|
-
*/
|
|
1902
|
-
declare function ReelPreview({ author, body, media, audioName, className, style, }: {
|
|
1898
|
+
interface ReelPreviewProps {
|
|
1903
1899
|
author: InstagramPreviewAuthor;
|
|
1904
1900
|
body: string;
|
|
1905
1901
|
media: readonly ResolvedMedia[];
|
|
1902
|
+
/** Media is referenced but its pixels aren't resolved yet (still processing). */
|
|
1903
|
+
pending?: boolean;
|
|
1904
|
+
/** The reel's audio label (`settings.audio_name`); defaults to "Original audio". */
|
|
1906
1905
|
audioName?: string;
|
|
1907
1906
|
className?: string;
|
|
1908
1907
|
style?: CSSProperties;
|
|
1909
|
-
}
|
|
1908
|
+
}
|
|
1909
|
+
/**
|
|
1910
|
+
* An Instagram Reel preview — the 9:16 vertical card: full-bleed video, the
|
|
1911
|
+
* username/verified + caption overlaid bottom-left, an audio row ("♪ <audio>"),
|
|
1912
|
+
* and the right action rail (like/comment/share/save/more — no fabricated
|
|
1913
|
+
* counts). Always dark, like the real Reels surface. The caption uses the shared
|
|
1914
|
+
* `ExpandableText` fold so the full text is readable (no silent truncation).
|
|
1915
|
+
*/
|
|
1916
|
+
declare function ReelPreview({ author, body, media, pending, audioName, className, style, }: ReelPreviewProps): react.JSX.Element;
|
|
1910
1917
|
|
|
1911
1918
|
/**
|
|
1912
1919
|
* Public props for the TikTok post preview — a faithful render of how a post will
|
|
@@ -2041,4 +2048,4 @@ declare function Declaration({ brandedContent }: {
|
|
|
2041
2048
|
brandedContent: boolean;
|
|
2042
2049
|
}): react.JSX.Element;
|
|
2043
2050
|
|
|
2044
|
-
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, 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, 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 };
|
|
2051
|
+
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
|
@@ -1631,29 +1631,31 @@ declare function useTikTokCreatorInfo(connectionId: string | null): _tanstack_re
|
|
|
1631
1631
|
/** The identity fields our `Connection` stores — the SDK-driven base every
|
|
1632
1632
|
* preview author derives from (so the field names + nullability match the API). */
|
|
1633
1633
|
type ConnectionIdentity = Pick<Connection, 'username' | 'avatar_url'>;
|
|
1634
|
-
/**
|
|
1635
|
-
|
|
1636
|
-
|
|
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. */
|
|
1637
1641
|
name: string;
|
|
1638
|
-
/**
|
|
1639
|
-
handle: string;
|
|
1640
|
-
/** Avatar image URL. Omit for a neutral placeholder. */
|
|
1641
|
-
avatarUrl?: string;
|
|
1642
|
-
/** Show the verified badge. Default false. */
|
|
1642
|
+
/** Show the verified badge. NOT on Connection — caller-supplied. */
|
|
1643
1643
|
verified?: boolean;
|
|
1644
|
-
}
|
|
1645
|
-
/**
|
|
1646
|
-
*
|
|
1647
|
-
|
|
1648
|
-
|
|
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. */
|
|
1649
1653
|
name: string;
|
|
1650
|
-
/** One-line headline under the name
|
|
1654
|
+
/** One-line headline under the name. NOT on Connection — caller-supplied. */
|
|
1651
1655
|
headline?: string;
|
|
1652
|
-
/**
|
|
1653
|
-
avatarUrl?: string;
|
|
1654
|
-
/** Show the verified badge. Default false. */
|
|
1656
|
+
/** Show the verified badge. NOT on Connection — caller-supplied. */
|
|
1655
1657
|
verified?: boolean;
|
|
1656
|
-
}
|
|
1658
|
+
};
|
|
1657
1659
|
/**
|
|
1658
1660
|
* The author identity rendered in an Instagram preview header. Instagram shows
|
|
1659
1661
|
* the `username` (no separate display name) + an optional verified badge.
|
|
@@ -1744,7 +1746,7 @@ interface XPostPreviewProps {
|
|
|
1744
1746
|
* preview. Fully customizable: restyle via `className`/`style` (CSS variables)
|
|
1745
1747
|
* or swap internals via `components`; theme light/dark/auto.
|
|
1746
1748
|
*/
|
|
1747
|
-
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;
|
|
1748
1750
|
/** Memoized: re-renders only when its props change (the resolved-media hook
|
|
1749
1751
|
* already absorbs unstable media arrays). */
|
|
1750
1752
|
declare const XPostPreview: react.MemoExoticComponent<typeof XPostPreviewImpl>;
|
|
@@ -1893,20 +1895,25 @@ declare function InstagramPostPreviewImpl({ variant, author, media, theme, class
|
|
|
1893
1895
|
/** Memoized: the resolved-media hook absorbs unstable media arrays. */
|
|
1894
1896
|
declare const InstagramPostPreview: react.MemoExoticComponent<typeof InstagramPostPreviewImpl>;
|
|
1895
1897
|
|
|
1896
|
-
|
|
1897
|
-
* An Instagram Reel preview — the 9:16 vertical card: full-bleed video, the
|
|
1898
|
-
* username/verified + caption overlaid bottom-left, an audio row ("♪ <audio>"),
|
|
1899
|
-
* and the right action rail (like/comment/share/save/more — no fabricated
|
|
1900
|
-
* counts). Always dark, like the real Reels surface.
|
|
1901
|
-
*/
|
|
1902
|
-
declare function ReelPreview({ author, body, media, audioName, className, style, }: {
|
|
1898
|
+
interface ReelPreviewProps {
|
|
1903
1899
|
author: InstagramPreviewAuthor;
|
|
1904
1900
|
body: string;
|
|
1905
1901
|
media: readonly ResolvedMedia[];
|
|
1902
|
+
/** Media is referenced but its pixels aren't resolved yet (still processing). */
|
|
1903
|
+
pending?: boolean;
|
|
1904
|
+
/** The reel's audio label (`settings.audio_name`); defaults to "Original audio". */
|
|
1906
1905
|
audioName?: string;
|
|
1907
1906
|
className?: string;
|
|
1908
1907
|
style?: CSSProperties;
|
|
1909
|
-
}
|
|
1908
|
+
}
|
|
1909
|
+
/**
|
|
1910
|
+
* An Instagram Reel preview — the 9:16 vertical card: full-bleed video, the
|
|
1911
|
+
* username/verified + caption overlaid bottom-left, an audio row ("♪ <audio>"),
|
|
1912
|
+
* and the right action rail (like/comment/share/save/more — no fabricated
|
|
1913
|
+
* counts). Always dark, like the real Reels surface. The caption uses the shared
|
|
1914
|
+
* `ExpandableText` fold so the full text is readable (no silent truncation).
|
|
1915
|
+
*/
|
|
1916
|
+
declare function ReelPreview({ author, body, media, pending, audioName, className, style, }: ReelPreviewProps): react.JSX.Element;
|
|
1910
1917
|
|
|
1911
1918
|
/**
|
|
1912
1919
|
* Public props for the TikTok post preview — a faithful render of how a post will
|
|
@@ -2041,4 +2048,4 @@ declare function Declaration({ brandedContent }: {
|
|
|
2041
2048
|
brandedContent: boolean;
|
|
2042
2049
|
}): react.JSX.Element;
|
|
2043
2050
|
|
|
2044
|
-
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, 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, 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 };
|
|
2051
|
+
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 };
|