@lightspeed/crane 1.1.1 → 1.1.3
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/app.d.mts +76 -8
- package/dist/app.d.ts +76 -8
- package/dist/app.mjs +1 -1
- package/dist/cli.mjs +10 -23
- package/package.json +6 -5
- package/template/footers/example-footer/ExampleFooter.vue +12 -2
- package/template/footers/example-footer/assets/cart.svg +19 -0
- package/template/footers/example-footer/component/LegalLinks.vue +20 -0
- package/template/footers/example-footer/component/MadeWith.vue +23 -0
- package/template/footers/example-footer/component/ReportAbuse.vue +4 -3
- package/template/footers/example-footer/showcases/1.ts +1 -1
- package/template/headers/example-header/ExampleHeader.vue +38 -4
- package/template/headers/example-header/assets/account_icon.svg +11 -0
- package/template/headers/example-header/assets/lightspeed_logo.png +0 -0
- package/template/headers/example-header/component/Account.vue +20 -0
- package/template/headers/example-header/component/Cart.vue +14 -33
- package/template/headers/example-header/component/Logo.vue +95 -0
- package/template/headers/example-header/component/NavigationMenu.vue +53 -0
- package/template/headers/example-header/settings/translations.ts +6 -2
- package/template/headers/example-header/showcases/1.ts +32 -3
- package/template/headers/example-header/showcases/2.ts +42 -0
- package/template/headers/example-header/showcases/translations.ts +14 -2
- package/template/package.json +1 -1
- package/template/reference/sections/about-us/AboutUs.vue +73 -0
- package/template/reference/sections/about-us/assets/our_company_in_numbers.jpg +0 -0
- package/template/reference/sections/about-us/assets/our_company_in_numbers_preview.jpg +0 -0
- package/template/reference/sections/about-us/assets/our_team.jpg +0 -0
- package/template/reference/sections/about-us/assets/our_team_preview.jpg +0 -0
- package/template/reference/sections/about-us/client.ts +6 -0
- package/template/reference/sections/about-us/component/Image.vue +94 -0
- package/template/reference/sections/about-us/component/Stats.vue +155 -0
- package/template/reference/sections/about-us/component/Title.vue +32 -0
- package/template/reference/sections/about-us/server.ts +6 -0
- package/template/reference/sections/about-us/settings/content.ts +64 -0
- package/template/reference/sections/about-us/settings/design.ts +74 -0
- package/template/reference/sections/about-us/settings/layout.ts +12 -0
- package/template/reference/sections/about-us/settings/translations.ts +151 -0
- package/template/reference/sections/about-us/showcases/1.ts +176 -0
- package/template/reference/sections/about-us/showcases/2.ts +160 -0
- package/template/reference/sections/about-us/showcases/translations.ts +259 -0
- package/template/reference/sections/about-us/type.ts +5 -0
- package/template/reference/sections/about-us/util/visibility-provider.ts +27 -0
- package/template/reference/sections/intro-slider/IntroSlider.vue +77 -0
- package/template/reference/sections/intro-slider/assets/bike_1.jpg +0 -0
- package/template/reference/sections/intro-slider/assets/bike_1@2x.jpg +0 -0
- package/template/reference/sections/intro-slider/assets/bike_2.jpg +0 -0
- package/template/reference/sections/intro-slider/assets/bike_2@2x.jpg +0 -0
- package/template/reference/sections/intro-slider/assets/bike_3.jpg +0 -0
- package/template/reference/sections/intro-slider/assets/bike_3@2x.jpg +0 -0
- package/template/reference/sections/intro-slider/assets/bike_4.jpg +0 -0
- package/template/reference/sections/intro-slider/assets/bike_4@2x.jpg +0 -0
- package/template/reference/sections/intro-slider/assets/bike_5.jpg +0 -0
- package/template/reference/sections/intro-slider/assets/bike_5@2x.jpg +0 -0
- package/template/reference/sections/intro-slider/assets/bike_6.jpg +0 -0
- package/template/reference/sections/intro-slider/assets/bike_6@2x.jpg +0 -0
- package/template/reference/sections/intro-slider/assets/category_1.jpg +0 -0
- package/template/reference/sections/intro-slider/assets/category_1@2x.jpg +0 -0
- package/template/reference/sections/intro-slider/assets/category_2.jpg +0 -0
- package/template/reference/sections/intro-slider/assets/category_2@2x.jpg +0 -0
- package/template/reference/sections/intro-slider/assets/category_3.jpg +0 -0
- package/template/reference/sections/intro-slider/assets/category_3@2x.jpg +0 -0
- package/template/reference/sections/intro-slider/assets/category_5.jpg +0 -0
- package/template/reference/sections/intro-slider/assets/category_5@2x.jpg +0 -0
- package/template/reference/sections/intro-slider/assets/category_6.jpg +0 -0
- package/template/reference/sections/intro-slider/assets/category_6@2x.jpg +0 -0
- package/template/reference/sections/intro-slider/assets/custom_section_showcase_1_preview.png +0 -0
- package/template/reference/sections/intro-slider/assets/custom_section_showcase_2_preview.png +0 -0
- package/template/reference/sections/intro-slider/client.ts +5 -0
- package/template/reference/sections/intro-slider/component/Slider.vue +235 -0
- package/template/reference/sections/intro-slider/component/Title.vue +106 -0
- package/template/reference/sections/intro-slider/entity/color.ts +4 -0
- package/template/reference/sections/intro-slider/server.ts +5 -0
- package/template/reference/sections/intro-slider/settings/content.ts +43 -0
- package/template/reference/sections/intro-slider/settings/design.ts +88 -0
- package/template/reference/sections/intro-slider/settings/layout.ts +12 -0
- package/template/reference/sections/intro-slider/settings/translations.ts +53 -0
- package/template/reference/sections/intro-slider/showcases/1.ts +274 -0
- package/template/reference/sections/intro-slider/showcases/2.ts +270 -0
- package/template/reference/sections/intro-slider/showcases/translations.ts +88 -0
- package/template/reference/sections/intro-slider/type.ts +5 -0
- package/template/reference/sections/tag-lines/TagLines.vue +158 -0
- package/template/reference/sections/tag-lines/assets/explore_our_holiday_gift_guide.jpg +0 -0
- package/template/reference/sections/tag-lines/assets/fall_is_here.jpg +0 -0
- package/template/reference/sections/tag-lines/assets/fall_is_here_preview.jpg +0 -0
- package/template/reference/sections/tag-lines/assets/folding_bikes.jpg +0 -0
- package/template/reference/sections/tag-lines/assets/hybrid_bikes.jpg +0 -0
- package/template/reference/sections/tag-lines/assets/mountain_and_road_bikes.jpg +0 -0
- package/template/reference/sections/tag-lines/assets/shop_chelsea_boots.jpg +0 -0
- package/template/reference/sections/tag-lines/assets/sweater_weather.jpg +0 -0
- package/template/reference/sections/tag-lines/assets/what_we_sell.jpg +0 -0
- package/template/reference/sections/tag-lines/assets/what_we_sell_preview.jpg +0 -0
- package/template/reference/sections/tag-lines/client.ts +5 -0
- package/template/reference/sections/tag-lines/component/HighlightedText.vue +50 -0
- package/template/reference/sections/tag-lines/component/SectionImage.vue +78 -0
- package/template/reference/sections/tag-lines/component/Title.vue +51 -0
- package/template/reference/sections/tag-lines/composables/highlighted-text-image-list.ts +34 -0
- package/template/reference/sections/tag-lines/server.ts +5 -0
- package/template/reference/sections/tag-lines/settings/content.ts +37 -0
- package/template/reference/sections/tag-lines/settings/design.ts +81 -0
- package/template/reference/sections/tag-lines/settings/layout.ts +12 -0
- package/template/reference/sections/tag-lines/settings/translations.ts +61 -0
- package/template/reference/sections/tag-lines/showcases/1.ts +190 -0
- package/template/reference/sections/tag-lines/showcases/2.ts +190 -0
- package/template/reference/sections/tag-lines/showcases/translations.ts +49 -0
- package/template/reference/sections/tag-lines/type.ts +5 -0
- package/template/reference/shared/components/Button.vue +151 -0
- package/template/reference/shared/components/SectionWrapper.vue +26 -0
- package/template/reference/shared/components/Tagline.vue +45 -0
- package/template/reference/shared/utils/color.ts +16 -0
- package/template/reference/shared/utils/styles.ts +12 -0
- package/template/reference/templates/assets/reference_template_apparel_cover_image.jpg +0 -0
- package/template/reference/templates/assets/reference_template_bike_cover_image.jpg +0 -0
- package/template/reference/templates/reference-template-apparel.ts +44 -0
- package/template/reference/templates/reference-template-bike.ts +44 -0
- package/template/sections/example-section/ExampleSection.vue +8 -19
- package/template/sections/example-section/assets/bike_accessories_high.jpg +0 -0
- package/template/sections/example-section/assets/bike_accessories_low.jpg +0 -0
- package/template/sections/example-section/assets/bike_new_arrivals_high.jpg +0 -0
- package/template/sections/example-section/assets/bike_new_arrivals_low.jpg +0 -0
- package/template/sections/example-section/assets/custom_section_showcase_3_preview.jpg +0 -0
- package/template/sections/example-section/assets/fixed_gears_high.jpg +0 -0
- package/template/sections/example-section/assets/fixed_gears_low.jpg +0 -0
- package/template/sections/example-section/assets/repair_service_high.jpg +0 -0
- package/template/sections/example-section/assets/repair_service_low.jpg +0 -0
- package/template/sections/example-section/settings/translations.ts +39 -7
- package/template/sections/example-section/showcases/3.ts +198 -0
- package/template/sections/example-section/showcases/translations.ts +49 -1
- package/template/shared/components/LanguageSelector.vue +75 -0
- package/template/shared/components/SectionWrapper.vue +26 -0
- package/template/templates/template.ts +28 -43
- package/types.d.ts +264 -141
- package/template/headers/example-header/component/SampleComponent.vue +0 -11
package/types.d.ts
CHANGED
|
@@ -1,114 +1,165 @@
|
|
|
1
1
|
/// <reference types="vite/client" />
|
|
2
2
|
|
|
3
3
|
declare module '*.vue' {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
import type { DefineComponent } from 'vue';
|
|
5
|
+
// eslint-disable-next-line
|
|
6
|
+
const component: DefineComponent<{}, {}, any>;
|
|
7
|
+
export default component;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
type
|
|
11
|
-
'SCROLL_TO_TILE'
|
|
10
|
+
type ActionLinkType
|
|
11
|
+
= 'SCROLL_TO_TILE'
|
|
12
12
|
| 'HYPER_LINK'
|
|
13
13
|
| 'MAIL_LINK'
|
|
14
14
|
| 'TEL_LINK'
|
|
15
|
+
| 'GO_TO_STORE'
|
|
15
16
|
| 'GO_TO_STORE_LINK'
|
|
16
17
|
| 'GO_TO_PAGE';
|
|
17
18
|
|
|
18
19
|
interface ButtonContentData {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
20
|
+
readonly title: string;
|
|
21
|
+
readonly type: ActionLinkType;
|
|
22
|
+
readonly link?: string;
|
|
23
|
+
readonly email?: string;
|
|
24
|
+
readonly phone?: string;
|
|
25
|
+
readonly tileId?: string;
|
|
26
|
+
readonly pageId?: string;
|
|
27
|
+
readonly pageUrl?: string;
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
interface ImageInfoData {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
readonly url: string;
|
|
32
|
+
readonly width: number;
|
|
33
|
+
readonly height: number;
|
|
33
34
|
}
|
|
34
35
|
|
|
35
36
|
interface ImageBorderInfoData {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
37
|
+
readonly homogeneity: boolean;
|
|
38
|
+
readonly color: {
|
|
39
|
+
readonly r: number;
|
|
40
|
+
readonly g: number;
|
|
41
|
+
readonly b: number;
|
|
42
|
+
readonly a: number;
|
|
43
|
+
};
|
|
43
44
|
}
|
|
44
45
|
|
|
45
46
|
interface ImageContentData {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
readonly bucket: string;
|
|
48
|
+
readonly borderInfo: ImageBorderInfoData;
|
|
49
|
+
readonly set: Record<string, ImageInfoData>;
|
|
49
50
|
}
|
|
50
51
|
|
|
51
52
|
interface ToggleContentData {
|
|
52
|
-
|
|
53
|
+
readonly enabled: boolean;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
interface ActionLink {
|
|
57
|
+
id: string;
|
|
58
|
+
title?: string;
|
|
59
|
+
type?: string;
|
|
60
|
+
link?: string;
|
|
61
|
+
email?: string;
|
|
62
|
+
phone?: string;
|
|
63
|
+
tileIdForScroll?: string;
|
|
64
|
+
pageIdForNavigate?: string;
|
|
65
|
+
showStoreCategories?: boolean;
|
|
66
|
+
isSubmenuOpened?: boolean;
|
|
67
|
+
categoryId?: number;
|
|
68
|
+
performAction?: () => void;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
interface MenuContentData {
|
|
72
|
+
readonly items: ReadonlyArray<ActionLink>;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
type LogoType = 'TEXT' | 'IMAGE';
|
|
76
|
+
|
|
77
|
+
interface LogoContentData {
|
|
78
|
+
readonly type: LogoType;
|
|
79
|
+
readonly text: string;
|
|
80
|
+
readonly image: ImageContentData
|
|
53
81
|
}
|
|
54
82
|
|
|
55
83
|
type GlobalColorsString =
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
84
|
+
'global.color.title' |
|
|
85
|
+
'global.color.body' |
|
|
86
|
+
'global.color.button' |
|
|
87
|
+
'global.color.link' |
|
|
88
|
+
'global.color.background';
|
|
61
89
|
|
|
62
90
|
type GlobalFontsString =
|
|
63
|
-
|
|
64
|
-
|
|
91
|
+
'global.fontFamily.title' |
|
|
92
|
+
'global.fontFamily.body';
|
|
65
93
|
|
|
66
94
|
type GlobalTextSizeString =
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
95
|
+
'global.textSize.title' |
|
|
96
|
+
'global.textSize.subtitle' |
|
|
97
|
+
'global.textSize.body';
|
|
70
98
|
|
|
71
99
|
interface HSLColor {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
100
|
+
h: number;
|
|
101
|
+
s: number;
|
|
102
|
+
l: number;
|
|
103
|
+
a: number;
|
|
76
104
|
}
|
|
77
105
|
interface RGBAColor {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
106
|
+
r: number;
|
|
107
|
+
g: number;
|
|
108
|
+
b: number;
|
|
109
|
+
a: number;
|
|
82
110
|
}
|
|
83
111
|
|
|
84
112
|
interface Color {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
113
|
+
raw: string;
|
|
114
|
+
hex: string;
|
|
115
|
+
hsl: HSLColor;
|
|
116
|
+
rgba: RGBAColor;
|
|
117
|
+
auto?: boolean;
|
|
90
118
|
}
|
|
91
119
|
|
|
92
120
|
interface SolidColor {
|
|
93
|
-
|
|
121
|
+
color: Color | GlobalColorsString | undefined;
|
|
94
122
|
}
|
|
95
123
|
|
|
96
124
|
interface GradientColor {
|
|
97
|
-
|
|
98
|
-
|
|
125
|
+
fromColor: Color | GlobalColorsString | undefined;
|
|
126
|
+
toColor: Color | GlobalColorsString | undefined;
|
|
99
127
|
}
|
|
100
128
|
|
|
101
129
|
interface TextDesignData {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
130
|
+
font: string | GlobalFontsString | undefined;
|
|
131
|
+
size: number | GlobalTextSizeString | undefined;
|
|
132
|
+
bold: boolean | undefined;
|
|
133
|
+
italic: boolean | undefined;
|
|
134
|
+
color: Color | GlobalColorsString | undefined;
|
|
135
|
+
visible: boolean;
|
|
108
136
|
}
|
|
109
137
|
|
|
110
138
|
interface TextareaDesignData extends TextDesignData {
|
|
111
|
-
|
|
139
|
+
readonly whiteSpace: string;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
type CapitalizationType =
|
|
143
|
+
'none'
|
|
144
|
+
| 'all'
|
|
145
|
+
| 'small';
|
|
146
|
+
|
|
147
|
+
interface Frame {
|
|
148
|
+
visible: boolean;
|
|
149
|
+
width: number | undefined;
|
|
150
|
+
color: Color | GlobalColorsString | undefined;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
interface LogoDesignData {
|
|
154
|
+
font: string | GlobalFontsString | undefined;
|
|
155
|
+
size: number | GlobalTextSizeString | undefined;
|
|
156
|
+
bold: boolean | undefined;
|
|
157
|
+
italic: boolean | undefined;
|
|
158
|
+
color: Color | GlobalColorsString | undefined;
|
|
159
|
+
visible: boolean;
|
|
160
|
+
spacing: number | undefined;
|
|
161
|
+
capitalization: CapitalizationType | undefined;
|
|
162
|
+
frame: Frame | undefined;
|
|
112
163
|
}
|
|
113
164
|
|
|
114
165
|
type ButtonAppearance =
|
|
@@ -127,12 +178,12 @@ type ButtonStyle =
|
|
|
127
178
|
| 'pill';
|
|
128
179
|
|
|
129
180
|
interface ButtonDesignData {
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
181
|
+
appearance: ButtonAppearance | undefined;
|
|
182
|
+
font: string | GlobalFontsString | undefined;
|
|
183
|
+
size: ButtonSize | undefined;
|
|
184
|
+
style: ButtonStyle | undefined;
|
|
185
|
+
color: Color | GlobalColorsString | undefined;
|
|
186
|
+
visible: boolean;
|
|
136
187
|
}
|
|
137
188
|
|
|
138
189
|
type OverlayType =
|
|
@@ -141,22 +192,22 @@ type OverlayType =
|
|
|
141
192
|
| 'none';
|
|
142
193
|
|
|
143
194
|
interface Overlay {
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
195
|
+
type: OverlayType | undefined;
|
|
196
|
+
solid: SolidColor | undefined;
|
|
197
|
+
gradient: GradientColor | undefined;
|
|
147
198
|
}
|
|
148
199
|
|
|
149
200
|
interface ImageDesignData {
|
|
150
|
-
|
|
151
|
-
|
|
201
|
+
overlay: Overlay | undefined;
|
|
202
|
+
visible: boolean;
|
|
152
203
|
}
|
|
153
204
|
|
|
154
205
|
interface SelectboxDesignData {
|
|
155
|
-
|
|
206
|
+
value: string | undefined;
|
|
156
207
|
}
|
|
157
208
|
|
|
158
209
|
interface ToggleDesignData {
|
|
159
|
-
|
|
210
|
+
enabled: boolean | undefined;
|
|
160
211
|
}
|
|
161
212
|
|
|
162
213
|
type BackgroundType =
|
|
@@ -164,73 +215,132 @@ type BackgroundType =
|
|
|
164
215
|
| 'gradient';
|
|
165
216
|
|
|
166
217
|
interface Background {
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
218
|
+
type: BackgroundType | undefined;
|
|
219
|
+
solid: SolidColor | undefined;
|
|
220
|
+
gradient: GradientColor | undefined;
|
|
170
221
|
}
|
|
171
222
|
|
|
172
223
|
interface BackgroundDesignData {
|
|
173
|
-
|
|
224
|
+
background: Background | undefined;
|
|
174
225
|
}
|
|
175
226
|
|
|
176
227
|
type MapEditorContentTypes = {
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
228
|
+
readonly INPUTBOX: string;
|
|
229
|
+
readonly TEXTAREA: string;
|
|
230
|
+
readonly BUTTON: ButtonContentData;
|
|
231
|
+
readonly IMAGE: ImageContentData;
|
|
232
|
+
readonly TOGGLE: ToggleContentData;
|
|
233
|
+
readonly SELECTBOX: string;
|
|
234
|
+
readonly MENU: MenuContentData;
|
|
235
|
+
readonly LOGO: LogoContentData;
|
|
183
236
|
};
|
|
184
237
|
|
|
185
238
|
interface InputboxContentEditor {
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
239
|
+
readonly type: 'INPUTBOX';
|
|
240
|
+
readonly label: Record<string, string>;
|
|
241
|
+
readonly placeholder: Record<string, string>;
|
|
189
242
|
}
|
|
190
243
|
|
|
191
244
|
interface TextareaContentEditor {
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
245
|
+
readonly type: 'TEXTAREA';
|
|
246
|
+
readonly label: Record<string, string>;
|
|
247
|
+
readonly placeholder: Record<string, string>;
|
|
195
248
|
}
|
|
196
249
|
|
|
197
|
-
interface
|
|
198
|
-
|
|
250
|
+
interface ReportAbuse {
|
|
251
|
+
readonly title: string;
|
|
252
|
+
readonly url: string | undefined;
|
|
253
|
+
readonly target: string | undefined;
|
|
199
254
|
}
|
|
200
255
|
|
|
201
|
-
interface
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
256
|
+
interface MadeWith {
|
|
257
|
+
readonly url: string | undefined;
|
|
258
|
+
readonly target: string | undefined;
|
|
259
|
+
readonly icon: string | undefined;
|
|
260
|
+
readonly poweredBy: string | undefined;
|
|
261
|
+
readonly company: string | undefined;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
interface Language {
|
|
265
|
+
readonly code: string;
|
|
266
|
+
readonly description: string;
|
|
267
|
+
readonly main: boolean;
|
|
268
|
+
readonly selected: boolean;
|
|
269
|
+
readonly url: string;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
interface Account {
|
|
273
|
+
readonly title: string | undefined;
|
|
274
|
+
readonly url: string | undefined;
|
|
275
|
+
readonly target: string | undefined;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
interface Cart {
|
|
279
|
+
readonly url: string | undefined;
|
|
280
|
+
readonly count: number;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
interface LegalPage {
|
|
284
|
+
readonly title: string | undefined;
|
|
285
|
+
readonly url: string | undefined;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
interface SiteContent {
|
|
289
|
+
readonly isPreviewMode: boolean;
|
|
290
|
+
readonly reportAbuse?: ReportAbuse;
|
|
291
|
+
readonly madeWith?: MadeWith;
|
|
292
|
+
readonly languages?: Language[];
|
|
293
|
+
readonly account?: Account;
|
|
294
|
+
readonly cart?: Cart;
|
|
295
|
+
readonly legalPages?: LegalPage[];
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
interface ExternalContentData {
|
|
299
|
+
readonly site?: SiteContent;
|
|
205
300
|
}
|
|
206
301
|
|
|
207
302
|
interface ButtonContentEditor {
|
|
208
|
-
|
|
209
|
-
|
|
303
|
+
readonly type: 'BUTTON';
|
|
304
|
+
readonly label: Record<string, string>;
|
|
210
305
|
}
|
|
211
306
|
|
|
212
307
|
interface ImageContentEditor {
|
|
213
|
-
|
|
214
|
-
|
|
308
|
+
readonly type: 'IMAGE';
|
|
309
|
+
readonly label: Record<string, string>;
|
|
215
310
|
}
|
|
216
311
|
|
|
217
312
|
interface ToggleContentEditor {
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
313
|
+
readonly type: 'TOGGLE';
|
|
314
|
+
readonly label: Record<string, string>;
|
|
315
|
+
readonly description?: Record<string, string>;
|
|
221
316
|
}
|
|
222
317
|
|
|
223
318
|
interface SelectboxContentOption {
|
|
224
|
-
|
|
225
|
-
|
|
319
|
+
readonly value: string;
|
|
320
|
+
readonly label: Record<string, string>;
|
|
226
321
|
}
|
|
227
322
|
|
|
228
323
|
interface SelectboxContentEditor {
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
324
|
+
readonly type: 'SELECTBOX';
|
|
325
|
+
readonly label: Record<string, string>;
|
|
326
|
+
readonly placeholder: Record<string, string>;
|
|
327
|
+
readonly description?: Record<string, string>;
|
|
328
|
+
readonly options: ReadonlyArray<SelectboxOption>;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
interface MenuContentEditor {
|
|
332
|
+
readonly type: 'MENU';
|
|
333
|
+
readonly label: Record<string, string>;
|
|
334
|
+
readonly items: ReadonlyArray<ActionLink>;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
interface NavigationMenuContentEditor {
|
|
338
|
+
readonly type: 'NAVIGATION_MENU';
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
interface LogoContentEditor {
|
|
342
|
+
readonly type: 'LOGO';
|
|
343
|
+
readonly label: Record<string, string>;
|
|
234
344
|
}
|
|
235
345
|
|
|
236
346
|
type ContentEditor =
|
|
@@ -239,61 +349,71 @@ type ContentEditor =
|
|
|
239
349
|
| ButtonContentEditor
|
|
240
350
|
| ImageContentEditor
|
|
241
351
|
| ToggleContentEditor
|
|
242
|
-
| SelectboxContentEditor
|
|
352
|
+
| SelectboxContentEditor
|
|
353
|
+
| MenuContentEditor
|
|
354
|
+
| NavigationMenuContentEditor
|
|
355
|
+
| LogoContentEditor;
|
|
243
356
|
|
|
244
357
|
type InferContentType<T extends Record<string, ContentEditor>> = {
|
|
245
|
-
|
|
358
|
+
readonly [P in keyof T]: MapEditorContentTypes[T[P]['type']]
|
|
246
359
|
}
|
|
247
360
|
|
|
248
361
|
type MapEditorDesignTypes = {
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
362
|
+
readonly TEXT: string;
|
|
363
|
+
readonly BUTTON: string;
|
|
364
|
+
readonly IMAGE: string;
|
|
365
|
+
readonly TOGGLE: string;
|
|
366
|
+
readonly SELECTBOX: string;
|
|
367
|
+
readonly BACKGROUND: string;
|
|
368
|
+
readonly COLOR_PICKER: string;
|
|
369
|
+
readonly LOGO: string;
|
|
256
370
|
};
|
|
257
371
|
|
|
258
372
|
interface TextDesignEditor {
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
373
|
+
readonly type: 'TEXT';
|
|
374
|
+
readonly label: string | Record<string, string>;
|
|
375
|
+
defaults: Record<string, unknown>;
|
|
262
376
|
}
|
|
263
377
|
|
|
264
378
|
interface ButtonDesignEditor {
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
379
|
+
readonly type: 'BUTTON';
|
|
380
|
+
readonly label: string | Record<string, string>;
|
|
381
|
+
defaults: Record<string, unknown>;
|
|
268
382
|
}
|
|
269
383
|
|
|
270
384
|
interface ImageDesignEditor {
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
385
|
+
readonly type: 'IMAGE';
|
|
386
|
+
readonly label: string | Record<string, string>;
|
|
387
|
+
defaults: Record<string, unknown>;
|
|
274
388
|
}
|
|
275
389
|
|
|
276
390
|
interface ToggleDesignEditor {
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
391
|
+
readonly type: 'TOGGLE';
|
|
392
|
+
readonly label: string | Record<string, string>;
|
|
393
|
+
defaults: Record<string, unknown>;
|
|
280
394
|
}
|
|
281
395
|
|
|
282
396
|
interface SelectboxDesignEditor {
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
397
|
+
readonly type: 'SELECTBOX';
|
|
398
|
+
readonly label: string | Record<string, string>;
|
|
399
|
+
defaults: Record<string, unknown>;
|
|
286
400
|
}
|
|
287
401
|
|
|
288
402
|
interface BackgroundDesignEditor {
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
403
|
+
readonly type: 'BACKGROUND';
|
|
404
|
+
readonly label: string | Record<string, string>;
|
|
405
|
+
defaults: Record<string, unknown>;
|
|
292
406
|
}
|
|
293
407
|
|
|
294
408
|
interface ColorPickerDesignEditor {
|
|
295
|
-
|
|
296
|
-
|
|
409
|
+
readonly type: 'COLOR_PICKER';
|
|
410
|
+
defaults: Record<string, unknown>;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
interface LogoDesignEditor {
|
|
414
|
+
readonly type: 'LOGO';
|
|
415
|
+
readonly label?: string | Record<string, string>;
|
|
416
|
+
defaults: Record<string, unknown>;
|
|
297
417
|
}
|
|
298
418
|
|
|
299
419
|
type DesignEditor =
|
|
@@ -303,8 +423,11 @@ type DesignEditor =
|
|
|
303
423
|
| ToggleDesignEditor
|
|
304
424
|
| SelectboxDesignEditor
|
|
305
425
|
| BackgroundDesignEditor
|
|
306
|
-
| ColorPickerDesignEditor
|
|
426
|
+
| ColorPickerDesignEditor
|
|
427
|
+
| LogoDesignEditor;
|
|
307
428
|
|
|
308
429
|
type InferDesignType<T extends Record<string, DesignEditor>> = {
|
|
309
|
-
|
|
430
|
+
readonly [P in keyof T]: MapEditorDesignTypes[T[P]['type']]
|
|
310
431
|
}
|
|
432
|
+
|
|
433
|
+
type SettingsEditor = DesignEditor | ContentEditor;
|