@lightspeed/crane 1.4.2 → 2.0.1
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/CHANGELOG.md +51 -0
- package/UPGRADE.md +19 -0
- package/dist/app.d.mts +1 -1028
- package/dist/app.d.ts +1 -1028
- package/dist/app.mjs +1 -1
- package/dist/cli.mjs +20 -7
- package/package.json +4 -3
- package/template/footers/example-footer/ExampleFooter.vue +1 -1
- package/template/footers/example-footer/client.ts +2 -1
- package/template/footers/example-footer/component/LegalLinks.vue +1 -1
- package/template/footers/example-footer/component/MadeWith.vue +1 -1
- package/template/footers/example-footer/component/ReportAbuse.vue +1 -1
- package/template/footers/example-footer/entity/color.ts +2 -2
- package/template/footers/example-footer/server.ts +2 -1
- package/template/headers/example-header/client.ts +2 -1
- package/template/headers/example-header/component/Account.vue +1 -1
- package/template/headers/example-header/component/Cart.vue +1 -1
- package/template/headers/example-header/component/CategoriesDropdown.vue +1 -1
- package/template/headers/example-header/component/Logo.vue +1 -1
- package/template/headers/example-header/component/NavigationMenu.vue +1 -1
- package/template/headers/example-header/component/SearchForm.vue +1 -1
- package/template/headers/example-header/server.ts +2 -1
- package/template/index.d.ts +1 -1
- package/template/layouts/catalog/example-catalog/Main.vue +1 -1
- package/template/layouts/catalog/example-catalog/slots/custom-bottom-bar/client.ts +2 -1
- package/template/layouts/catalog/example-catalog/slots/custom-bottom-bar/server.ts +2 -1
- package/template/layouts/category/example-category/Main.vue +1 -1
- package/template/layouts/category/example-category/settings/content.ts +1 -1
- package/template/layouts/category/example-category/settings/design.ts +1 -1
- package/template/layouts/product/example-product/Main.vue +1 -1
- package/template/layouts/product/example-product/settings/content.ts +1 -1
- package/template/layouts/product/example-product/settings/design.ts +1 -1
- package/template/package.json +6 -3
- package/template/page-templates/example-template/pages/catalog.ts +1 -1
- package/template/page-templates/example-template/pages/category.ts +1 -1
- package/template/page-templates/example-template/pages/product.ts +1 -1
- package/template/preview/sections/preview.html +1 -1
- package/template/preview/shared/api-routes.ts +515 -41
- package/template/preview/shared/mock.ts +43 -41
- package/template/preview/shared/preview.ts +220 -123
- package/template/preview/shared/utils.ts +209 -62
- package/template/preview/ssr-server.ts +430 -0
- package/template/preview/vite.config.js +76 -75
- package/template/reference/sections/about-us/AboutUs.vue +1 -1
- package/template/reference/sections/about-us/client.ts +1 -1
- package/template/reference/sections/about-us/component/Image.vue +1 -1
- package/template/reference/sections/about-us/component/Stats.vue +2 -2
- package/template/reference/sections/about-us/component/Title.vue +1 -1
- package/template/reference/sections/about-us/server.ts +1 -1
- package/template/reference/sections/about-us/util/visibility-provider.ts +1 -1
- package/template/reference/sections/featured-products/FeaturedProducts.vue +65 -0
- package/template/reference/sections/featured-products/assets/arrow.svg +3 -0
- package/template/reference/sections/featured-products/assets/custom_section_showcase_1_preview.png +0 -0
- package/template/reference/sections/featured-products/client.ts +6 -0
- package/template/reference/sections/featured-products/component/ProductItem.vue +71 -0
- package/template/reference/sections/featured-products/component/Title.vue +31 -0
- package/template/reference/sections/featured-products/entity/color.ts +4 -0
- package/template/reference/sections/featured-products/server.ts +6 -0
- package/template/reference/sections/featured-products/settings/content.ts +14 -0
- package/template/reference/sections/featured-products/settings/design.ts +33 -0
- package/template/reference/sections/featured-products/settings/translations.ts +24 -0
- package/template/reference/sections/featured-products/showcases/1.ts +28 -0
- package/template/reference/sections/featured-products/showcases/translations.ts +16 -0
- package/template/reference/sections/featured-products/type.ts +5 -0
- package/template/reference/sections/intro-slider/IntroSlider.vue +1 -1
- package/template/reference/sections/intro-slider/client.ts +2 -1
- package/template/reference/sections/intro-slider/component/Slider.vue +8 -2
- package/template/reference/sections/intro-slider/component/Title.vue +1 -1
- package/template/reference/sections/intro-slider/entity/color.ts +2 -2
- package/template/reference/sections/intro-slider/server.ts +2 -1
- package/template/reference/sections/tag-lines/TagLines.vue +1 -1
- package/template/reference/sections/tag-lines/client.ts +2 -1
- package/template/reference/sections/tag-lines/component/SectionImage.vue +1 -1
- package/template/reference/sections/tag-lines/component/Title.vue +1 -1
- package/template/reference/sections/tag-lines/composables/highlighted-text-image-list.ts +4 -3
- package/template/reference/sections/tag-lines/server.ts +2 -1
- package/template/reference/sections/trending-categories/TrendingCategories.vue +70 -0
- package/template/reference/sections/trending-categories/assets/arrow.svg +3 -0
- package/template/reference/sections/trending-categories/assets/custom_section_showcase_1_preview.png +0 -0
- package/template/reference/sections/trending-categories/client.ts +6 -0
- package/template/reference/sections/trending-categories/component/CategoryItem.vue +62 -0
- package/template/reference/sections/trending-categories/component/Title.vue +32 -0
- package/template/reference/sections/trending-categories/entity/color.ts +4 -0
- package/template/reference/sections/trending-categories/server.ts +6 -0
- package/template/reference/sections/trending-categories/settings/content.ts +14 -0
- package/template/reference/sections/trending-categories/settings/design.ts +33 -0
- package/template/reference/sections/trending-categories/settings/translations.ts +24 -0
- package/template/reference/sections/trending-categories/showcases/1.ts +36 -0
- package/template/reference/sections/trending-categories/showcases/translations.ts +22 -0
- package/template/reference/sections/trending-categories/type.ts +5 -0
- package/template/reference/shared/components/Button.vue +1 -1
- package/template/reference/shared/utils/styles.ts +1 -0
- package/template/reference/templates/reference-template-apparel/pages/catalog.ts +1 -1
- package/template/reference/templates/reference-template-apparel/pages/category.ts +1 -1
- package/template/reference/templates/reference-template-apparel/pages/home.ts +10 -0
- package/template/reference/templates/reference-template-apparel/pages/product.ts +1 -1
- package/template/reference/templates/reference-template-bike/pages/catalog.ts +1 -1
- package/template/reference/templates/reference-template-bike/pages/category.ts +1 -1
- package/template/reference/templates/reference-template-bike/pages/home.ts +10 -0
- package/template/reference/templates/reference-template-bike/pages/product.ts +1 -1
- package/template/sections/example-section/ExampleSection.vue +8 -1
- package/template/sections/example-section/client.ts +2 -1
- package/template/sections/example-section/component/button/Button.vue +1 -1
- package/template/sections/example-section/component/image/Image.vue +1 -1
- package/template/sections/example-section/component/image/ImagesGrid.vue +1 -1
- package/template/sections/example-section/component/selectbox/Selectbox.vue +1 -1
- package/template/sections/example-section/component/title/Title.vue +1 -1
- package/template/sections/example-section/component/toggle/Toggle.vue +1 -1
- package/template/sections/example-section/entity/color.ts +2 -2
- package/template/sections/example-section/server.ts +2 -1
- package/template/sections/example-section/settings/translations.ts +1 -1
- package/template/sections/example-section/showcases/1.ts +2 -22
- package/template/sections/example-section/showcases/2.ts +2 -22
- package/template/sections/example-section/showcases/3.ts +2 -22
- package/template/sections/example-section/showcases/translations.ts +11 -149
- package/template/shared/components/LanguageSelector.vue +1 -1
- package/template/shared/translation.ts +16 -0
- package/template/shared/utils.ts +3 -1
- package/template/tsconfig.json +1 -0
- package/types.d.ts +6 -457
package/types.d.ts
CHANGED
|
@@ -7,461 +7,10 @@ declare module '*.vue' {
|
|
|
7
7
|
export default component;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
| 'TEL_LINK'
|
|
15
|
-
| 'GO_TO_STORE'
|
|
16
|
-
| 'GO_TO_STORE_LINK'
|
|
17
|
-
| 'GO_TO_PAGE'
|
|
18
|
-
| 'GO_TO_CATEGORY'
|
|
19
|
-
| 'GO_TO_CATEGORY_LINK';
|
|
10
|
+
/**
|
|
11
|
+
* @deprecated These types have been moved to @lightspeed/crane-api
|
|
12
|
+
* Please import from '@lightspeed/crane-api' instead
|
|
13
|
+
*/
|
|
20
14
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
readonly type: ActionLinkType;
|
|
24
|
-
readonly link?: string;
|
|
25
|
-
readonly email?: string;
|
|
26
|
-
readonly phone?: string;
|
|
27
|
-
readonly tileId?: string;
|
|
28
|
-
readonly pageId?: string;
|
|
29
|
-
readonly pageUrl?: string;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
interface ImageInfoData {
|
|
33
|
-
readonly url: string;
|
|
34
|
-
readonly width: number;
|
|
35
|
-
readonly height: number;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
interface ImageBorderInfoData {
|
|
39
|
-
readonly homogeneity: boolean;
|
|
40
|
-
readonly color: {
|
|
41
|
-
readonly r: number;
|
|
42
|
-
readonly g: number;
|
|
43
|
-
readonly b: number;
|
|
44
|
-
readonly a: number;
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
interface ImageContentData {
|
|
49
|
-
readonly bucket: string;
|
|
50
|
-
readonly borderInfo: ImageBorderInfoData;
|
|
51
|
-
readonly set: Record<string, ImageInfoData>;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
interface ToggleContentData {
|
|
55
|
-
readonly enabled: boolean;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
interface ActionLink {
|
|
59
|
-
id: string;
|
|
60
|
-
title?: string;
|
|
61
|
-
type?: ActionLinkType;
|
|
62
|
-
link?: string;
|
|
63
|
-
email?: string;
|
|
64
|
-
phone?: string;
|
|
65
|
-
tileIdForScroll?: string;
|
|
66
|
-
pageIdForNavigate?: string;
|
|
67
|
-
showStoreCategories?: boolean;
|
|
68
|
-
isSubmenuOpened?: boolean;
|
|
69
|
-
categoryId?: number;
|
|
70
|
-
performAction?: () => void;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
interface MenuContentData {
|
|
74
|
-
readonly items: ReadonlyArray<ActionLink>;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
type LogoType = 'TEXT' | 'IMAGE';
|
|
78
|
-
|
|
79
|
-
interface LogoContentData {
|
|
80
|
-
readonly type: LogoType;
|
|
81
|
-
readonly text: string;
|
|
82
|
-
readonly image: ImageContentData;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
type GlobalColorsString =
|
|
86
|
-
'global.color.title' |
|
|
87
|
-
'global.color.body' |
|
|
88
|
-
'global.color.button' |
|
|
89
|
-
'global.color.link' |
|
|
90
|
-
'global.color.background';
|
|
91
|
-
|
|
92
|
-
type GlobalFontsString =
|
|
93
|
-
'global.fontFamily.title' |
|
|
94
|
-
'global.fontFamily.body';
|
|
95
|
-
|
|
96
|
-
type GlobalTextSizeString =
|
|
97
|
-
'global.textSize.title' |
|
|
98
|
-
'global.textSize.subtitle' |
|
|
99
|
-
'global.textSize.body';
|
|
100
|
-
|
|
101
|
-
interface HSLColor {
|
|
102
|
-
h: number;
|
|
103
|
-
s: number;
|
|
104
|
-
l: number;
|
|
105
|
-
a: number;
|
|
106
|
-
}
|
|
107
|
-
interface RGBAColor {
|
|
108
|
-
r: number;
|
|
109
|
-
g: number;
|
|
110
|
-
b: number;
|
|
111
|
-
a: number;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
interface Color {
|
|
115
|
-
raw: string;
|
|
116
|
-
hex: string;
|
|
117
|
-
hsl: HSLColor;
|
|
118
|
-
rgba: RGBAColor;
|
|
119
|
-
auto?: boolean;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
interface SolidColor {
|
|
123
|
-
color: Color | GlobalColorsString | undefined;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
interface GradientColor {
|
|
127
|
-
fromColor: Color | GlobalColorsString | undefined;
|
|
128
|
-
toColor: Color | GlobalColorsString | undefined;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
interface TextDesignData {
|
|
132
|
-
font: string | GlobalFontsString | undefined;
|
|
133
|
-
size: number | GlobalTextSizeString | undefined;
|
|
134
|
-
bold: boolean | undefined;
|
|
135
|
-
italic: boolean | undefined;
|
|
136
|
-
color: Color | GlobalColorsString | undefined;
|
|
137
|
-
visible: boolean;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
interface TextareaDesignData extends TextDesignData {
|
|
141
|
-
readonly whiteSpace: string;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
type CapitalizationType =
|
|
145
|
-
'none'
|
|
146
|
-
| 'all'
|
|
147
|
-
| 'small';
|
|
148
|
-
|
|
149
|
-
interface Frame {
|
|
150
|
-
visible: boolean;
|
|
151
|
-
width: number | undefined;
|
|
152
|
-
color: Color | GlobalColorsString | undefined;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
interface LogoDesignData {
|
|
156
|
-
font: string | GlobalFontsString | undefined;
|
|
157
|
-
size: number | GlobalTextSizeString | undefined;
|
|
158
|
-
bold: boolean | undefined;
|
|
159
|
-
italic: boolean | undefined;
|
|
160
|
-
color: Color | GlobalColorsString | undefined;
|
|
161
|
-
visible: boolean;
|
|
162
|
-
spacing: number | undefined;
|
|
163
|
-
capitalization: CapitalizationType | undefined;
|
|
164
|
-
frame: Frame | undefined;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
type ButtonAppearance =
|
|
168
|
-
'solid-button'
|
|
169
|
-
| 'outline-button'
|
|
170
|
-
| 'text-link';
|
|
171
|
-
|
|
172
|
-
type ButtonSize =
|
|
173
|
-
'small'
|
|
174
|
-
| 'medium'
|
|
175
|
-
| 'large';
|
|
176
|
-
|
|
177
|
-
type ButtonStyle =
|
|
178
|
-
'round-corner'
|
|
179
|
-
| 'rectangle'
|
|
180
|
-
| 'pill';
|
|
181
|
-
|
|
182
|
-
interface ButtonDesignData {
|
|
183
|
-
appearance: ButtonAppearance | undefined;
|
|
184
|
-
font: string | GlobalFontsString | undefined;
|
|
185
|
-
size: ButtonSize | undefined;
|
|
186
|
-
style: ButtonStyle | undefined;
|
|
187
|
-
color: Color | GlobalColorsString | undefined;
|
|
188
|
-
visible: boolean;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
type OverlayType =
|
|
192
|
-
'solid'
|
|
193
|
-
| 'gradient'
|
|
194
|
-
| 'none';
|
|
195
|
-
|
|
196
|
-
interface Overlay {
|
|
197
|
-
type: OverlayType | undefined;
|
|
198
|
-
solid: SolidColor | undefined;
|
|
199
|
-
gradient: GradientColor | undefined;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
interface ImageDesignData {
|
|
203
|
-
overlay: Overlay | undefined;
|
|
204
|
-
visible: boolean;
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
interface SelectboxDesignData {
|
|
208
|
-
value: string | undefined;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
interface ToggleDesignData {
|
|
212
|
-
enabled: boolean | undefined;
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
type BackgroundType =
|
|
216
|
-
'solid'
|
|
217
|
-
| 'gradient';
|
|
218
|
-
|
|
219
|
-
interface Background {
|
|
220
|
-
type: BackgroundType | undefined;
|
|
221
|
-
solid: SolidColor | undefined;
|
|
222
|
-
gradient: GradientColor | undefined;
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
interface BackgroundDesignData {
|
|
226
|
-
background: Background | undefined;
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
type MapEditorContentTypes = {
|
|
230
|
-
readonly INPUTBOX: string;
|
|
231
|
-
readonly TEXTAREA: string;
|
|
232
|
-
readonly BUTTON: ButtonContentData;
|
|
233
|
-
readonly IMAGE: ImageContentData;
|
|
234
|
-
readonly TOGGLE: ToggleContentData;
|
|
235
|
-
readonly SELECTBOX: string;
|
|
236
|
-
readonly MENU: MenuContentData;
|
|
237
|
-
readonly LOGO: LogoContentData;
|
|
238
|
-
};
|
|
239
|
-
|
|
240
|
-
interface InputboxContentEditor {
|
|
241
|
-
readonly type: 'INPUTBOX';
|
|
242
|
-
readonly label: Record<string, string>;
|
|
243
|
-
readonly placeholder: Record<string, string>;
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
interface TextareaContentEditor {
|
|
247
|
-
readonly type: 'TEXTAREA';
|
|
248
|
-
readonly label: Record<string, string>;
|
|
249
|
-
readonly placeholder: Record<string, string>;
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
interface ReportAbuse {
|
|
253
|
-
readonly title: string;
|
|
254
|
-
readonly url: string | undefined;
|
|
255
|
-
readonly target: string | undefined;
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
interface MadeWith {
|
|
259
|
-
readonly url: string | undefined;
|
|
260
|
-
readonly target: string | undefined;
|
|
261
|
-
readonly icon: string | undefined;
|
|
262
|
-
readonly poweredBy: string | undefined;
|
|
263
|
-
readonly company: string | undefined;
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
interface Language {
|
|
267
|
-
readonly code: string;
|
|
268
|
-
readonly description: string;
|
|
269
|
-
readonly main: boolean;
|
|
270
|
-
readonly selected: boolean;
|
|
271
|
-
readonly url: string;
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
interface Account {
|
|
275
|
-
readonly title: string | undefined;
|
|
276
|
-
readonly url: string | undefined;
|
|
277
|
-
readonly target: string | undefined;
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
interface Cart {
|
|
281
|
-
readonly url: string | undefined;
|
|
282
|
-
readonly count: number;
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
interface LegalPage {
|
|
286
|
-
readonly title: string | undefined;
|
|
287
|
-
readonly url: string | undefined;
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
interface SiteContent {
|
|
291
|
-
readonly isPreviewMode: boolean;
|
|
292
|
-
readonly reportAbuse?: ReportAbuse;
|
|
293
|
-
readonly madeWith?: MadeWith;
|
|
294
|
-
readonly languages?: Language[];
|
|
295
|
-
readonly account?: Account;
|
|
296
|
-
readonly cart?: Cart;
|
|
297
|
-
readonly legalPages?: LegalPage[];
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
interface CategoryListComponentItem {
|
|
301
|
-
readonly id: number;
|
|
302
|
-
readonly name: string;
|
|
303
|
-
readonly url: string;
|
|
304
|
-
readonly imageUrl?: string;
|
|
305
|
-
readonly thumbnailImageUrl?: string;
|
|
306
|
-
readonly imageBorderInfo?: ImageBorderInfo;
|
|
307
|
-
readonly alt?: string;
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
interface CategoryTree {
|
|
311
|
-
readonly id: number;
|
|
312
|
-
readonly name: string;
|
|
313
|
-
readonly nameTranslated: Record<string, string>;
|
|
314
|
-
readonly urlPath: string;
|
|
315
|
-
readonly enabled: boolean;
|
|
316
|
-
readonly children: CategoryTree[];
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
interface Category {
|
|
320
|
-
readonly categories?: CategoryListComponentItem[];
|
|
321
|
-
readonly categoryTree?: CategoryTree[];
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
interface ExternalContentData {
|
|
325
|
-
readonly site?: SiteContent;
|
|
326
|
-
readonly category?: Category;
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
interface ButtonContentEditor {
|
|
330
|
-
readonly type: 'BUTTON';
|
|
331
|
-
readonly label: Record<string, string>;
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
interface ImageContentEditor {
|
|
335
|
-
readonly type: 'IMAGE';
|
|
336
|
-
readonly label: Record<string, string>;
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
interface ToggleContentEditor {
|
|
340
|
-
readonly type: 'TOGGLE';
|
|
341
|
-
readonly label: Record<string, string>;
|
|
342
|
-
readonly description?: Record<string, string>;
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
interface SelectboxContentOption {
|
|
346
|
-
readonly value: string;
|
|
347
|
-
readonly label: Record<string, string>;
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
interface SelectboxContentEditor {
|
|
351
|
-
readonly type: 'SELECTBOX';
|
|
352
|
-
readonly label: Record<string, string>;
|
|
353
|
-
readonly placeholder: Record<string, string>;
|
|
354
|
-
readonly description?: Record<string, string>;
|
|
355
|
-
readonly options: ReadonlyArray<SelectboxOption>;
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
interface MenuContentEditor {
|
|
359
|
-
readonly type: 'MENU';
|
|
360
|
-
readonly label: Record<string, string>;
|
|
361
|
-
readonly items: ReadonlyArray<ActionLink>;
|
|
362
|
-
}
|
|
363
|
-
|
|
364
|
-
interface NavigationMenuContentEditor {
|
|
365
|
-
readonly type: 'NAVIGATION_MENU';
|
|
366
|
-
}
|
|
367
|
-
|
|
368
|
-
interface LogoContentEditor {
|
|
369
|
-
readonly type: 'LOGO';
|
|
370
|
-
readonly label: Record<string, string>;
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
type ContentEditor =
|
|
374
|
-
TextContentEditor
|
|
375
|
-
| MultilineTextContentEditor
|
|
376
|
-
| ButtonContentEditor
|
|
377
|
-
| ImageContentEditor
|
|
378
|
-
| ToggleContentEditor
|
|
379
|
-
| SelectboxContentEditor
|
|
380
|
-
| MenuContentEditor
|
|
381
|
-
| NavigationMenuContentEditor
|
|
382
|
-
| LogoContentEditor;
|
|
383
|
-
|
|
384
|
-
type InferContentType<T extends Record<string, ContentEditor>> = {
|
|
385
|
-
readonly [P in keyof T]: MapEditorContentTypes[T[P]['type']]
|
|
386
|
-
};
|
|
387
|
-
|
|
388
|
-
type MapEditorDesignTypes = {
|
|
389
|
-
readonly TEXT: string;
|
|
390
|
-
readonly BUTTON: string;
|
|
391
|
-
readonly IMAGE: string;
|
|
392
|
-
readonly TOGGLE: string;
|
|
393
|
-
readonly SELECTBOX: string;
|
|
394
|
-
readonly BACKGROUND: string;
|
|
395
|
-
readonly COLOR_PICKER: string;
|
|
396
|
-
readonly LOGO: string;
|
|
397
|
-
readonly DIVIDER: string;
|
|
398
|
-
};
|
|
399
|
-
|
|
400
|
-
interface TextDesignEditor {
|
|
401
|
-
readonly type: 'TEXT';
|
|
402
|
-
readonly label: string | Record<string, string>;
|
|
403
|
-
defaults: Record<string, unknown>;
|
|
404
|
-
}
|
|
405
|
-
|
|
406
|
-
interface ButtonDesignEditor {
|
|
407
|
-
readonly type: 'BUTTON';
|
|
408
|
-
readonly label: string | Record<string, string>;
|
|
409
|
-
defaults: Record<string, unknown>;
|
|
410
|
-
}
|
|
411
|
-
|
|
412
|
-
interface ImageDesignEditor {
|
|
413
|
-
readonly type: 'IMAGE';
|
|
414
|
-
readonly label: string | Record<string, string>;
|
|
415
|
-
defaults: Record<string, unknown>;
|
|
416
|
-
}
|
|
417
|
-
|
|
418
|
-
interface ToggleDesignEditor {
|
|
419
|
-
readonly type: 'TOGGLE';
|
|
420
|
-
readonly label: string | Record<string, string>;
|
|
421
|
-
defaults: Record<string, unknown>;
|
|
422
|
-
}
|
|
423
|
-
|
|
424
|
-
interface SelectboxDesignEditor {
|
|
425
|
-
readonly type: 'SELECTBOX';
|
|
426
|
-
readonly label: string | Record<string, string>;
|
|
427
|
-
defaults: Record<string, unknown>;
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
interface BackgroundDesignEditor {
|
|
431
|
-
readonly type: 'BACKGROUND';
|
|
432
|
-
readonly label: string | Record<string, string>;
|
|
433
|
-
defaults: Record<string, unknown>;
|
|
434
|
-
}
|
|
435
|
-
|
|
436
|
-
interface ColorPickerDesignEditor {
|
|
437
|
-
readonly type: 'COLOR_PICKER';
|
|
438
|
-
defaults: Record<string, unknown>;
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
interface LogoDesignEditor {
|
|
442
|
-
readonly type: 'LOGO';
|
|
443
|
-
readonly label?: string | Record<string, string>;
|
|
444
|
-
defaults: Record<string, unknown>;
|
|
445
|
-
}
|
|
446
|
-
|
|
447
|
-
interface DividerDesignEditor {
|
|
448
|
-
readonly type: 'DIVIDER';
|
|
449
|
-
readonly label: string | Record<string, string>;
|
|
450
|
-
}
|
|
451
|
-
|
|
452
|
-
type DesignEditor =
|
|
453
|
-
TextDesignEditor
|
|
454
|
-
| ButtonDesignEditor
|
|
455
|
-
| ImageDesignEditor
|
|
456
|
-
| ToggleDesignEditor
|
|
457
|
-
| SelectboxDesignEditor
|
|
458
|
-
| BackgroundDesignEditor
|
|
459
|
-
| ColorPickerDesignEditor
|
|
460
|
-
| LogoDesignEditor
|
|
461
|
-
| DividerDesignEditor;
|
|
462
|
-
|
|
463
|
-
type InferDesignType<T extends Record<string, DesignEditor>> = {
|
|
464
|
-
readonly [P in keyof T]: MapEditorDesignTypes[T[P]['type']]
|
|
465
|
-
};
|
|
466
|
-
|
|
467
|
-
type SettingsEditor = DesignEditor | ContentEditor;
|
|
15
|
+
// Re-export types from crane-api for backward compatibility
|
|
16
|
+
/// <reference types="@lightspeed/crane-api" />
|