@developer_tribe/react-builder 0.1.31 → 0.1.32

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.
Files changed (41) hide show
  1. package/dist/build-components/Button/ButtonProps.generated.d.ts +2 -1
  2. package/dist/build-components/CarouselButtons/CarouselButtonsProps.generated.d.ts +2 -1
  3. package/dist/build-components/CarouselDots/CarouselDotsProps.generated.d.ts +2 -1
  4. package/dist/build-components/Image/ImageProps.generated.d.ts +2 -1
  5. package/dist/build-components/OnboardButton/OnboardButtonProps.generated.d.ts +8 -4
  6. package/dist/build-components/OnboardButtons/OnboardButtonsProps.generated.d.ts +6 -3
  7. package/dist/build-components/OnboardDot/OnboardDotProps.generated.d.ts +2 -1
  8. package/dist/build-components/OnboardFooter/OnboardFooterProps.generated.d.ts +10 -5
  9. package/dist/build-components/OnboardImage/OnboardImageProps.generated.d.ts +4 -1
  10. package/dist/build-components/OnboardItem/OnboardItemProps.generated.d.ts +4 -2
  11. package/dist/build-components/OnboardSubtitle/OnboardSubtitleProps.generated.d.ts +10 -5
  12. package/dist/build-components/OnboardTitle/OnboardTitleProps.generated.d.ts +10 -5
  13. package/dist/build-components/Text/TextProps.generated.d.ts +10 -5
  14. package/dist/build-components/View/ViewProps.generated.d.ts +6 -3
  15. package/dist/build-components/patterns.generated.d.ts +7 -2
  16. package/dist/index.cjs.js +6 -4
  17. package/dist/index.esm.js +6 -4
  18. package/package.json +2 -1
  19. package/scripts/prebuild/utils/createGeneratedProps.js +64 -5
  20. package/src/assets/samples/getSamples.ts +6 -0
  21. package/src/assets/samples/vpn-onboard-5.json +1025 -0
  22. package/src/assets/samples/vpn-onboard-6.json +709 -0
  23. package/src/build-components/Button/ButtonProps.generated.ts +14 -12
  24. package/src/build-components/CarouselButtons/CarouselButtonsProps.generated.ts +6 -1
  25. package/src/build-components/CarouselDots/CarouselDotsProps.generated.ts +9 -7
  26. package/src/build-components/Image/ImageProps.generated.ts +3 -1
  27. package/src/build-components/OnboardButton/OnboardButtonProps.generated.ts +14 -9
  28. package/src/build-components/OnboardButton/pattern.json +3 -2
  29. package/src/build-components/OnboardButtons/OnboardButtonsProps.generated.ts +10 -3
  30. package/src/build-components/OnboardDot/OnboardDotProps.generated.ts +9 -7
  31. package/src/build-components/OnboardFooter/OnboardFooterProps.generated.ts +33 -22
  32. package/src/build-components/OnboardImage/OnboardImage.tsx +24 -1
  33. package/src/build-components/OnboardImage/OnboardImageProps.generated.ts +5 -1
  34. package/src/build-components/OnboardImage/pattern.json +3 -5
  35. package/src/build-components/OnboardItem/OnboardItemProps.generated.ts +5 -2
  36. package/src/build-components/OnboardSubtitle/OnboardSubtitleProps.generated.ts +33 -22
  37. package/src/build-components/OnboardTitle/OnboardTitleProps.generated.ts +33 -22
  38. package/src/build-components/Text/TextProps.generated.ts +33 -22
  39. package/src/build-components/View/ViewProps.generated.ts +18 -9
  40. package/src/build-components/patterns.generated.ts +7 -2
  41. package/src/utils/novaToJson.ts +5 -0
@@ -2,23 +2,25 @@
2
2
 
3
3
  import type { NodeData } from '../../types/Node';
4
4
 
5
+ export type FontWeightOptionType =
6
+ | 'normal'
7
+ | 'bold'
8
+ | '100'
9
+ | '200'
10
+ | '300'
11
+ | '400'
12
+ | '500'
13
+ | '600'
14
+ | '700'
15
+ | '800'
16
+ | '900';
17
+
5
18
  export interface ButtonPropsGenerated {
6
19
  child: string;
7
20
  attributes: {
8
21
  color?: string;
9
22
  fontSize?: number;
10
- fontWeight?:
11
- | 'normal'
12
- | 'bold'
13
- | '100'
14
- | '200'
15
- | '300'
16
- | '400'
17
- | '500'
18
- | '600'
19
- | '700'
20
- | '800'
21
- | '900';
23
+ fontWeight?: FontWeightOptionType;
22
24
  };
23
25
  }
