@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
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
section_title: {
|
|
3
|
+
type: 'INPUTBOX',
|
|
4
|
+
label: '$label.section_title.label',
|
|
5
|
+
placeholder: '$label.section_title.placeholder',
|
|
6
|
+
},
|
|
7
|
+
trending_categories: {
|
|
8
|
+
type: 'CATEGORY_SELECTOR',
|
|
9
|
+
label: '$label.trending_categories.label',
|
|
10
|
+
defaults: {
|
|
11
|
+
maxCategories: 4,
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
} as const;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
section_title: {
|
|
3
|
+
type: 'TEXT',
|
|
4
|
+
label: '$label.section_title.label',
|
|
5
|
+
colors: ['#FFFFFF66', '#0000004D', '#00000099', '#64C7FF66', '#F9947266', '#C794CD66', '#FFD17466'],
|
|
6
|
+
sizes: [18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60],
|
|
7
|
+
defaults: {
|
|
8
|
+
font: 'global.fontFamily.body',
|
|
9
|
+
size: 40,
|
|
10
|
+
bold: true,
|
|
11
|
+
italic: false,
|
|
12
|
+
color: '#313131',
|
|
13
|
+
visible: true,
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
background: {
|
|
17
|
+
type: 'BACKGROUND',
|
|
18
|
+
label: '$label.background.label',
|
|
19
|
+
colors: [
|
|
20
|
+
'#FFFFFF66',
|
|
21
|
+
'#0000004D',
|
|
22
|
+
'#00000099',
|
|
23
|
+
'#64C7FF66',
|
|
24
|
+
'#F9947266',
|
|
25
|
+
'#C794CD66',
|
|
26
|
+
'#FFD17466',
|
|
27
|
+
],
|
|
28
|
+
defaults: {
|
|
29
|
+
style: 'COLOR',
|
|
30
|
+
color: 'global.color.background',
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
} as const;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
en: {
|
|
3
|
+
'$label.section_title.label': 'Main title',
|
|
4
|
+
'$label.section_title.placeholder':
|
|
5
|
+
'This will be the main title for this section',
|
|
6
|
+
'$label.trending_categories.label': 'Trending categories',
|
|
7
|
+
|
|
8
|
+
'$label.background.label': 'Background',
|
|
9
|
+
},
|
|
10
|
+
|
|
11
|
+
nl: {
|
|
12
|
+
'$label.section_title.label': 'Hoofdtitel',
|
|
13
|
+
'$label.section_title.placeholder':
|
|
14
|
+
'Dit wordt de hoofdtitel voor deze sectie',
|
|
15
|
+
'$label.trending_categories.label': 'Trending categorieën',
|
|
16
|
+
},
|
|
17
|
+
|
|
18
|
+
fr: {
|
|
19
|
+
'$label.section_title.label': 'Titre principal',
|
|
20
|
+
'$label.section_title.placeholder':
|
|
21
|
+
'Ce sera le titre principal de cette section',
|
|
22
|
+
'$label.trending_categories.label': 'Catégories tendance',
|
|
23
|
+
},
|
|
24
|
+
} as const;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
showcaseId: '1',
|
|
3
|
+
previewImage: {
|
|
4
|
+
set: {
|
|
5
|
+
ORIGINAL: {
|
|
6
|
+
url: 'custom_section_showcase_1_preview.png',
|
|
7
|
+
},
|
|
8
|
+
},
|
|
9
|
+
},
|
|
10
|
+
blockName: '$label.showcase_1.blockName',
|
|
11
|
+
content: {
|
|
12
|
+
section_title: {
|
|
13
|
+
type: 'INPUTBOX',
|
|
14
|
+
text: '$label.showcase_1.section_title.text',
|
|
15
|
+
},
|
|
16
|
+
trending_categories: {
|
|
17
|
+
type: 'CATEGORY_SELECTOR',
|
|
18
|
+
maxCategories: 4,
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
design: {
|
|
22
|
+
section_title: {
|
|
23
|
+
type: 'TEXT',
|
|
24
|
+
font: 'global.fontFamily.body',
|
|
25
|
+
size: 44,
|
|
26
|
+
bold: true,
|
|
27
|
+
italic: false,
|
|
28
|
+
color: '#333',
|
|
29
|
+
},
|
|
30
|
+
background: {
|
|
31
|
+
type: 'BACKGROUND',
|
|
32
|
+
style: 'COLOR',
|
|
33
|
+
color: 'global.color.background',
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
} as const;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
en: {
|
|
3
|
+
'$label.showcase_1.blockName': 'Reference Section — Trending Categories',
|
|
4
|
+
'$label.showcase_1.section_title.text': 'Trending categories',
|
|
5
|
+
'$label.showcase_1.section_description.text':
|
|
6
|
+
'Discover our trending categories',
|
|
7
|
+
},
|
|
8
|
+
|
|
9
|
+
nl: {
|
|
10
|
+
'$label.showcase_1.blockName': 'Referentiesectie — Trending categorieën',
|
|
11
|
+
'$label.showcase_1.section_title.text': 'Trending categorieën',
|
|
12
|
+
'$label.showcase_1.section_description.text':
|
|
13
|
+
'Ontdek onze trending categorieën',
|
|
14
|
+
},
|
|
15
|
+
|
|
16
|
+
fr: {
|
|
17
|
+
'$label.showcase_1.blockName': 'Section de référence — Catégories tendance',
|
|
18
|
+
'$label.showcase_1.section_title.text': 'Catégories tendance',
|
|
19
|
+
'$label.showcase_1.section_description.text':
|
|
20
|
+
'Découvrez nos catégories tendance',
|
|
21
|
+
},
|
|
22
|
+
} as const;
|
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
class="example-section"
|
|
4
4
|
:style="backgroundStyle"
|
|
5
5
|
>
|
|
6
|
+
<div class="example-section__static-text-example">
|
|
7
|
+
<h2>{{ t('$label.shared.title') }}</h2>
|
|
8
|
+
</div>
|
|
9
|
+
<div class="example-section__blank_space" />
|
|
6
10
|
<CustomSectionExampleTitle />
|
|
7
11
|
<div class="example-section__blank_space" />
|
|
8
12
|
<CustomSectionExampleImagesGrid />
|
|
@@ -16,7 +20,8 @@
|
|
|
16
20
|
<script setup lang="ts">
|
|
17
21
|
import {
|
|
18
22
|
useBackgroundElementDesign,
|
|
19
|
-
|
|
23
|
+
useTranslation,
|
|
24
|
+
} from '@lightspeed/crane-api';
|
|
20
25
|
import { computed } from 'vue';
|
|
21
26
|
import { Design } from './type.ts';
|
|
22
27
|
import CustomSectionExampleTitle from './component/title/Title.vue';
|
|
@@ -26,6 +31,8 @@ import Selectbox from './component/selectbox/Selectbox.vue';
|
|
|
26
31
|
import Toggle from './component/toggle/Toggle.vue';
|
|
27
32
|
import Button from './component/button/Button.vue';
|
|
28
33
|
|
|
34
|
+
const { t } = useTranslation();
|
|
35
|
+
|
|
29
36
|
const backgroundDesign = useBackgroundElementDesign<Design>('background');
|
|
30
37
|
const background = computed(() => ({
|
|
31
38
|
type: backgroundDesign.background?.type,
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
<script setup lang="ts">
|
|
10
10
|
import { computed } from 'vue';
|
|
11
|
-
import { useBackgroundElementDesign, useSelectboxElementContent } from '@lightspeed/crane';
|
|
11
|
+
import { useBackgroundElementDesign, useSelectboxElementContent } from '@lightspeed/crane-api';
|
|
12
12
|
import { Content, Design } from '../../type.ts';
|
|
13
13
|
import { isDark } from '../../../../shared/utils.ts';
|
|
14
14
|
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
import { computed } from 'vue';
|
|
21
21
|
import {
|
|
22
22
|
useInputboxElementContent, useTextareaElementContent, useTextElementDesign, useTextareaElementDesign,
|
|
23
|
-
} from '@lightspeed/crane';
|
|
23
|
+
} from '@lightspeed/crane-api';
|
|
24
24
|
import { Content, Design } from '../../type.ts';
|
|
25
25
|
|
|
26
26
|
const titleContent = useInputboxElementContent<Content>('section_title');
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
<script setup lang="ts">
|
|
10
10
|
import { computed } from 'vue';
|
|
11
|
-
import { useBackgroundElementDesign, useToggleElementContent } from '@lightspeed/crane';
|
|
11
|
+
import { useBackgroundElementDesign, useToggleElementContent } from '@lightspeed/crane-api';
|
|
12
12
|
import { Content, Design } from '../../type.ts';
|
|
13
13
|
import { isDark } from '../../../../shared/utils.ts';
|
|
14
14
|
|
|
@@ -126,7 +126,7 @@ export default {
|
|
|
126
126
|
|
|
127
127
|
'$label.info.label': 'Content.ts: Info',
|
|
128
128
|
'$label.info.description': 'Content.ts: Ceci est une section d\'information où vous '
|
|
129
|
-
|
|
129
|
+
+ 'pouvez fournir des conseils utiles sur l\'utilisation de la section personnalisée',
|
|
130
130
|
'$label.info.button.label': 'En savoir plus',
|
|
131
131
|
},
|
|
132
132
|
} as const;
|
|
@@ -160,30 +160,11 @@ export default {
|
|
|
160
160
|
},
|
|
161
161
|
toggle: {
|
|
162
162
|
type: 'TOGGLE',
|
|
163
|
-
|
|
164
|
-
description: '$label.showcase_1.toggle.description',
|
|
165
|
-
defaults: {
|
|
166
|
-
enabled: true,
|
|
167
|
-
},
|
|
163
|
+
enabled: true,
|
|
168
164
|
},
|
|
169
165
|
selectbox: {
|
|
170
166
|
type: 'SELECTBOX',
|
|
171
|
-
|
|
172
|
-
label: '$label.showcase_1.selectbox.label',
|
|
173
|
-
description: '$label.showcase_1.selectbox.description',
|
|
174
|
-
options: [
|
|
175
|
-
{
|
|
176
|
-
value: 'one',
|
|
177
|
-
label: '$label.showcase_1.selectbox.one.label',
|
|
178
|
-
},
|
|
179
|
-
{
|
|
180
|
-
value: 'two',
|
|
181
|
-
label: '$label.showcase_1.selectbox.two.label',
|
|
182
|
-
},
|
|
183
|
-
],
|
|
184
|
-
defaults: {
|
|
185
|
-
value: 'one',
|
|
186
|
-
},
|
|
167
|
+
value: 'one',
|
|
187
168
|
},
|
|
188
169
|
info: {
|
|
189
170
|
type: 'INFO',
|
|
@@ -196,7 +177,6 @@ export default {
|
|
|
196
177
|
},
|
|
197
178
|
button: {
|
|
198
179
|
type: 'BUTTON',
|
|
199
|
-
label: '$label.showcase_1.button.label',
|
|
200
180
|
title: '$label.showcase_1.button.defaults.title',
|
|
201
181
|
buttonType: 'HYPER_LINK',
|
|
202
182
|
link: 'https://www.example.com',
|
|
@@ -139,30 +139,11 @@ export default {
|
|
|
139
139
|
},
|
|
140
140
|
toggle: {
|
|
141
141
|
type: 'TOGGLE',
|
|
142
|
-
|
|
143
|
-
description: '$label.showcase_2.toggle.description',
|
|
144
|
-
defaults: {
|
|
145
|
-
enabled: true,
|
|
146
|
-
},
|
|
142
|
+
enabled: true,
|
|
147
143
|
},
|
|
148
144
|
selectbox: {
|
|
149
145
|
type: 'SELECTBOX',
|
|
150
|
-
|
|
151
|
-
label: '$label.showcase_2.selectbox.label',
|
|
152
|
-
description: '$label.showcase_2.selectbox.description',
|
|
153
|
-
options: [
|
|
154
|
-
{
|
|
155
|
-
value: 'one',
|
|
156
|
-
label: '$label.showcase_2.selectbox.one.label',
|
|
157
|
-
},
|
|
158
|
-
{
|
|
159
|
-
value: 'two',
|
|
160
|
-
label: '$label.showcase_2.selectbox.two.label',
|
|
161
|
-
},
|
|
162
|
-
],
|
|
163
|
-
defaults: {
|
|
164
|
-
value: 'one',
|
|
165
|
-
},
|
|
146
|
+
value: 'one',
|
|
166
147
|
},
|
|
167
148
|
info: {
|
|
168
149
|
type: 'INFO',
|
|
@@ -175,7 +156,6 @@ export default {
|
|
|
175
156
|
},
|
|
176
157
|
button: {
|
|
177
158
|
type: 'BUTTON',
|
|
178
|
-
label: '$label.showcase_2.button.label',
|
|
179
159
|
title: '$label.showcase_2.button.defaults.title',
|
|
180
160
|
buttonType: 'HYPER_LINK',
|
|
181
161
|
link: 'https://www.example.com',
|
|
@@ -156,30 +156,11 @@ export default {
|
|
|
156
156
|
},
|
|
157
157
|
toggle: {
|
|
158
158
|
type: 'TOGGLE',
|
|
159
|
-
|
|
160
|
-
description: '$label.showcase_3.toggle.description',
|
|
161
|
-
defaults: {
|
|
162
|
-
enabled: true,
|
|
163
|
-
},
|
|
159
|
+
enabled: true,
|
|
164
160
|
},
|
|
165
161
|
selectbox: {
|
|
166
162
|
type: 'SELECTBOX',
|
|
167
|
-
|
|
168
|
-
label: '$label.showcase_3.selectbox.label',
|
|
169
|
-
description: '$label.showcase_3.selectbox.description',
|
|
170
|
-
options: [
|
|
171
|
-
{
|
|
172
|
-
value: 'one',
|
|
173
|
-
label: '$label.showcase_3.selectbox.one.label',
|
|
174
|
-
},
|
|
175
|
-
{
|
|
176
|
-
value: 'two',
|
|
177
|
-
label: '$label.showcase_3.selectbox.two.label',
|
|
178
|
-
},
|
|
179
|
-
],
|
|
180
|
-
defaults: {
|
|
181
|
-
value: 'one',
|
|
182
|
-
},
|
|
163
|
+
value: 'one',
|
|
183
164
|
},
|
|
184
165
|
info: {
|
|
185
166
|
type: 'INFO',
|
|
@@ -192,7 +173,6 @@ export default {
|
|
|
192
173
|
},
|
|
193
174
|
button: {
|
|
194
175
|
type: 'BUTTON',
|
|
195
|
-
label: '$label.showcase_1.button.label',
|
|
196
176
|
title: '$label.showcase_1.button.defaults.title',
|
|
197
177
|
buttonType: 'HYPER_LINK',
|
|
198
178
|
link: 'https://www.example.com',
|