chesai-ui 0.9.2 → 0.12.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.
Files changed (131) hide show
  1. package/dist/chesai-ui.css +1 -1
  2. package/dist/chesai-ui.es.js +259 -241
  3. package/dist/chesai-ui.umd.js +295 -192
  4. package/dist/components/accordion/index.d.ts +10 -6
  5. package/dist/components/alert/index.d.ts +3 -6
  6. package/dist/components/appbar/index.d.ts +5 -4
  7. package/dist/components/avatar/index.d.ts +1 -1
  8. package/dist/components/bottom-tabs/index.d.ts +3 -0
  9. package/dist/components/button/index.d.ts +4 -3
  10. package/dist/components/button-group/index.d.ts +4 -1
  11. package/dist/components/card/index.d.ts +10 -3
  12. package/dist/components/charts/area-chart.d.ts +3 -1
  13. package/dist/components/charts/bar-chart.d.ts +1 -1
  14. package/dist/components/charts/line-chart.d.ts +1 -1
  15. package/dist/components/code-editor/index.d.ts +36 -0
  16. package/dist/components/combobox/index.d.ts +10 -2
  17. package/dist/components/command/index.d.ts +13 -19
  18. package/dist/components/context-menu/index.d.ts +40 -24
  19. package/dist/components/data-display/index.d.ts +2 -2
  20. package/dist/components/date-input/date-input-styles.d.ts +1 -1
  21. package/dist/components/date-picker/date-picker.d.ts +3 -1
  22. package/dist/components/dialog/index.d.ts +3 -1
  23. package/dist/components/dropdown-menu/index.d.ts +17 -16
  24. package/dist/components/elastic-scroll-area/index.d.ts +8 -5
  25. package/dist/components/empty-state/index.d.ts +2 -6
  26. package/dist/components/floating-panel/index.d.ts +48 -0
  27. package/dist/components/full-calendar/calendar-context.d.ts +37 -0
  28. package/dist/components/full-calendar/event-popover.d.ts +1 -0
  29. package/dist/components/full-calendar/index.d.ts +17 -0
  30. package/dist/components/full-calendar/month-view.d.ts +1 -0
  31. package/dist/components/full-calendar/print-preview-dialog.d.ts +1 -0
  32. package/dist/components/full-calendar/timeline-view.d.ts +1 -0
  33. package/dist/components/full-calendar/types.d.ts +56 -0
  34. package/dist/components/full-calendar/utils.d.ts +23 -0
  35. package/dist/components/full-calendar/year-view.d.ts +1 -0
  36. package/dist/components/icon-button/index.d.ts +3 -3
  37. package/dist/components/index.d.ts +9 -5
  38. package/dist/components/input/input-styles.d.ts +2 -2
  39. package/dist/components/input/use-input.d.ts +2 -2
  40. package/dist/components/install-command/index.d.ts +13 -0
  41. package/dist/components/item/index.d.ts +22 -11
  42. package/dist/components/kbd/index.d.ts +4 -8
  43. package/dist/components/{layout → layouts}/flex.d.ts +1 -1
  44. package/dist/components/lexical-editor/index.d.ts +28 -0
  45. package/dist/components/lexical-editor/nodes/CodeBlockNode.d.ts +32 -0
  46. package/dist/components/lexical-editor/plugins/ToolbarPlugin.d.ts +3 -0
  47. package/dist/components/lexical-editor/theme.d.ts +2 -0
  48. package/dist/components/loadingIndicator/MaterialMorph.d.ts +5 -0
  49. package/dist/components/loadingIndicator/index.d.ts +2 -0
  50. package/dist/components/material3-carousel/types.d.ts +5 -2
  51. package/dist/components/{rich-text-editor → medium-text-editor}/index.d.ts +3 -3
  52. package/dist/components/menubar/index.d.ts +46 -32
  53. package/dist/components/multi-select/multi-select-styles.d.ts +1 -1
  54. package/dist/components/navigation-menu/index.d.ts +22 -13
  55. package/dist/components/navigation-rail/index.d.ts +30 -3
  56. package/dist/components/number-input/number-input-styles.d.ts +1 -1
  57. package/dist/components/number-input/use-number-input.d.ts +2 -2
  58. package/dist/components/progress/circular-progress.d.ts +8 -11
  59. package/dist/components/progress/linear-progress.d.ts +6 -0
  60. package/dist/components/qr-code/index.d.ts +1 -1
  61. package/dist/components/select/select-styles.d.ts +1 -1
  62. package/dist/components/select/select-subcomponents.d.ts +4 -4
  63. package/dist/components/separator/index.d.ts +1 -1
  64. package/dist/components/shallow-router/index.d.ts +1 -1
  65. package/dist/components/shape/shaped-components.d.ts +32 -16
  66. package/dist/components/sheet/index.d.ts +2 -0
  67. package/dist/components/sidebar/index.d.ts +20 -4
  68. package/dist/components/slider/bar-line-slider.d.ts +1 -1
  69. package/dist/components/slider/index.d.ts +14 -1
  70. package/dist/components/stack-router/adapters/tanstack.d.ts +16 -0
  71. package/dist/components/stack-router/index.d.ts +17 -13
  72. package/dist/components/stack-router/types.d.ts +35 -4
  73. package/dist/components/tabs/index.d.ts +1 -1
  74. package/dist/components/textarea/textarea-styles.d.ts +1 -1
  75. package/dist/components/textarea/use-textarea.d.ts +2 -2
  76. package/dist/components/time-picker/index.d.ts +1 -0
  77. package/dist/components/timeline/index.d.ts +18 -0
  78. package/dist/components/toolbar/index.d.ts +29 -31
  79. package/dist/components/tooltip/index.d.ts +3 -2
  80. package/dist/components/tree-view/index.d.ts +52 -0
  81. package/dist/components/view-transition/index.d.ts +14 -0
  82. package/dist/components/view-transition/use-view-transition.d.ts +1 -0
  83. package/dist/components/view-transition/useGlobalViewTransitions.d.ts +1 -0
  84. package/dist/components/virtual-list/index.d.ts +1 -2
  85. package/dist/components/website-studio/BuilderContext.d.ts +16 -0
  86. package/dist/components/website-studio/ScriptAndStyleInjector.d.ts +12 -0
  87. package/dist/components/website-studio/ThemeInjector.d.ts +12 -0
  88. package/dist/components/website-studio/builder/ComponentPickerDialog.d.ts +1 -0
  89. package/dist/components/website-studio/builder/ComponentsTab.d.ts +11 -0
  90. package/dist/components/website-studio/builder/InspectorPanel.d.ts +6 -0
  91. package/dist/components/website-studio/builder/LayersTab.d.ts +12 -0
  92. package/dist/components/website-studio/builder/PageDialogs.d.ts +19 -0
  93. package/dist/components/website-studio/builder/PagesTab.d.ts +14 -0
  94. package/dist/components/website-studio/builder/PreviewOverlay.d.ts +6 -0
  95. package/dist/components/website-studio/builder/helpers.d.ts +3 -0
  96. package/dist/components/website-studio/builder/types.d.ts +23 -0
  97. package/dist/components/website-studio/builder.d.ts +19 -0
  98. package/dist/components/website-studio/canvas/ArtboardIframe.d.ts +6 -0
  99. package/dist/components/website-studio/canvas/ArtboardNode.d.ts +2 -0
  100. package/dist/components/website-studio/canvas/CanvasOverlay.d.ts +7 -0
  101. package/dist/components/website-studio/canvas/IframeWrappers.d.ts +9 -0
  102. package/dist/components/website-studio/canvas/StudioCanvas.d.ts +21 -0
  103. package/dist/components/website-studio/canvas/artboard-types.d.ts +53 -0
  104. package/dist/components/website-studio/canvas/artboard-utils.d.ts +17 -0
  105. package/dist/components/website-studio/defaultActions.d.ts +5 -0
  106. package/dist/components/website-studio/index.d.ts +11 -0
  107. package/dist/components/website-studio/renderer.d.ts +31 -0
  108. package/dist/components/website-studio/store.d.ts +47 -0
  109. package/dist/components/website-studio/types.d.ts +68 -0
  110. package/dist/context/ChesaiProvider.d.ts +4 -6
  111. package/dist/context/ThemeProvider.d.ts +11 -2
  112. package/dist/hooks/index.d.ts +1 -0
  113. package/dist/hooks/useAppBar.d.ts +1 -1
  114. package/dist/hooks/useShallowRouter.d.ts +6 -1
  115. package/dist/{index-CzSl-8Ic.mjs → index-DtvJZDGt.mjs} +136884 -105926
  116. package/dist/{maplibre-gl-BjVNQqoX.mjs → maplibre-gl-C7uF7zuT.mjs} +1 -1
  117. package/dist/{web-H0ujTUcU.mjs → web-BuBkYllI.mjs} +1 -1
  118. package/package.json +23 -7
  119. package/dist/components/animated-outlet/index.d.ts +0 -25
  120. package/dist/components/editor/editor-canvas.d.ts +0 -7
  121. package/dist/components/editor/editor-context.d.ts +0 -37
  122. package/dist/components/editor/editor-item.d.ts +0 -15
  123. package/dist/components/editor/editor-measurements.d.ts +0 -1
  124. package/dist/components/editor/index.d.ts +0 -9
  125. package/dist/components/window-controls/index.d.ts +0 -2
  126. /package/dist/components/{layout → layouts}/grid.d.ts +0 -0
  127. /package/dist/components/{layout → layouts}/index.d.ts +0 -0
  128. /package/dist/components/{layout → layouts}/masonry.d.ts +0 -0
  129. /package/dist/components/{layout → layouts}/virtual-flex.d.ts +0 -0
  130. /package/dist/components/{layout → layouts}/virtual-grid.d.ts +0 -0
  131. /package/dist/components/{layout → layouts}/virtual-masonry.d.ts +0 -0
