@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.
Files changed (66) hide show
  1. package/dist/build-components/index.d.ts +1 -2
  2. package/dist/build-components/patterns.generated.d.ts +56 -439
  3. package/dist/components/AttributesEditorPanel.d.ts +2 -2
  4. package/dist/components/BottomBar.d.ts +8 -0
  5. package/dist/components/Checkbox.d.ts +1 -1
  6. package/dist/components/LoadingComponent.d.ts +1 -0
  7. package/dist/components/MobilePanelToggleButton.d.ts +8 -0
  8. package/dist/hooks/useMinimumDelay.d.ts +7 -0
  9. package/dist/hooks/useMobileEditorPanels.d.ts +12 -0
  10. package/dist/hooks/useSyncProjectPageStore.d.ts +15 -0
  11. package/dist/index.cjs.js +3 -3
  12. package/dist/index.cjs.js.map +1 -1
  13. package/dist/index.esm.js +3 -3
  14. package/dist/index.esm.js.map +1 -1
  15. package/dist/index.native.cjs.js +1 -1
  16. package/dist/index.native.cjs.js.map +1 -1
  17. package/dist/index.native.esm.js +4 -4
  18. package/dist/index.native.esm.js.map +1 -1
  19. package/dist/modals/ScreenColorsModal.d.ts +8 -0
  20. package/dist/modals/index.d.ts +1 -0
  21. package/dist/pages/tabs/BuilderPanel.d.ts +2 -2
  22. package/dist/store.d.ts +6 -0
  23. package/dist/styles.css +1 -1
  24. package/dist/utils/nodeTree.d.ts +5 -0
  25. package/package.json +1 -1
  26. package/src/RenderPage.tsx +4 -1
  27. package/src/assets/samples/carousel-sample.json +99 -81
  28. package/src/assets/samples/simple-1.json +8 -2
  29. package/src/assets/samples/simple-2.json +36 -9
  30. package/src/assets/samples/vpn-onboard-1.json +27 -23
  31. package/src/assets/samples/vpn-onboard-2.json +279 -275
  32. package/src/assets/samples/vpn-onboard-3.json +247 -246
  33. package/src/assets/samples/vpn-onboard-4.json +247 -246
  34. package/src/assets/samples/vpn-onboard-5.json +375 -369
  35. package/src/assets/samples/vpn-onboard-6.json +252 -248
  36. package/src/build-components/RenderNode.generated.tsx +0 -7
  37. package/src/build-components/View/pattern.json +2 -2
  38. package/src/build-components/index.ts +0 -5
  39. package/src/build-components/patterns.generated.ts +56 -455
  40. package/src/components/AttributesEditorPanel.tsx +12 -8
  41. package/src/components/BottomBar.tsx +236 -0
  42. package/src/components/EditorHeader.tsx +11 -4
  43. package/src/components/LoadingComponent.tsx +10 -0
  44. package/src/components/MobilePanelToggleButton.tsx +39 -0
  45. package/src/hooks/useMinimumDelay.ts +20 -0
  46. package/src/hooks/useMobileEditorPanels.ts +56 -0
  47. package/src/hooks/useSyncProjectPageStore.ts +40 -0
  48. package/src/modals/ScreenColorsModal.tsx +115 -0
  49. package/src/modals/index.ts +1 -0
  50. package/src/pages/ProjectPage.tsx +53 -243
  51. package/src/pages/tabs/BuilderPanel.tsx +14 -8
  52. package/src/store.ts +10 -6
  53. package/src/styles/base/_global.scss +12 -4
  54. package/src/styles/components/_attributes-editor.scss +9 -1
  55. package/src/styles/components/_bottom-bar.scss +113 -0
  56. package/src/styles/components/_editor-shell.scss +0 -19
  57. package/src/styles/index.scss +1 -0
  58. package/src/utils/analyseNodeByPatterns.ts +15 -0
  59. package/src/utils/nodeTree.ts +99 -0
  60. package/dist/build-components/PaywallSubscriButton/PaywallSubscriButton.d.ts +0 -5
  61. package/dist/build-components/PaywallSubscriButton/PaywallSubscriButtonProps.generated.d.ts +0 -50
  62. package/dist/pages/tabs/SideTool.d.ts +0 -8
  63. package/src/build-components/PaywallSubscriButton/PaywallSubscriButton.tsx +0 -10
  64. package/src/build-components/PaywallSubscriButton/PaywallSubscriButtonProps.generated.ts +0 -77
  65. package/src/build-components/PaywallSubscriButton/pattern.json +0 -27
  66. 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: any;
5
- onChange: (data: Node) => void;
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;
@@ -0,0 +1,8 @@
1
+ type BottomBarProps = {
2
+ className?: string;
3
+ };
4
+ /**
5
+ * Empty placeholder bottom bar (Figma-like). We'll complete later.
6
+ */
7
+ export declare function BottomBar({ className }: BottomBarProps): import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -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>, "type" | "onChange" | "className"> & {
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;