@nuskin/marketing-components 1.51.0-video-player.1 → 1.51.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.mts +35 -98
- package/dist/index.d.ts +35 -98
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -2
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React$1, { ReactElement, ComponentProps, ReactNode } from 'react';
|
|
2
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
3
|
|
|
4
|
-
interface CsTextProps$
|
|
4
|
+
interface CsTextProps$2 {
|
|
5
5
|
readonly full_width?: boolean;
|
|
6
6
|
readonly container_background_color?: unknown;
|
|
7
7
|
readonly alignment?: 'left' | 'center' | 'right';
|
|
@@ -11,7 +11,7 @@ interface CsTextProps$1 {
|
|
|
11
11
|
text_editor?: Record<string, unknown>;
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
|
-
declare const CsText: ({ full_width, container_background_color, alignment, text_editor, font_color, $ }: CsTextProps$
|
|
14
|
+
declare const CsText: ({ full_width, container_background_color, alignment, text_editor, font_color, $ }: CsTextProps$2) => ReactElement | null;
|
|
15
15
|
|
|
16
16
|
type NsImageProps = {
|
|
17
17
|
alt: string;
|
|
@@ -201,11 +201,11 @@ declare const PLACEHOLDER_VALUES: {
|
|
|
201
201
|
readonly body: "Enter Body Text";
|
|
202
202
|
};
|
|
203
203
|
|
|
204
|
-
type PaddingScale
|
|
204
|
+
type PaddingScale = 'none' | 'small' | 'medium' | 'large';
|
|
205
205
|
type DividerStyle = 'solid' | 'dashed' | 'dotted' | 'none';
|
|
206
206
|
type DividerThickness = 'thin' | 'medium' | 'thick';
|
|
207
207
|
interface SpacingDividerProps {
|
|
208
|
-
vertical_padding?: PaddingScale
|
|
208
|
+
vertical_padding?: PaddingScale;
|
|
209
209
|
divider_style?: DividerStyle;
|
|
210
210
|
divider_thickness?: DividerThickness;
|
|
211
211
|
divider_color?: string;
|
|
@@ -352,8 +352,8 @@ interface HeroBannerProps {
|
|
|
352
352
|
|
|
353
353
|
declare const HeroBanner: React$1.FC<HeroBannerProps>;
|
|
354
354
|
|
|
355
|
-
type CsTextProps = ComponentProps<typeof CsText>;
|
|
356
|
-
interface RichTextProps extends Omit<CsTextProps, 'text_editor' | 'font_color'> {
|
|
355
|
+
type CsTextProps$1 = ComponentProps<typeof CsText>;
|
|
356
|
+
interface RichTextProps extends Omit<CsTextProps$1, 'text_editor' | 'font_color'> {
|
|
357
357
|
readonly text_editor: string;
|
|
358
358
|
readonly font_color?: 'Light' | 'Dark';
|
|
359
359
|
readonly container_alignment?: 'left' | 'center' | 'right';
|
|
@@ -447,6 +447,34 @@ declare function BynderMedia({ bynder_media, $ }: Readonly<BynderMediaProps>): R
|
|
|
447
447
|
declare function getMediaUrl(selected: BynderImageDataType['selected'], isPublic: boolean, previewUrls: BynderImageDataType['previewUrls']): string;
|
|
448
448
|
declare function extractBynderMedia(mediaJson?: string): BynderMediaExtracted | null;
|
|
449
449
|
|
|
450
|
+
type CsTextProps = ComponentProps<typeof CsText>;
|
|
451
|
+
interface TableRichTextProps extends Omit<CsTextProps, 'text_editor' | 'font_color'> {
|
|
452
|
+
readonly text_editor: string;
|
|
453
|
+
readonly font_color?: 'Light' | 'Dark';
|
|
454
|
+
readonly container_alignment?: 'left' | 'center' | 'right';
|
|
455
|
+
readonly container_vertical_alignment?: 'top' | 'center' | 'bottom';
|
|
456
|
+
readonly container_width?: 100 | 75 | 50 | 25;
|
|
457
|
+
readonly container_background_color?: string;
|
|
458
|
+
}
|
|
459
|
+
/**
|
|
460
|
+
* RichText Component
|
|
461
|
+
*
|
|
462
|
+
* Wrapper component that sanitizes Rich Text Editor content before passing to CsText.
|
|
463
|
+
* Uses DOMPurify to remove dangerous markup (scripts, styles, event handlers, etc.)
|
|
464
|
+
* while preserving allowed formatting tags and attributes.
|
|
465
|
+
*
|
|
466
|
+
* SECURITY FEATURES:
|
|
467
|
+
* - Removes script tags and event handlers
|
|
468
|
+
* - Strips dangerous attributes and tags
|
|
469
|
+
* - Allows only specified tags: p, div, span, a, br, strong, em, i, u, h1, h2, h3, ul, ol, li
|
|
470
|
+
* - Allows only specified attributes: href, target, rel, title, class, style, data-cslp
|
|
471
|
+
* - Sanitization is applied before rendering in CsText
|
|
472
|
+
*
|
|
473
|
+
* @param props - CsText component props with sanitizable text_editor content
|
|
474
|
+
* @returns Rendered component with sanitized content
|
|
475
|
+
*/
|
|
476
|
+
declare const TableRichText: ({ text_editor, font_color, container_alignment, container_vertical_alignment, container_width, container_background_color, ...restProps }: TableRichTextProps) => ReactElement | null;
|
|
477
|
+
|
|
450
478
|
type FaqSectionWidth = 25 | 50 | 75 | 100;
|
|
451
479
|
interface FaqItemEditTags {
|
|
452
480
|
question?: Record<string, unknown>;
|
|
@@ -487,95 +515,4 @@ interface FaqProps {
|
|
|
487
515
|
|
|
488
516
|
declare const Faq: React$1.FC<FaqProps>;
|
|
489
517
|
|
|
490
|
-
type
|
|
491
|
-
type PaddingScale = 'none' | 'small' | 'medium' | 'large';
|
|
492
|
-
type Alignment = 'left' | 'center' | 'right';
|
|
493
|
-
/** Playback options for the video player. */
|
|
494
|
-
interface PlaybackOptions {
|
|
495
|
-
autoplay?: boolean;
|
|
496
|
-
/** When false, controls are hidden. Defaults to visible. */
|
|
497
|
-
controls?: boolean;
|
|
498
|
-
loop?: boolean;
|
|
499
|
-
}
|
|
500
|
-
/** Normalized, render-ready description of a video. */
|
|
501
|
-
interface VideoDescriptor extends PlaybackOptions {
|
|
502
|
-
/** 'youtube' | 'vimeo' render as a provider iframe; 'embed' renders a generic sandboxed iframe. */
|
|
503
|
-
kind: VideoKind;
|
|
504
|
-
/** Embed/iframe URL (providers & generic embeds) or direct media URL (file). */
|
|
505
|
-
src: string;
|
|
506
|
-
/** Optional human-readable title used for the iframe `title`. */
|
|
507
|
-
title?: string;
|
|
508
|
-
}
|
|
509
|
-
/** Raw values as supplied by the VideoPlayer component props. */
|
|
510
|
-
interface VideoPlayerProps {
|
|
511
|
-
/** Video source type: 'youtube', 'vimeo', or 'embed' (generic iframe). */
|
|
512
|
-
videoSource?: 'youtube' | 'vimeo' | 'embed' | string;
|
|
513
|
-
/** Provider video URL or bare ID, a generic embed URL, or a direct file URL. */
|
|
514
|
-
url?: string;
|
|
515
|
-
autoplay?: boolean;
|
|
516
|
-
controls?: boolean;
|
|
517
|
-
loop?: boolean;
|
|
518
|
-
/** Optional accessible title for the iframe. */
|
|
519
|
-
title?: string;
|
|
520
|
-
/** Horizontal alignment of the video within its container. */
|
|
521
|
-
alignment?: Alignment;
|
|
522
|
-
/** Vertical padding above and below the video. */
|
|
523
|
-
vertical_padding?: PaddingScale;
|
|
524
|
-
/** Horizontal padding to the left and right of the video. */
|
|
525
|
-
horizontal_padding?: PaddingScale;
|
|
526
|
-
/** Width of the video as a percentage of its container (0–100). */
|
|
527
|
-
width_percent?: number | string;
|
|
528
|
-
}
|
|
529
|
-
|
|
530
|
-
/**
|
|
531
|
-
* Renders a sandboxed provider/embed iframe (YouTube, Vimeo, generic) or an
|
|
532
|
-
* HTML5 `<video>` for direct file URLs, given a normalized `VideoDescriptor`.
|
|
533
|
-
* This internal variant accepts a pre-built descriptor — useful when you already
|
|
534
|
-
* have one (e.g. from `buildVideoDescriptor`).
|
|
535
|
-
*/
|
|
536
|
-
declare function VideoPlayerFromDescriptor({ video }: {
|
|
537
|
-
readonly video: VideoDescriptor | null;
|
|
538
|
-
}): React$1.ReactElement;
|
|
539
|
-
/**
|
|
540
|
-
* Presentational video player component.
|
|
541
|
-
*
|
|
542
|
-
* Supports YouTube, Vimeo, generic embed iframes, and direct video file URLs.
|
|
543
|
-
* Pass `videoSource` and `url` to render a video; if either is missing a
|
|
544
|
-
* placeholder is shown instead.
|
|
545
|
-
*
|
|
546
|
-
* @example
|
|
547
|
-
* // YouTube
|
|
548
|
-
* <VideoPlayer videoSource="youtube" url="https://www.youtube.com/watch?v=I0_951_MPE0" />
|
|
549
|
-
*
|
|
550
|
-
* @example
|
|
551
|
-
* // Vimeo
|
|
552
|
-
* <VideoPlayer videoSource="vimeo" url="https://vimeo.com/22439234" />
|
|
553
|
-
*
|
|
554
|
-
* @example
|
|
555
|
-
* // Direct file
|
|
556
|
-
* <VideoPlayer videoSource="url" url="https://example.com/video.mp4" controls loop />
|
|
557
|
-
*/
|
|
558
|
-
declare const VideoPlayer: React$1.FC<VideoPlayerProps>;
|
|
559
|
-
|
|
560
|
-
/**
|
|
561
|
-
* Only permit http/https URLs to prevent `javascript:` injection.
|
|
562
|
-
*/
|
|
563
|
-
declare function safeVideoSrc(url: unknown): string;
|
|
564
|
-
/**
|
|
565
|
-
* Extract the bare video ID from either a raw id or a full share/watch URL.
|
|
566
|
-
* The author may enter a YouTube/Vimeo URL or just the ID.
|
|
567
|
-
*/
|
|
568
|
-
declare function extractVideoId(source: string, raw: unknown): string;
|
|
569
|
-
/** Build a provider embed URL (YouTube/Vimeo), encoding playback options as query params. */
|
|
570
|
-
declare function buildEmbedUrl(source: string, raw: unknown, opts?: PlaybackOptions): string;
|
|
571
|
-
/**
|
|
572
|
-
* Build a render-ready VideoDescriptor from the VideoPlayer props.
|
|
573
|
-
* Returns null until enough has been entered to render something.
|
|
574
|
-
*
|
|
575
|
-
* Providers:
|
|
576
|
-
* - youtube / vimeo → provider embed iframe (options encoded in the URL).
|
|
577
|
-
* - embed → generic iframe using the entered URL as-is.
|
|
578
|
-
*/
|
|
579
|
-
declare function buildVideoDescriptor(videoSource: string | undefined, url: string | undefined, opts?: PlaybackOptions): VideoDescriptor | null;
|
|
580
|
-
|
|
581
|
-
export { type BannerAlignment, type BannerData, type BannerTextProps, Button, type Button$, type ButtonAlignment, type ButtonBlockProp, type ButtonProps, type ButtonSize, type ButtonType, type ButtonVariant, Buttons, type ButtonsBlock, type ButtonsBlock$, type ButtonsEntry, type BynderImageDataType, BynderMedia, type BynderMediaExtracted, type BynderMediaProps, type BynderMediaType, type CSEditTags$1 as CSEditTags, Carousel, type CarouselPreset, type CarouselProps, type CarouselRenderSlide, type ColorTheme, _default as ColumnControl, type ColumnControlProps, type ContentAlignment, ContentCard, type ContentCardProps, CsImage, CsText as CsTextComponent, DEFAULT_BANNER_CONFIG, DEFAULT_CAROUSEL_CONFIG, DEFAULT_ROTATION_INTERVAL, Faq, type FaqEditTags, type FaqItemData, type FaqItemEditTags, type FaqProps, type FaqSectionWidth, type GradientDepth$1 as GradientDepth, type GradientDirection, HeroBanner, type HeroBanner$, type HeroBannerMediaType, type HeroBannerProps, type IconPosition, type LinkTarget, MarketingBannerComponent as MarketingBanner, type MarketingBannerData, type MarketingBannerProps, type MediaType, PLACEHOLDER_VALUES, type PlaybackOptions, RichText as RichTextComponent, SpacingDivider, type SpacingDividerProps, type TextAlignment, type TextColor, type UseCarouselReturn, type VerticalAlignment, type VideoDescriptor, type VideoKind, VideoPlayer, VideoPlayerFromDescriptor, type VideoPlayerProps, buildEmbedUrl, buildVideoDescriptor, extractBynderMedia, extractVideoId, getMediaUrl, safeVideoSrc };
|
|
518
|
+
export { type BannerAlignment, type BannerData, type BannerTextProps, Button, type Button$, type ButtonAlignment, type ButtonBlockProp, type ButtonProps, type ButtonSize, type ButtonType, type ButtonVariant, Buttons, type ButtonsBlock, type ButtonsBlock$, type ButtonsEntry, type BynderImageDataType, BynderMedia, type BynderMediaExtracted, type BynderMediaProps, type BynderMediaType, type CSEditTags$1 as CSEditTags, Carousel, type CarouselPreset, type CarouselProps, type CarouselRenderSlide, type ColorTheme, _default as ColumnControl, type ColumnControlProps, type ContentAlignment, ContentCard, type ContentCardProps, CsImage, CsText as CsTextComponent, DEFAULT_BANNER_CONFIG, DEFAULT_CAROUSEL_CONFIG, DEFAULT_ROTATION_INTERVAL, Faq, type FaqEditTags, type FaqItemData, type FaqItemEditTags, type FaqProps, type FaqSectionWidth, type GradientDepth$1 as GradientDepth, type GradientDirection, HeroBanner, type HeroBanner$, type HeroBannerMediaType, type HeroBannerProps, type IconPosition, type LinkTarget, MarketingBannerComponent as MarketingBanner, type MarketingBannerData, type MarketingBannerProps, type MediaType, PLACEHOLDER_VALUES, RichText as RichTextComponent, SpacingDivider, type SpacingDividerProps, TableRichText, type TextAlignment, type TextColor, type UseCarouselReturn, type VerticalAlignment, extractBynderMedia, getMediaUrl };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React$1, { ReactElement, ComponentProps, ReactNode } from 'react';
|
|
2
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
3
|
|
|
4
|
-
interface CsTextProps$
|
|
4
|
+
interface CsTextProps$2 {
|
|
5
5
|
readonly full_width?: boolean;
|
|
6
6
|
readonly container_background_color?: unknown;
|
|
7
7
|
readonly alignment?: 'left' | 'center' | 'right';
|
|
@@ -11,7 +11,7 @@ interface CsTextProps$1 {
|
|
|
11
11
|
text_editor?: Record<string, unknown>;
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
|
-
declare const CsText: ({ full_width, container_background_color, alignment, text_editor, font_color, $ }: CsTextProps$
|
|
14
|
+
declare const CsText: ({ full_width, container_background_color, alignment, text_editor, font_color, $ }: CsTextProps$2) => ReactElement | null;
|
|
15
15
|
|
|
16
16
|
type NsImageProps = {
|
|
17
17
|
alt: string;
|
|
@@ -201,11 +201,11 @@ declare const PLACEHOLDER_VALUES: {
|
|
|
201
201
|
readonly body: "Enter Body Text";
|
|
202
202
|
};
|
|
203
203
|
|
|
204
|
-
type PaddingScale
|
|
204
|
+
type PaddingScale = 'none' | 'small' | 'medium' | 'large';
|
|
205
205
|
type DividerStyle = 'solid' | 'dashed' | 'dotted' | 'none';
|
|
206
206
|
type DividerThickness = 'thin' | 'medium' | 'thick';
|
|
207
207
|
interface SpacingDividerProps {
|
|
208
|
-
vertical_padding?: PaddingScale
|
|
208
|
+
vertical_padding?: PaddingScale;
|
|
209
209
|
divider_style?: DividerStyle;
|
|
210
210
|
divider_thickness?: DividerThickness;
|
|
211
211
|
divider_color?: string;
|
|
@@ -352,8 +352,8 @@ interface HeroBannerProps {
|
|
|
352
352
|
|
|
353
353
|
declare const HeroBanner: React$1.FC<HeroBannerProps>;
|
|
354
354
|
|
|
355
|
-
type CsTextProps = ComponentProps<typeof CsText>;
|
|
356
|
-
interface RichTextProps extends Omit<CsTextProps, 'text_editor' | 'font_color'> {
|
|
355
|
+
type CsTextProps$1 = ComponentProps<typeof CsText>;
|
|
356
|
+
interface RichTextProps extends Omit<CsTextProps$1, 'text_editor' | 'font_color'> {
|
|
357
357
|
readonly text_editor: string;
|
|
358
358
|
readonly font_color?: 'Light' | 'Dark';
|
|
359
359
|
readonly container_alignment?: 'left' | 'center' | 'right';
|
|
@@ -447,6 +447,34 @@ declare function BynderMedia({ bynder_media, $ }: Readonly<BynderMediaProps>): R
|
|
|
447
447
|
declare function getMediaUrl(selected: BynderImageDataType['selected'], isPublic: boolean, previewUrls: BynderImageDataType['previewUrls']): string;
|
|
448
448
|
declare function extractBynderMedia(mediaJson?: string): BynderMediaExtracted | null;
|
|
449
449
|
|
|
450
|
+
type CsTextProps = ComponentProps<typeof CsText>;
|
|
451
|
+
interface TableRichTextProps extends Omit<CsTextProps, 'text_editor' | 'font_color'> {
|
|
452
|
+
readonly text_editor: string;
|
|
453
|
+
readonly font_color?: 'Light' | 'Dark';
|
|
454
|
+
readonly container_alignment?: 'left' | 'center' | 'right';
|
|
455
|
+
readonly container_vertical_alignment?: 'top' | 'center' | 'bottom';
|
|
456
|
+
readonly container_width?: 100 | 75 | 50 | 25;
|
|
457
|
+
readonly container_background_color?: string;
|
|
458
|
+
}
|
|
459
|
+
/**
|
|
460
|
+
* RichText Component
|
|
461
|
+
*
|
|
462
|
+
* Wrapper component that sanitizes Rich Text Editor content before passing to CsText.
|
|
463
|
+
* Uses DOMPurify to remove dangerous markup (scripts, styles, event handlers, etc.)
|
|
464
|
+
* while preserving allowed formatting tags and attributes.
|
|
465
|
+
*
|
|
466
|
+
* SECURITY FEATURES:
|
|
467
|
+
* - Removes script tags and event handlers
|
|
468
|
+
* - Strips dangerous attributes and tags
|
|
469
|
+
* - Allows only specified tags: p, div, span, a, br, strong, em, i, u, h1, h2, h3, ul, ol, li
|
|
470
|
+
* - Allows only specified attributes: href, target, rel, title, class, style, data-cslp
|
|
471
|
+
* - Sanitization is applied before rendering in CsText
|
|
472
|
+
*
|
|
473
|
+
* @param props - CsText component props with sanitizable text_editor content
|
|
474
|
+
* @returns Rendered component with sanitized content
|
|
475
|
+
*/
|
|
476
|
+
declare const TableRichText: ({ text_editor, font_color, container_alignment, container_vertical_alignment, container_width, container_background_color, ...restProps }: TableRichTextProps) => ReactElement | null;
|
|
477
|
+
|
|
450
478
|
type FaqSectionWidth = 25 | 50 | 75 | 100;
|
|
451
479
|
interface FaqItemEditTags {
|
|
452
480
|
question?: Record<string, unknown>;
|
|
@@ -487,95 +515,4 @@ interface FaqProps {
|
|
|
487
515
|
|
|
488
516
|
declare const Faq: React$1.FC<FaqProps>;
|
|
489
517
|
|
|
490
|
-
type
|
|
491
|
-
type PaddingScale = 'none' | 'small' | 'medium' | 'large';
|
|
492
|
-
type Alignment = 'left' | 'center' | 'right';
|
|
493
|
-
/** Playback options for the video player. */
|
|
494
|
-
interface PlaybackOptions {
|
|
495
|
-
autoplay?: boolean;
|
|
496
|
-
/** When false, controls are hidden. Defaults to visible. */
|
|
497
|
-
controls?: boolean;
|
|
498
|
-
loop?: boolean;
|
|
499
|
-
}
|
|
500
|
-
/** Normalized, render-ready description of a video. */
|
|
501
|
-
interface VideoDescriptor extends PlaybackOptions {
|
|
502
|
-
/** 'youtube' | 'vimeo' render as a provider iframe; 'embed' renders a generic sandboxed iframe. */
|
|
503
|
-
kind: VideoKind;
|
|
504
|
-
/** Embed/iframe URL (providers & generic embeds) or direct media URL (file). */
|
|
505
|
-
src: string;
|
|
506
|
-
/** Optional human-readable title used for the iframe `title`. */
|
|
507
|
-
title?: string;
|
|
508
|
-
}
|
|
509
|
-
/** Raw values as supplied by the VideoPlayer component props. */
|
|
510
|
-
interface VideoPlayerProps {
|
|
511
|
-
/** Video source type: 'youtube', 'vimeo', or 'embed' (generic iframe). */
|
|
512
|
-
videoSource?: 'youtube' | 'vimeo' | 'embed' | string;
|
|
513
|
-
/** Provider video URL or bare ID, a generic embed URL, or a direct file URL. */
|
|
514
|
-
url?: string;
|
|
515
|
-
autoplay?: boolean;
|
|
516
|
-
controls?: boolean;
|
|
517
|
-
loop?: boolean;
|
|
518
|
-
/** Optional accessible title for the iframe. */
|
|
519
|
-
title?: string;
|
|
520
|
-
/** Horizontal alignment of the video within its container. */
|
|
521
|
-
alignment?: Alignment;
|
|
522
|
-
/** Vertical padding above and below the video. */
|
|
523
|
-
vertical_padding?: PaddingScale;
|
|
524
|
-
/** Horizontal padding to the left and right of the video. */
|
|
525
|
-
horizontal_padding?: PaddingScale;
|
|
526
|
-
/** Width of the video as a percentage of its container (0–100). */
|
|
527
|
-
width_percent?: number | string;
|
|
528
|
-
}
|
|
529
|
-
|
|
530
|
-
/**
|
|
531
|
-
* Renders a sandboxed provider/embed iframe (YouTube, Vimeo, generic) or an
|
|
532
|
-
* HTML5 `<video>` for direct file URLs, given a normalized `VideoDescriptor`.
|
|
533
|
-
* This internal variant accepts a pre-built descriptor — useful when you already
|
|
534
|
-
* have one (e.g. from `buildVideoDescriptor`).
|
|
535
|
-
*/
|
|
536
|
-
declare function VideoPlayerFromDescriptor({ video }: {
|
|
537
|
-
readonly video: VideoDescriptor | null;
|
|
538
|
-
}): React$1.ReactElement;
|
|
539
|
-
/**
|
|
540
|
-
* Presentational video player component.
|
|
541
|
-
*
|
|
542
|
-
* Supports YouTube, Vimeo, generic embed iframes, and direct video file URLs.
|
|
543
|
-
* Pass `videoSource` and `url` to render a video; if either is missing a
|
|
544
|
-
* placeholder is shown instead.
|
|
545
|
-
*
|
|
546
|
-
* @example
|
|
547
|
-
* // YouTube
|
|
548
|
-
* <VideoPlayer videoSource="youtube" url="https://www.youtube.com/watch?v=I0_951_MPE0" />
|
|
549
|
-
*
|
|
550
|
-
* @example
|
|
551
|
-
* // Vimeo
|
|
552
|
-
* <VideoPlayer videoSource="vimeo" url="https://vimeo.com/22439234" />
|
|
553
|
-
*
|
|
554
|
-
* @example
|
|
555
|
-
* // Direct file
|
|
556
|
-
* <VideoPlayer videoSource="url" url="https://example.com/video.mp4" controls loop />
|
|
557
|
-
*/
|
|
558
|
-
declare const VideoPlayer: React$1.FC<VideoPlayerProps>;
|
|
559
|
-
|
|
560
|
-
/**
|
|
561
|
-
* Only permit http/https URLs to prevent `javascript:` injection.
|
|
562
|
-
*/
|
|
563
|
-
declare function safeVideoSrc(url: unknown): string;
|
|
564
|
-
/**
|
|
565
|
-
* Extract the bare video ID from either a raw id or a full share/watch URL.
|
|
566
|
-
* The author may enter a YouTube/Vimeo URL or just the ID.
|
|
567
|
-
*/
|
|
568
|
-
declare function extractVideoId(source: string, raw: unknown): string;
|
|
569
|
-
/** Build a provider embed URL (YouTube/Vimeo), encoding playback options as query params. */
|
|
570
|
-
declare function buildEmbedUrl(source: string, raw: unknown, opts?: PlaybackOptions): string;
|
|
571
|
-
/**
|
|
572
|
-
* Build a render-ready VideoDescriptor from the VideoPlayer props.
|
|
573
|
-
* Returns null until enough has been entered to render something.
|
|
574
|
-
*
|
|
575
|
-
* Providers:
|
|
576
|
-
* - youtube / vimeo → provider embed iframe (options encoded in the URL).
|
|
577
|
-
* - embed → generic iframe using the entered URL as-is.
|
|
578
|
-
*/
|
|
579
|
-
declare function buildVideoDescriptor(videoSource: string | undefined, url: string | undefined, opts?: PlaybackOptions): VideoDescriptor | null;
|
|
580
|
-
|
|
581
|
-
export { type BannerAlignment, type BannerData, type BannerTextProps, Button, type Button$, type ButtonAlignment, type ButtonBlockProp, type ButtonProps, type ButtonSize, type ButtonType, type ButtonVariant, Buttons, type ButtonsBlock, type ButtonsBlock$, type ButtonsEntry, type BynderImageDataType, BynderMedia, type BynderMediaExtracted, type BynderMediaProps, type BynderMediaType, type CSEditTags$1 as CSEditTags, Carousel, type CarouselPreset, type CarouselProps, type CarouselRenderSlide, type ColorTheme, _default as ColumnControl, type ColumnControlProps, type ContentAlignment, ContentCard, type ContentCardProps, CsImage, CsText as CsTextComponent, DEFAULT_BANNER_CONFIG, DEFAULT_CAROUSEL_CONFIG, DEFAULT_ROTATION_INTERVAL, Faq, type FaqEditTags, type FaqItemData, type FaqItemEditTags, type FaqProps, type FaqSectionWidth, type GradientDepth$1 as GradientDepth, type GradientDirection, HeroBanner, type HeroBanner$, type HeroBannerMediaType, type HeroBannerProps, type IconPosition, type LinkTarget, MarketingBannerComponent as MarketingBanner, type MarketingBannerData, type MarketingBannerProps, type MediaType, PLACEHOLDER_VALUES, type PlaybackOptions, RichText as RichTextComponent, SpacingDivider, type SpacingDividerProps, type TextAlignment, type TextColor, type UseCarouselReturn, type VerticalAlignment, type VideoDescriptor, type VideoKind, VideoPlayer, VideoPlayerFromDescriptor, type VideoPlayerProps, buildEmbedUrl, buildVideoDescriptor, extractBynderMedia, extractVideoId, getMediaUrl, safeVideoSrc };
|
|
518
|
+
export { type BannerAlignment, type BannerData, type BannerTextProps, Button, type Button$, type ButtonAlignment, type ButtonBlockProp, type ButtonProps, type ButtonSize, type ButtonType, type ButtonVariant, Buttons, type ButtonsBlock, type ButtonsBlock$, type ButtonsEntry, type BynderImageDataType, BynderMedia, type BynderMediaExtracted, type BynderMediaProps, type BynderMediaType, type CSEditTags$1 as CSEditTags, Carousel, type CarouselPreset, type CarouselProps, type CarouselRenderSlide, type ColorTheme, _default as ColumnControl, type ColumnControlProps, type ContentAlignment, ContentCard, type ContentCardProps, CsImage, CsText as CsTextComponent, DEFAULT_BANNER_CONFIG, DEFAULT_CAROUSEL_CONFIG, DEFAULT_ROTATION_INTERVAL, Faq, type FaqEditTags, type FaqItemData, type FaqItemEditTags, type FaqProps, type FaqSectionWidth, type GradientDepth$1 as GradientDepth, type GradientDirection, HeroBanner, type HeroBanner$, type HeroBannerMediaType, type HeroBannerProps, type IconPosition, type LinkTarget, MarketingBannerComponent as MarketingBanner, type MarketingBannerData, type MarketingBannerProps, type MediaType, PLACEHOLDER_VALUES, RichText as RichTextComponent, SpacingDivider, type SpacingDividerProps, TableRichText, type TextAlignment, type TextColor, type UseCarouselReturn, type VerticalAlignment, extractBynderMedia, getMediaUrl };
|