@@ -1,47 +1,45 @@
1
- import { VariantProps } from 'class-variance-authority';
2
1
  import { default as React } from 'react';
3
- import { iconButtonVariants } from '../icon-button';
4
2
  import * as ToolbarPrimitive from "@radix-ui/react-toolbar";
5
- type ToolbarSize = "sm" | "md" | "lg";
6
- type ToolbarShape = "full" | "minimal" | "sharp";
7
- declare const toolbarVariants: (props?: ({
8
- orientation?: "horizontal" | "vertical" | null | undefined;
9
- variant?: "primary" | "secondary" | "ghost" | null | undefined;
10
- shape?: "full" | "minimal" | "sharp" | null | undefined;
11
- shadow?: "sm" | "md" | "lg" | "none" | null | undefined;
12
- padding?: "sm" | "md" | "lg" | "none" | null | undefined;
13
- gap?: "sm" | "md" | "lg" | "none" | null | undefined;
14
- } & import('class-variance-authority/dist/types').ClassProp) | undefined) => string;
15
- declare const toggleItemVariants: (props?: ({
16
- variant?: "default" | "primary" | "outline" | null | undefined;
17
- size?: "sm" | "md" | "lg" | null | undefined;
18
- shape?: "full" | "minimal" | "sharp" | null | undefined;
19
- } & import('class-variance-authority/dist/types').ClassProp) | undefined) => string;
20
3
  interface ToolbarItemTooltipProps {
21
4
  children: React.ReactElement;
22
5
  content: string;
23
6
  shortcut?: string;
24
7
  }
