social-embeds 0.7.1 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +63 -51
- package/dist/components/apple-embed.d.ts +7 -0
- package/dist/components/apple-embed.js +39 -0
- package/dist/components/bluesky-embed.d.ts +10 -0
- package/dist/components/bluesky-embed.js +27 -0
- package/dist/components/dailymotion-embed.d.ts +9 -0
- package/dist/components/dailymotion-embed.js +30 -0
- package/dist/components/facebook-embed.d.ts +6 -0
- package/dist/components/facebook-embed.js +40 -0
- package/dist/components/flickr-embed.d.ts +6 -0
- package/dist/components/flickr-embed.js +27 -0
- package/dist/components/generic-iframe-embed.d.ts +11 -0
- package/dist/components/generic-iframe-embed.js +26 -0
- package/dist/components/giphy-embed.d.ts +4 -0
- package/dist/components/giphy-embed.js +22 -0
- package/dist/components/hooks.js +38 -0
- package/dist/components/iframe-embed.js +169 -0
- package/dist/components/imgur-embed.d.ts +6 -0
- package/dist/components/imgur-embed.js +23 -0
- package/dist/components/instagram-embed.d.ts +5 -0
- package/dist/components/instagram-embed.js +25 -0
- package/dist/components/kick-embed.d.ts +6 -0
- package/dist/components/kick-embed.js +25 -0
- package/dist/components/linkedin-embed.d.ts +6 -0
- package/dist/components/linkedin-embed.js +23 -0
- package/dist/components/pinterest-embed.d.ts +5 -0
- package/dist/components/pinterest-embed.js +25 -0
- package/dist/components/reddit-embed.d.ts +6 -0
- package/dist/components/reddit-embed.js +29 -0
- package/dist/components/rumble-embed.d.ts +4 -0
- package/dist/components/rumble-embed.js +22 -0
- package/dist/components/script-embed.js +108 -0
- package/dist/components/shared.d.ts +29 -0
- package/dist/components/snapchat-embed.d.ts +4 -0
- package/dist/components/snapchat-embed.js +22 -0
- package/dist/components/social-embed.d.ts +60 -0
- package/dist/components/social-embed.js +221 -0
- package/dist/components/soundcloud-embed.d.ts +6 -0
- package/dist/components/soundcloud-embed.js +33 -0
- package/dist/components/spotify-embed.d.ts +9 -0
- package/dist/components/spotify-embed.js +25 -0
- package/dist/components/strava-embed.d.ts +6 -0
- package/dist/components/strava-embed.js +26 -0
- package/dist/components/streamable-embed.d.ts +6 -0
- package/dist/components/streamable-embed.js +28 -0
- package/dist/components/telegram-embed.d.ts +6 -0
- package/dist/components/telegram-embed.js +27 -0
- package/dist/components/tenor-embed.d.ts +4 -0
- package/dist/components/tenor-embed.js +22 -0
- package/dist/components/threads-embed.d.ts +5 -0
- package/dist/components/threads-embed.js +25 -0
- package/dist/components/tiktok-embed.d.ts +6 -0
- package/dist/components/tiktok-embed.js +37 -0
- package/dist/components/truthsocial-embed.d.ts +4 -0
- package/dist/components/truthsocial-embed.js +22 -0
- package/dist/components/tumblr-embed.d.ts +4 -0
- package/dist/components/tumblr-embed.js +22 -0
- package/dist/components/twitch-embed.d.ts +6 -0
- package/dist/components/twitch-embed.js +26 -0
- package/dist/components/vimeo-embed.d.ts +5 -0
- package/dist/components/vimeo-embed.js +40 -0
- package/dist/components/x-embed.d.ts +5 -0
- package/dist/components/x-embed.js +32 -0
- package/dist/components/youtube-embed.d.ts +5 -0
- package/dist/components/youtube-embed.js +43 -0
- package/dist/core/drivers.js +125 -0
- package/dist/core/layout.js +73 -0
- package/dist/core/markup.js +30 -0
- package/dist/core/params.js +26 -0
- package/dist/core/plans/apple.js +44 -0
- package/dist/core/plans/bluesky.d.ts +3 -0
- package/dist/core/plans/bluesky.js +34 -0
- package/dist/core/plans/dailymotion.d.ts +8 -0
- package/dist/core/plans/dailymotion.js +37 -0
- package/dist/core/plans/facebook.d.ts +15 -0
- package/dist/core/plans/facebook.js +79 -0
- package/dist/core/plans/flickr.d.ts +7 -0
- package/dist/core/plans/flickr.js +37 -0
- package/dist/core/plans/generic.js +44 -0
- package/dist/core/plans/giphy.js +16 -0
- package/dist/core/plans/imgur.d.ts +4 -0
- package/dist/core/plans/imgur.js +34 -0
- package/dist/core/plans/instagram.d.ts +4 -0
- package/dist/core/plans/instagram.js +26 -0
- package/dist/core/plans/kick.d.ts +5 -0
- package/dist/core/plans/kick.js +22 -0
- package/dist/core/plans/linkedin.d.ts +4 -0
- package/dist/core/plans/linkedin.js +23 -0
- package/dist/core/plans/pinterest.d.ts +4 -0
- package/dist/core/plans/pinterest.js +31 -0
- package/dist/core/plans/reddit.d.ts +11 -0
- package/dist/core/plans/reddit.js +46 -0
- package/dist/core/plans/rumble.js +21 -0
- package/dist/core/plans/snapchat.js +20 -0
- package/dist/core/plans/soundcloud.d.ts +14 -0
- package/dist/core/plans/soundcloud.js +37 -0
- package/dist/core/plans/spotify.d.ts +4 -0
- package/dist/core/plans/spotify.js +29 -0
- package/dist/core/plans/strava.d.ts +8 -0
- package/dist/core/plans/strava.js +38 -0
- package/dist/core/plans/streamable.d.ts +8 -0
- package/dist/core/plans/streamable.js +31 -0
- package/dist/core/plans/telegram.d.ts +10 -0
- package/dist/core/plans/telegram.js +59 -0
- package/dist/core/plans/tenor.js +16 -0
- package/dist/core/plans/threads.d.ts +4 -0
- package/dist/core/plans/threads.js +25 -0
- package/dist/core/plans/tiktok.d.ts +17 -0
- package/dist/core/plans/tiktok.js +36 -0
- package/dist/core/plans/truthsocial.js +43 -0
- package/dist/core/plans/tumblr.js +29 -0
- package/dist/core/plans/twitch.d.ts +7 -0
- package/dist/core/plans/twitch.js +38 -0
- package/dist/core/plans/vimeo.d.ts +23 -0
- package/dist/core/plans/vimeo.js +42 -0
- package/dist/core/plans/x.d.ts +12 -0
- package/dist/core/plans/x.js +31 -0
- package/dist/core/plans/youtube.d.ts +25 -0
- package/dist/core/plans/youtube.js +59 -0
- package/dist/core/post-link.js +19 -0
- package/dist/core/resolve.js +57 -0
- package/dist/core/timing.js +7 -0
- package/dist/element.d.ts +1 -1
- package/dist/element.js +1 -1
- package/dist/index.d.ts +53 -344
- package/dist/index.js +30 -2575
- package/dist/loader/load-script.js +116 -0
- package/dist/loader/platform-scripts.js +89 -0
- package/dist/parser/frames.js +70 -0
- package/dist/parser/html.js +172 -0
- package/dist/parser/iframe.d.ts +24 -0
- package/dist/parser/iframe.js +151 -0
- package/dist/parser/lookup.js +20 -0
- package/dist/parser/match-url.d.ts +3 -0
- package/dist/parser/match-url.js +22 -0
- package/dist/parser/parse-embed.d.ts +7 -0
- package/dist/parser/parse-embed.js +69 -0
- package/dist/parser/platform.js +60 -0
- package/dist/parser/platforms/applemusic.js +45 -0
- package/dist/parser/platforms/applepodcasts.js +41 -0
- package/dist/parser/platforms/bluesky.js +64 -0
- package/dist/parser/platforms/dailymotion.js +57 -0
- package/dist/parser/platforms/facebook.js +181 -0
- package/dist/parser/platforms/flickr.js +134 -0
- package/dist/parser/platforms/giphy.js +68 -0
- package/dist/parser/platforms/imgur.js +107 -0
- package/dist/parser/platforms/index.js +62 -0
- package/dist/parser/platforms/instagram.js +59 -0
- package/dist/parser/platforms/kick.js +61 -0
- package/dist/parser/platforms/linkedin.js +42 -0
- package/dist/parser/platforms/pinterest.js +59 -0
- package/dist/parser/platforms/reddit.js +69 -0
- package/dist/parser/platforms/rumble.js +44 -0
- package/dist/parser/platforms/snapchat.js +87 -0
- package/dist/parser/platforms/soundcloud.js +128 -0
- package/dist/parser/platforms/spotify.js +51 -0
- package/dist/parser/platforms/strava.js +55 -0
- package/dist/parser/platforms/streamable.js +95 -0
- package/dist/parser/platforms/telegram.js +61 -0
- package/dist/parser/platforms/tenor.js +79 -0
- package/dist/parser/platforms/threads.js +51 -0
- package/dist/parser/platforms/tiktok.js +48 -0
- package/dist/parser/platforms/truthsocial.js +50 -0
- package/dist/parser/platforms/tumblr.js +72 -0
- package/dist/parser/platforms/twitch.js +128 -0
- package/dist/parser/platforms/vimeo.js +95 -0
- package/dist/parser/platforms/x.js +65 -0
- package/dist/parser/platforms/youtube.js +140 -0
- package/dist/parser/types.d.ts +14 -0
- package/dist/parser/url.js +41 -0
- package/dist/parser/verify.js +63 -0
- package/dist/parser.d.ts +4 -1
- package/dist/parser.js +4 -1
- package/package.json +1 -1
- package/dist/index-DrMHAkyG.d.ts +0 -46
- package/dist/parser-CovaPg5T.js +0 -2585
package/dist/index.d.ts
CHANGED
|
@@ -1,344 +1,53 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
export
|
|
54
|
-
/**
|
|
55
|
-
* `data-width` and `data-lazy` have no props, because `width` and `lazy` are the wrapper's
|
|
56
|
-
* (docs/decisions.md D33).
|
|
57
|
-
*/
|
|
58
|
-
type FacebookOptions = {
|
|
59
|
-
/** SDK locale, such as `bg_BG`. One SDK serves the page: the first locale wins. */
|
|
60
|
-
locale?: string;
|
|
61
|
-
showText?: boolean;
|
|
62
|
-
/** Video only. */
|
|
63
|
-
allowfullscreen?: boolean;
|
|
64
|
-
/** Video only. */
|
|
65
|
-
autoplay?: boolean;
|
|
66
|
-
/** Video only. */
|
|
67
|
-
showCaptions?: boolean;
|
|
68
|
-
};
|
|
69
|
-
/** `height` and `maxHeight` apply only to a video that renders as an iframe. */
|
|
70
|
-
type FacebookEmbedProps = EmbedSource & Omit<FrameProps, keyof FacebookOptions> & FacebookOptions;
|
|
71
|
-
export declare function FacebookEmbed(props: FacebookEmbedProps): import("react").JSX.Element | null;
|
|
72
|
-
/** The display options of Flickr's embed code that the frame keeps (docs/decisions.md D98). */
|
|
73
|
-
type FlickrOptions = {
|
|
74
|
-
header?: boolean;
|
|
75
|
-
footer?: boolean;
|
|
76
|
-
/** The embed dialog's Slideshow setting. */
|
|
77
|
-
context?: boolean;
|
|
78
|
-
};
|
|
79
|
-
type FlickrEmbedProps = EmbedSource & Omit<FrameProps, keyof FlickrOptions> & FlickrOptions;
|
|
80
|
-
/** Embed code keeps its image's ratio and is at most as wide as the image; a URL renders at 4:3 (docs/decisions.md D98). */
|
|
81
|
-
export declare function FlickrEmbed(props: FlickrEmbedProps): import("react").JSX.Element | null;
|
|
82
|
-
type ImgurOptions = {
|
|
83
|
-
/** `false` hides the post's title and description. */
|
|
84
|
-
context?: boolean;
|
|
85
|
-
};
|
|
86
|
-
type ImgurEmbedProps = EmbedSource & Omit<SharedProps, keyof ImgurOptions> & ImgurOptions;
|
|
87
|
-
/** At most 540px wide by default, the widest `embed.js` makes the frame (docs/decisions.md D94). */
|
|
88
|
-
export declare function ImgurEmbed(props: ImgurEmbedProps): import("react").JSX.Element | null;
|
|
89
|
-
type InstagramOptions = {
|
|
90
|
-
/** Show the caption (`data-instgrm-captioned`). */
|
|
91
|
-
captioned?: boolean;
|
|
92
|
-
};
|
|
93
|
-
type InstagramEmbedProps = EmbedSource & Omit<SharedProps, keyof InstagramOptions> & InstagramOptions;
|
|
94
|
-
export declare function InstagramEmbed(props: InstagramEmbedProps): import("react").JSX.Element | null;
|
|
95
|
-
/** Kick's player parameters; undocumented, read from its player URL (docs/decisions.md D75). */
|
|
96
|
-
type KickOptions = {
|
|
97
|
-
autoplay?: boolean;
|
|
98
|
-
muted?: boolean;
|
|
99
|
-
};
|
|
100
|
-
type KickEmbedProps = EmbedSource & Omit<FrameProps, keyof KickOptions> & KickOptions;
|
|
101
|
-
/** A live channel at 16:9. */
|
|
102
|
-
export declare function KickEmbed(props: KickEmbedProps): import("react").JSX.Element | null;
|
|
103
|
-
type LinkedInOptions = {
|
|
104
|
-
/** The Embed dialog's "less text" option. */
|
|
105
|
-
collapsed?: boolean;
|
|
106
|
-
};
|
|
107
|
-
type LinkedInEmbedProps = EmbedSource & Omit<FrameProps, keyof LinkedInOptions> & LinkedInOptions;
|
|
108
|
-
/** A fixed height: the `height` prop, else the embed code's, else 670px. */
|
|
109
|
-
export declare function LinkedInEmbed(props: LinkedInEmbedProps): import("react").JSX.Element | null;
|
|
110
|
-
/** `pinWidth` is `data-pin-width`; `width` stays the wrapper's. */
|
|
111
|
-
type PinterestOptions = {
|
|
112
|
-
pinWidth?: 'small' | 'medium' | 'large';
|
|
113
|
-
};
|
|
114
|
-
type PinterestEmbedProps = EmbedSource & Omit<SharedProps, keyof PinterestOptions> & PinterestOptions;
|
|
115
|
-
export declare function PinterestEmbed(props: PinterestEmbedProps): import("react").JSX.Element | null;
|
|
116
|
-
/** The `data-embed-*` options of Reddit's embed code that hosts set most. */
|
|
117
|
-
type RedditOptions = {
|
|
118
|
-
theme?: 'light' | 'dark';
|
|
119
|
-
showMedia?: boolean;
|
|
120
|
-
showTitle?: boolean;
|
|
121
|
-
showUsername?: boolean;
|
|
122
|
-
/** Language of the post, which Reddit machine-translates (docs/decisions.md D52). */
|
|
123
|
-
locale?: string;
|
|
124
|
-
/** Replies shown under an embedded comment. */
|
|
125
|
-
depth?: number;
|
|
126
|
-
};
|
|
127
|
-
type RedditEmbedProps = EmbedSource & Omit<SharedProps, keyof RedditOptions> & RedditOptions;
|
|
128
|
-
/** At most 640px wide by default, the width widgets.js gives the frame (docs/decisions.md D52). */
|
|
129
|
-
export declare function RedditEmbed(props: RedditEmbedProps): import("react").JSX.Element | null;
|
|
130
|
-
/** SoundCloud's player parameters, in camelCase. */
|
|
131
|
-
type SoundCloudOptions = {
|
|
132
|
-
/** The large-artwork player; `false` for the classic one. */
|
|
133
|
-
visual?: boolean;
|
|
134
|
-
/** Accent colour, such as `'#ff5500'`. */
|
|
135
|
-
color?: string;
|
|
136
|
-
autoPlay?: boolean;
|
|
137
|
-
hideRelated?: boolean;
|
|
138
|
-
showComments?: boolean;
|
|
139
|
-
showUser?: boolean;
|
|
140
|
-
showReposts?: boolean;
|
|
141
|
-
showTeaser?: boolean;
|
|
142
|
-
showArtwork?: boolean;
|
|
143
|
-
};
|
|
144
|
-
type SoundCloudEmbedProps = EmbedSource & Omit<FrameProps, keyof SoundCloudOptions> & SoundCloudOptions;
|
|
145
|
-
/** A fixed height: the `height` prop, else the embed code's, else 400px for the visual player. */
|
|
146
|
-
export declare function SoundCloudEmbed(props: SoundCloudEmbedProps): import("react").JSX.Element | null;
|
|
147
|
-
/** The display options of Strava's embed code (docs/decisions.md D97). */
|
|
148
|
-
type StravaOptions = {
|
|
149
|
-
/** The embed's `data-style`. */
|
|
150
|
-
embedStyle?: 'standard' | 'minimal';
|
|
151
|
-
/** Routes only: the frame fills its container, with no maximum width. */
|
|
152
|
-
fullWidth?: boolean;
|
|
153
|
-
mapHash?: string;
|
|
154
|
-
};
|
|
155
|
-
type StravaEmbedProps = EmbedSource & Omit<SharedProps, keyof StravaOptions> & StravaOptions;
|
|
156
|
-
/** At most 554px wide by default, as `embed.js` makes the frame; a full-width route has no maximum (docs/decisions.md D97). */
|
|
157
|
-
export declare function StravaEmbed(props: StravaEmbedProps): import("react").JSX.Element | null;
|
|
158
|
-
/** The player parameters of Streamable's help center (docs/decisions.md D96). */
|
|
159
|
-
type StreamableOptions = {
|
|
160
|
-
autoplay?: boolean;
|
|
161
|
-
hd?: boolean;
|
|
162
|
-
loop?: boolean;
|
|
163
|
-
muted?: boolean;
|
|
164
|
-
nocontrols?: boolean;
|
|
165
|
-
};
|
|
166
|
-
type StreamableEmbedProps = EmbedSource & Omit<FrameProps, keyof StreamableOptions> & StreamableOptions;
|
|
167
|
-
/** The embed code's aspect ratio, else 16:9. */
|
|
168
|
-
export declare function StreamableEmbed(props: StreamableEmbedProps): import("react").JSX.Element | null;
|
|
169
|
-
/** The options of Telegram's post widget configurator (core.telegram.org/widgets/post). */
|
|
170
|
-
type TelegramOptions = {
|
|
171
|
-
/** Show the author's photo. */
|
|
172
|
-
userpic?: boolean;
|
|
173
|
-
/** Accent colour as hex, without `#`. */
|
|
174
|
-
color?: string;
|
|
175
|
-
dark?: boolean;
|
|
176
|
-
/** Accent colour in the dark theme, as hex without `#`. */
|
|
177
|
-
darkColor?: string;
|
|
178
|
-
};
|
|
179
|
-
type TelegramEmbedProps = EmbedSource & Omit<SharedProps, keyof TelegramOptions> & TelegramOptions;
|
|
180
|
-
/** At most 500px wide by default, the widest the post renders (docs/decisions.md D49). */
|
|
181
|
-
export declare function TelegramEmbed(props: TelegramEmbedProps): import("react").JSX.Element | null;
|
|
182
|
-
type ThreadsOptions = {
|
|
183
|
-
/** `data-theme`; embed.js also reads `dark` and `auto` (docs/decisions.md D32). */
|
|
184
|
-
theme?: 'light' | 'dark' | 'auto';
|
|
185
|
-
};
|
|
186
|
-
type ThreadsEmbedProps = EmbedSource & Omit<SharedProps, keyof ThreadsOptions> & ThreadsOptions;
|
|
187
|
-
export declare function ThreadsEmbed(props: ThreadsEmbedProps): import("react").JSX.Element | null;
|
|
188
|
-
/** The Embed Player parameters TikTok documents (developers.tiktok.com/doc/embed-player). */
|
|
189
|
-
type TikTokOptions = {
|
|
190
|
-
controls?: boolean;
|
|
191
|
-
progressBar?: boolean;
|
|
192
|
-
playButton?: boolean;
|
|
193
|
-
volumeControl?: boolean;
|
|
194
|
-
fullscreenButton?: boolean;
|
|
195
|
-
timestamp?: boolean;
|
|
196
|
-
loop?: boolean;
|
|
197
|
-
autoplay?: boolean;
|
|
198
|
-
musicInfo?: boolean;
|
|
199
|
-
description?: boolean;
|
|
200
|
-
rel?: boolean;
|
|
201
|
-
nativeContextMenu?: boolean;
|
|
202
|
-
closedCaption?: boolean;
|
|
203
|
-
forceMuted?: boolean;
|
|
204
|
-
};
|
|
205
|
-
type TikTokEmbedProps = EmbedSource & Omit<FrameProps, keyof TikTokOptions> & TikTokOptions;
|
|
206
|
-
/** At most 325px wide by default, the size of TikTok's own embed code (docs/decisions.md D40). */
|
|
207
|
-
export declare function TikTokEmbed(props: TikTokEmbedProps): import("react").JSX.Element | null;
|
|
208
|
-
type TwitchOptions = {
|
|
209
|
-
/** Twitch's default: `true` for channels and videos, `false` for clips. */
|
|
210
|
-
autoplay?: boolean;
|
|
211
|
-
muted?: boolean;
|
|
212
|
-
/** A video's start time, as `1h2m3s`. */
|
|
213
|
-
time?: string;
|
|
214
|
-
};
|
|
215
|
-
type TwitchEmbedProps = EmbedSource & Omit<FrameProps, keyof TwitchOptions> & TwitchOptions;
|
|
216
|
-
/** `parent` is the page's own host, added on the client (docs/decisions.md D62, D65). */
|
|
217
|
-
export declare function TwitchEmbed(props: TwitchEmbedProps): import("react").JSX.Element | null;
|
|
218
|
-
/** The player parameters Vimeo documents (help.vimeo.com, "Using player parameters"). */
|
|
219
|
-
type VimeoOptions = {
|
|
220
|
-
autopause?: boolean;
|
|
221
|
-
autoplay?: boolean;
|
|
222
|
-
background?: boolean;
|
|
223
|
-
byline?: boolean;
|
|
224
|
-
/** Hex colour without `#`. */
|
|
225
|
-
color?: string;
|
|
226
|
-
controls?: boolean;
|
|
227
|
-
dnt?: boolean;
|
|
228
|
-
keyboard?: boolean;
|
|
229
|
-
loop?: boolean;
|
|
230
|
-
muted?: boolean;
|
|
231
|
-
pip?: boolean;
|
|
232
|
-
playsinline?: boolean;
|
|
233
|
-
portrait?: boolean;
|
|
234
|
-
quality?: string;
|
|
235
|
-
speed?: boolean;
|
|
236
|
-
title?: boolean;
|
|
237
|
-
transparent?: boolean;
|
|
238
|
-
/** Start time: seconds, or `1m2s`. */
|
|
239
|
-
t?: number | string;
|
|
240
|
-
};
|
|
241
|
-
type VimeoEmbedProps = EmbedSource & Omit<FrameProps, keyof VimeoOptions> & VimeoOptions;
|
|
242
|
-
export declare function VimeoEmbed(props: VimeoEmbedProps): import("react").JSX.Element | null;
|
|
243
|
-
/**
|
|
244
|
-
* `data-width` has no prop, because `width` is the wrapper's: the post fills the wrapper up
|
|
245
|
-
* to `maxWidth` (docs/decisions.md D33).
|
|
246
|
-
*/
|
|
247
|
-
type XOptions = {
|
|
248
|
-
theme?: 'light' | 'dark';
|
|
249
|
-
conversation?: 'none';
|
|
250
|
-
cards?: 'hidden';
|
|
251
|
-
align?: 'left' | 'center' | 'right';
|
|
252
|
-
lang?: string;
|
|
253
|
-
dnt?: boolean;
|
|
254
|
-
};
|
|
255
|
-
type XEmbedProps = EmbedSource & Omit<SharedProps, keyof XOptions> & XOptions;
|
|
256
|
-
export declare function XEmbed(props: XEmbedProps): import("react").JSX.Element | null;
|
|
257
|
-
/** The player parameters YouTube documents (developers.google.com/youtube/player_parameters). */
|
|
258
|
-
type YouTubeOptions = {
|
|
259
|
-
autoplay?: boolean;
|
|
260
|
-
ccLangPref?: string;
|
|
261
|
-
ccLoadPolicy?: boolean;
|
|
262
|
-
color?: 'red' | 'white';
|
|
263
|
-
controls?: boolean;
|
|
264
|
-
disablekb?: boolean;
|
|
265
|
-
enablejsapi?: boolean;
|
|
266
|
-
end?: number;
|
|
267
|
-
fs?: boolean;
|
|
268
|
-
hl?: string;
|
|
269
|
-
ivLoadPolicy?: 1 | 3;
|
|
270
|
-
list?: string;
|
|
271
|
-
listType?: 'playlist' | 'user_uploads';
|
|
272
|
-
loop?: boolean;
|
|
273
|
-
origin?: string;
|
|
274
|
-
playlist?: string;
|
|
275
|
-
playsinline?: boolean;
|
|
276
|
-
rel?: boolean;
|
|
277
|
-
start?: number;
|
|
278
|
-
widgetReferrer?: string;
|
|
279
|
-
/** Privacy-enhanced mode: play from youtube-nocookie.com. */
|
|
280
|
-
nocookie?: boolean;
|
|
281
|
-
};
|
|
282
|
-
type YouTubeEmbedProps = EmbedSource & Omit<FrameProps, keyof YouTubeOptions> & YouTubeOptions;
|
|
283
|
-
export declare function YouTubeEmbed(props: YouTubeEmbedProps): import("react").JSX.Element | null;
|
|
284
|
-
type SocialEmbedSource = {
|
|
285
|
-
html: string;
|
|
286
|
-
url?: never;
|
|
287
|
-
} | {
|
|
288
|
-
url: string;
|
|
289
|
-
html?: never;
|
|
290
|
-
};
|
|
291
|
-
type PlatformOption = keyof XOptions | keyof InstagramOptions | keyof ThreadsOptions | keyof FacebookOptions | keyof TikTokOptions | keyof YouTubeOptions | keyof TelegramOptions | keyof RedditOptions | keyof LinkedInOptions | keyof PinterestOptions | keyof VimeoOptions | keyof TwitchOptions | keyof DailymotionOptions | keyof BlueskyOptions | keyof SoundCloudOptions | keyof KickOptions | keyof StreamableOptions | keyof ImgurOptions | keyof StravaOptions | keyof FlickrOptions;
|
|
292
|
-
type SocialEmbedProps = SocialEmbedSource & Omit<FrameProps, PlatformOption> & {
|
|
293
|
-
/**
|
|
294
|
-
* Called with the original string when `html` is neither a platform's embed code nor a
|
|
295
|
-
* safe iframe. Without it, nothing is rendered and `onError` is called.
|
|
296
|
-
*/
|
|
297
|
-
fallback?: (html: string) => ReactNode;
|
|
298
|
-
};
|
|
299
|
-
/** `height` and `maxHeight` reach only the iframe-based embeds: the others size themselves. */
|
|
300
|
-
export declare function SocialEmbed(props: SocialEmbedProps): string | number | bigint | boolean | import("react").JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | null | undefined;
|
|
301
|
-
type SnapchatEmbedProps = EmbedSource & FrameProps;
|
|
302
|
-
/** At most 416px wide by default, the size of Snapchat's own embed code (docs/decisions.md D50). */
|
|
303
|
-
export declare function SnapchatEmbed(props: SnapchatEmbedProps): import("react").JSX.Element | null;
|
|
304
|
-
type SpotifyOptions = {
|
|
305
|
-
/** `0` for the dark player. */
|
|
306
|
-
theme?: 0;
|
|
307
|
-
};
|
|
308
|
-
type SpotifyEmbedProps = EmbedSource & Omit<FrameProps, keyof SpotifyOptions> & SpotifyOptions;
|
|
309
|
-
/**
|
|
310
|
-
* A fixed height: the `height` prop, else the embed code's, else 152px for a track or episode
|
|
311
|
-
* and 352px for the rest. A video show keeps its 16:9 aspect ratio instead.
|
|
312
|
-
*/
|
|
313
|
-
export declare function SpotifyEmbed(props: SpotifyEmbedProps): import("react").JSX.Element | null;
|
|
314
|
-
type AppleMusicEmbedProps = EmbedSource & FrameProps;
|
|
315
|
-
type ApplePodcastsEmbedProps = EmbedSource & FrameProps;
|
|
316
|
-
/** A fixed height: the `height` prop, else the embed code's, else 175px for a song and 450px for the rest. */
|
|
317
|
-
export declare function AppleMusicEmbed(props: AppleMusicEmbedProps): import("react").JSX.Element | null;
|
|
318
|
-
/** A fixed height: the `height` prop, else the embed code's, else 160px for an episode and 450px for a show. */
|
|
319
|
-
export declare function ApplePodcastsEmbed(props: ApplePodcastsEmbedProps): import("react").JSX.Element | null;
|
|
320
|
-
type GiphyEmbedProps = EmbedSource & FrameProps;
|
|
321
|
-
/** The embed code's aspect ratio; a URL carries no size and renders square (docs/decisions.md D76). */
|
|
322
|
-
export declare function GiphyEmbed(props: GiphyEmbedProps): import("react").JSX.Element | null;
|
|
323
|
-
type TenorEmbedProps = EmbedSource & FrameProps;
|
|
324
|
-
/** The embed code's aspect ratio; a URL carries no size and renders at 1.33:1 (docs/decisions.md D95). */
|
|
325
|
-
export declare function TenorEmbed(props: TenorEmbedProps): import("react").JSX.Element | null;
|
|
326
|
-
type RumbleEmbedProps = EmbedSource & FrameProps;
|
|
327
|
-
/** Embed code only: a page URL holds another id than the player (docs/decisions.md D99). */
|
|
328
|
-
export declare function RumbleEmbed(props: RumbleEmbedProps): import("react").JSX.Element | null;
|
|
329
|
-
type TruthSocialEmbedProps = EmbedSource & SharedProps;
|
|
330
|
-
/** At most 600px wide by default, the width of Truth Social's embed code (docs/decisions.md D93). */
|
|
331
|
-
export declare function TruthSocialEmbed(props: TruthSocialEmbedProps): import("react").JSX.Element | null;
|
|
332
|
-
type GenericIframeEmbedProps = ({
|
|
333
|
-
html: string;
|
|
334
|
-
embed?: never;
|
|
335
|
-
} | {
|
|
336
|
-
embed: ParsedIframe;
|
|
337
|
-
html?: never;
|
|
338
|
-
}) & FrameProps;
|
|
339
|
-
/** One iframe rebuilt from its checked attributes; nothing else in the code renders. */
|
|
340
|
-
export declare function GenericIframeEmbed(props: GenericIframeEmbedProps): import("react").JSX.Element | null;
|
|
341
|
-
type TumblrEmbedProps = EmbedSource & SharedProps;
|
|
342
|
-
/** At most 540px wide by default, Tumblr's oEmbed width. Renders the frame `post.js` would create (docs/decisions.md D77). */
|
|
343
|
-
export declare function TumblrEmbed(props: TumblrEmbedProps): import("react").JSX.Element | null;
|
|
344
|
-
export type { AppleMusicEmbedProps, ApplePodcastsEmbedProps, BlueskyEmbedProps, BlueskyOptions, DailymotionEmbedProps, DailymotionOptions, EmbedSource, FacebookEmbedProps, FacebookOptions, FlickrEmbedProps, FlickrOptions, FrameProps, GenericIframeEmbedProps, GiphyEmbedProps, ImgurEmbedProps, ImgurOptions, InstagramEmbedProps, InstagramOptions, KickEmbedProps, KickOptions, LinkedInEmbedProps, LinkedInOptions, PinterestEmbedProps, PinterestOptions, RedditEmbedProps, RedditOptions, RumbleEmbedProps, SharedProps, SnapchatEmbedProps, SocialEmbedProps, SocialEmbedSource, SoundCloudEmbedProps, SoundCloudOptions, SpotifyEmbedProps, SpotifyOptions, StravaEmbedProps, StravaOptions, StreamableEmbedProps, StreamableOptions, TelegramEmbedProps, TelegramOptions, TenorEmbedProps, ThreadsEmbedProps, ThreadsOptions, TikTokEmbedProps, TikTokOptions, TruthSocialEmbedProps, TumblrEmbedProps, TwitchEmbedProps, TwitchOptions, VimeoEmbedProps, VimeoOptions, XEmbedProps, XOptions, YouTubeEmbedProps, YouTubeOptions };
|
|
1
|
+
import { EmbedSource, FrameProps, SharedProps } from "./components/shared.js";
|
|
2
|
+
import { BlueskyOptions } from "./core/plans/bluesky.js";
|
|
3
|
+
import { SocialEmbed, SocialEmbedProps, SocialEmbedSource } from "./components/social-embed.js";
|
|
4
|
+
import { DailymotionOptions } from "./core/plans/dailymotion.js";
|
|
5
|
+
import { DailymotionEmbed, DailymotionEmbedProps } from "./components/dailymotion-embed.js";
|
|
6
|
+
import { FacebookOptions } from "./core/plans/facebook.js";
|
|
7
|
+
import { FacebookEmbed, FacebookEmbedProps } from "./components/facebook-embed.js";
|
|
8
|
+
import { FlickrOptions } from "./core/plans/flickr.js";
|
|
9
|
+
import { InstagramEmbed, InstagramEmbedProps } from "./components/instagram-embed.js";
|
|
10
|
+
import { ImgurOptions } from "./core/plans/imgur.js";
|
|
11
|
+
import { LinkedInEmbed, LinkedInEmbedProps } from "./components/linkedin-embed.js";
|
|
12
|
+
import { InstagramOptions } from "./core/plans/instagram.js";
|
|
13
|
+
import { PinterestEmbed, PinterestEmbedProps } from "./components/pinterest-embed.js";
|
|
14
|
+
import { KickOptions } from "./core/plans/kick.js";
|
|
15
|
+
import { RedditEmbed, RedditEmbedProps } from "./components/reddit-embed.js";
|
|
16
|
+
import { LinkedInOptions } from "./core/plans/linkedin.js";
|
|
17
|
+
import { SnapchatEmbed, SnapchatEmbedProps } from "./components/snapchat-embed.js";
|
|
18
|
+
import { PinterestOptions } from "./core/plans/pinterest.js";
|
|
19
|
+
import { SpotifyEmbed, SpotifyEmbedProps } from "./components/spotify-embed.js";
|
|
20
|
+
import { RedditOptions } from "./core/plans/reddit.js";
|
|
21
|
+
import { TelegramEmbed, TelegramEmbedProps } from "./components/telegram-embed.js";
|
|
22
|
+
import { SoundCloudOptions } from "./core/plans/soundcloud.js";
|
|
23
|
+
import { ThreadsEmbed, ThreadsEmbedProps } from "./components/threads-embed.js";
|
|
24
|
+
import { StravaOptions } from "./core/plans/strava.js";
|
|
25
|
+
import { TwitchEmbed, TwitchEmbedProps } from "./components/twitch-embed.js";
|
|
26
|
+
import { StreamableOptions } from "./core/plans/streamable.js";
|
|
27
|
+
import { TikTokEmbed, TikTokEmbedProps } from "./components/tiktok-embed.js";
|
|
28
|
+
import { TelegramOptions } from "./core/plans/telegram.js";
|
|
29
|
+
import { VimeoEmbed, VimeoEmbedProps } from "./components/vimeo-embed.js";
|
|
30
|
+
import { ThreadsOptions } from "./core/plans/threads.js";
|
|
31
|
+
import { XEmbed, XEmbedProps } from "./components/x-embed.js";
|
|
32
|
+
import { TikTokOptions } from "./core/plans/tiktok.js";
|
|
33
|
+
import { YouTubeEmbed, YouTubeEmbedProps } from "./components/youtube-embed.js";
|
|
34
|
+
import { TwitchOptions } from "./core/plans/twitch.js";
|
|
35
|
+
import { SoundCloudEmbed, SoundCloudEmbedProps } from "./components/soundcloud-embed.js";
|
|
36
|
+
import { VimeoOptions } from "./core/plans/vimeo.js";
|
|
37
|
+
import { AppleMusicEmbed, AppleMusicEmbedProps, ApplePodcastsEmbed, ApplePodcastsEmbedProps } from "./components/apple-embed.js";
|
|
38
|
+
import { XOptions } from "./core/plans/x.js";
|
|
39
|
+
import { KickEmbed, KickEmbedProps } from "./components/kick-embed.js";
|
|
40
|
+
import { YouTubeOptions } from "./core/plans/youtube.js";
|
|
41
|
+
import { GiphyEmbed, GiphyEmbedProps } from "./components/giphy-embed.js";
|
|
42
|
+
import { TenorEmbed, TenorEmbedProps } from "./components/tenor-embed.js";
|
|
43
|
+
import { StreamableEmbed, StreamableEmbedProps } from "./components/streamable-embed.js";
|
|
44
|
+
import { SpotifyOptions } from "./core/plans/spotify.js";
|
|
45
|
+
import { RumbleEmbed, RumbleEmbedProps } from "./components/rumble-embed.js";
|
|
46
|
+
import { TruthSocialEmbed, TruthSocialEmbedProps } from "./components/truthsocial-embed.js";
|
|
47
|
+
import { ImgurEmbed, ImgurEmbedProps } from "./components/imgur-embed.js";
|
|
48
|
+
import { StravaEmbed, StravaEmbedProps } from "./components/strava-embed.js";
|
|
49
|
+
import { FlickrEmbed, FlickrEmbedProps } from "./components/flickr-embed.js";
|
|
50
|
+
import { GenericIframeEmbed, GenericIframeEmbedProps } from "./components/generic-iframe-embed.js";
|
|
51
|
+
import { BlueskyEmbed, BlueskyEmbedProps } from "./components/bluesky-embed.js";
|
|
52
|
+
import { TumblrEmbed, TumblrEmbedProps } from "./components/tumblr-embed.js";
|
|
53
|
+
export { AppleMusicEmbed, type AppleMusicEmbedProps, ApplePodcastsEmbed, type ApplePodcastsEmbedProps, BlueskyEmbed, type BlueskyEmbedProps, type BlueskyOptions, DailymotionEmbed, type DailymotionEmbedProps, type DailymotionOptions, type EmbedSource, FacebookEmbed, type FacebookEmbedProps, type FacebookOptions, FlickrEmbed, type FlickrEmbedProps, type FlickrOptions, type FrameProps, GenericIframeEmbed, type GenericIframeEmbedProps, GiphyEmbed, type GiphyEmbedProps, ImgurEmbed, type ImgurEmbedProps, type ImgurOptions, InstagramEmbed, type InstagramEmbedProps, type InstagramOptions, KickEmbed, type KickEmbedProps, type KickOptions, LinkedInEmbed, type LinkedInEmbedProps, type LinkedInOptions, PinterestEmbed, type PinterestEmbedProps, type PinterestOptions, RedditEmbed, type RedditEmbedProps, type RedditOptions, RumbleEmbed, type RumbleEmbedProps, type SharedProps, SnapchatEmbed, type SnapchatEmbedProps, SocialEmbed, type SocialEmbedProps, type SocialEmbedSource, SoundCloudEmbed, type SoundCloudEmbedProps, type SoundCloudOptions, SpotifyEmbed, type SpotifyEmbedProps, type SpotifyOptions, StravaEmbed, type StravaEmbedProps, type StravaOptions, StreamableEmbed, type StreamableEmbedProps, type StreamableOptions, TelegramEmbed, type TelegramEmbedProps, type TelegramOptions, TenorEmbed, type TenorEmbedProps, ThreadsEmbed, type ThreadsEmbedProps, type ThreadsOptions, TikTokEmbed, type TikTokEmbedProps, type TikTokOptions, TruthSocialEmbed, type TruthSocialEmbedProps, TumblrEmbed, type TumblrEmbedProps, TwitchEmbed, type TwitchEmbedProps, type TwitchOptions, VimeoEmbed, type VimeoEmbedProps, type VimeoOptions, XEmbed, type XEmbedProps, type XOptions, YouTubeEmbed, type YouTubeEmbedProps, type YouTubeOptions };
|