@skalar-saas/design-system 0.1.111 → 0.1.113

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.
@@ -1,4 +1,6 @@
1
1
  import React from "react";
2
+ import { type LayoutValue } from "@/shared/ui/DropLayoutPicker/DropLayoutPicker";
3
+ export type { LayoutValue };
2
4
  export interface FormFieldGroupProps extends React.HTMLAttributes<HTMLDivElement> {
3
5
  bodyClassName?: string;
4
6
  disabled?: boolean;
@@ -8,5 +10,7 @@ export interface FormFieldGroupProps extends React.HTMLAttributes<HTMLDivElement
8
10
  onCopy?: () => void;
9
11
  onTrash?: () => void;
10
12
  onAddWidget?: () => void;
13
+ layout?: LayoutValue;
14
+ onLayoutChange?: (layout: LayoutValue) => void;
11
15
  }
12
- export declare const FormFieldGroup: ({ className, bodyClassName, disabled, onMaximize, onGrid, onAdd, onCopy, onTrash, onAddWidget, children, ...props }: FormFieldGroupProps) => import("react/jsx-runtime").JSX.Element;
16
+ export declare const FormFieldGroup: ({ className, bodyClassName, disabled, onMaximize, onGrid, onAdd, onCopy, onTrash, onAddWidget, layout, onLayoutChange, children, ...props }: FormFieldGroupProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1,2 @@
1
1
  export { FormFieldGroup } from './FormFieldGroup';
2
- export type { FormFieldGroupProps } from './FormFieldGroup';
2
+ export type { FormFieldGroupProps, LayoutValue } from './FormFieldGroup';
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- type GridLayout = "1" | "2" | "3" | "2-1" | "1-2" | "1-1";
2
+ import { type LayoutValue } from "@/shared/ui/FormFieldGroup/FormFieldGroup";
3
3
  export type SectionAction = "maximize" | "grid" | "add" | "copy" | "trash" | "addWidget";
4
4
  export type WidgetAction = "maximize" | "text-block" | "edit" | "copy" | "trash";
5
5
  export interface WidgetData {
@@ -16,7 +16,7 @@ export interface ColumnData {
16
16
  }
17
17
  export interface SectionData {
18
18
  id: string;
19
- layout: GridLayout;
19
+ layout: LayoutValue;
20
20
  position: number;
21
21
  columns: ColumnData[];
22
22
  }
@@ -32,10 +32,10 @@ export interface VisualComposerProps extends React.HTMLAttributes<HTMLDivElement
32
32
  onTrash?: () => void;
33
33
  onSectionAction?: (action: SectionAction, sectionId: string) => void;
34
34
  sectionActions?: SectionAction[];
35
+ onLayoutChange?: (sectionId: string, layout: LayoutValue) => void;
35
36
  onWidgetAction?: (action: WidgetAction, widgetId: string, element: HTMLElement | null) => void;
36
37
  widgetActions?: WidgetAction[];
37
38
  renderWidgetIcon?: (widget: WidgetData) => React.ReactNode;
38
39
  onWidgetDrop?: (columnId: string, sectionId: string, position: number, dragData: Record<string, unknown>) => void;
39
40
  }
40
- export declare const VisualComposer: ({ className, data, emptyStateDescription, onAdd, onGrid, onCopy, onTrash, onSectionAction, sectionActions, onWidgetAction, widgetActions, renderWidgetIcon, onWidgetDrop, ...props }: VisualComposerProps) => import("react/jsx-runtime").JSX.Element;
41
- export {};
41
+ export declare const VisualComposer: ({ className, data, emptyStateDescription, onAdd, onGrid, onCopy, onTrash, onSectionAction, sectionActions, onWidgetAction, widgetActions, renderWidgetIcon, onWidgetDrop, onLayoutChange, ...props }: VisualComposerProps) => import("react/jsx-runtime").JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skalar-saas/design-system",
3
- "version": "0.1.111",
3
+ "version": "0.1.113",
4
4
  "type": "module",
5
5
  "description": "Skalar Design System - UI component library",
6
6
  "author": "Skalar Team",
@@ -98,6 +98,7 @@
98
98
  "vitest": "^3.2.4"
99
99
  },
100
100
  "dependencies": {
101
+ "@skalar-saas/design-system": "0.1.112",
101
102
  "react-markdown": "^10.1.0"
102
103
  },
103
104
  "scripts": {