25
- export interface ToolbarProps extends React.ComponentPropsWithoutRef<typeof ToolbarPrimitive.Root>, VariantProps<typeof toolbarVariants> {
26
- size: "sm" | "md" | "lg";
8
+ declare const ToolbarItemTooltip: ({ children, content, shortcut, }: ToolbarItemTooltipProps) => import("react/jsx-runtime").JSX.Element;
9
+ export interface ToolbarProps extends React.ComponentPropsWithoutRef<typeof ToolbarPrimitive.Root> {
10
+ orientation?: "horizontal" | "vertical";
11
+ variant?: "primary" | "secondary" | "ghost";
12
+ shape?: "full" | "minimal" | "sharp";
13
+ shadow?: "none" | "sm" | "md" | "lg";
14
+ padding?: "none" | "sm" | "md" | "lg";
15
+ gap?: "none" | "sm" | "md" | "lg";
16
+ size?: "sm" | "md" | "lg";
27
17
  }
28
- interface ToolbarButtonProps extends React.ComponentPropsWithoutRef<typeof ToolbarPrimitive.Button>, VariantProps<typeof iconButtonVariants> {
29
- size?: ToolbarSize;
30
- shape?: ToolbarShape;
18
+ declare const ToolbarRoot: React.ForwardRefExoticComponent<ToolbarProps & React.RefAttributes<never>>;
19
+ declare const ToolbarSeparator: React.ForwardRefExoticComponent<React.ComponentPropsWithoutRef<typeof ToolbarPrimitive.Separator> & React.RefAttributes<React.ElementRef<typeof ToolbarPrimitive.Separator>>>;
20
+ export interface ToolbarButtonProps extends React.ComponentPropsWithoutRef<typeof ToolbarPrimitive.Button> {
21
+ variant?: "primary" | "secondary" | "tertiary" | "outline" | "destructive" | "ghost" | "link";
22
+ size?: "sm" | "md" | "lg";
23
+ shape?: "full" | "minimal" | "sharp";
31
24
  tooltip?: string;
32
25
  shortcut?: string;
26
+ isLoading?: boolean;
33
27
  }
34
- interface ToolbarToggleItemProps extends React.ComponentPropsWithoutRef<typeof ToolbarPrimitive.ToggleItem>, VariantProps<typeof toggleItemVariants> {
35
- size?: ToolbarSize;
36
- shape?: ToolbarShape;
28
+ declare const ToolbarButton: React.ForwardRefExoticComponent<ToolbarButtonProps & React.RefAttributes<HTMLButtonElement>>;
29
+ declare const ToolbarToggleGroup: React.ForwardRefExoticComponent<React.ComponentPropsWithoutRef<typeof ToolbarPrimitive.ToggleGroup> & React.RefAttributes<React.ElementRef<typeof ToolbarPrimitive.ToggleGroup>>>;
30
+ export interface ToolbarToggleItemProps extends React.ComponentPropsWithoutRef<typeof ToolbarPrimitive.ToggleItem> {
31
+ variant?: "default" | "outline" | "primary";
32
+ size?: "sm" | "md" | "lg";
33
+ shape?: "full" | "minimal" | "sharp";
37
34
  tooltip?: string;
38
35
  shortcut?: string;
39
36
  }
40
- export declare const Toolbar: React.ForwardRefExoticComponent<ToolbarProps & React.RefAttributes<HTMLDivElement>> & {
41
- Button: React.ForwardRefExoticComponent<ToolbarButtonProps & React.RefAttributes<HTMLButtonElement>>;
42
- Separator: React.ForwardRefExoticComponent<Omit<ToolbarPrimitive.ToolbarSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
43
- ToggleGroup: React.ForwardRefExoticComponent<(Omit<ToolbarPrimitive.ToolbarToggleGroupSingleProps & React.RefAttributes<HTMLDivElement>, "ref"> | Omit<ToolbarPrimitive.ToolbarToggleGroupMultipleProps & React.RefAttributes<HTMLDivElement>, "ref">) & React.RefAttributes<HTMLDivElement>>;
44
- ToggleItem: React.ForwardRefExoticComponent<ToolbarToggleItemProps & React.RefAttributes<HTMLButtonElement>>;
45
- ItemTooltip: ({ children, content, shortcut, }: ToolbarItemTooltipProps) => import("react/jsx-runtime").JSX.Element;
37
+ declare const ToolbarToggleItem: React.ForwardRefExoticComponent<ToolbarToggleItemProps & React.RefAttributes<never>>;
38
+ export declare const Toolbar: typeof ToolbarRoot & {
39
+ Button: typeof ToolbarButton;
40
+ Separator: typeof ToolbarSeparator;
41
+ ToggleGroup: typeof ToolbarToggleGroup;
42
+ ToggleItem: typeof ToolbarToggleItem;
43
+ ItemTooltip: typeof ToolbarItemTooltip;
46
44
  };
47
45
  export {};
@@ -1,4 +1,4 @@
1
- import { useFloating } from '@floating-ui/react';
1
+ import { useFloating, Placement } from '@floating-ui/react';
2
2
  import { default as React } from 'react';
3
3
  export interface TooltipProps extends React.HTMLAttributes<HTMLDivElement> {
4
4
  variant?: "primary" | "secondary";
@@ -20,8 +20,9 @@ interface TooltipContextType {
20
20
  arrowRef: React.RefObject<HTMLDivElement>;
21
21
  }
22
22
  export declare const useTooltip: () => TooltipContextType;
23
- export declare const TooltipProvider: ({ children, }: {
23
+ export declare const TooltipProvider: ({ children, placement, }: {
24
24
  children: React.ReactNode;
25
+ placement?: Placement;
25
26
  }) => import("react/jsx-runtime").JSX.Element;
26
27
  export declare const TooltipTrigger: React.ForwardRefExoticComponent<Omit<React.HTMLProps<HTMLElement> & {
27
28
  asChild?: boolean;
@@ -0,0 +1,52 @@
1
+ import { VariantProps } from 'class-variance-authority';
2
+ import * as React from "react";
3
+ declare const treeItemVariants: (props?: ({
4
+ variant?: "primary" | "secondary" | "ghost" | null | undefined;
5
+ shape?: "full" | "minimal" | "sharp" | null | undefined;
6
+ size?: "sm" | "md" | "lg" | "xl" | null | undefined;
7
+ } & import('class-variance-authority/dist/types').ClassProp) | undefined) => string;
8
+ export interface FlattenedNode<T> {
9
+ id: string;
10
+ item: T;
11
+ parentId: string | null;
12
+ depth: number;
13
+ isExpanded: boolean;
14
+ hasChildren: boolean;
15
+ }
16
+ export interface TreeViewProps<T> extends Omit<React.HTMLAttributes<HTMLDivElement>, "onSelect">, VariantProps<typeof treeItemVariants> {
17
+ data: T[];
18
+ getId: (item: T) => string;
19
+ getChildren: (item: T) => T[] | undefined | null;
20
+ canHaveChildren?: (item: T) => boolean;
21
+ renderItem: (item: T, options: {
22
+ isExpanded: boolean;
23
+ isSelected: boolean;
24
+ depth: number;
25
+ isDragging: boolean;
26
+ }) => React.ReactNode;
27
+ selectedId?: string | null;
28
+ onSelect?: (id: string, item: T) => void;
29
+ multiSelect?: boolean;
30
+ selectedIds?: string[];
31
+ onSelectChange?: (ids: string[], items: T[]) => void;
32
+ expandedIds?: string[];
33
+ onExpandedChange?: (expandedIds: string[]) => void;
34
+ indentSize?: number;
35
+ enableDragAndDrop?: boolean;
36
+ onMoveNode?: (args: {
37
+ activeId: string;
38
+ activeIds: string[];
39
+ parentId: string | null;
40
+ index: number;
41
+ }) => void;
42
+ }
43
+ export declare function TreeView<T>({ data, getId, getChildren, canHaveChildren, renderItem, selectedId, onSelect, multiSelect, selectedIds, onSelectChange, expandedIds: controlledExpandedIds, onExpandedChange, variant, shape, size, indentSize, enableDragAndDrop, onMoveNode, className, ...props }: TreeViewProps<T>): import("react/jsx-runtime").JSX.Element;
44
+ export declare function useTreeHistory<T>(initialData: T[]): {
45
+ data: T[];
46
+ updateData: (newData: T[] | ((prev: T[]) => T[])) => void;
47
+ undo: () => void;
48
+ redo: () => void;
49
+ canUndo: boolean;
50
+ canRedo: boolean;
51
+ };
52
+ export {};
@@ -0,0 +1,14 @@
1
+ import { default as React } from 'react';
2
+ export * from './use-view-transition';
3
+ export * from './useGlobalViewTransitions';
4
+ export interface TransitionLinkProps extends React.HTMLAttributes<HTMLElement> {
5
+ /**
6
+ * The imperative navigation function to execute (e.g., router.push('/about'))
7
+ */
8
+ onNavigate: () => void | Promise<void>;
9
+ /**
10
+ * Set to true to merge props onto a child element instead of rendering a <div>
11
+ */
12
+ asChild?: boolean;
13
+ }
14
+ export declare const TransitionLink: React.ForwardRefExoticComponent<TransitionLinkProps & React.RefAttributes<HTMLElement>>;
@@ -0,0 +1 @@
1
+ export declare function useViewTransition(): <T>(callback: () => T | Promise<T>) => Promise<void>;
@@ -0,0 +1 @@
1
+ export declare function useGlobalViewTransitions(): void;
@@ -6,7 +6,7 @@ export interface VirtualListProps<T> {
6
6
  /** The render function for each item */
7
7
  renderItem: (item: T, index: number) => React.ReactNode;
8
8
  /** Scroll direction of the virtual list. @default "vertical" */
9
- direction?: "vertical" | "horizontal";
9
+ direction?: "vertical" | "horizontal" | "vertical-reverse" | "horizontal-reverse";
10
10
  /**
11
11
  * The component used as the outer scrollable container viewport.
12
12
  * Useful for passing ElasticScrollArea or customizing tags.
@@ -35,7 +35,6 @@ export interface VirtualListProps<T> {
35
35
  contentProps?: React.HTMLAttributes<HTMLDivElement> & Record<string, any>;
36
36
  /**
37
37
  * Access to the raw TanStack Virtual options for advanced logic
38
- * (e.g., initialOffset, scrollMargin, etc.)
39
38
  */
40
39
  virtualOptions?: Partial<VirtualizerOptions<any, any>>;
41
40
  /** Ref to access the virtualizer instance from parent (for scroll controls) */
@@ -0,0 +1,16 @@
1
+ import { default as React } from 'react';
2
+ import { ComponentRegistry, DesignSystemSchema } from './types';
3
+ interface BuilderContextValue {
4
+ components: ComponentRegistry;
5
+ cms?: any;
6
+ actions?: Record<string, Function>;
7
+ customApi?: any;
8
+ globalHeadCode?: string;
9
+ globalBodyCode?: string;
10
+ designSystem?: DesignSystemSchema;
11
+ }
12
+ export declare const useBuilderContext: () => BuilderContextValue;
13
+ export declare const BuilderContextProvider: ({ children, components, cms, actions, customApi, globalHeadCode, globalBodyCode, designSystem, }: BuilderContextValue & {
14
+ children: React.ReactNode;
15
+ }) => import("react/jsx-runtime").JSX.Element;
16
+ export {};
@@ -0,0 +1,12 @@
1
+ import { default as React } from 'react';
2
+ export interface ScriptAndStyleInjectorProps {
3
+ /** The raw HTML string containing elements like scripts, styles, or meta tags */
4
+ html?: string;
5
+ /** Where to append the extracted tags inside the document */
6
+ target: "head" | "body";
7
+ }
8
+ /**
9
+ * Safely parses and injects custom head or body scripts/styles inside the client environment.
10
+ * Automatically scopes injections to the document it mounts in (crucial for iframe isolation).
11
+ */
12
+ export declare const ScriptAndStyleInjector: React.FC<ScriptAndStyleInjectorProps>;
@@ -0,0 +1,12 @@
1
+ import { default as React } from 'react';
2
+ import { DesignSystemSchema } from './types';
3
+ interface ThemeInjectorProps {
4
+ designSystem: DesignSystemSchema;
5
+ children: React.ReactNode;
6
+ }
7
+ /**
8
+ * Injects the agnostic design system tokens as CSS Variables into a wrapper div.
9
+ * This guarantees the styling cascades down to all child components.
10
+ */
11
+ export declare const ThemeInjector: React.FC<ThemeInjectorProps>;
12
+ export {};
@@ -0,0 +1 @@
1
+ export declare const ComponentPickerDialog: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,11 @@
1
+ import { default as React } from 'react';
2
+ import { ComponentTreeNode } from './types';
3
+ interface ComponentsTabProps {
4
+ assetSearch: string;
5
+ setAssetSearch: (val: string) => void;
6
+ componentTreeData: ComponentTreeNode[];
7
+ expandedAssetIds: string[];
8
+ setExpandedAssetIds: React.Dispatch<React.SetStateAction<string[]>>;
9
+ }
10
+ export declare const ComponentsTab: React.FC<ComponentsTabProps>;
11
+ export {};
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ interface InspectorPanelProps {
3
+ selectedNodeIds: string[];
4
+ }
5
+ export declare const InspectorPanel: React.FC<InspectorPanelProps>;
6
+ export {};
@@ -0,0 +1,12 @@
1
+ import { default as React } from 'react';
2
+ import { ComponentRegistry, StudioNode } from '../types';
3
+ interface LayersTabProps {
4
+ layerSearch: string;
5
+ setLayerSearch: (val: string) => void;
6
+ displayedLayers: StudioNode[];
7
+ expandedLayerIds: string[];
8
+ setExpandedLayerIds: React.Dispatch<React.SetStateAction<string[]>>;
9
+ components: ComponentRegistry;
10
+ }
11
+ export declare const LayersTab: React.FC<LayersTabProps>;
12
+ export {};
@@ -0,0 +1,19 @@
1
+ import { default as React } from 'react';
2
+ interface PageDialogsProps {
3
+ isAddPageOpen: boolean;
4
+ setIsAddPageOpen: (open: boolean) => void;
5
+ newPageSlug: string;
6
+ setNewPageSlug: (val: string) => void;
7
+ newPageTitle: string;
8
+ setNewPageTitle: (val: string) => void;
9
+ handleCreatePage: () => void;
10
+ editingPageId: string | null;
11
+ setEditingPageId: (id: string | null) => void;
12
+ editPageSlug: string;
13
+ setEditPageSlug: (val: string) => void;
14
+ editPageTitle: string;
15
+ setEditPageTitle: (val: string) => void;
16
+ handleEditPage: () => void;
17
+ }
18
+ export declare const PageDialogs: React.FC<PageDialogsProps>;
19
+ export {};
@@ -0,0 +1,14 @@
1
+ import { default as React } from 'react';
2
+ import { PageNode, PageAction } from './types';
3
+ interface PagesTabProps {
4
+ pageSearch: string;
5
+ setPageSearch: (val: string) => void;
6
+ displayedPagesTree: PageNode[];
7
+ expandedPageIds: string[];
8
+ setExpandedPageIds: React.Dispatch<React.SetStateAction<string[]>>;
9
+ setIsAddPageOpen: (open: boolean) => void;
10
+ openEditPage: (id: string) => void;
11
+ customPageActions?: PageAction[];
12
+ }
13
+ export declare const PagesTab: React.FC<PagesTabProps>;
14
+ export {};
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ export interface PreviewOverlayProps {
3
+ isOpen: boolean;
4
+ onClose: () => void;
5
+ }
6
+ export declare const PreviewOverlay: React.FC<PreviewOverlayProps>;
@@ -0,0 +1,3 @@
1
+ import { StudioNode } from '../types';
2
+ export declare const getNodeIcon: (type: string) => import("react/jsx-runtime").JSX.Element;
3
+ export declare const filterTree: (nodes: StudioNode[], query: string) => StudioNode[];
@@ -0,0 +1,23 @@
1
+ import { default as React } from 'react';
2
+ import { PageSchema } from '../types';
3
+ export interface PageAction {
4
+ id: string;
5
+ label: string;
6
+ icon?: React.ReactNode;
7
+ destructive?: boolean;
8
+ run: (pageId: string, page: PageSchema) => void;
9
+ }
10
+ export interface PageNode {
11
+ id: string;
12
+ slug: string;
13
+ name: string;
14
+ title: string;
15
+ children: PageNode[];
16
+ pageId: string;
17
+ }
18
+ export interface ComponentTreeNode {
19
+ id: string;
20
+ name: string;
21
+ isCategory: boolean;
22
+ children?: ComponentTreeNode[];
23
+ }
@@ -0,0 +1,19 @@
1
+ import { default as React } from 'react';
2
+ import { ComponentRegistry, WebsiteSchema, DesignSystemSchema } from './types';
3
+ import { PageAction } from './builder/types';
4
+ export interface BuilderProps {
5
+ components: ComponentRegistry;
6
+ initialState: WebsiteSchema;
7
+ cms?: any;
8
+ actions?: Record<string, Function>;
9
+ customApi?: any;
10
+ globalHeadCode?: string;
11
+ globalBodyCode?: string;
12
+ designSystem?: DesignSystemSchema;
13
+ topBarLeft?: React.ReactNode;
14
+ topBarCenter?: React.ReactNode;
15
+ topBarRight?: React.ReactNode;
16
+ customPageActions?: PageAction[];
17
+ onExit?: () => void;
18
+ }
19
+ export declare const Builder: React.FC<BuilderProps>;
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ export declare const ArtboardIframe: ({ children, title, defaultHeight, }: {
3
+ children: React.ReactNode;
4
+ title: string;
5
+ defaultHeight: number;
6
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { NodeProps } from '@xyflow/react';
2
+ export declare const ArtboardNode: ({ data, selected }: NodeProps<any>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { InteractionState, DropTarget } from './artboard-types';
2
+ export declare const CanvasOverlay: ({ iframeWindow, interaction, dropTarget, inlineEditElement, }: {
3
+ iframeWindow: Window;
4
+ interaction: InteractionState;
5
+ dropTarget: DropTarget | null;
6
+ inlineEditElement: HTMLElement | null;
7
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,9 @@
1
+ import { default as React } from 'react';
2
+ export declare const NavigationInterceptor: ({ children, onNavigate, }: {
3
+ children: React.ReactNode;
4
+ onNavigate: (linkTo: string) => void;
5
+ }) => import("react/jsx-runtime").JSX.Element;
6
+ export declare const IframeContentObserver: ({ children, onHeightChange, }: {
7
+ children: React.ReactNode;
8
+ onHeightChange: (h: number) => void;
9
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,21 @@
1
+ import { default as React } from 'react';
2
+ export interface StudioAIConfig {
3
+ enabled: boolean;
4
+ suggestions?: string[];
5
+ models?: string[];
6
+ defaultModel?: string;
7
+ onModelChange?: (model: string) => void;
8
+ onPromptSubmit?: (prompt: string, context: {
9
+ nodes: any[];
10
+ files: File[];
11
+ model?: string;
12
+ }) => void;
13
+ onPanelCollapseToggle?: (isOpen: boolean) => void;
14
+ logsContent?: React.ReactNode;
15
+ customActions?: React.ReactNode;
16
+ }
17
+ interface CanvasInnerProps {
18
+ aiConfig?: StudioAIConfig;
19
+ }
20
+ export declare const StudioCanvas: ({ aiConfig }: CanvasInnerProps) => import("react/jsx-runtime").JSX.Element;
21
+ export {};
@@ -0,0 +1,53 @@
1
+ export type InteractionState = {
2
+ type: 'idle';
3
+ } | {
4
+ type: 'marquee_prep';
5
+ startCoords: {
6
+ x: number;
7
+ y: number;
8
+ };
9
+ } | {
10
+ type: 'marquee';
11
+ startCoords: {
12
+ x: number;
13
+ y: number;
14
+ };
15
+ currentCoords: {
16
+ x: number;
17
+ y: number;
18
+ };
19
+ } | {
20
+ type: 'drag_prep';
21
+ startCoords: {
22
+ x: number;
23
+ y: number;
24
+ };
25
+ } | {
26
+ type: 'drag';
27
+ startCoords: {
28
+ x: number;
29
+ y: number;
30
+ };
31
+ currentCoords: {
32
+ x: number;
33
+ y: number;
34
+ };
35
+ };
36
+ export type DropTarget = {
37
+ parentId: string | null;
38
+ index?: number;
39
+ type: 'line' | 'box';
40
+ rect: {
41
+ top: number;
42
+ left: number;
43
+ width: number;
44
+ height: number;
45
+ };
46
+ };
47
+ export type ArtboardData = {
48
+ label: string;
49
+ width: number;
50
+ height: number;
51
+ isIsolationMode?: boolean;
52
+ componentId?: string;
53
+ };
@@ -0,0 +1,17 @@
1
+ import { ComponentControl, StudioNode } from '../types';
2
+ export declare const isRectEqual: (a: DOMRect | null | undefined, b: DOMRect | null | undefined) => boolean;
3
+ export declare const findNodeById: (nodes: StudioNode[], id: string) => StudioNode | null;
4
+ export declare const getParentAndIndex: (nodes: StudioNode[], targetId: string, parentId?: string | null) => {
5
+ parentId: string | null;
6
+ index: number;
7
+ } | null;
8
+ export declare function generateSingleAxisVariations(controls: Record<string, ComponentControl>): {
9
+ baselineProps: Record<string, any>;
10
+ groups: {
11
+ propName: string;
12
+ variations: {
13
+ props: Record<string, any>;
14
+ value: any;
15
+ }[];
16
+ }[];
17
+ };
@@ -0,0 +1,5 @@
1
+ /**
2
+ * A standard, safe library of built-in actions that work universally
3
+ * within the Renderer engine runtime context.
4
+ */
5
+ export declare const defaultActions: Record<string, Function>;
@@ -0,0 +1,11 @@
1
+ export { defaultActions } from './defaultActions';
2
+ export { ScriptAndStyleInjector } from './ScriptAndStyleInjector';
3
+ export { useStudioStore } from './store';
4
+ export * from './types';
5
+ export declare const WebsiteStudio: {
6
+ Renderer: import('react').FC<import('./renderer').RendererProps>;
7
+ Builder: import('react').FC<import('./builder').BuilderProps>;
8
+ PreviewOverlay: import('react').FC<import('./builder/PreviewOverlay').PreviewOverlayProps>;
9
+ ScriptAndStyleInjector: import('react').FC<import('./ScriptAndStyleInjector').ScriptAndStyleInjectorProps>;
10
+ defaultActions: Record<string, Function>;
11
+ };
@@ -0,0 +1,31 @@
1
+ import { default as React } from 'react';
2
+ import { ComponentRegistry, DesignSystemSchema, PageSchema, StudioNode } from './types';
3
+ export interface ResponsiveValue {
4
+ mobile?: string | number;
5
+ tablet?: string | number;
6
+ desktop?: string | number;
7
+ default?: string | number;
8
+ }
9
+ export declare function isResponsiveValue(value: any): value is ResponsiveValue;
10
+ interface ProcessedStyles {
11
+ cleanProps: Record<string, any>;
12
+ styleTagContent: string | null;
13
+ }
14
+ export declare function processResponsiveStyles(nodeId: string, props: Record<string, any>, responsiveCssProps?: string[]): ProcessedStyles;
15
+ export declare const ThemeInjector: React.FC<{
16
+ designSystem: DesignSystemSchema;
17
+ children: React.ReactNode;
18
+ }>;
19
+ export interface RendererProps {
20
+ components: ComponentRegistry;
21
+ data: PageSchema | StudioNode[];
22
+ designSystem?: DesignSystemSchema;
23
+ cms?: any;
24
+ actions?: Record<string, Function>;
25
+ customApi?: any;
26
+ globalHeadCode?: string;
27
+ globalBodyCode?: string;
28
+ pageHeadCode?: string;
29
+ }
30
+ export declare const Renderer: React.FC<RendererProps>;
31
+ export {};
@@ -0,0 +1,47 @@
1
+ import { StudioNode, WebsiteSchema } from './types';
2
+ interface StudioState {
3
+ website: WebsiteSchema | null;
4
+ activePageId: string | null;
5
+ past: WebsiteSchema[];
6
+ future: WebsiteSchema[];
7
+ undo: () => void;
8
+ redo: () => void;
9
+ selectedNodeIds: string[];
10
+ hoveredNodeId: string | null;
11
+ componentPicker: {
12
+ isOpen: boolean;
13
+ action: 'before' | 'after' | 'inside' | 'replace' | null;
14
+ targetId: string | null;
15
+ };
16
+ openComponentPicker: (action: 'before' | 'after' | 'inside' | 'replace', targetId: string) => void;
17
+ closeComponentPicker: () => void;
18
+ viewContext: {
19
+ type: 'PAGE' | 'COMPONENT';
20
+ id: string | null;
21
+ };
22
+ clipboard: StudioNode[];
23
+ copyNodes: (nodeIds: string[]) => void;
24
+ pasteNodes: (targetId: string | null, position?: 'inside' | 'after') => void;
25
+ duplicateNodes: (nodeIds: string[]) => void;
26
+ initStudio: (schema: WebsiteSchema) => void;
27
+ setActivePage: (pageId: string) => void;
28
+ setViewContext: (type: 'PAGE' | 'COMPONENT', id: string | null) => void;
29
+ setSelectedNodes: (ids: string[]) => void;
30
+ toggleNodeSelection: (id: string, multi: boolean) => void;
31
+ setHoveredNode: (id: string | null) => void;
32
+ addNode: (node: StudioNode, parentId?: string | null, index?: number) => void;
33
+ removeNodes: (nodeIds: string[]) => void;
34
+ moveNode: (nodeId: string, targetParentId: string | null, index?: number) => void;
35
+ moveNodes: (nodeIds: string[], targetParentId: string | null, index?: number) => void;
36
+ updateNodeProps: (nodeId: string, props: Record<string, any>) => void;
37
+ updateNodeId: (oldId: string, newId: string) => void;
38
+ updateDesignSystemTokens: (tokens: Record<string, string | number>) => void;
39
+ insertNodeRelative: (node: StudioNode, targetId: string, position: 'before' | 'after' | 'inside') => void;
40
+ replaceNode: (targetId: string, newNode: StudioNode) => void;
41
+ addPage: (slug: string, title: string) => void;
42
+ updatePage: (id: string, slug: string, title: string) => void;
43
+ duplicatePage: (id: string) => void;
44
+ removePage: (id: string) => void;
45
+ }
46
+ export declare const useStudioStore: import('zustand').UseBoundStore<import('zustand').StoreApi<StudioState>>;
47
+ export {};