@nuskin/marketing-components 1.51.0-video-player.1 → 1.52.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 +33 -5
- package/dist/index.d.ts +33 -5
- 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;
|
|
@@ -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>;
|
|
@@ -578,4 +606,4 @@ declare function buildEmbedUrl(source: string, raw: unknown, opts?: PlaybackOpti
|
|
|
578
606
|
*/
|
|
579
607
|
declare function buildVideoDescriptor(videoSource: string | undefined, url: string | undefined, opts?: PlaybackOptions): VideoDescriptor | null;
|
|
580
608
|
|
|
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 };
|
|
609
|
+
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, TableRichText, type TextAlignment, type TextColor, type UseCarouselReturn, type VerticalAlignment, type VideoDescriptor, type VideoKind, VideoPlayer, VideoPlayerFromDescriptor, type VideoPlayerProps, buildEmbedUrl, buildVideoDescriptor, extractBynderMedia, extractVideoId, getMediaUrl, safeVideoSrc };
|
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;
|
|
@@ -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>;
|
|
@@ -578,4 +606,4 @@ declare function buildEmbedUrl(source: string, raw: unknown, opts?: PlaybackOpti
|
|
|
578
606
|
*/
|
|
579
607
|
declare function buildVideoDescriptor(videoSource: string | undefined, url: string | undefined, opts?: PlaybackOptions): VideoDescriptor | null;
|
|
580
608
|
|
|
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 };
|
|
609
|
+
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, TableRichText, type TextAlignment, type TextColor, type UseCarouselReturn, type VerticalAlignment, type VideoDescriptor, type VideoKind, VideoPlayer, VideoPlayerFromDescriptor, type VideoPlayerProps, buildEmbedUrl, buildVideoDescriptor, extractBynderMedia, extractVideoId, getMediaUrl, safeVideoSrc };
|