@cntrl-site/components 1.0.12-alpha.9 → 1.0.12
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/Components/Form/Form.d.ts +3 -1
- package/dist/Components/Form/FormComponent.d.ts +5 -17
- package/dist/Components/Grid/Grid.d.ts +13 -7
- package/dist/Components/List/List.d.ts +15 -9
- package/dist/Components/List/ListComponent.d.ts +2 -1
- package/dist/Components/Marquee/Marquee.d.ts +2 -1
- package/dist/Components/Marquee/MarqueeComponent.d.ts +2 -1
- package/dist/Components/OnelinerForm/OnelinerForm.d.ts +2 -1
- package/dist/Components/OnelinerForm/OnelinerFormComponent.d.ts +2 -1
- package/dist/Components/TestimonialGrid/TestimonialGrid.d.ts +2 -2
- package/dist/Components/TestimonialGrid/TestimonialGridComponent.d.ts +2 -2
- package/dist/Components/TestimonialSingle/TestimonialSingle.d.ts +3 -3
- package/dist/Components/TestimonialSingle/TestimonialSingleComponent.d.ts +3 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4633 -3639
- package/dist/index.mjs +10540 -9074
- package/dist/types/Component.d.ts +8 -4
- package/package.json +1 -1
- package/dist/Components/utils/getMainFontBaseOnSystem.d.ts +0 -1
|
@@ -4,10 +4,12 @@ type FormProps = {
|
|
|
4
4
|
settings: FormSettings;
|
|
5
5
|
content?: unknown;
|
|
6
6
|
isEditor?: boolean;
|
|
7
|
+
isEditMode?: boolean;
|
|
8
|
+
isPreviewMode?: boolean;
|
|
7
9
|
activeEvent: string | undefined;
|
|
8
10
|
onUpdateSettings?: (settings: FormSettings) => void;
|
|
9
11
|
} & CommonComponentProps;
|
|
10
|
-
export declare function Form({ settings, isEditor, metadata, activeEvent }: FormProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare function Form({ settings, isEditor, isEditMode, isPreviewMode, metadata, activeEvent }: FormProps): import("react/jsx-runtime").JSX.Element;
|
|
11
13
|
export type FormFieldType = 'text' | 'textarea' | 'phone' | 'email';
|
|
12
14
|
export type FormFieldItem = {
|
|
13
15
|
name: string;
|
|
@@ -518,14 +518,14 @@ export declare const FormComponent: {
|
|
|
518
518
|
fieldsToShow: number;
|
|
519
519
|
fields: ({
|
|
520
520
|
name: string;
|
|
521
|
-
type: "
|
|
521
|
+
type: "text";
|
|
522
522
|
placeholder: string;
|
|
523
523
|
label: string;
|
|
524
524
|
isRequired: boolean;
|
|
525
525
|
error: string;
|
|
526
526
|
} | {
|
|
527
527
|
name: string;
|
|
528
|
-
type: "
|
|
528
|
+
type: "email";
|
|
529
529
|
placeholder: string;
|
|
530
530
|
label: string;
|
|
531
531
|
isRequired: boolean;
|
|
@@ -701,23 +701,11 @@ export declare const FormComponent: {
|
|
|
701
701
|
} | {
|
|
702
702
|
type: "group";
|
|
703
703
|
title: string;
|
|
704
|
-
items:
|
|
704
|
+
items: {
|
|
705
705
|
type: "row";
|
|
706
706
|
title: string;
|
|
707
|
-
items:
|
|
708
|
-
|
|
709
|
-
title: string;
|
|
710
|
-
items: string[];
|
|
711
|
-
}[];
|
|
712
|
-
} | {
|
|
713
|
-
type: "group";
|
|
714
|
-
title: string;
|
|
715
|
-
items: {
|
|
716
|
-
type: "row";
|
|
717
|
-
title: string;
|
|
718
|
-
items: string[];
|
|
719
|
-
}[];
|
|
720
|
-
})[];
|
|
707
|
+
items: string[];
|
|
708
|
+
}[];
|
|
721
709
|
})[];
|
|
722
710
|
} | {
|
|
723
711
|
id: string;
|
|
@@ -6,10 +6,11 @@ type GridProps = {
|
|
|
6
6
|
content?: any;
|
|
7
7
|
isEditor?: boolean;
|
|
8
8
|
isPreviewMode?: boolean;
|
|
9
|
+
isEditMode?: boolean;
|
|
9
10
|
activeEvent: string | undefined;
|
|
10
11
|
onUpdateSettings?: (settings: GridSettings) => void;
|
|
11
12
|
} & CommonComponentProps;
|
|
12
|
-
export declare function Grid({ settings, content, isEditor, isPreviewMode, metadata, activeEvent, layoutId }: GridProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare function Grid({ settings, content, isEditor, isPreviewMode, isEditMode, metadata, activeEvent, layoutId }: GridProps): import("react/jsx-runtime").JSX.Element;
|
|
13
14
|
type GridLayoutConfig = {
|
|
14
15
|
entryWidth: number;
|
|
15
16
|
horizontalGap: number;
|
|
@@ -18,21 +19,26 @@ type GridLayoutConfig = {
|
|
|
18
19
|
lockedParam?: 'wrapperWidth' | 'entryWidth' | 'horizontalGap' | null;
|
|
19
20
|
};
|
|
20
21
|
type GridSettings = {
|
|
21
|
-
type: '
|
|
22
|
+
type: 'a' | 'b' | 'c';
|
|
22
23
|
gridLayout: GridLayoutConfig;
|
|
23
24
|
textBoxWidth: number;
|
|
24
25
|
verticalGap: number;
|
|
25
26
|
entriesCount: number;
|
|
26
|
-
lightbox: '
|
|
27
|
+
lightbox: 'on' | 'off';
|
|
27
28
|
imageDisplay: {
|
|
28
|
-
display: '
|
|
29
|
+
display: 'fit' | 'cover';
|
|
29
30
|
ratioValue: '1:1' | '2:3' | '3:4' | '4:5' | '16:9';
|
|
30
31
|
reversed: boolean;
|
|
31
32
|
};
|
|
32
|
-
|
|
33
|
+
lightboxImageDisplay?: 'fit' | 'cover' | {
|
|
34
|
+
display?: 'fit' | 'cover';
|
|
35
|
+
};
|
|
36
|
+
slider: 'on' | 'off';
|
|
33
37
|
sliderTiming: number;
|
|
34
|
-
direction: '
|
|
35
|
-
transition: '
|
|
38
|
+
direction: 'horizontal' | 'vertical' | 'random';
|
|
39
|
+
transition: 'fade' | 'slide';
|
|
40
|
+
showText: 'always' | 'on hover';
|
|
41
|
+
alignEntries: 'on' | 'off';
|
|
36
42
|
titleMarginTop: number;
|
|
37
43
|
subtitleMarginTop: number;
|
|
38
44
|
titleColor: string;
|
|
@@ -65,11 +65,11 @@ type ListColumnTextStyleOverrides = {
|
|
|
65
65
|
export type ListColumnVerticalAlignKey = `${ListColumnPrefix}VerticalAlign`;
|
|
66
66
|
export type ListSettings = {
|
|
67
67
|
columns: number;
|
|
68
|
-
type: '
|
|
68
|
+
type: 'a' | 'b';
|
|
69
69
|
wrapperWidth: number;
|
|
70
70
|
entriesCount: number;
|
|
71
71
|
cellMinHeight: number;
|
|
72
|
-
imageOnHover: '
|
|
72
|
+
imageOnHover: 'on' | 'off';
|
|
73
73
|
imageSize?: {
|
|
74
74
|
min: number;
|
|
75
75
|
max: number;
|
|
@@ -80,7 +80,8 @@ export type ListSettings = {
|
|
|
80
80
|
showCut: number;
|
|
81
81
|
cutCellMinHeight: number;
|
|
82
82
|
cutLabel: string;
|
|
83
|
-
entryHoverEffect: '
|
|
83
|
+
entryHoverEffect: 'none' | 'default' | 'blinds' | 'reveal';
|
|
84
|
+
entryHoverShowOption: 'always' | 'link only';
|
|
84
85
|
rowPaddingTop: number;
|
|
85
86
|
rowPaddingBottom: number;
|
|
86
87
|
rowPaddingTopB: number;
|
|
@@ -113,17 +114,19 @@ export type ListSettings = {
|
|
|
113
114
|
backgroundHoverColor: string;
|
|
114
115
|
dividerHoverColor: string;
|
|
115
116
|
} & ListColumnTextStyleOverrides;
|
|
117
|
+
type ListMedia = {
|
|
118
|
+
objectFit?: 'cover' | 'contain';
|
|
119
|
+
url: string;
|
|
120
|
+
name: string;
|
|
121
|
+
type?: 'image' | 'video';
|
|
122
|
+
};
|
|
116
123
|
type ListContentItem = {
|
|
117
124
|
AColumn?: string;
|
|
118
125
|
BColumnWidth?: string;
|
|
119
126
|
CColumnWidth?: string;
|
|
120
127
|
DColumnWidth?: string;
|
|
121
128
|
EColumnWidth?: string;
|
|
122
|
-
image?:
|
|
123
|
-
objectFit?: 'cover' | 'contain';
|
|
124
|
-
url: string;
|
|
125
|
-
name: string;
|
|
126
|
-
};
|
|
129
|
+
image?: ListMedia;
|
|
127
130
|
link?: string;
|
|
128
131
|
};
|
|
129
132
|
type ListProps = {
|
|
@@ -132,6 +135,7 @@ type ListProps = {
|
|
|
132
135
|
content?: ListContentItem[];
|
|
133
136
|
isEditor?: boolean;
|
|
134
137
|
isPreviewMode?: boolean;
|
|
138
|
+
isEditMode?: boolean;
|
|
135
139
|
activeEvent: string | undefined;
|
|
136
140
|
onUpdateSettings?: (settings: ListSettings) => void;
|
|
137
141
|
} & CommonComponentProps;
|
|
@@ -143,6 +147,7 @@ export type ListTextStylePrefix = typeof LIST_TEXT_STYLE_PREFIXES[number];
|
|
|
143
147
|
export declare const LIST_COLUMN_LETTERS: readonly ["A", "B", "C", "D", "E"];
|
|
144
148
|
export declare function getListColumnVerticalAlignSettingKey(columnLetter: string): string;
|
|
145
149
|
export declare const COLUMN_VALIGN_BASIC_OPTIONS: readonly ["Top", "Center", "Bottom"];
|
|
150
|
+
export declare function normalizeListColumnVerticalAlign(value: string | undefined): string;
|
|
146
151
|
export declare function isBaselineAnchorColumnVerticalAlign(value: string | undefined): boolean;
|
|
147
152
|
export declare function parseBaselineAnchorLetter(value: string | undefined): string | null;
|
|
148
153
|
export declare function isValidColumnBaselineVAlign(value: string | undefined, forColumnLetter: string, settings: ListSettings): boolean;
|
|
@@ -164,8 +169,9 @@ export declare function resolveListColumnPadding(columnWidth: number, paddingLef
|
|
|
164
169
|
};
|
|
165
170
|
export declare function getEffectiveListColumnWidths(columns: number, wrapperWidth: number, storedWidths: Record<ColumnWidthKey, number>): number[];
|
|
166
171
|
export declare function resolveListColumnWidths(columns: number, wrapperWidth: number, storedWidths: Record<ColumnWidthKey, number>): number[];
|
|
172
|
+
export declare function applyListColumnCountChange(nextSettings: ListSettings, prevSettings: ListSettings): ListSettings;
|
|
167
173
|
export declare function applyListSettingsChange(nextSettings: ListSettings, prevSettings: ListSettings, options?: {
|
|
168
174
|
designWidth?: number;
|
|
169
175
|
}): ListSettings;
|
|
170
|
-
export declare function List({ settings, content, isEditor, isPreviewMode, activeEvent, layoutId, onUpdateSettings }: ListProps): import("react/jsx-runtime").JSX.Element;
|
|
176
|
+
export declare function List({ settings, content, isEditor, isPreviewMode, isEditMode, activeEvent, layoutId, onUpdateSettings }: ListProps): import("react/jsx-runtime").JSX.Element;
|
|
171
177
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { List } from './List';
|
|
1
|
+
import { List, ListSettings } from './List';
|
|
2
2
|
import { ComponentSchemaV1 } from '../../types/SchemaV1';
|
|
3
3
|
export declare const ListComponent: {
|
|
4
4
|
element: typeof List;
|
|
@@ -6,6 +6,7 @@ export declare const ListComponent: {
|
|
|
6
6
|
name: string;
|
|
7
7
|
category: string;
|
|
8
8
|
layoutMode: "structured";
|
|
9
|
+
normalizeLayoutSettingsUpdate: (nextSettings: Record<string, any>, prevSettings: Record<string, any>) => ListSettings;
|
|
9
10
|
preview: {
|
|
10
11
|
type: "image";
|
|
11
12
|
url: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CommonComponentProps } from '../props';
|
|
2
|
-
export declare const Marquee: ({ settings, content, isEditor, isPreviewMode }: MarqueeProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const Marquee: ({ settings, content, isEditor, isPreviewMode, isEditMode }: MarqueeProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export type MarqueeItem = {
|
|
4
4
|
image?: {
|
|
5
5
|
url?: string;
|
|
@@ -26,5 +26,6 @@ type MarqueeProps = {
|
|
|
26
26
|
content?: MarqueeItem[];
|
|
27
27
|
isEditor?: boolean;
|
|
28
28
|
isPreviewMode?: boolean;
|
|
29
|
+
isEditMode?: boolean;
|
|
29
30
|
} & CommonComponentProps;
|
|
30
31
|
export {};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { ComponentSchemaV1 } from '../../types/SchemaV1';
|
|
2
2
|
export declare const MarqueeComponent: {
|
|
3
|
-
element: ({ settings, content, isEditor, isPreviewMode }: {
|
|
3
|
+
element: ({ settings, content, isEditor, isPreviewMode, isEditMode }: {
|
|
4
4
|
settings: import('./Marquee').MarqueeSettings;
|
|
5
5
|
content?: import('./Marquee').MarqueeItem[];
|
|
6
6
|
isEditor?: boolean;
|
|
7
7
|
isPreviewMode?: boolean;
|
|
8
|
+
isEditMode?: boolean;
|
|
8
9
|
} & import('../props').CommonComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
10
|
id: string;
|
|
10
11
|
name: string;
|
|
@@ -4,9 +4,10 @@ type OnelinerFormProps = {
|
|
|
4
4
|
settings: OnelinerFormSettings;
|
|
5
5
|
content?: unknown;
|
|
6
6
|
isEditor?: boolean;
|
|
7
|
+
isPreviewMode?: boolean;
|
|
7
8
|
activeEvent?: string;
|
|
8
9
|
} & CommonComponentProps;
|
|
9
|
-
export declare const OnelinerForm: ({ settings, isEditor, metadata, activeEvent }: OnelinerFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare const OnelinerForm: ({ settings, isEditor, isPreviewMode, metadata, activeEvent }: OnelinerFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
11
|
type FieldConfig = {
|
|
11
12
|
name: string;
|
|
12
13
|
type: 'text' | 'phone' | 'email';
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
export declare const OnelinerFormComponent: {
|
|
2
|
-
element: ({ settings, isEditor, metadata, activeEvent }: {
|
|
2
|
+
element: ({ settings, isEditor, isPreviewMode, metadata, activeEvent }: {
|
|
3
3
|
settings: import('./OnelinerForm').OnelinerFormSettings;
|
|
4
4
|
content?: unknown;
|
|
5
5
|
isEditor?: boolean;
|
|
6
|
+
isPreviewMode?: boolean;
|
|
6
7
|
activeEvent?: string;
|
|
7
8
|
} & import('../props').CommonComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
9
|
id: string;
|
|
@@ -4,8 +4,9 @@ type TestimonialsProps = {
|
|
|
4
4
|
content?: TestimonialsItem[];
|
|
5
5
|
isEditor?: boolean;
|
|
6
6
|
isPreviewMode?: boolean;
|
|
7
|
+
isEditMode?: boolean;
|
|
7
8
|
} & CommonComponentProps;
|
|
8
|
-
export declare const TestimonialGrid: ({ settings, content, isEditor, isPreviewMode }: TestimonialsProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare const TestimonialGrid: ({ settings, content, isEditor, isPreviewMode, isEditMode }: TestimonialsProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
10
|
export type TestimonialsItem = {
|
|
10
11
|
logo?: {
|
|
11
12
|
url?: string;
|
|
@@ -22,7 +23,6 @@ type Padding = {
|
|
|
22
23
|
left: number;
|
|
23
24
|
};
|
|
24
25
|
type TestimonialsSettings = {
|
|
25
|
-
autoplay: 'on' | 'off';
|
|
26
26
|
speed: number;
|
|
27
27
|
align: 'start' | 'center' | 'end';
|
|
28
28
|
direction: 'left' | 'right';
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { ComponentSchemaV1 } from '../../types/SchemaV1';
|
|
2
2
|
export declare const TestimonialGridComponent: {
|
|
3
|
-
element: ({ settings, content, isEditor, isPreviewMode }: {
|
|
3
|
+
element: ({ settings, content, isEditor, isPreviewMode, isEditMode }: {
|
|
4
4
|
settings: {
|
|
5
|
-
autoplay: "on" | "off";
|
|
6
5
|
speed: number;
|
|
7
6
|
align: "start" | "center" | "end";
|
|
8
7
|
direction: "left" | "right";
|
|
@@ -27,6 +26,7 @@ export declare const TestimonialGridComponent: {
|
|
|
27
26
|
content?: import('./TestimonialGrid').TestimonialsItem[];
|
|
28
27
|
isEditor?: boolean;
|
|
29
28
|
isPreviewMode?: boolean;
|
|
29
|
+
isEditMode?: boolean;
|
|
30
30
|
} & import('../props').CommonComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
31
31
|
id: string;
|
|
32
32
|
name: string;
|
|
@@ -4,8 +4,9 @@ type TestimonialsProps = {
|
|
|
4
4
|
content?: TestimonialsItem[];
|
|
5
5
|
isEditor?: boolean;
|
|
6
6
|
isPreviewMode?: boolean;
|
|
7
|
+
isEditMode?: boolean;
|
|
7
8
|
} & CommonComponentProps;
|
|
8
|
-
export declare const TestimonialSingle: ({ settings, content, isEditor, isPreviewMode }: TestimonialsProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare const TestimonialSingle: ({ settings, content, isEditor, isPreviewMode, isEditMode }: TestimonialsProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
10
|
export type TestimonialsItem = {
|
|
10
11
|
image?: {
|
|
11
12
|
url?: string;
|
|
@@ -16,8 +17,7 @@ export type TestimonialsItem = {
|
|
|
16
17
|
caption?: any[];
|
|
17
18
|
};
|
|
18
19
|
type TestimonialsSettings = {
|
|
19
|
-
|
|
20
|
-
delay: number;
|
|
20
|
+
speed: number;
|
|
21
21
|
align: 'start' | 'center' | 'end';
|
|
22
22
|
width: number;
|
|
23
23
|
imageMarginTop?: number;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { ComponentSchemaV1 } from '../../types/SchemaV1';
|
|
2
2
|
export declare const TestimonialSingleComponent: {
|
|
3
|
-
element: ({ settings, content, isEditor, isPreviewMode }: {
|
|
3
|
+
element: ({ settings, content, isEditor, isPreviewMode, isEditMode }: {
|
|
4
4
|
settings: {
|
|
5
|
-
|
|
6
|
-
delay: number;
|
|
5
|
+
speed: number;
|
|
7
6
|
align: "start" | "center" | "end";
|
|
8
7
|
width: number;
|
|
9
8
|
imageMarginTop?: number;
|
|
@@ -22,6 +21,7 @@ export declare const TestimonialSingleComponent: {
|
|
|
22
21
|
content?: import('./TestimonialSingle').TestimonialsItem[];
|
|
23
22
|
isEditor?: boolean;
|
|
24
23
|
isPreviewMode?: boolean;
|
|
24
|
+
isEditMode?: boolean;
|
|
25
25
|
} & import('../props').CommonComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
26
26
|
id: string;
|
|
27
27
|
name: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { type Component, isSchemaV1 } from './types/Component';
|
|
1
|
+
export { type Breakpoint, type Component, type ComponentDefaultSize, type ComponentSize, isSchemaV1 } from './types/Component';
|
|
2
2
|
export type { ComponentSchemaV1, SchemaProperty, PropertyScope, LayoutItem, LayoutRow, LayoutGroup, LayoutSwitcher, LayoutTab, SchemaSection, SchemaPanel, SchemaDisplay } from './types/SchemaV1';
|
|
3
3
|
export { components } from './Components/components';
|