@mandolop97/constructor-nexora 1.3.1 → 1.5.0

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.
@@ -3,6 +3,7 @@ import { PublishPayload } from '@/components/builder/PublishDialog';
3
3
  import { BlockDefinition } from '@/lib/block-registry';
4
4
  import { BuilderLocale } from '@/lib/i18n';
5
5
  import { CustomComponentMap } from '@/components/schema/NodeRegistry';
6
+ import { RenderContext } from '@/types/contract';
6
7
  export interface NexoraBuilderAppProps {
7
8
  initialSchema?: Schema;
8
9
  domain?: string;
@@ -30,5 +31,9 @@ export interface NexoraBuilderAppProps {
30
31
  onImageUpload?: (file: File) => Promise<string>;
31
32
  /** Resolve asset paths to full URLs */
32
33
  resolveAssetUrl?: (path: string) => string;
34
+ /** Mock data for edit/preview mode (products, collections, settings, etc.) */
35
+ mockData?: Record<string, any>;
36
+ /** Data context for resolving bindings — passed to PageRenderer */
37
+ renderContext?: RenderContext;
33
38
  }
34
- export declare function NexoraBuilderApp({ initialSchema, domain, pageSlug, onSave, onPublish, onPreview, onExport, className, pages, activePage, onPageChange, onSaveWithSlug, onPublishSubmit, locale: localeProp, customComponents, extraBlocks, customStylesheets, customCSS, customScripts, onImageUpload, resolveAssetUrl, }: NexoraBuilderAppProps): import("react/jsx-runtime").JSX.Element;
39
+ export declare function NexoraBuilderApp({ initialSchema, domain, pageSlug, onSave, onPublish, onPreview, onExport, className, pages, activePage, onPageChange, onSaveWithSlug, onPublishSubmit, locale: localeProp, customComponents, extraBlocks, customStylesheets, customCSS, customScripts, onImageUpload, resolveAssetUrl, mockData: externalMockData, renderContext: externalRenderContext, }: NexoraBuilderAppProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { SchemaNode, NodeProps } from '@/types/schema';
2
+ interface BindingsPanelProps {
3
+ node: SchemaNode;
4
+ onUpdateProps: (props: Partial<NodeProps>) => void;
5
+ }
6
+ export declare function BindingsPanel({ node, onUpdateProps }: BindingsPanelProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -1,5 +1,6 @@
1
1
  import { Schema, TemplateType } from '@/types/schema';
2
2
  import { CustomComponentMap } from '@/components/schema/NodeRegistry';
3
+ import { RenderContext } from '@/types/contract';
3
4
  interface BuilderCanvasProps {
4
5
  schema: Schema;
5
6
  device: 'desktop' | 'tablet' | 'mobile';
@@ -28,6 +29,11 @@ interface BuilderCanvasProps {
28
29
  right?: string;
29
30
  bottom?: string;
30
31
  }) => void;
32
+ onCopyStyle?: (nodeId: string) => void;
33
+ onPasteStyle?: (nodeId: string) => void;
34
+ canPasteStyle?: boolean;
35
+ /** Pre-built render context from host — takes priority over auto-built one */
36
+ externalRenderContext?: RenderContext;
31
37
  }
32
- export declare function BuilderCanvas({ schema, device, selectedNodeId, onSelectNode, customComponents, templateType, canvasSize, mockData, customStylesheets, customCSS, customScripts, onCopyNode, onPasteNode, onDuplicateNode, onDeleteNode, canPaste, onEditSection, onSaveAsTemplate, onRepositionNode }: BuilderCanvasProps): import("react/jsx-runtime").JSX.Element;
38
+ export declare function BuilderCanvas({ schema, device, selectedNodeId, onSelectNode, customComponents, templateType, canvasSize, mockData, customStylesheets, customCSS, customScripts, onCopyNode, onPasteNode, onDuplicateNode, onDeleteNode, canPaste, onEditSection, onSaveAsTemplate, onRepositionNode, onCopyStyle, onPasteStyle, canPasteStyle, externalRenderContext }: BuilderCanvasProps): import("react/jsx-runtime").JSX.Element;
33
39
  export {};
@@ -1,3 +1,4 @@
1
+ import { RenderContext } from '@/types/contract';
1
2
  import { Schema, PageDefinition } from '@/types/schema';
2
3
  import { PublishPayload } from '@/components/builder/PublishDialog';
3
4
  import { CustomComponentMap } from '@/components/schema/NodeRegistry';
@@ -20,5 +21,9 @@ export interface BuilderEditorShellProps {
20
21
  customScripts?: string[];
21
22
  onImageUpload?: (file: File) => Promise<string>;
22
23
  resolveAssetUrl?: (path: string) => string;
24
+ /** Mock data from host for edit/preview binding resolution */
25
+ externalMockData?: Record<string, any>;
26
+ /** Pre-built render context from host */
27
+ externalRenderContext?: RenderContext;
23
28
  }
24
- export declare function BuilderEditorShell({ initialSchema, onSave: onSaveExternal, onPublish, onPreview, onExport, className, onPublishSubmit, pages, activePage, onPageChange, pageTitle, customComponents, onBack, customStylesheets, customCSS, customScripts, onImageUpload, resolveAssetUrl, }: BuilderEditorShellProps): import("react/jsx-runtime").JSX.Element;
29
+ export declare function BuilderEditorShell({ initialSchema, onSave: onSaveExternal, onPublish, onPreview, onExport, className, onPublishSubmit, pages, activePage, onPageChange, pageTitle, customComponents, onBack, customStylesheets, customCSS, customScripts, onImageUpload, resolveAssetUrl, externalMockData, externalRenderContext, }: BuilderEditorShellProps): import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,4 @@
1
- import { SchemaNode, NodeProps, NodeStyle } from '@/types/schema';
1
+ import { SchemaNode, NodeProps, NodeStyle, GlobalStyleDef } from '@/types/schema';
2
2
  interface InspectorProps {
3
3
  node: SchemaNode;
4
4
  onUpdateProps: (props: Partial<NodeProps>) => void;
@@ -7,6 +7,9 @@ interface InspectorProps {
7
7
  onDuplicate?: () => void;
8
8
  onImageUpload?: (file: File) => Promise<string>;
9
9
  onUpdateCustomCSS?: (css: string) => void;
10
+ device?: 'desktop' | 'tablet' | 'mobile';
11
+ globalStyles?: Record<string, GlobalStyleDef>;
12
+ onUpdateAppliedGlobalStyles?: (ids: string[]) => void;
10
13
  }
11
- export declare function Inspector({ node, onUpdateProps, onUpdateStyle, onDelete, onDuplicate, onImageUpload, onUpdateCustomCSS }: InspectorProps): import("react/jsx-runtime").JSX.Element;
14
+ export declare function Inspector({ node, onUpdateProps, onUpdateStyle, onDelete, onDuplicate, onImageUpload, onUpdateCustomCSS, device, globalStyles, onUpdateAppliedGlobalStyles }: InspectorProps): import("react/jsx-runtime").JSX.Element;
12
15
  export {};
@@ -1,7 +1,9 @@
1
- import { ThemeTokens } from '@/types/schema';
1
+ import { ThemeTokens, GlobalStyleDef } from '@/types/schema';
2
2
  interface ThemeEditorProps {
3
3
  themeTokens: ThemeTokens;
4
4
  onUpdate: (tokens: ThemeTokens) => void;
5
+ globalStyles?: Record<string, GlobalStyleDef>;
6
+ onUpdateGlobalStyles?: (styles: Record<string, GlobalStyleDef>) => void;
5
7
  }
6
- export declare function ThemeEditor({ themeTokens, onUpdate }: ThemeEditorProps): import("react/jsx-runtime").JSX.Element;
8
+ export declare function ThemeEditor({ themeTokens, onUpdate, globalStyles, onUpdateGlobalStyles }: ThemeEditorProps): import("react/jsx-runtime").JSX.Element;
7
9
  export {};
@@ -1,5 +1,6 @@
1
1
  import { Schema, RenderMode } from '@/types/schema';
2
2
  import { CustomComponentMap } from './NodeRegistry';
3
+ import { RenderContext } from '@/types/contract';
3
4
  interface PageRendererProps {
4
5
  schema: Schema;
5
6
  mode: RenderMode;
@@ -20,6 +21,11 @@ interface PageRendererProps {
20
21
  right?: string;
21
22
  bottom?: string;
22
23
  }) => void;
24
+ onCopyStyle?: (nodeId: string) => void;
25
+ onPasteStyle?: (nodeId: string) => void;
26
+ canPasteStyle?: boolean;
27
+ /** Data context for resolving bindings in public/preview mode */
28
+ renderContext?: RenderContext;
23
29
  }
24
- export declare function PageRenderer({ schema, mode, selectedNodeId, onSelectNode, customComponents, mockData, onCopyNode, onPasteNode, onDuplicateNode, onDeleteNode, canPaste, onEditSection, onSaveAsTemplate, onRepositionNode }: PageRendererProps): import("react/jsx-runtime").JSX.Element;
30
+ export declare function PageRenderer({ schema, mode, selectedNodeId, onSelectNode, customComponents, mockData, onCopyNode, onPasteNode, onDuplicateNode, onDeleteNode, canPaste, onEditSection, onSaveAsTemplate, onRepositionNode, onCopyStyle, onPasteStyle, canPasteStyle, renderContext }: PageRendererProps): import("react/jsx-runtime").JSX.Element;
25
31
  export {};
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ export type ScrollAnimationType = 'fadeIn' | 'slideUp' | 'slideLeft' | 'slideRight' | 'scaleIn' | 'none';
3
+ interface ScrollAnimationWrapperProps {
4
+ children: React.ReactNode;
5
+ animation: ScrollAnimationType;
6
+ delay?: string;
7
+ duration?: string;
8
+ }
9
+ export declare function ScrollAnimationWrapper({ children, animation, delay, duration }: ScrollAnimationWrapperProps): import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -12,6 +12,9 @@ interface SortableNodeWrapperProps {
12
12
  canPaste?: boolean;
13
13
  onEditSection?: (nodeType: string) => void;
14
14
  onSaveAsTemplate?: (nodeId: string) => void;
15
+ onCopyStyle?: (nodeId: string) => void;
16
+ onPasteStyle?: (nodeId: string) => void;
17
+ canPasteStyle?: boolean;
15
18
  /** Pass the node's position-related styles so the wrapper can inherit absolute/fixed positioning */
16
19
  nodeStyle?: {
17
20
  position?: string;
@@ -29,5 +32,5 @@ interface SortableNodeWrapperProps {
29
32
  bottom?: string;
30
33
  }) => void;
31
34
  }
32
- export declare function SortableNodeWrapper({ nodeId, children, isSelected, nodeType, onSelect, onCopy, onPaste, onDuplicate, onDelete, canPaste, onEditSection, onSaveAsTemplate, nodeStyle, onRepositionNode }: SortableNodeWrapperProps): import("react/jsx-runtime").JSX.Element;
35
+ export declare function SortableNodeWrapper({ nodeId, children, isSelected, nodeType, onSelect, onCopy, onPaste, onDuplicate, onDelete, canPaste, onEditSection, onSaveAsTemplate, onCopyStyle, onPasteStyle, canPasteStyle, nodeStyle, onRepositionNode }: SortableNodeWrapperProps): import("react/jsx-runtime").JSX.Element;
33
36
  export {};
@@ -0,0 +1,3 @@
1
+ import { ThemeTokens } from '@/types/schema';
2
+ export declare const ThemeProvider: import("react").Provider<ThemeTokens>;
3
+ export declare function useThemeTokens(): ThemeTokens | null;
@@ -4,6 +4,9 @@ interface NodeComponentProps {
4
4
  node: SchemaNode;
5
5
  mode: RenderMode;
6
6
  renderChildren: (childIds: string[]) => React.ReactNode;
7
+ mockData?: Record<string, any>;
7
8
  }
8
9
  export declare function ProductCardNode({ node, mode, renderChildren }: NodeComponentProps): import("react/jsx-runtime").JSX.Element;
10
+ export declare function ProductGridNode({ node, mode, mockData }: NodeComponentProps): import("react/jsx-runtime").JSX.Element;
11
+ export declare function CollectionGridNode({ node, mode, mockData }: NodeComponentProps): import("react/jsx-runtime").JSX.Element;
9
12
  export {};
@@ -10,4 +10,9 @@ export declare function FeatureBarNode({ node }: NodeComponentProps): import("re
10
10
  export declare function TestimonialCardNode({ node }: NodeComponentProps): import("react/jsx-runtime").JSX.Element;
11
11
  export declare function NewsletterSectionNode({ node }: NodeComponentProps): import("react/jsx-runtime").JSX.Element;
12
12
  export declare function HeroSectionNode({ node }: NodeComponentProps): import("react/jsx-runtime").JSX.Element;
13
+ export declare function ImageBannerNode({ node }: NodeComponentProps): import("react/jsx-runtime").JSX.Element;
14
+ export declare function RichTextSectionNode({ node }: NodeComponentProps): import("react/jsx-runtime").JSX.Element;
15
+ export declare function CTASectionNode({ node }: NodeComponentProps): import("react/jsx-runtime").JSX.Element;
16
+ export declare function TestimonialSectionNode({ node }: NodeComponentProps): import("react/jsx-runtime").JSX.Element;
17
+ export declare function FAQSectionNode({ node }: NodeComponentProps): import("react/jsx-runtime").JSX.Element;
13
18
  export {};
@@ -1,7 +1,7 @@
1
1
  import * as React from "react";
2
2
  import { type VariantProps } from "class-variance-authority";
3
3
  declare const badgeVariants: (props?: {
4
- variant?: "outline" | "default" | "destructive" | "secondary";
4
+ variant?: "outline" | "default" | "secondary" | "destructive";
5
5
  } & import("class-variance-authority/types").ClassProp) => string;
6
6
  export interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
7
7
  }
@@ -1,8 +1,8 @@
1
1
  import * as React from "react";
2
2
  import { type VariantProps } from "class-variance-authority";
3
3
  declare const buttonVariants: (props?: {
4
- variant?: "outline" | "link" | "default" | "destructive" | "secondary" | "ghost";
5
- size?: "default" | "icon" | "sm" | "lg";
4
+ variant?: "outline" | "link" | "default" | "secondary" | "ghost" | "destructive";
5
+ size?: "default" | "sm" | "lg" | "icon";
6
6
  } & import("class-variance-authority/types").ClassProp) => string;
7
7
  export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
8
8
  asChild?: boolean;
@@ -1,6 +1,6 @@
1
1
  import * as ResizablePrimitive from "react-resizable-panels";
2
2
  declare const ResizablePanelGroup: ({ className, ...props }: React.ComponentProps<typeof ResizablePrimitive.PanelGroup>) => import("react/jsx-runtime").JSX.Element;
3
- declare const ResizablePanel: import("react").ForwardRefExoticComponent<Omit<import("react").HTMLAttributes<HTMLObjectElement | HTMLElement | HTMLLabelElement | HTMLHeadingElement | HTMLParagraphElement | HTMLSpanElement | HTMLLinkElement | HTMLSelectElement | HTMLTextAreaElement | HTMLAnchorElement | HTMLAreaElement | HTMLAudioElement | HTMLBaseElement | HTMLQuoteElement | HTMLBodyElement | HTMLBRElement | HTMLButtonElement | HTMLCanvasElement | HTMLTableColElement | HTMLDataElement | HTMLDataListElement | HTMLModElement | HTMLDetailsElement | HTMLDialogElement | HTMLDivElement | HTMLDListElement | HTMLEmbedElement | HTMLFieldSetElement | HTMLFormElement | HTMLHeadElement | HTMLHRElement | HTMLHtmlElement | HTMLIFrameElement | HTMLImageElement | HTMLInputElement | HTMLLegendElement | HTMLLIElement | HTMLMapElement | HTMLMetaElement | HTMLMeterElement | HTMLOListElement | HTMLOptGroupElement | HTMLOptionElement | HTMLOutputElement | HTMLPreElement | HTMLProgressElement | HTMLSlotElement | HTMLScriptElement | HTMLSourceElement | HTMLStyleElement | HTMLTableElement | HTMLTemplateElement | HTMLTableSectionElement | HTMLTableCellElement | HTMLTimeElement | HTMLTitleElement | HTMLTableRowElement | HTMLTrackElement | HTMLUListElement | HTMLVideoElement | HTMLTableCaptionElement | HTMLMenuElement | HTMLPictureElement>, "id" | "onResize"> & {
3
+ declare const ResizablePanel: import("react").ForwardRefExoticComponent<Omit<import("react").HTMLAttributes<HTMLObjectElement | HTMLElement | HTMLLabelElement | HTMLHeadingElement | HTMLParagraphElement | HTMLSpanElement | HTMLLinkElement | HTMLTitleElement | HTMLSelectElement | HTMLTextAreaElement | HTMLAnchorElement | HTMLAreaElement | HTMLAudioElement | HTMLBaseElement | HTMLQuoteElement | HTMLBodyElement | HTMLBRElement | HTMLButtonElement | HTMLCanvasElement | HTMLTableColElement | HTMLDataElement | HTMLDataListElement | HTMLModElement | HTMLDetailsElement | HTMLDialogElement | HTMLDivElement | HTMLDListElement | HTMLEmbedElement | HTMLFieldSetElement | HTMLFormElement | HTMLHeadElement | HTMLHRElement | HTMLHtmlElement | HTMLIFrameElement | HTMLImageElement | HTMLInputElement | HTMLLegendElement | HTMLLIElement | HTMLMapElement | HTMLMetaElement | HTMLMeterElement | HTMLOListElement | HTMLOptGroupElement | HTMLOptionElement | HTMLOutputElement | HTMLPreElement | HTMLProgressElement | HTMLSlotElement | HTMLScriptElement | HTMLSourceElement | HTMLStyleElement | HTMLTableElement | HTMLTemplateElement | HTMLTableSectionElement | HTMLTableCellElement | HTMLTimeElement | HTMLTableRowElement | HTMLTrackElement | HTMLUListElement | HTMLVideoElement | HTMLTableCaptionElement | HTMLMenuElement | HTMLPictureElement>, "id" | "onResize"> & {
4
4
  className?: string | undefined;
5
5
  collapsedSize?: number | undefined;
6
6
  collapsible?: boolean | undefined;