@developer_tribe/react-builder 1.0.5 → 1.0.6
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/build-components/index.d.ts +1 -2
- package/dist/build-components/patterns.generated.d.ts +56 -439
- package/dist/components/AttributesEditorPanel.d.ts +2 -2
- package/dist/components/BottomBar.d.ts +8 -0
- package/dist/components/Checkbox.d.ts +1 -1
- package/dist/components/LoadingComponent.d.ts +1 -0
- package/dist/components/MobilePanelToggleButton.d.ts +8 -0
- package/dist/hooks/useMinimumDelay.d.ts +7 -0
- package/dist/hooks/useMobileEditorPanels.d.ts +12 -0
- package/dist/hooks/useSyncProjectPageStore.d.ts +15 -0
- package/dist/index.cjs.js +3 -3
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +3 -3
- package/dist/index.esm.js.map +1 -1
- package/dist/index.native.cjs.js +1 -1
- package/dist/index.native.cjs.js.map +1 -1
- package/dist/index.native.esm.js +4 -4
- package/dist/index.native.esm.js.map +1 -1
- package/dist/modals/ScreenColorsModal.d.ts +8 -0
- package/dist/modals/index.d.ts +1 -0
- package/dist/pages/tabs/BuilderPanel.d.ts +2 -2
- package/dist/store.d.ts +6 -0
- package/dist/styles.css +1 -1
- package/dist/utils/nodeTree.d.ts +5 -0
- package/package.json +1 -1
- package/src/RenderPage.tsx +4 -1
- package/src/assets/samples/carousel-sample.json +99 -81
- package/src/assets/samples/simple-1.json +8 -2
- package/src/assets/samples/simple-2.json +36 -9
- package/src/assets/samples/vpn-onboard-1.json +27 -23
- package/src/assets/samples/vpn-onboard-2.json +279 -275
- package/src/assets/samples/vpn-onboard-3.json +247 -246
- package/src/assets/samples/vpn-onboard-4.json +247 -246
- package/src/assets/samples/vpn-onboard-5.json +375 -369
- package/src/assets/samples/vpn-onboard-6.json +252 -248
- package/src/build-components/RenderNode.generated.tsx +0 -7
- package/src/build-components/View/pattern.json +2 -2
- package/src/build-components/index.ts +0 -5
- package/src/build-components/patterns.generated.ts +56 -455
- package/src/components/AttributesEditorPanel.tsx +12 -8
- package/src/components/BottomBar.tsx +236 -0
- package/src/components/EditorHeader.tsx +11 -4
- package/src/components/LoadingComponent.tsx +10 -0
- package/src/components/MobilePanelToggleButton.tsx +39 -0
- package/src/hooks/useMinimumDelay.ts +20 -0
- package/src/hooks/useMobileEditorPanels.ts +56 -0
- package/src/hooks/useSyncProjectPageStore.ts +40 -0
- package/src/modals/ScreenColorsModal.tsx +115 -0
- package/src/modals/index.ts +1 -0
- package/src/pages/ProjectPage.tsx +53 -243
- package/src/pages/tabs/BuilderPanel.tsx +14 -8
- package/src/store.ts +10 -6
- package/src/styles/base/_global.scss +12 -4
- package/src/styles/components/_attributes-editor.scss +9 -1
- package/src/styles/components/_bottom-bar.scss +113 -0
- package/src/styles/components/_editor-shell.scss +0 -19
- package/src/styles/index.scss +1 -0
- package/src/utils/analyseNodeByPatterns.ts +15 -0
- package/src/utils/nodeTree.ts +99 -0
- package/dist/build-components/PaywallSubscriButton/PaywallSubscriButton.d.ts +0 -5
- package/dist/build-components/PaywallSubscriButton/PaywallSubscriButtonProps.generated.d.ts +0 -50
- package/dist/pages/tabs/SideTool.d.ts +0 -8
- package/src/build-components/PaywallSubscriButton/PaywallSubscriButton.tsx +0 -10
- package/src/build-components/PaywallSubscriButton/PaywallSubscriButtonProps.generated.ts +0 -77
- package/src/build-components/PaywallSubscriButton/pattern.json +0 -27
- package/src/pages/tabs/SideTool.tsx +0 -253
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { Node } from '../types/Node';
|
|
2
2
|
import type { ProjectColors } from '../types/Project';
|
|
3
3
|
interface AttributesEditorPanelProps {
|
|
4
|
-
attributes
|
|
5
|
-
onChange
|
|
4
|
+
attributes?: any;
|
|
5
|
+
onChange?: (data: Node) => void;
|
|
6
6
|
projectColors?: ProjectColors;
|
|
7
7
|
}
|
|
8
8
|
export declare function AttributesEditorPanel({ attributes, onChange, projectColors, }: AttributesEditorPanelProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -7,7 +7,7 @@ export type CheckboxProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, 't
|
|
|
7
7
|
inputClassName?: string;
|
|
8
8
|
onChange?: CheckboxChangeHandler;
|
|
9
9
|
};
|
|
10
|
-
export declare const Checkbox: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "
|
|
10
|
+
export declare const Checkbox: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "type" | "className"> & {
|
|
11
11
|
label?: React.ReactNode;
|
|
12
12
|
helperText?: React.ReactNode;
|
|
13
13
|
className?: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function LoadingComponent(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type MobilePanelToggleButtonProps = {
|
|
2
|
+
label: string;
|
|
3
|
+
isActive: boolean;
|
|
4
|
+
ariaLabel: string;
|
|
5
|
+
ariaControls: string;
|
|
6
|
+
onClick: () => void;
|
|
7
|
+
};
|
|
8
|
+
export declare function MobilePanelToggleButton({ label, isActive, ariaLabel, ariaControls, onClick, }: MobilePanelToggleButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ensures a boolean becomes `true` only after a minimum delay.
|
|
3
|
+
* Resets to `false` whenever `deps` change.
|
|
4
|
+
*
|
|
5
|
+
* Common use-case: keep a loading indicator visible for at least N ms.
|
|
6
|
+
*/
|
|
7
|
+
export declare function useMinimumDelay(delayMs: number, deps?: unknown[]): boolean;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type MobileEditorPanel = 'builder' | 'attributes';
|
|
2
|
+
export type UseMobileEditorPanelsOptions = {
|
|
3
|
+
breakpoint?: number;
|
|
4
|
+
};
|
|
5
|
+
export declare function useMobileEditorPanels(options?: UseMobileEditorPanelsOptions): {
|
|
6
|
+
isMobile: boolean;
|
|
7
|
+
mobilePanel: MobileEditorPanel | null;
|
|
8
|
+
toggleMobilePanel: (panel: MobileEditorPanel) => void;
|
|
9
|
+
closeMobilePanels: () => void;
|
|
10
|
+
leftPanelIsOpen: boolean;
|
|
11
|
+
attributesPanelIsOpen: boolean;
|
|
12
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { AppConfig } from '../types/PreviewConfig';
|
|
2
|
+
import type { ProjectColors } from '../types/Project';
|
|
3
|
+
export type UseSyncProjectPageStoreArgs = {
|
|
4
|
+
appConfig: AppConfig;
|
|
5
|
+
name: string;
|
|
6
|
+
projectColors: ProjectColors | undefined;
|
|
7
|
+
setAppConfig: (appConfig: AppConfig) => void;
|
|
8
|
+
setProjectName: (name: string) => void;
|
|
9
|
+
setProjectColors: (colors: ProjectColors | undefined) => void;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Syncs ProjectPage props into the render store.
|
|
13
|
+
* Kept as a small hook to keep ProjectPage UI-focused.
|
|
14
|
+
*/
|
|
15
|
+
export declare function useSyncProjectPageStore({ appConfig, name, projectColors, setAppConfig, setProjectName, setProjectColors, }: UseSyncProjectPageStoreArgs): void;
|