@cntrl-site/components 1.0.12-alpha.3 → 1.0.12-alpha.30
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/LICENSE +21 -21
- package/README.md +2 -2
- 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 +24 -7
- package/dist/Components/Lightbox/Lightbox.d.ts +2 -1
- package/dist/Components/LightboxJournal/LightboxJournal.d.ts +104 -0
- package/dist/Components/LightboxJournal/LightboxJournalComponent.d.ts +44 -0
- package/dist/Components/LightboxStrip/LightboxStrip.d.ts +115 -0
- package/dist/Components/LightboxStrip/LightboxStripComponent.d.ts +44 -0
- package/dist/Components/List/List.d.ts +27 -17
- package/dist/Components/List/ListComponent.d.ts +2 -1
- package/dist/Components/Marquee/Marquee.d.ts +8 -3
- 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/Components/utils/imageFitStyles.d.ts +7 -0
- package/dist/Components/utils/textStylesToCss.d.ts +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +11224 -6219
- package/dist/index.mjs +18910 -10667
- package/dist/types/Component.d.ts +8 -4
- package/dist/types/SchemaV1.d.ts +6 -1
- package/package.json +85 -85
- package/dist/Components/utils/getMainFontBaseOnSystem.d.ts +0 -1
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2025 GX Platform
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 GX Platform
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
# Control Components
|
|
2
|
-
|
|
1
|
+
# Control Components
|
|
2
|
+
|
|
3
3
|
This is custom components for control editor and public websites.
|
|
@@ -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,25 +19,31 @@ 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;
|
|
39
45
|
subtitleColor: string;
|
|
46
|
+
lightboxCounterColor: string;
|
|
40
47
|
titleFontFamily: string;
|
|
41
48
|
titleFontSettings?: {
|
|
42
49
|
fontWeight: number;
|
|
@@ -57,5 +64,15 @@ type GridSettings = {
|
|
|
57
64
|
subtitleLetterSpacing?: number;
|
|
58
65
|
subtitleWordSpacing?: number;
|
|
59
66
|
subtitleTextAppearance?: TextStyles['textAppearance'];
|
|
67
|
+
lightboxCounterFontFamily: string;
|
|
68
|
+
lightboxCounterFontSettings?: {
|
|
69
|
+
fontWeight: number;
|
|
70
|
+
fontStyle: string;
|
|
71
|
+
};
|
|
72
|
+
lightboxCounterFontSize?: number;
|
|
73
|
+
lightboxCounterLineHeight?: number;
|
|
74
|
+
lightboxCounterLetterSpacing?: number;
|
|
75
|
+
lightboxCounterWordSpacing?: number;
|
|
76
|
+
lightboxCounterTextAppearance?: TextStyles['textAppearance'];
|
|
60
77
|
};
|
|
61
78
|
export {};
|
|
@@ -7,8 +7,9 @@ type LightboxGalleryProps = {
|
|
|
7
7
|
portalId: string;
|
|
8
8
|
activeEvent: 'close' | 'open';
|
|
9
9
|
isEditor?: boolean;
|
|
10
|
+
isPreviewMode?: boolean;
|
|
10
11
|
};
|
|
11
|
-
export declare const LightboxGallery: ({ settings, content, styles, portalId, activeEvent, isEditor }: LightboxGalleryProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare const LightboxGallery: ({ settings, content, styles, portalId, activeEvent, isEditor, isPreviewMode }: LightboxGalleryProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
13
|
type LightboxImage = {
|
|
13
14
|
image: {
|
|
14
15
|
url: string;
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { CommonComponentProps } from '../props';
|
|
2
|
+
import { TextStyles } from '../utils/textStylesToCss';
|
|
3
|
+
import { LayoutItem, LayoutTab } from '../../types/SchemaV1';
|
|
4
|
+
export type LightboxJournalImage = {
|
|
5
|
+
url: string;
|
|
6
|
+
name?: string;
|
|
7
|
+
objectFit?: 'cover' | 'contain';
|
|
8
|
+
};
|
|
9
|
+
export type LightboxJournalItem = {
|
|
10
|
+
title1: string;
|
|
11
|
+
title2: string;
|
|
12
|
+
title3: string;
|
|
13
|
+
image: LightboxJournalImage[];
|
|
14
|
+
};
|
|
15
|
+
export declare const JOURNAL_TEXT_STYLE_PREFIXES: readonly ["title1", "title2", "title3", "count"];
|
|
16
|
+
export type JournalTextStylePrefix = typeof JOURNAL_TEXT_STYLE_PREFIXES[number];
|
|
17
|
+
export declare const JOURNAL_GLOBAL_TEXT_STYLE_KEYS: readonly ["fontFamily", "fontSettings", "fontSize", "lineHeight", "letterSpacing", "wordSpacing", "textAlign", "textAppearance"];
|
|
18
|
+
export type JournalGlobalTextStyleKey = typeof JOURNAL_GLOBAL_TEXT_STYLE_KEYS[number];
|
|
19
|
+
export declare function getJournalTextStyleSettingKey(prefix: JournalTextStylePrefix, globalKey: JournalGlobalTextStyleKey): string;
|
|
20
|
+
export declare const JOURNAL_TEXT_STYLE_TAB_LABELS: Record<JournalTextStylePrefix, string>;
|
|
21
|
+
export declare function createJournalTextStyleTabContentItems(prefix: JournalTextStylePrefix): LayoutItem[];
|
|
22
|
+
export declare function createJournalTextStylePanelTab(): LayoutTab;
|
|
23
|
+
type LightboxJournalProps = {
|
|
24
|
+
settings: LightboxJournalSettings;
|
|
25
|
+
content?: LightboxJournalItem[];
|
|
26
|
+
isEditor?: boolean;
|
|
27
|
+
isEditMode?: boolean;
|
|
28
|
+
isPreviewMode?: boolean;
|
|
29
|
+
portalId?: string;
|
|
30
|
+
} & CommonComponentProps;
|
|
31
|
+
export declare const LightboxJournal: ({ settings, content, isEditor, isEditMode, isPreviewMode, portalId }: LightboxJournalProps) => import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
export type LightboxJournalSettings = {
|
|
33
|
+
cover: string | null;
|
|
34
|
+
coverFit: {
|
|
35
|
+
display: 'Fit' | 'Cover';
|
|
36
|
+
ratioValue: '1:1' | '2:3' | '3:4' | '4:5' | '16:9';
|
|
37
|
+
reversed: boolean;
|
|
38
|
+
};
|
|
39
|
+
type: 'A' | 'B';
|
|
40
|
+
maxWidth: number;
|
|
41
|
+
maxHeight: number;
|
|
42
|
+
backgroundColor: string;
|
|
43
|
+
imageGap?: number;
|
|
44
|
+
textMaxWidth: number;
|
|
45
|
+
textTransition: 'none' | 'fade';
|
|
46
|
+
titlesGap?: number;
|
|
47
|
+
countCloseGap?: number;
|
|
48
|
+
title1Color: string;
|
|
49
|
+
title2Color: string;
|
|
50
|
+
title3Color: string;
|
|
51
|
+
countColor: string;
|
|
52
|
+
title1FontFamily?: string;
|
|
53
|
+
title1FontSettings?: {
|
|
54
|
+
fontWeight: number;
|
|
55
|
+
fontStyle: string;
|
|
56
|
+
};
|
|
57
|
+
title1FontSize?: number;
|
|
58
|
+
title1LineHeight?: number;
|
|
59
|
+
title1LetterSpacing?: number;
|
|
60
|
+
title1WordSpacing?: number;
|
|
61
|
+
title1TextAlign?: 'left' | 'center' | 'right' | 'justify';
|
|
62
|
+
title1TextAppearance?: TextStyles['textAppearance'];
|
|
63
|
+
title2FontFamily?: string;
|
|
64
|
+
title2FontSettings?: {
|
|
65
|
+
fontWeight: number;
|
|
66
|
+
fontStyle: string;
|
|
67
|
+
};
|
|
68
|
+
title2FontSize?: number;
|
|
69
|
+
title2LineHeight?: number;
|
|
70
|
+
title2LetterSpacing?: number;
|
|
71
|
+
title2WordSpacing?: number;
|
|
72
|
+
title2TextAlign?: 'left' | 'center' | 'right' | 'justify';
|
|
73
|
+
title2TextAppearance?: TextStyles['textAppearance'];
|
|
74
|
+
title3FontFamily?: string;
|
|
75
|
+
title3FontSettings?: {
|
|
76
|
+
fontWeight: number;
|
|
77
|
+
fontStyle: string;
|
|
78
|
+
};
|
|
79
|
+
title3FontSize?: number;
|
|
80
|
+
title3LineHeight?: number;
|
|
81
|
+
title3LetterSpacing?: number;
|
|
82
|
+
title3WordSpacing?: number;
|
|
83
|
+
title3TextAlign?: 'left' | 'center' | 'right' | 'justify';
|
|
84
|
+
title3TextAppearance?: TextStyles['textAppearance'];
|
|
85
|
+
countFontFamily?: string;
|
|
86
|
+
countFontSettings?: {
|
|
87
|
+
fontWeight: number;
|
|
88
|
+
fontStyle: string;
|
|
89
|
+
};
|
|
90
|
+
countFontSize?: number;
|
|
91
|
+
countLineHeight?: number;
|
|
92
|
+
countLetterSpacing?: number;
|
|
93
|
+
countWordSpacing?: number;
|
|
94
|
+
countTextAlign?: 'left' | 'center' | 'right' | 'justify';
|
|
95
|
+
countTextAppearance?: TextStyles['textAppearance'];
|
|
96
|
+
contentMarginTop: number;
|
|
97
|
+
contentMarginLeft: number;
|
|
98
|
+
contentMarginRight: number;
|
|
99
|
+
closeIcon: string | null;
|
|
100
|
+
closeIconMaxWidth: number;
|
|
101
|
+
closeIconColor: string;
|
|
102
|
+
closeIconHoverColor: string;
|
|
103
|
+
};
|
|
104
|
+
export {};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { ComponentSchemaV1 } from '../../types/SchemaV1';
|
|
2
|
+
export declare const LightboxJournalComponent: {
|
|
3
|
+
element: ({ settings, content, isEditor, isEditMode, isPreviewMode, portalId }: {
|
|
4
|
+
settings: import('./LightboxJournal').LightboxJournalSettings;
|
|
5
|
+
content?: import('./LightboxJournal').LightboxJournalItem[];
|
|
6
|
+
isEditor?: boolean;
|
|
7
|
+
isEditMode?: boolean;
|
|
8
|
+
isPreviewMode?: boolean;
|
|
9
|
+
portalId?: string;
|
|
10
|
+
} & import('../props').CommonComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
id: string;
|
|
12
|
+
name: string;
|
|
13
|
+
category: string;
|
|
14
|
+
version: number;
|
|
15
|
+
defaultSize: {
|
|
16
|
+
d: {
|
|
17
|
+
width: number;
|
|
18
|
+
height: number;
|
|
19
|
+
};
|
|
20
|
+
m: {
|
|
21
|
+
width: number;
|
|
22
|
+
height: number;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
preview: {
|
|
26
|
+
type: "image";
|
|
27
|
+
url: string;
|
|
28
|
+
};
|
|
29
|
+
schema: ComponentSchemaV1;
|
|
30
|
+
sourceCode: string;
|
|
31
|
+
assetsPaths: {
|
|
32
|
+
content: {
|
|
33
|
+
path: string;
|
|
34
|
+
placeholderEnabled: boolean;
|
|
35
|
+
}[];
|
|
36
|
+
parameters: never[];
|
|
37
|
+
};
|
|
38
|
+
fontSettingsPaths: {
|
|
39
|
+
content: never[];
|
|
40
|
+
parameters: {
|
|
41
|
+
path: string;
|
|
42
|
+
}[];
|
|
43
|
+
};
|
|
44
|
+
};
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { CommonComponentProps } from '../props';
|
|
2
|
+
import { TextStyles } from '../utils/textStylesToCss';
|
|
3
|
+
import { LayoutItem, LayoutTab } from '../../types/SchemaV1';
|
|
4
|
+
export type LightboxStripItem = {
|
|
5
|
+
image: {
|
|
6
|
+
url: string;
|
|
7
|
+
name?: string;
|
|
8
|
+
objectFit?: 'cover' | 'contain';
|
|
9
|
+
};
|
|
10
|
+
title1?: string;
|
|
11
|
+
title2?: string;
|
|
12
|
+
title3?: string;
|
|
13
|
+
};
|
|
14
|
+
type LightboxStripLegacyItem = LightboxStripItem & {
|
|
15
|
+
text?: Array<{
|
|
16
|
+
type?: string;
|
|
17
|
+
children?: Array<{
|
|
18
|
+
text?: string;
|
|
19
|
+
}>;
|
|
20
|
+
}>;
|
|
21
|
+
};
|
|
22
|
+
export type SharedStripTitles = {
|
|
23
|
+
title1: string;
|
|
24
|
+
title2: string;
|
|
25
|
+
title3: string;
|
|
26
|
+
};
|
|
27
|
+
export declare function extractTitlesFromLegacyText(text: LightboxStripLegacyItem['text']): Partial<SharedStripTitles>;
|
|
28
|
+
export declare function resolveSharedStripTitles(items: LightboxStripLegacyItem[]): SharedStripTitles;
|
|
29
|
+
export type LightboxStripSettings = {
|
|
30
|
+
cover: string | null;
|
|
31
|
+
coverFit: {
|
|
32
|
+
display: 'Fit' | 'Cover';
|
|
33
|
+
ratioValue: '1:1' | '2:3' | '3:4' | '4:5' | '16:9';
|
|
34
|
+
reversed: boolean;
|
|
35
|
+
};
|
|
36
|
+
type: 'A' | 'B';
|
|
37
|
+
backgroundColor: string;
|
|
38
|
+
contentBackgroundColor?: string;
|
|
39
|
+
thumbnailVisibility: 'on' | 'off';
|
|
40
|
+
thumbnailObjectFit: {
|
|
41
|
+
display: 'Fit' | 'Cover';
|
|
42
|
+
ratioValue: '1:1' | '2:3' | '3:4' | '4:5' | '16:9';
|
|
43
|
+
reversed: boolean;
|
|
44
|
+
};
|
|
45
|
+
thumbnailTrigger: 'click' | 'hover';
|
|
46
|
+
thumbnailActive: 'outline' | 'color' | 'scale-up';
|
|
47
|
+
thumbnailActiveColor: string;
|
|
48
|
+
thumbnailGap: number;
|
|
49
|
+
thumbnailMarginBottom?: number;
|
|
50
|
+
imageGap?: number;
|
|
51
|
+
textMaxWidth: number;
|
|
52
|
+
title1Gap?: number;
|
|
53
|
+
title2Gap?: number;
|
|
54
|
+
title1Color: string;
|
|
55
|
+
title2Color: string;
|
|
56
|
+
title3Color: string;
|
|
57
|
+
title1FontFamily?: string;
|
|
58
|
+
title1FontSettings?: {
|
|
59
|
+
fontWeight: number;
|
|
60
|
+
fontStyle: string;
|
|
61
|
+
};
|
|
62
|
+
title1FontSize?: number;
|
|
63
|
+
title1LineHeight?: number;
|
|
64
|
+
title1LetterSpacing?: number;
|
|
65
|
+
title1WordSpacing?: number;
|
|
66
|
+
title1TextAlign?: 'left' | 'center' | 'right' | 'justify';
|
|
67
|
+
title1TextAppearance?: TextStyles['textAppearance'];
|
|
68
|
+
title2FontFamily?: string;
|
|
69
|
+
title2FontSettings?: {
|
|
70
|
+
fontWeight: number;
|
|
71
|
+
fontStyle: string;
|
|
72
|
+
};
|
|
73
|
+
title2FontSize?: number;
|
|
74
|
+
title2LineHeight?: number;
|
|
75
|
+
title2LetterSpacing?: number;
|
|
76
|
+
title2WordSpacing?: number;
|
|
77
|
+
title2TextAlign?: 'left' | 'center' | 'right' | 'justify';
|
|
78
|
+
title2TextAppearance?: TextStyles['textAppearance'];
|
|
79
|
+
title3FontFamily?: string;
|
|
80
|
+
title3FontSettings?: {
|
|
81
|
+
fontWeight: number;
|
|
82
|
+
fontStyle: string;
|
|
83
|
+
};
|
|
84
|
+
title3FontSize?: number;
|
|
85
|
+
title3LineHeight?: number;
|
|
86
|
+
title3LetterSpacing?: number;
|
|
87
|
+
title3WordSpacing?: number;
|
|
88
|
+
title3TextAlign?: 'left' | 'center' | 'right' | 'justify';
|
|
89
|
+
title3TextAppearance?: TextStyles['textAppearance'];
|
|
90
|
+
contentMarginTop: number;
|
|
91
|
+
contentMarginLeft: number;
|
|
92
|
+
contentMarginRight: number;
|
|
93
|
+
closeIcon: string | null;
|
|
94
|
+
closeIconMaxWidth: number;
|
|
95
|
+
closeIconColor: string;
|
|
96
|
+
closeIconHoverColor: string;
|
|
97
|
+
};
|
|
98
|
+
export declare const STRIP_TEXT_STYLE_PREFIXES: readonly ["title1", "title2", "title3"];
|
|
99
|
+
export type StripTextStylePrefix = typeof STRIP_TEXT_STYLE_PREFIXES[number];
|
|
100
|
+
export declare const STRIP_GLOBAL_TEXT_STYLE_KEYS: readonly ["fontFamily", "fontSettings", "fontSize", "lineHeight", "letterSpacing", "wordSpacing", "textAlign", "textAppearance"];
|
|
101
|
+
export type StripGlobalTextStyleKey = typeof STRIP_GLOBAL_TEXT_STYLE_KEYS[number];
|
|
102
|
+
export declare function getStripTextStyleSettingKey(prefix: StripTextStylePrefix, globalKey: StripGlobalTextStyleKey): string;
|
|
103
|
+
export declare const STRIP_TEXT_STYLE_TAB_LABELS: Record<StripTextStylePrefix, string>;
|
|
104
|
+
export declare function createStripTextStyleTabContentItems(prefix: StripTextStylePrefix): LayoutItem[];
|
|
105
|
+
export declare function createStripTextStylePanelTab(): LayoutTab;
|
|
106
|
+
type LightboxStripProps = {
|
|
107
|
+
settings: LightboxStripSettings;
|
|
108
|
+
content?: LightboxStripItem[];
|
|
109
|
+
isEditor?: boolean;
|
|
110
|
+
isEditMode?: boolean;
|
|
111
|
+
isPreviewMode?: boolean;
|
|
112
|
+
portalId?: string;
|
|
113
|
+
} & CommonComponentProps;
|
|
114
|
+
export declare const LightboxStrip: ({ settings, content, isEditor, isEditMode, isPreviewMode, portalId }: LightboxStripProps) => import("react/jsx-runtime").JSX.Element;
|
|
115
|
+
export {};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { ComponentSchemaV1 } from '../../types/SchemaV1';
|
|
2
|
+
export declare const LightboxStripComponent: {
|
|
3
|
+
element: ({ settings, content, isEditor, isEditMode, isPreviewMode, portalId }: {
|
|
4
|
+
settings: import('./LightboxStrip').LightboxStripSettings;
|
|
5
|
+
content?: import('./LightboxStrip').LightboxStripItem[];
|
|
6
|
+
isEditor?: boolean;
|
|
7
|
+
isEditMode?: boolean;
|
|
8
|
+
isPreviewMode?: boolean;
|
|
9
|
+
portalId?: string;
|
|
10
|
+
} & import('../props').CommonComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
id: string;
|
|
12
|
+
name: string;
|
|
13
|
+
category: string;
|
|
14
|
+
version: number;
|
|
15
|
+
defaultSize: {
|
|
16
|
+
d: {
|
|
17
|
+
width: number;
|
|
18
|
+
height: number;
|
|
19
|
+
};
|
|
20
|
+
m: {
|
|
21
|
+
width: number;
|
|
22
|
+
height: number;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
preview: {
|
|
26
|
+
type: "image";
|
|
27
|
+
url: string;
|
|
28
|
+
};
|
|
29
|
+
schema: ComponentSchemaV1;
|
|
30
|
+
sourceCode: string;
|
|
31
|
+
assetsPaths: {
|
|
32
|
+
content: {
|
|
33
|
+
path: string;
|
|
34
|
+
placeholderEnabled: boolean;
|
|
35
|
+
}[];
|
|
36
|
+
parameters: never[];
|
|
37
|
+
};
|
|
38
|
+
fontSettingsPaths: {
|
|
39
|
+
content: never[];
|
|
40
|
+
parameters: {
|
|
41
|
+
path: string;
|
|
42
|
+
}[];
|
|
43
|
+
};
|
|
44
|
+
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CommonComponentProps } from '../props';
|
|
2
2
|
import { TextStyles } from '../utils/textStylesToCss';
|
|
3
|
+
import { LayoutItem, LayoutTab } from '../../types/SchemaV1';
|
|
3
4
|
type ListFontSettings = {
|
|
4
5
|
fontWeight: number;
|
|
5
6
|
fontStyle: string;
|
|
@@ -13,6 +14,7 @@ type ListColumnTextStyleOverrides = {
|
|
|
13
14
|
AColumnTextLineHeight?: number;
|
|
14
15
|
AColumnTextLetterSpacing?: number;
|
|
15
16
|
AColumnTextWordSpacing?: number;
|
|
17
|
+
AColumnTextTextAlign?: 'left' | 'center' | 'right' | 'justify';
|
|
16
18
|
AColumnTextTextAppearance?: TextStyles['textAppearance'];
|
|
17
19
|
BColumnVerticalAlign?: string;
|
|
18
20
|
BColumnTextFontFamily?: string;
|
|
@@ -21,6 +23,7 @@ type ListColumnTextStyleOverrides = {
|
|
|
21
23
|
BColumnTextLineHeight?: number;
|
|
22
24
|
BColumnTextLetterSpacing?: number;
|
|
23
25
|
BColumnTextWordSpacing?: number;
|
|
26
|
+
BColumnTextTextAlign?: 'left' | 'center' | 'right' | 'justify';
|
|
24
27
|
BColumnTextTextAppearance?: TextStyles['textAppearance'];
|
|
25
28
|
CColumnVerticalAlign?: string;
|
|
26
29
|
CColumnTextFontFamily?: string;
|
|
@@ -29,6 +32,7 @@ type ListColumnTextStyleOverrides = {
|
|
|
29
32
|
CColumnTextLineHeight?: number;
|
|
30
33
|
CColumnTextLetterSpacing?: number;
|
|
31
34
|
CColumnTextWordSpacing?: number;
|
|
35
|
+
CColumnTextTextAlign?: 'left' | 'center' | 'right' | 'justify';
|
|
32
36
|
CColumnTextTextAppearance?: TextStyles['textAppearance'];
|
|
33
37
|
DColumnVerticalAlign?: string;
|
|
34
38
|
DColumnTextFontFamily?: string;
|
|
@@ -37,6 +41,7 @@ type ListColumnTextStyleOverrides = {
|
|
|
37
41
|
DColumnTextLineHeight?: number;
|
|
38
42
|
DColumnTextLetterSpacing?: number;
|
|
39
43
|
DColumnTextWordSpacing?: number;
|
|
44
|
+
DColumnTextTextAlign?: 'left' | 'center' | 'right' | 'justify';
|
|
40
45
|
DColumnTextTextAppearance?: TextStyles['textAppearance'];
|
|
41
46
|
EColumnVerticalAlign?: string;
|
|
42
47
|
EColumnTextFontFamily?: string;
|
|
@@ -45,6 +50,7 @@ type ListColumnTextStyleOverrides = {
|
|
|
45
50
|
EColumnTextLineHeight?: number;
|
|
46
51
|
EColumnTextLetterSpacing?: number;
|
|
47
52
|
EColumnTextWordSpacing?: number;
|
|
53
|
+
EColumnTextTextAlign?: 'left' | 'center' | 'right' | 'justify';
|
|
48
54
|
EColumnTextTextAppearance?: TextStyles['textAppearance'];
|
|
49
55
|
cutLabelTextFontFamily?: string;
|
|
50
56
|
cutLabelTextFontSettings?: ListFontSettings;
|
|
@@ -52,16 +58,18 @@ type ListColumnTextStyleOverrides = {
|
|
|
52
58
|
cutLabelTextLineHeight?: number;
|
|
53
59
|
cutLabelTextLetterSpacing?: number;
|
|
54
60
|
cutLabelTextWordSpacing?: number;
|
|
61
|
+
cutLabelTextTextAlign?: 'left' | 'center' | 'right' | 'justify';
|
|
55
62
|
cutLabelTextTextAppearance?: TextStyles['textAppearance'];
|
|
63
|
+
cutLabelVerticalAlign?: string;
|
|
56
64
|
};
|
|
57
65
|
export type ListColumnVerticalAlignKey = `${ListColumnPrefix}VerticalAlign`;
|
|
58
66
|
export type ListSettings = {
|
|
59
67
|
columns: number;
|
|
60
|
-
type: '
|
|
68
|
+
type: 'a' | 'b';
|
|
61
69
|
wrapperWidth: number;
|
|
62
70
|
entriesCount: number;
|
|
63
71
|
cellMinHeight: number;
|
|
64
|
-
imageOnHover: '
|
|
72
|
+
imageOnHover: 'on' | 'off';
|
|
65
73
|
imageSize?: {
|
|
66
74
|
min: number;
|
|
67
75
|
max: number;
|
|
@@ -72,7 +80,8 @@ export type ListSettings = {
|
|
|
72
80
|
showCut: number;
|
|
73
81
|
cutCellMinHeight: number;
|
|
74
82
|
cutLabel: string;
|
|
75
|
-
entryHoverEffect: '
|
|
83
|
+
entryHoverEffect: 'none' | 'default' | 'blinds' | 'reveal';
|
|
84
|
+
entryHoverShowOption: 'always' | 'link only';
|
|
76
85
|
rowPaddingTop: number;
|
|
77
86
|
rowPaddingBottom: number;
|
|
78
87
|
rowPaddingTopB: number;
|
|
@@ -99,30 +108,25 @@ export type ListSettings = {
|
|
|
99
108
|
columnsOrder?: string[];
|
|
100
109
|
textPaddingLR?: number;
|
|
101
110
|
textColor: string;
|
|
102
|
-
textFontFamily: string;
|
|
103
|
-
textFontSettings?: ListFontSettings;
|
|
104
|
-
textFontSize?: number;
|
|
105
|
-
textLineHeight?: number;
|
|
106
|
-
textLetterSpacing?: number;
|
|
107
|
-
textWordSpacing?: number;
|
|
108
|
-
textTextAppearance?: TextStyles['textAppearance'];
|
|
109
111
|
backgroundColor: string;
|
|
110
112
|
dividerColor: string;
|
|
111
113
|
textHoverColor: string;
|
|
112
114
|
backgroundHoverColor: string;
|
|
113
115
|
dividerHoverColor: string;
|
|
114
116
|
} & ListColumnTextStyleOverrides;
|
|
117
|
+
type ListMedia = {
|
|
118
|
+
objectFit?: 'cover' | 'contain';
|
|
119
|
+
url: string;
|
|
120
|
+
name: string;
|
|
121
|
+
type?: 'image' | 'video';
|
|
122
|
+
};
|
|
115
123
|
type ListContentItem = {
|
|
116
124
|
AColumn?: string;
|
|
117
125
|
BColumnWidth?: string;
|
|
118
126
|
CColumnWidth?: string;
|
|
119
127
|
DColumnWidth?: string;
|
|
120
128
|
EColumnWidth?: string;
|
|
121
|
-
image?:
|
|
122
|
-
objectFit?: 'cover' | 'contain';
|
|
123
|
-
url: string;
|
|
124
|
-
name: string;
|
|
125
|
-
};
|
|
129
|
+
image?: ListMedia;
|
|
126
130
|
link?: string;
|
|
127
131
|
};
|
|
128
132
|
type ListProps = {
|
|
@@ -131,6 +135,7 @@ type ListProps = {
|
|
|
131
135
|
content?: ListContentItem[];
|
|
132
136
|
isEditor?: boolean;
|
|
133
137
|
isPreviewMode?: boolean;
|
|
138
|
+
isEditMode?: boolean;
|
|
134
139
|
activeEvent: string | undefined;
|
|
135
140
|
onUpdateSettings?: (settings: ListSettings) => void;
|
|
136
141
|
} & CommonComponentProps;
|
|
@@ -142,13 +147,17 @@ export type ListTextStylePrefix = typeof LIST_TEXT_STYLE_PREFIXES[number];
|
|
|
142
147
|
export declare const LIST_COLUMN_LETTERS: readonly ["A", "B", "C", "D", "E"];
|
|
143
148
|
export declare function getListColumnVerticalAlignSettingKey(columnLetter: string): string;
|
|
144
149
|
export declare const COLUMN_VALIGN_BASIC_OPTIONS: readonly ["Top", "Center", "Bottom"];
|
|
150
|
+
export declare function normalizeListColumnVerticalAlign(value: string | undefined): string;
|
|
145
151
|
export declare function isBaselineAnchorColumnVerticalAlign(value: string | undefined): boolean;
|
|
146
152
|
export declare function parseBaselineAnchorLetter(value: string | undefined): string | null;
|
|
147
153
|
export declare function isValidColumnBaselineVAlign(value: string | undefined, forColumnLetter: string, settings: ListSettings): boolean;
|
|
148
154
|
export declare function getColumnVerticalAlignOptionsForLetter(columnLetter: string, settings: ListSettings): string[];
|
|
149
|
-
export declare const LIST_GLOBAL_TEXT_STYLE_KEYS: readonly ["textFontFamily", "textFontSettings", "textFontSize", "textLineHeight", "textLetterSpacing", "textWordSpacing", "textTextAppearance"];
|
|
155
|
+
export declare const LIST_GLOBAL_TEXT_STYLE_KEYS: readonly ["textFontFamily", "textFontSettings", "textFontSize", "textLineHeight", "textLetterSpacing", "textWordSpacing", "textTextAlign", "textTextAppearance"];
|
|
150
156
|
export type ListGlobalTextStyleKey = typeof LIST_GLOBAL_TEXT_STYLE_KEYS[number];
|
|
151
157
|
export declare function getListColumnTextSettingKey(prefix: ListTextStylePrefix, globalKey: ListGlobalTextStyleKey): string;
|
|
158
|
+
export declare const LIST_TEXT_STYLE_TAB_LABELS: Record<ListTextStylePrefix, string>;
|
|
159
|
+
export declare function createListTextStyleTabContentItems(prefix: ListTextStylePrefix): LayoutItem[];
|
|
160
|
+
export declare function createListTextStylePanelTab(): LayoutTab;
|
|
152
161
|
declare const COLUMN_WIDTH_KEYS: readonly ["AColumnWidth", "BColumnWidth", "CColumnWidth", "DColumnWidth", "EColumnWidth"];
|
|
153
162
|
type ColumnWidthKey = typeof COLUMN_WIDTH_KEYS[number];
|
|
154
163
|
export declare function getListMinColumnWidth(designWidthPx?: number): number;
|
|
@@ -160,8 +169,9 @@ export declare function resolveListColumnPadding(columnWidth: number, paddingLef
|
|
|
160
169
|
};
|
|
161
170
|
export declare function getEffectiveListColumnWidths(columns: number, wrapperWidth: number, storedWidths: Record<ColumnWidthKey, number>): number[];
|
|
162
171
|
export declare function resolveListColumnWidths(columns: number, wrapperWidth: number, storedWidths: Record<ColumnWidthKey, number>): number[];
|
|
172
|
+
export declare function applyListColumnCountChange(nextSettings: ListSettings, prevSettings: ListSettings): ListSettings;
|
|
163
173
|
export declare function applyListSettingsChange(nextSettings: ListSettings, prevSettings: ListSettings, options?: {
|
|
164
174
|
designWidth?: number;
|
|
165
175
|
}): ListSettings;
|
|
166
|
-
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;
|
|
167
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;
|