@developer_tribe/react-builder 0.1.13 → 0.1.15

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.
@@ -12,15 +12,15 @@ export const mainNodeContext = createContext<{
12
12
  } | null>(null);
13
13
 
14
14
  export function RenderMainNode({
15
- node,
15
+ children,
16
16
  localication,
17
17
  defaultLanguage,
18
18
  theme,
19
19
  }: {
20
- node: Node;
21
20
  localication?: Localication;
22
21
  defaultLanguage?: string;
23
22
  theme?: 'light' | 'dark';
23
+ children: React.ReactNode;
24
24
  warning?: string;
25
25
  setWarning?: (message: string) => void;
26
26
  }) {
@@ -31,7 +31,7 @@ export function RenderMainNode({
31
31
  value={{ localication, defaultLanguage, theme, warning, setWarning }}
32
32
  >
33
33
  {warning && <div className="warning">{warning}</div>}
34
- <RenderNode node={node} />
34
+ {children}
35
35
  </mainNodeContext.Provider>
36
36
  );
37
37
  }
@@ -2,6 +2,7 @@ import { Localication } from './types/PreviewConfig';
2
2
  import { TargetedScreenSize } from './types/TargetedScreenSize';
3
3
  import { RenderMainNode } from './RenderMainNode';
4
4
  import { Node } from './types/Node';
5
+ import { RenderNode } from './build-components';
5
6
  type RenderPageProps = {
6
7
  data: Node;
7
8
  screenSize: TargetedScreenSize;
@@ -50,10 +51,11 @@ export function RenderPage({
50
51
  {
51
52
  <RenderMainNode
52
53
  localication={localication}
53
- node={data}
54
54
  defaultLanguage={defaultLanguage}
55
55
  theme={theme}
56
- />
56
+ >
57
+ <RenderNode node={data} />
58
+ </RenderMainNode>
57
59
  }
58
60
  </div>
59
61
  </div>
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
- import type { OnboardBoardTitleComponentProps } from './OnboardBoardTitleProps.generated';
2
+ import type { OnboardTitleComponentProps } from './OnboardTitleProps.generated';
3
3
  import Text from '../Text/Text';
4
4
 
5
- function OnboardBoardTitle({ node }: OnboardBoardTitleComponentProps) {
5
+ function OnboardTitle({ node }: OnboardTitleComponentProps) {
6
6
  return (
7
7
  <Text
8
8
  node={
@@ -20,4 +20,4 @@ function OnboardBoardTitle({ node }: OnboardBoardTitleComponentProps) {
20
20
  );
21
21
  }
22
22
 
23
- export default React.memo(OnboardBoardTitle);
23
+ export default React.memo(OnboardTitle);
@@ -2,7 +2,7 @@
2
2
 
3
3
  import type { NodeData } from '../../types/Node';
4
4
 
5
- export interface OnboardBoardTitlePropsGenerated {
5
+ export interface OnboardTitlePropsGenerated {
6
6
  child: string;
7
7
  attributes: {
8
8
  color?: string;
@@ -22,6 +22,6 @@ export interface OnboardBoardTitlePropsGenerated {
22
22
  };
23
23
  }
24
24
 
25
- export interface OnboardBoardTitleComponentProps {
26
- node: NodeData<OnboardBoardTitlePropsGenerated['attributes']>;
25
+ export interface OnboardTitleComponentProps {
26
+ node: NodeData<OnboardTitlePropsGenerated['attributes']>;
27
27
  }
@@ -2,7 +2,7 @@
2
2
  "schemaVersion": 1,
3
3
  "allowUnknownAttributes": false,
4
4
  "pattern": {
5
- "type": "OnboardBoardTitle",
5
+ "type": "OnboardTitle",
6
6
  "children": "node",
7
7
  "attributes": {
8
8
  "color": "string",
@@ -20,7 +20,6 @@ import CarouselItem from './CarouselItem/CarouselItem';
20
20
  import CarouselProvider from './CarouselProvider/CarouselProvider';
21
21
  import Image from './Image/Image';
22
22
  import Onboard from './Onboard/Onboard';
23
- import OnboardBoardTitle from './OnboardBoardTitle/OnboardBoardTitle';
24
23
  import OnboardButton from './OnboardButton/OnboardButton';
25
24
  import OnboardButtons from './OnboardButtons/OnboardButtons';
26
25
  import OnboardDot from './OnboardDot/OnboardDot';
@@ -29,6 +28,7 @@ import OnboardImage from './OnboardImage/OnboardImage';
29
28
  import OnboardItem from './OnboardItem/OnboardItem';
30
29
  import OnboardProvider from './OnboardProvider/OnboardProvider';
31
30
  import OnboardSubtitle from './OnboardSubtitle/OnboardSubtitle';
31
+ import OnboardTitle from './OnboardTitle/OnboardTitle';
32
32
  import Text from './Text/Text';
33
33
  import View from './View/View';
34
34
 
@@ -67,8 +67,6 @@ function RenderNode({ node }: { node: Node }) {
67
67
  return <Image node={simpleNode} />;
68
68
  case 'Onboard':
69
69
  return <Onboard node={simpleNode} />;
70
- case 'OnboardBoardTitle':
71
- return <OnboardBoardTitle node={simpleNode} />;
72
70
  case 'OnboardButton':
73
71
  return <OnboardButton node={simpleNode} />;
74
72
  case 'OnboardButtons':
@@ -85,6 +83,8 @@ function RenderNode({ node }: { node: Node }) {
85
83
  return <OnboardProvider node={simpleNode} />;
86
84
  case 'OnboardSubtitle':
87
85
  return <OnboardSubtitle node={simpleNode} />;
86
+ case 'OnboardTitle':
87
+ return <OnboardTitle node={simpleNode} />;
88
88
  case 'text':
89
89
  return <Text node={simpleNode} />;
90
90
  case 'view':
@@ -34,10 +34,6 @@ export type {
34
34
  OnboardPropsGenerated,
35
35
  OnboardComponentProps,
36
36
  } from './Onboard/OnboardProps.generated';
37
- export type {
38
- OnboardBoardTitlePropsGenerated,
39
- OnboardBoardTitleComponentProps,
40
- } from './OnboardBoardTitle/OnboardBoardTitleProps.generated';
41
37
  export type {
42
38
  OnboardButtonPropsGenerated,
43
39
  OnboardButtonComponentProps,
@@ -70,6 +66,10 @@ export type {
70
66
  OnboardSubtitlePropsGenerated,
71
67
  OnboardSubtitleComponentProps,
72
68
  } from './OnboardSubtitle/OnboardSubtitleProps.generated';
69
+ export type {
70
+ OnboardTitlePropsGenerated,
71
+ OnboardTitleComponentProps,
72
+ } from './OnboardTitle/OnboardTitleProps.generated';
73
73
  export type {
74
74
  TextPropsGenerated,
75
75
  TextComponentProps,
@@ -13,7 +13,7 @@ import onboardItemPattern from '../build-components/OnboardItem/pattern.json';
13
13
  import onboardImagePattern from '../build-components/OnboardImage/pattern.json';
14
14
  import onboardButtonsPattern from '../build-components/OnboardButtons/pattern.json';
15
15
  import onboardButtonPattern from '../build-components/OnboardButton/pattern.json';
16
- import onboardBoardTitlePattern from '../build-components/OnboardBoardTitle/pattern.json';
16
+ import onboardBoardTitlePattern from '../build-components/OnboardTitle/pattern.json';
17
17
  import onboardSubtitlePattern from '../build-components/OnboardSubtitle/pattern.json';
18
18
  import onboardFooterPattern from '../build-components/OnboardFooter/pattern.json';
19
19
  import onboardExpandingDotPattern from '../build-components/OnboardDot/pattern.json';
@@ -1,5 +0,0 @@
1
- import React from 'react';
2
- import type { OnboardBoardTitleComponentProps } from './OnboardBoardTitleProps.generated';
3
- declare function OnboardBoardTitle({ node }: OnboardBoardTitleComponentProps): import("react/jsx-runtime").JSX.Element;
4
- declare const _default: React.MemoExoticComponent<typeof OnboardBoardTitle>;
5
- export default _default;