24
26
 
@@ -2,10 +2,15 @@
2
2
 
3
3
  import type { NodeData } from '../../types/Node';
4
4
 
5
+ export type ButtonTypeOptionType =
6
+ | 'previous_button'
7
+ | 'next_button'
8
+ | 'skip_button';
9
+
5
10
  export interface CarouselButtonsPropsGenerated {
6
11
  child: string;
7
12
  attributes: {
8
- buttonType?: 'previous_button' | 'next_button' | 'skip_button';
13
+ buttonType?: ButtonTypeOptionType;
9
14
  skipNumber?: number;
10
15
  };
11
16
  }
@@ -2,16 +2,18 @@
2
2
 
3
3
  import type { NodeData } from '../../types/Node';
4
4
 
5
+ export type DotTypeOptionType =
6
+ | 'expanding_dot'
7
+ | 'normal_dot'
8
+ | 'scaling_dot'
9
+ | 'sliding_border'
10
+ | 'sliding_dot'
11
+ | 'liquid_like';
12
+
5
13
  export interface CarouselDotsPropsGenerated {
6
14
  child: string;
7
15
  attributes: {
8
- dotType?:
9
- | 'expanding_dot'
10
- | 'normal_dot'
11
- | 'scaling_dot'
12
- | 'sliding_border'
13
- | 'sliding_dot'
14
- | 'liquid_like';
16
+ dotType?: DotTypeOptionType;
15
17
  };
16
18
  }
17
19
 
@@ -2,13 +2,15 @@
2
2
 
3
3
  import type { NodeData } from '../../types/Node';
4
4
 
5
+ export type ResizeModeOptionType = 'cover' | 'contain' | 'stretch' | 'center';
6
+
5
7
  export interface ImagePropsGenerated {
6
8
  child: string;
7
9
  attributes: {
8
10
  src?: string;
9
11
  width?: number;
10
12
  height?: number;
11
- resizeMode?: 'cover' | 'contain' | 'stretch' | 'center';
13
+ resizeMode?: ResizeModeOptionType;
12
14
  borderRadius?: number;
13
15
  };
14
16
  }
@@ -2,10 +2,20 @@
2
2
 
3
3
  import type { NodeData } from '../../types/Node';
4
4
 
5
+ export type TypeOptionType = 'Permission' | 'Navigate';
6
+ export type PermissionOptionType = 'att' | 'notification' | 'rating' | 'GDPR';
7
+ export type AnimationOptionType =
8
+ | 'simple-animation'
9
+ | 'line-animation'
10
+ | 'blur'
11
+ | 'blur-animation'
12
+ | 'blur-line-animation';
13
+
5
14
  export interface EventObjectGenerated {
6
- type?: 'Permission' | 'Navigate';
7
- permission?: 'att' | 'notification' | 'rating' | 'null';
8
- navigate_to?: 'string' | 'null';
15
+ type?: TypeOptionType;
16
+ permission?: PermissionOptionType | null;
17
+ navigate_to?: string;
18
+ targetIndex?: number;
9
19
  }
10
20
 
