@developer_tribe/react-builder 0.1.32 → 1.0.1
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/DeviceMockFrame.d.ts +1 -17
- package/dist/RenderPage.d.ts +1 -9
- package/dist/build-components/index.d.ts +1 -0
- package/dist/components/AttributesEditorPanel.d.ts +9 -0
- package/dist/components/Breadcrumb.d.ts +13 -0
- package/dist/components/Builder.d.ts +9 -0
- package/dist/components/EditorHeader.d.ts +15 -0
- package/dist/index.cjs.js +6 -5
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.d.ts +8 -4
- package/dist/index.esm.js +6 -5
- package/dist/index.esm.js.map +1 -0
- package/dist/pages/ProjectPage.d.ts +11 -0
- package/dist/pages/tabs/BuilderTab.d.ts +9 -0
- package/dist/pages/tabs/DebugTab.d.ts +7 -0
- package/dist/pages/tabs/PreviewTab.d.ts +3 -0
- package/dist/store.d.ts +17 -18
- package/dist/styles.css +1 -1
- package/dist/types/PreviewConfig.d.ts +6 -3
- package/dist/types/Project.d.ts +12 -2
- package/dist/utils/copyNode.d.ts +2 -0
- package/dist/utils/logger.d.ts +11 -0
- package/dist/utils/useLogRender.d.ts +1 -0
- package/package.json +16 -9
- package/scripts/prebuild/utils/createBuildComponentsIndex.js +15 -1
- package/src/AttributesEditor.tsx +2 -0
- package/src/DeviceMockFrame.tsx +22 -31
- package/src/RenderPage.tsx +5 -42
- package/src/assets/images/android.svg +43 -0
- package/src/assets/images/apple.svg +16 -0
- package/src/assets/images/background.jpg +0 -0
- package/src/assets/samples/carousel-sample.json +2 -3
- package/src/assets/samples/getSamples.ts +49 -12
- package/src/assets/samples/simple-1.json +1 -2
- package/src/assets/samples/simple-2.json +1 -2
- package/src/assets/samples/vpn-onboard-1.json +1 -2
- package/src/assets/samples/vpn-onboard-2.json +1 -2
- package/src/assets/samples/vpn-onboard-3.json +1 -2
- package/src/assets/samples/vpn-onboard-4.json +1 -2
- package/src/assets/samples/vpn-onboard-5.json +1 -2
- package/src/assets/samples/vpn-onboard-6.json +1 -2
- package/src/build-components/Button/Button.tsx +2 -0
- package/src/build-components/Carousel/Carousel.tsx +2 -0
- package/src/build-components/CarouselButtons/CarouselButtons.tsx +2 -0
- package/src/build-components/CarouselDots/CarouselDots.tsx +2 -0
- package/src/build-components/CarouselItem/CarouselItem.tsx +2 -0
- package/src/build-components/Image/Image.tsx +2 -0
- package/src/build-components/Onboard/Onboard.tsx +2 -0
- package/src/build-components/OnboardButton/OnboardButton.tsx +7 -4
- package/src/build-components/OnboardButtons/OnboardButtons.tsx +7 -7
- package/src/build-components/OnboardDot/OnboardDot.tsx +2 -0
- package/src/build-components/OnboardFooter/OnboardFooter.tsx +5 -3
- package/src/build-components/OnboardImage/OnboardImage.tsx +2 -0
- package/src/build-components/OnboardItem/OnboardItem.tsx +2 -0
- package/src/build-components/OnboardProvider/OnboardProvider.tsx +2 -0
- package/src/build-components/OnboardSubtitle/OnboardSubtitle.tsx +2 -0
- package/src/build-components/OnboardTitle/OnboardTitle.tsx +2 -0
- package/src/build-components/Text/Text.tsx +5 -3
- package/src/build-components/View/View.tsx +2 -0
- package/src/build-components/index.ts +22 -0
- package/src/components/AttributesEditorPanel.tsx +112 -0
- package/src/components/Breadcrumb.tsx +48 -0
- package/src/components/Builder.tsx +272 -0
- package/src/components/EditorHeader.tsx +186 -0
- package/src/index.ts +8 -4
- package/src/pages/ProjectPage.tsx +152 -0
- package/src/pages/tabs/BuilderTab.tsx +33 -0
- package/src/pages/tabs/DebugTab.tsx +23 -0
- package/src/pages/tabs/PreviewTab.tsx +194 -0
- package/src/size-matters/index.ts +5 -1
- package/src/store.ts +60 -38
- package/src/styles/_mixins.scss +21 -0
- package/src/styles/_variables.scss +27 -0
- package/src/styles/builder.scss +60 -0
- package/src/styles/components.scss +88 -0
- package/src/styles/editor.scss +174 -0
- package/src/styles/global.scss +200 -0
- package/src/styles/index.scss +7 -0
- package/src/styles/pages.scss +2 -0
- package/src/types/PreviewConfig.ts +14 -5
- package/src/types/Project.ts +15 -2
- package/src/utils/copyNode.ts +7 -0
- package/src/utils/extractTextStyle.ts +4 -2
- package/src/utils/getDevices.ts +1 -0
- package/src/utils/logger.ts +76 -0
- package/src/utils/useLogRender.ts +13 -0
|
@@ -1,22 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Device } from './types/Device';
|
|
3
2
|
type DeviceMockFrameProps = {
|
|
4
|
-
width: number;
|
|
5
|
-
height: number;
|
|
6
|
-
isRtl: boolean;
|
|
7
|
-
screenStyle: {
|
|
8
|
-
light: {
|
|
9
|
-
backgroundColor: string;
|
|
10
|
-
color: string;
|
|
11
|
-
};
|
|
12
|
-
dark: {
|
|
13
|
-
backgroundColor: string;
|
|
14
|
-
color: string;
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
theme: 'dark' | 'light';
|
|
18
3
|
children: React.ReactNode;
|
|
19
|
-
device: Device;
|
|
20
4
|
};
|
|
21
|
-
export declare function DeviceMockFrame({
|
|
5
|
+
export declare function DeviceMockFrame({ children }: DeviceMockFrameProps): import("react/jsx-runtime").JSX.Element;
|
|
22
6
|
export default DeviceMockFrame;
|
package/dist/RenderPage.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { Localication } from './types/PreviewConfig';
|
|
2
1
|
import { Node } from './types/Node';
|
|
3
|
-
import { Device } from './types/Device';
|
|
4
2
|
export type ScreenStyle = {
|
|
5
3
|
light: {
|
|
6
4
|
backgroundColor: string;
|
|
@@ -15,12 +13,6 @@ export type ScreenStyle = {
|
|
|
15
13
|
};
|
|
16
14
|
type RenderPageProps = {
|
|
17
15
|
data: Node;
|
|
18
|
-
isRtl: boolean;
|
|
19
|
-
screenStyle: ScreenStyle;
|
|
20
|
-
theme: 'dark' | 'light';
|
|
21
|
-
localication: Localication;
|
|
22
|
-
defaultLanguage?: string;
|
|
23
|
-
device: Device;
|
|
24
16
|
};
|
|
25
|
-
export declare function RenderPage({ data
|
|
17
|
+
export declare function RenderPage({ data }: RenderPageProps): import("react/jsx-runtime").JSX.Element;
|
|
26
18
|
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { default as RenderNode } from './RenderNode.generated';
|
|
2
2
|
export { patterns } from './patterns.generated';
|
|
3
|
+
export declare const allcomponentNames: readonly ["button", "carousel", "carouselButtons", "carouselDots", "carouselItem", "carouselProvider", "image", "Onboard", "OnboardButton", "OnboardButtons", "OnboardDot", "OnboardFooter", "OnboardImage", "OnboardItem", "OnboardProvider", "OnboardSubtitle", "OnboardTitle", "text", "view"];
|
|
3
4
|
export type { ButtonPropsGenerated, ButtonComponentProps, } from './Button/ButtonProps.generated';
|
|
4
5
|
export type { CarouselPropsGenerated, CarouselComponentProps, } from './Carousel/CarouselProps.generated';
|
|
5
6
|
export type { CarouselButtonsPropsGenerated, CarouselButtonsComponentProps, } from './CarouselButtons/CarouselButtonsProps.generated';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Node } from '..';
|
|
2
|
+
interface AttributesEditorPanelProps {
|
|
3
|
+
current: Node;
|
|
4
|
+
attributes: any;
|
|
5
|
+
onChange: (data: Node) => void;
|
|
6
|
+
setCurrent: (current: Node) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function AttributesEditorPanel({ current, attributes, onChange, setCurrent, }: AttributesEditorPanelProps): import("react/jsx-runtime").JSX.Element | null;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export type BreadcrumbItem = {
|
|
3
|
+
label: string;
|
|
4
|
+
to?: string;
|
|
5
|
+
onClick?: () => void;
|
|
6
|
+
};
|
|
7
|
+
type BreadcrumbProps = {
|
|
8
|
+
items: BreadcrumbItem[];
|
|
9
|
+
separator?: ReactNode;
|
|
10
|
+
ariaLabel?: string;
|
|
11
|
+
};
|
|
12
|
+
export declare function Breadcrumb({ items, separator, ariaLabel, }: BreadcrumbProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Node } from '..';
|
|
2
|
+
type BuilderEditorProps = {
|
|
3
|
+
data: Node;
|
|
4
|
+
setData: (data: Node) => void;
|
|
5
|
+
current: Node;
|
|
6
|
+
setCurrent: (current: Node) => void;
|
|
7
|
+
};
|
|
8
|
+
export declare function Builder({ data, setData, current, setCurrent, }: BuilderEditorProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Device, Node } from '..';
|
|
2
|
+
interface EditorHeaderProps {
|
|
3
|
+
onSaveProject?: () => void;
|
|
4
|
+
current?: Node;
|
|
5
|
+
editorData?: Node;
|
|
6
|
+
setEditorData?: (data: Node) => void;
|
|
7
|
+
}
|
|
8
|
+
interface DeviceButtonProps {
|
|
9
|
+
device: Device;
|
|
10
|
+
selectedDevice: Device | null;
|
|
11
|
+
setSelectedDevice: (device: Device) => void;
|
|
12
|
+
}
|
|
13
|
+
export declare function DeviceButton({ device, selectedDevice, setSelectedDevice, }: DeviceButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare function EditorHeader({ onSaveProject, current, editorData, setEditorData, }: EditorHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export {};
|