@nuskin/marketing-components 1.52.0 → 1.53.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 +3 -31
- package/dist/index.d.ts +3 -31
- 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 +1 -1
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$1 {
|
|
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$2 {
|
|
|
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$1) => ReactElement | null;
|
|
15
15
|
|
|
16
16
|
type NsImageProps = {
|
|
17
17
|
alt: string;
|
|
@@ -352,34 +352,6 @@ interface HeroBannerProps {
|
|
|
352
352
|
|
|
353
353
|
declare const HeroBanner: React$1.FC<HeroBannerProps>;
|
|
354
354
|
|
|
355
|
-
type CsTextProps$1 = ComponentProps<typeof CsText>;
|
|
356
|
-
interface RichTextProps extends Omit<CsTextProps$1, 'text_editor' | 'font_color'> {
|
|
357
|
-
readonly text_editor: string;
|
|
358
|
-
readonly font_color?: 'Light' | 'Dark';
|
|
359
|
-
readonly container_alignment?: 'left' | 'center' | 'right';
|
|
360
|
-
readonly container_vertical_alignment?: 'top' | 'center' | 'bottom';
|
|
361
|
-
readonly container_width?: 100 | 75 | 50 | 25;
|
|
362
|
-
readonly container_background_color?: string;
|
|
363
|
-
}
|
|
364
|
-
/**
|
|
365
|
-
* RichText Component
|
|
366
|
-
*
|
|
367
|
-
* Wrapper component that sanitizes Rich Text Editor content before passing to CsText.
|
|
368
|
-
* Uses DOMPurify to remove dangerous markup (scripts, styles, event handlers, etc.)
|
|
369
|
-
* while preserving allowed formatting tags and attributes.
|
|
370
|
-
*
|
|
371
|
-
* SECURITY FEATURES:
|
|
372
|
-
* - Removes script tags and event handlers
|
|
373
|
-
* - Strips dangerous attributes and tags
|
|
374
|
-
* - Allows only specified tags: p, div, span, a, br, strong, em, i, u, h1, h2, h3, ul, ol, li
|
|
375
|
-
* - Allows only specified attributes: href, target, rel, title, class, style, data-cslp
|
|
376
|
-
* - Sanitization is applied before rendering in CsText
|
|
377
|
-
*
|
|
378
|
-
* @param props - CsText component props with sanitizable text_editor content
|
|
379
|
-
* @returns Rendered component with sanitized content
|
|
380
|
-
*/
|
|
381
|
-
declare const RichText: ({ text_editor, font_color, container_alignment, container_vertical_alignment, container_width, container_background_color, ...restProps }: RichTextProps) => ReactElement | null;
|
|
382
|
-
|
|
383
355
|
type BynderMediaType = 'image' | 'gif' | 'video';
|
|
384
356
|
type CSEditTags = Record<string, unknown>;
|
|
385
357
|
interface BynderMediaProps {
|
|
@@ -606,4 +578,4 @@ declare function buildEmbedUrl(source: string, raw: unknown, opts?: PlaybackOpti
|
|
|
606
578
|
*/
|
|
607
579
|
declare function buildVideoDescriptor(videoSource: string | undefined, url: string | undefined, opts?: PlaybackOptions): VideoDescriptor | null;
|
|
608
580
|
|
|
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,
|
|
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, 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$1 {
|
|
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$2 {
|
|
|
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$1) => ReactElement | null;
|
|
15
15
|
|
|
16
16
|
type NsImageProps = {
|
|
17
17
|
alt: string;
|
|
@@ -352,34 +352,6 @@ interface HeroBannerProps {
|
|
|
352
352
|
|
|
353
353
|
declare const HeroBanner: React$1.FC<HeroBannerProps>;
|
|
354
354
|
|
|
355
|
-
type CsTextProps$1 = ComponentProps<typeof CsText>;
|
|
356
|
-
interface RichTextProps extends Omit<CsTextProps$1, 'text_editor' | 'font_color'> {
|
|
357
|
-
readonly text_editor: string;
|
|
358
|
-
readonly font_color?: 'Light' | 'Dark';
|
|
359
|
-
readonly container_alignment?: 'left' | 'center' | 'right';
|
|
360
|
-
readonly container_vertical_alignment?: 'top' | 'center' | 'bottom';
|
|
361
|
-
readonly container_width?: 100 | 75 | 50 | 25;
|
|
362
|
-
readonly container_background_color?: string;
|
|
363
|
-
}
|
|
364
|
-
/**
|
|
365
|
-
* RichText Component
|
|
366
|
-
*
|
|
367
|
-
* Wrapper component that sanitizes Rich Text Editor content before passing to CsText.
|
|
368
|
-
* Uses DOMPurify to remove dangerous markup (scripts, styles, event handlers, etc.)
|
|
369
|
-
* while preserving allowed formatting tags and attributes.
|
|
370
|
-
*
|
|
371
|
-
* SECURITY FEATURES:
|
|
372
|
-
* - Removes script tags and event handlers
|
|
373
|
-
* - Strips dangerous attributes and tags
|
|
374
|
-
* - Allows only specified tags: p, div, span, a, br, strong, em, i, u, h1, h2, h3, ul, ol, li
|
|
375
|
-
* - Allows only specified attributes: href, target, rel, title, class, style, data-cslp
|
|
376
|
-
* - Sanitization is applied before rendering in CsText
|
|
377
|
-
*
|
|
378
|
-
* @param props - CsText component props with sanitizable text_editor content
|
|
379
|
-
* @returns Rendered component with sanitized content
|
|
380
|
-
*/
|
|
381
|
-
declare const RichText: ({ text_editor, font_color, container_alignment, container_vertical_alignment, container_width, container_background_color, ...restProps }: RichTextProps) => ReactElement | null;
|
|
382
|
-
|
|
383
355
|
type BynderMediaType = 'image' | 'gif' | 'video';
|
|
384
356
|
type CSEditTags = Record<string, unknown>;
|
|
385
357
|
interface BynderMediaProps {
|
|
@@ -606,4 +578,4 @@ declare function buildEmbedUrl(source: string, raw: unknown, opts?: PlaybackOpti
|
|
|
606
578
|
*/
|
|
607
579
|
declare function buildVideoDescriptor(videoSource: string | undefined, url: string | undefined, opts?: PlaybackOptions): VideoDescriptor | null;
|
|
608
580
|
|
|
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,
|
|
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, 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 };
|