11
21
  export interface OnboardButtonPropsGenerated {
@@ -13,12 +23,7 @@ export interface OnboardButtonPropsGenerated {
13
23
  attributes: {
14
24
  labelKey?: string;
15
25
  button_text_color?: string;
16
- animation?:
17
- | 'simple-animation'
18
- | 'line-animation'
19
- | 'blur'
20
- | 'blur-animation'
21
- | 'blur-line-animation';
26
+ animation?: AnimationOptionType;
22
27
  animation_color?: string;
23
28
  button_background_color?: string;
24
29
  flex?: number;
@@ -23,8 +23,9 @@
23
23
  "types": {
24
24
  "EventObject": {
25
25
  "type": ["Permission", "Navigate"],
26
- "permission": ["att", "notification", "rating", "null"],
27
- "navigate_to": ["string", "null"]
26
+ "permission": ["att", "notification", "rating", "GDPR", "null"],
27
+ "navigate_to": "string",
28
+ "targetIndex": "number"
28
29
  }
29
30
  }
30
31
  }
@@ -2,15 +2,22 @@
2
2
 
3
3
  import type { NodeData } from '../../types/Node';
4
4
 
5
+ export type ButtonTypeOptionType =
6
+ | 'previous_button'
7
+ | 'next_button'
8
+ | 'skip_button';
9
+ export type ButtonsDirectionOptionType = 'row' | 'column';
10
+ export type ConditionOptionType = 'carousel-index';
11
+
5
12
  export interface OnboardButtonsPropsGenerated {
6
13
  child: string;
7
14
  attributes: {
8
- buttonType?: 'previous_button' | 'next_button' | 'skip_button';
15
+ buttonType?: ButtonTypeOptionType;
9
16
  skipNumber?: number;
10
- buttons_direction?: 'row' | 'column';
17
+ buttons_direction?: ButtonsDirectionOptionType;
11
18
  forIndex?: number;
12
19
  seperatorColor?: string;
13
- condition?: 'carousel-index';
20
+ condition?: ConditionOptionType;
14
21
  conditionVariable?: number;
15
22
  };
16
23
  }
@@ -2,16 +2,18 @@
2
2
 
3
3
  import type { NodeData } from '../../types/Node';
4
4
 
5
+ export type DotTypeOptionType =
6
+ | 'expanding_dot'
7
+ | 'normal_dot'
8
+ | 'scaling_dot'
9
+ | 'sliding_border'
10
+ | 'sliding_dot'
11
+ | 'liquid_like';
12
+
5
13
  export interface OnboardDotPropsGenerated {
6
14
  child: string;
7
15
  attributes: {
8
- dotType?:
9
- | 'expanding_dot'
10
- | 'normal_dot'
11
- | 'scaling_dot'
12
- | 'sliding_border'
13
- | 'sliding_dot'
14
- | 'liquid_like';
16
+ dotType?: DotTypeOptionType;
15
17
  inactive_dot_opacity?: number;
16
18
  expanding_dot_width?: number;
17
19
  dot_style?: string;
@@ -2,34 +2,45 @@
2
2
 
3
3
  import type { NodeData } from '../../types/Node';
4
4
 
5
+ export type FontWeightOptionType =
6
+ | 'normal'
7
+ | 'bold'
8
+ | '100'
9
+ | '200'
10
+ | '300'
11
+ | '400'
12
+ | '500'
13
+ | '600'
14
+ | '700'
15
+ | '800'
16
+ | '900';
17
+ export type TextAlignOptionType = 'left' | 'center' | 'right' | 'justify';
18
+ export type FlexDirectionOptionType = 'row' | 'column';
19
+ export type AlignItemsOptionType =
20
+ | 'flex-start'
21
+ | 'center'
22
+ | 'flex-end'
23
+ | 'stretch'
24
+ | 'baseline';
25
+ export type JustifyContentOptionType =
26
+ | 'flex-start'
27
+ | 'center'
28
+ | 'flex-end'
29
+ | 'space-between'
30
+ | 'space-around'
31
+ | 'space-evenly';
32
+
5
33
  export interface OnboardFooterPropsGenerated {
6
34
  child: string;
7
35
  attributes: {
8
36
  color?: string;
9
37
  fontSize?: number;
10
- fontWeight?:
11
- | 'normal'
12
- | 'bold'
13
- | '100'
14
- | '200'
15
- | '300'
16
- | '400'
17
- | '500'
18
- | '600'
19
- | '700'
20
- | '800'
21
- | '900';
22
- textAlign?: 'left' | 'center' | 'right' | 'justify';
38
+ fontWeight?: FontWeightOptionType;
39
+ textAlign?: TextAlignOptionType;
23
40
  scrollable?: boolean;
24
- flexDirection?: 'row' | 'column';
25
- alignItems?: 'flex-start' | 'center' | 'flex-end' | 'stretch' | 'baseline';
26
- justifyContent?:
27
- | 'flex-start'
28
- | 'center'
29
- | 'flex-end'
30
- | 'space-between'
31
- | 'space-around'
32
- | 'space-evenly';
41
+ flexDirection?: FlexDirectionOptionType;
42
+ alignItems?: AlignItemsOptionType;
43
+ justifyContent?: JustifyContentOptionType;
33
44
  gap?: string;
34
45
  padding?: number;
35
46
  paddingHorizontal?: string;
@@ -1,10 +1,33 @@
1
- import React from 'react';
1
+ import React, { useEffect, useState } from 'react';
2
2
  import type { OnboardImageComponentProps } from './OnboardImageProps.generated';
3
3
  import Image from '../Image/Image';
4
4
  import useNode from '../useNode';
5
+ import Lottie from 'lottie-react';
5
6
 
6
7
  function OnboardImage({ node }: OnboardImageComponentProps) {
7
8
  node = useNode(node);
9
+ const [lottie, setLottie] = useState<string | null>(null);
10
+
11
+ useEffect(() => {
12
+ if (node.attributes?.lottie) {
13
+ fetch(node.attributes?.lottie)
14
+ .then((res) => res.json())
15
+ .then((data) => setLottie(data));
16
+ }
17
+ }, [node.attributes?.lottie]);
18
+
19
+ if (node.attributes?.video_url) {
20
+ return <video autoPlay muted loop src={node.attributes?.video_url} />;
21
+ }
22
+
23
+ if (node.attributes?.lottie) {
24
+ if (lottie) {
25
+ return <Lottie animationData={lottie} />;
26
+ } else {
27
+ return <div>Loading...</div>;
28
+ }
29
+ }
30
+
8
31
  return <Image node={{ ...node, type: 'image' } as any} />;
9
32
  }
10
33
 
@@ -2,14 +2,18 @@
2
2
 
3
3
  import type { NodeData } from '../../types/Node';
4
4
 
5
+ export type ResizeModeOptionType = 'cover' | 'contain' | 'stretch' | 'center';
6
+
5
7
  export interface OnboardImagePropsGenerated {
6
8
  child: string;
7
9
  attributes: {
8
10
  src?: string;
9
11
  width?: number;
10
12
  height?: number;
11
- resizeMode?: 'cover' | 'contain' | 'stretch' | 'center';
13
+ resizeMode?: ResizeModeOptionType;
12
14
  borderRadius?: number;
15
+ video_url?: string;
16
+ lottie?: string;
13
17
  };
14
18
  }
15
19
 
@@ -4,12 +4,10 @@
4
4
  "pattern": {
5
5
  "type": "OnboardImage",
6
6
  "children": "node",
7
+ "extends": "Image",
7
8
  "attributes": {
8
- "src": "string",
9
- "width": "number",
10
- "height": "number",
11
- "resizeMode": ["cover", "contain", "stretch", "center"],
12
- "borderRadius": "number"
9
+ "video_url": "string",
10
+ "lottie": "string"
13
11
  }
14
12
  }
15
13
  }
@@ -2,12 +2,15 @@
2
2
 
3
3
  import type { NodeData } from '../../types/Node';
4
4
 
5
+ export type DisplayOptionType = 'flex' | 'block';
6
+ export type FlexDirectionOptionType = 'row' | 'column';
7
+
5
8
  export interface OnboardItemPropsGenerated {
6
9
  child: string;
7
10
  attributes: {
8
- display?: 'flex' | 'block';
11
+ display?: DisplayOptionType;
9
12
  gap?: string;
10
- flexDirection?: 'row' | 'column';
13
+ flexDirection?: FlexDirectionOptionType;
11
14
  paddingHorizontal?: string;
12
15
  };
13
16
  }
@@ -2,34 +2,45 @@
2
2
 
3
3
  import type { NodeData } from '../../types/Node';
4
4
 
5
+ export type FontWeightOptionType =
6
+ | 'normal'
7
+ | 'bold'
8
+ | '100'
9
+ | '200'
10
+ | '300'
11
+ | '400'
12
+ | '500'
13
+ | '600'
14
+ | '700'
15
+ | '800'
16
+ | '900';
17
+ export type TextAlignOptionType = 'left' | 'center' | 'right' | 'justify';
18
+ export type FlexDirectionOptionType = 'row' | 'column';
19
+ export type AlignItemsOptionType =
20
+ | 'flex-start'
21
+ | 'center'
22
+ | 'flex-end'
23
+ | 'stretch'
24
+ | 'baseline';
25
+ export type JustifyContentOptionType =
26
+ | 'flex-start'
27
+ | 'center'
28
+ | 'flex-end'
29
+ | 'space-between'
30
+ | 'space-around'
31
+ | 'space-evenly';
32
+
5
33
  export interface OnboardSubtitlePropsGenerated {
6
34
  child: string;
7
35
  attributes: {
8
36
  color?: string;
9
37
  fontSize?: number;
10
- fontWeight?:
11
- | 'normal'
12
- | 'bold'
13
- | '100'
14
- | '200'
15
- | '300'
16
- | '400'
17
- | '500'
18
- | '600'
19
- | '700'
20
- | '800'
21
- | '900';
22
- textAlign?: 'left' | 'center' | 'right' | 'justify';
38
+ fontWeight?: FontWeightOptionType;
39
+ textAlign?: TextAlignOptionType;
23
40
  scrollable?: boolean;
24
- flexDirection?: 'row' | 'column';
25
- alignItems?: 'flex-start' | 'center' | 'flex-end' | 'stretch' | 'baseline';
26
- justifyContent?:
27
- | 'flex-start'
28
- | 'center'
29
- | 'flex-end'
30
- | 'space-between'
31
- | 'space-around'
32
- | 'space-evenly';
41
+ flexDirection?: FlexDirectionOptionType;
42
+ alignItems?: AlignItemsOptionType;
43
+ justifyContent?: JustifyContentOptionType;
33
44
  gap?: string;
34
45
  padding?: number;
35
46
  paddingHorizontal?: string;
@@ -2,34 +2,45 @@
2
2
 
3
3
  import type { NodeData } from '../../types/Node';
4
4
 
5
+ export type FontWeightOptionType =
6
+ | 'normal'
7
+ | 'bold'
8
+ | '100'
9
+ | '200'
10
+ | '300'
11
+ | '400'
12
+ | '500'
13
+ | '600'
14
+ | '700'
15
+ | '800'
16
+ | '900';
17
+ export type TextAlignOptionType = 'left' | 'center' | 'right' | 'justify';
18
+ export type FlexDirectionOptionType = 'row' | 'column';
19
+ export type AlignItemsOptionType =
20
+ | 'flex-start'
21
+ | 'center'
22
+ | 'flex-end'
23
+ | 'stretch'
24
+ | 'baseline';
25
+ export type JustifyContentOptionType =
26
+ | 'flex-start'
27
+ | 'center'
28
+ | 'flex-end'
29
+ | 'space-between'
30
+ | 'space-around'
31
+ | 'space-evenly';
32
+
5
33
  export interface OnboardTitlePropsGenerated {
6
34
  child: string;
7
35
  attributes: {
8
36
  color?: string;
9
37
  fontSize?: number;
10
- fontWeight?:
11
- | 'normal'
12
- | 'bold'
13
- | '100'
14
- | '200'
15
- | '300'
16
- | '400'
17
- | '500'
18
- | '600'
19
- | '700'
20
- | '800'
21
- | '900';
22
- textAlign?: 'left' | 'center' | 'right' | 'justify';
38
+ fontWeight?: FontWeightOptionType;
39
+ textAlign?: TextAlignOptionType;
23
40
  scrollable?: boolean;
24
- flexDirection?: 'row' | 'column';
25
- alignItems?: 'flex-start' | 'center' | 'flex-end' | 'stretch' | 'baseline';
26
- justifyContent?:
27
- | 'flex-start'
28
- | 'center'
29
- | 'flex-end'
30
- | 'space-between'
31
- | 'space-around'
32
- | 'space-evenly';
41
+ flexDirection?: FlexDirectionOptionType;
42
+ alignItems?: AlignItemsOptionType;
43
+ justifyContent?: JustifyContentOptionType;
33
44
  gap?: string;
34
45
  padding?: number;
35
46
  paddingHorizontal?: string;
@@ -2,19 +2,41 @@
2
2
 
3
3
  import type { NodeData } from '../../types/Node';
4
4
 
5
+ export type FlexDirectionOptionType = 'row' | 'column';
6
+ export type AlignItemsOptionType =
7
+ | 'flex-start'
8
+ | 'center'
9
+ | 'flex-end'
10
+ | 'stretch'
11
+ | 'baseline';
12
+ export type JustifyContentOptionType =
13
+ | 'flex-start'
14
+ | 'center'
15
+ | 'flex-end'
16
+ | 'space-between'
17
+ | 'space-around'
18
+ | 'space-evenly';
19
+ export type FontWeightOptionType =
20
+ | 'normal'
21
+ | 'bold'
22
+ | '100'
23
+ | '200'
24
+ | '300'
25
+ | '400'
26
+ | '500'
27
+ | '600'
28
+ | '700'
29
+ | '800'
30
+ | '900';
31
+ export type TextAlignOptionType = 'left' | 'center' | 'right' | 'justify';
32
+
5
33
  export interface TextPropsGenerated {
6
34
  child: string;
7
35
  attributes: {
8
36
  scrollable?: boolean;
9
- flexDirection?: 'row' | 'column';
10
- alignItems?: 'flex-start' | 'center' | 'flex-end' | 'stretch' | 'baseline';
11
- justifyContent?:
12
- | 'flex-start'
13
- | 'center'
14
- | 'flex-end'
15
- | 'space-between'
16
- | 'space-around'
17
- | 'space-evenly';
37
+ flexDirection?: FlexDirectionOptionType;
38
+ alignItems?: AlignItemsOptionType;
39
+ justifyContent?: JustifyContentOptionType;
18
40
  gap?: string;
19
41
  padding?: number;
20
42
  paddingHorizontal?: string;
@@ -36,19 +58,8 @@ export interface TextPropsGenerated {
36
58
  height?: number;
37
59
  color?: string;
38
60
  fontSize?: number;
39
- fontWeight?:
40
- | 'normal'
41
- | 'bold'
42
- | '100'
43
- | '200'
44
- | '300'
45
- | '400'
46
- | '500'
47
- | '600'
48
- | '700'
49
- | '800'
50
- | '900';
51
- textAlign?: 'left' | 'center' | 'right' | 'justify';
61
+ fontWeight?: FontWeightOptionType;
62
+ textAlign?: TextAlignOptionType;
52
63
  };
53
64
  }
54
65
 
@@ -2,19 +2,28 @@
2
2
 
3
3
  import type { NodeData } from '../../types/Node';
4
4
 
5
+ export type FlexDirectionOptionType = 'row' | 'column';
6
+ export type AlignItemsOptionType =
7
+ | 'flex-start'
8
+ | 'center'
9
+ | 'flex-end'
10
+ | 'stretch'
11
+ | 'baseline';
12
+ export type JustifyContentOptionType =
13
+ | 'flex-start'
14
+ | 'center'
15
+ | 'flex-end'
16
+ | 'space-between'
17
+ | 'space-around'
18
+ | 'space-evenly';
19
+
5
20
  export interface ViewPropsGenerated {
6
21
  child: string;
7
22
  attributes: {
8
23
  scrollable?: boolean;
9
- flexDirection?: 'row' | 'column';
10
- alignItems?: 'flex-start' | 'center' | 'flex-end' | 'stretch' | 'baseline';
11
- justifyContent?:
12
- | 'flex-start'
13
- | 'center'
14
- | 'flex-end'
15
- | 'space-between'
16
- | 'space-around'
17
- | 'space-evenly';
24
+ flexDirection?: FlexDirectionOptionType;
25
+ alignItems?: AlignItemsOptionType;
26
+ justifyContent?: JustifyContentOptionType;
18
27
  gap?: string;
19
28
  padding?: number;
20
29
  paddingHorizontal?: string;
@@ -117,8 +117,9 @@ export const patterns = [
117
117
  types: {
118
118
  EventObject: {
119
119
  type: ['Permission', 'Navigate'],
120
- permission: ['att', 'notification', 'rating', 'null'],
121
- navigate_to: ['string', 'null'],
120
+ permission: ['att', 'notification', 'rating', 'GDPR', 'null'],
121
+ navigate_to: 'string',
122
+ targetIndex: 'number',
122
123
  },
123
124
  },
124
125
  },
@@ -239,8 +240,12 @@ export const patterns = [
239
240
  height: 'number',
240
241
  resizeMode: ['cover', 'contain', 'stretch', 'center'],
241
242
  borderRadius: 'number',
243
+ video_url: 'string',
244
+ lottie: 'string',
242
245
  },
243
246
  },
247
+ types: {},
248
+ defaults: {},
244
249
  },
245
250
  {
246
251
  schemaVersion: 1,
@@ -172,6 +172,9 @@ function buildCarouselItem(
172
172
  // derive resizeMode from is_bg_image and try to extract borderRadius from styles
173
173
  const isBgImage = Boolean(comp?.attributes?.is_bg_image);
174
174
  const imageStyle = extractViewStyleAttributesFromComponent(comp);
175
+ // optional rich media
176
+ const lottie = comp?.attributes?.lottie as string | undefined;
177
+ const videoUrl = comp?.attributes?.video_url as string | undefined;
175
178
 
176
179
  if (src) {
177
180
  children.push({
@@ -183,6 +186,8 @@ function buildCarouselItem(
183
186
  ...(typeof imageStyle.borderRadius === 'number'
184
187
  ? { borderRadius: imageStyle.borderRadius }
185
188
  : {}),
189
+ ...(typeof lottie === 'string' ? { lottie } : {}),
190
+ ...(typeof videoUrl === 'string' ? { video_url: videoUrl } : {}),
186
191
  },
187
192
  children: undefined as unknown as Node,
188
193
  } as unknown as NodeData);