@lightspeed/crane 2.0.4 → 3.0.0

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.
Files changed (131) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/UPGRADE.md +96 -0
  3. package/dist/cli.mjs +44 -25
  4. package/package.json +6 -3
  5. package/template/blank/sections/blank-section/BlankSection.vue +9 -0
  6. package/template/blank/sections/blank-section/assets/blank_section_showcase_1_preview.jpg +0 -0
  7. package/template/blank/sections/blank-section/client.ts +6 -0
  8. package/template/blank/sections/blank-section/server.ts +6 -0
  9. package/template/blank/sections/blank-section/settings/content.ts +2 -0
  10. package/template/blank/sections/blank-section/settings/design.ts +2 -0
  11. package/template/blank/sections/blank-section/settings/layout.ts +2 -0
  12. package/template/blank/sections/blank-section/settings/translations.ts +8 -0
  13. package/template/blank/sections/blank-section/showcases/1.ts +15 -0
  14. package/template/blank/sections/blank-section/showcases/translations.ts +10 -0
  15. package/template/blank/sections/blank-section/type.ts +5 -0
  16. package/template/collections/assets/collection_cover_image.png +0 -0
  17. package/template/collections/example-collection/configuration.ts +21 -0
  18. package/template/crane.config.json +1 -1
  19. package/template/footers/example-footer/ExampleFooter.vue +4 -4
  20. package/template/footers/example-footer/component/LegalLinks.vue +1 -1
  21. package/template/footers/example-footer/component/MadeWith.vue +1 -1
  22. package/template/footers/example-footer/component/ReportAbuse.vue +1 -1
  23. package/template/footers/example-footer/settings/design.ts +5 -4
  24. package/template/footers/example-footer/settings/translations.ts +4 -3
  25. package/template/footers/example-footer/showcases/1.ts +4 -2
  26. package/template/footers/example-footer/showcases/translations.ts +4 -2
  27. package/template/headers/example-header/ExampleHeader.vue +1 -1
  28. package/template/headers/example-header/component/Account.vue +1 -1
  29. package/template/headers/example-header/component/CategoriesDropdown.vue +1 -1
  30. package/template/headers/example-header/component/Logo.vue +7 -7
  31. package/template/headers/example-header/component/NavigationMenu.vue +1 -1
  32. package/template/headers/example-header/settings/content.ts +8 -1
  33. package/template/headers/example-header/settings/design.ts +7 -1
  34. package/template/headers/example-header/settings/layout.ts +1 -1
  35. package/template/headers/example-header/settings/translations.ts +4 -2
  36. package/template/headers/example-header/showcases/1.ts +15 -11
  37. package/template/headers/example-header/showcases/2.ts +12 -8
  38. package/template/headers/example-header/showcases/translations.ts +4 -2
  39. package/template/layouts/catalog/example-catalog/components/Icon.vue +14 -14
  40. package/template/layouts/catalog/example-catalog/slots/custom-bottom-bar/CustomBottomBar.vue +1 -1
  41. package/template/package.json +1 -0
  42. package/template/page-templates/example-template/configuration.ts +8 -10
  43. package/template/page-templates/example-template/pages/catalog.ts +3 -6
  44. package/template/page-templates/example-template/pages/category.ts +3 -6
  45. package/template/page-templates/example-template/pages/home.ts +42 -57
  46. package/template/page-templates/example-template/pages/product.ts +3 -6
  47. package/template/preview/sections/preview.html +10 -6
  48. package/template/preview/shared/api-routes.ts +235 -102
  49. package/template/preview/shared/logger.ts +9 -0
  50. package/template/preview/shared/preview.ts +150 -69
  51. package/template/preview/shared/utils.ts +63 -43
  52. package/template/preview/ssr-server.ts +1 -1
  53. package/template/reference/sections/about-us/AboutUs.vue +20 -22
  54. package/template/reference/sections/about-us/component/Image.vue +18 -18
  55. package/template/reference/sections/about-us/component/Stats.vue +42 -42
  56. package/template/reference/sections/about-us/component/Title.vue +1 -1
  57. package/template/reference/sections/about-us/settings/content.ts +15 -19
  58. package/template/reference/sections/about-us/settings/design.ts +14 -18
  59. package/template/reference/sections/about-us/settings/layout.ts +7 -5
  60. package/template/reference/sections/about-us/settings/translations.ts +4 -2
  61. package/template/reference/sections/about-us/showcases/1.ts +48 -62
  62. package/template/reference/sections/about-us/showcases/2.ts +44 -56
  63. package/template/reference/sections/about-us/showcases/translations.ts +4 -2
  64. package/template/reference/sections/featured-products/FeaturedProducts.vue +12 -6
  65. package/template/reference/sections/featured-products/component/ProductItem.vue +18 -1
  66. package/template/reference/sections/featured-products/component/ProductPlaceholder.vue +42 -0
  67. package/template/reference/sections/featured-products/component/Title.vue +1 -1
  68. package/template/reference/sections/featured-products/settings/content.ts +8 -10
  69. package/template/reference/sections/featured-products/settings/design.ts +7 -7
  70. package/template/reference/sections/featured-products/settings/translations.ts +4 -2
  71. package/template/reference/sections/featured-products/showcases/1.ts +8 -12
  72. package/template/reference/sections/featured-products/showcases/translations.ts +4 -2
  73. package/template/reference/sections/intro-slider/IntroSlider.vue +6 -6
  74. package/template/reference/sections/intro-slider/component/Slider.vue +43 -44
  75. package/template/reference/sections/intro-slider/component/Title.vue +9 -9
  76. package/template/reference/sections/intro-slider/settings/content.ts +36 -22
  77. package/template/reference/sections/intro-slider/settings/design.ts +17 -22
  78. package/template/reference/sections/intro-slider/settings/layout.ts +6 -4
  79. package/template/reference/sections/intro-slider/settings/translations.ts +4 -2
  80. package/template/reference/sections/intro-slider/showcases/1.ts +52 -75
  81. package/template/reference/sections/intro-slider/showcases/2.ts +50 -72
  82. package/template/reference/sections/intro-slider/showcases/translations.ts +4 -2
  83. package/template/reference/sections/tag-lines/TagLines.vue +41 -47
  84. package/template/reference/sections/tag-lines/component/HighlightedText.vue +2 -2
  85. package/template/reference/sections/tag-lines/component/SectionImage.vue +18 -18
  86. package/template/reference/sections/tag-lines/component/Title.vue +2 -2
  87. package/template/reference/sections/tag-lines/settings/content.ts +53 -19
  88. package/template/reference/sections/tag-lines/settings/design.ts +15 -19
  89. package/template/reference/sections/tag-lines/settings/layout.ts +6 -4
  90. package/template/reference/sections/tag-lines/settings/translations.ts +4 -2
  91. package/template/reference/sections/tag-lines/showcases/1.ts +40 -50
  92. package/template/reference/sections/tag-lines/showcases/2.ts +40 -50
  93. package/template/reference/sections/tag-lines/showcases/translations.ts +4 -2
  94. package/template/reference/sections/trending-categories/TrendingCategories.vue +1 -1
  95. package/template/reference/sections/trending-categories/component/CategoryItem.vue +18 -1
  96. package/template/reference/sections/trending-categories/component/Title.vue +2 -2
  97. package/template/reference/sections/trending-categories/settings/content.ts +8 -10
  98. package/template/reference/sections/trending-categories/settings/design.ts +7 -7
  99. package/template/reference/sections/trending-categories/settings/translations.ts +4 -2
  100. package/template/reference/sections/trending-categories/showcases/1.ts +14 -15
  101. package/template/reference/sections/trending-categories/showcases/translations.ts +4 -2
  102. package/template/reference/shared/components/Button.vue +6 -6
  103. package/template/reference/shared/components/SectionWrapper.vue +5 -5
  104. package/template/reference/shared/components/Tagline.vue +12 -11
  105. package/template/reference/templates/reference-template-apparel/configuration.ts +8 -8
  106. package/template/reference/templates/reference-template-apparel/pages/catalog.ts +3 -6
  107. package/template/reference/templates/reference-template-apparel/pages/category.ts +3 -6
  108. package/template/reference/templates/reference-template-apparel/pages/home.ts +14 -18
  109. package/template/reference/templates/reference-template-apparel/pages/product.ts +3 -6
  110. package/template/reference/templates/reference-template-bike/configuration.ts +9 -9
  111. package/template/reference/templates/reference-template-bike/pages/catalog.ts +3 -6
  112. package/template/reference/templates/reference-template-bike/pages/category.ts +3 -6
  113. package/template/reference/templates/reference-template-bike/pages/home.ts +14 -18
  114. package/template/reference/templates/reference-template-bike/pages/product.ts +3 -6
  115. package/template/sections/example-section/ExampleSection.vue +3 -5
  116. package/template/sections/example-section/component/button/Button.vue +1 -1
  117. package/template/sections/example-section/component/image/Image.vue +43 -43
  118. package/template/sections/example-section/component/image/ImagesGrid.vue +21 -32
  119. package/template/sections/example-section/component/selectbox/Selectbox.vue +1 -1
  120. package/template/sections/example-section/component/title/Title.vue +1 -1
  121. package/template/sections/example-section/component/toggle/Toggle.vue +4 -4
  122. package/template/sections/example-section/settings/content.ts +25 -34
  123. package/template/sections/example-section/settings/design.ts +15 -19
  124. package/template/sections/example-section/settings/layout.ts +15 -14
  125. package/template/sections/example-section/settings/translations.ts +4 -2
  126. package/template/sections/example-section/showcases/1.ts +52 -79
  127. package/template/sections/example-section/showcases/2.ts +46 -62
  128. package/template/sections/example-section/showcases/3.ts +50 -76
  129. package/template/sections/example-section/showcases/translations.ts +4 -2
  130. package/template/shared/components/LanguageSelector.vue +1 -1
  131. package/template/shared/components/SectionWrapper.vue +5 -5
@@ -1,4 +1,6 @@
1
- export default {
1
+ import { translation } from '@lightspeed/crane-api';
2
+
3
+ export default translation.init({
2
4
  en: {
3
5
  '$label.showcase_1.blockName': 'Reference Section — Slider',
4
6
 
@@ -85,4 +87,4 @@ export default {
85
87
  '$label.showcase_2.slide_text_5.text': 'Nom du vélo 5',
86
88
  '$label.showcase_2.slide_text_6.text': 'Nom du vélo 6',
87
89
  },
88
- } as const;
90
+ });
@@ -94,65 +94,59 @@ const {
94
94
 
95
95
  </script>
96
96
 
97
- <style lang="scss" scoped>
98
- .tag-lines-section {
99
- &__wrapper {
100
- display: flex;
101
- flex-direction: column;
102
- align-items: center;
103
- gap: 24px;
104
-
105
- @media screen and (min-width: 900px) {
106
- flex-direction: row;
107
- justify-content: space-between;
108
- }
97
+ <style scoped>
98
+ .tag-lines-section__wrapper {
99
+ display: flex;
100
+ flex-direction: column;
101
+ align-items: center;
102
+ gap: 24px;
103
+
104
+ @media screen and (min-width: 900px) {
105
+ flex-direction: row;
106
+ justify-content: space-between;
109
107
  }
108
+ }
110
109
 
111
- &__info {
112
- width: 100%;
110
+ .tag-lines-section__info {
111
+ width: 100%;
113
112
 
114
- @media screen and (min-width: 900px) {
115
- width: unset;
116
- max-width: 530px;
117
- }
113
+ @media screen and (min-width: 900px) {
114
+ width: unset;
115
+ max-width: 530px;
118
116
  }
117
+ }
119
118
 
120
- &__tagline {
121
- margin-bottom: 24px;
122
- }
119
+ .tag-lines-section__tagline {
120
+ margin-bottom: 24px;
121
+ }
123
122
 
124
- &__image {
125
- width: 100%;
123
+ .tag-lines-section__image {
124
+ width: 100%;
126
125
 
127
- @media screen and (min-width: 900px) {
128
- max-width: 479px;
129
- }
126
+ @media screen and (min-width: 900px) {
127
+ max-width: 479px;
130
128
  }
129
+ }
131
130
 
132
- &::v-deep(.tag-lines-section__highlighted-texts:has(.tag-lines-section__highlighted-text:hover)) {
133
- & .tag-lines-section__highlighted-text {
134
- opacity: 0.2;
131
+ .tag-lines-section::v-deep(.tag-lines-section__highlighted-texts:has(.tag-lines-section__highlighted-text:hover)) .tag-lines-section__highlighted-text {
132
+ opacity: 0.2;
133
+ }
135
134
 
136
- &:hover {
137
- opacity: 1;
138
- }
139
- }
140
- }
135
+ .tag-lines-section::v-deep(.tag-lines-section__highlighted-texts:has(.tag-lines-section__highlighted-text:hover)) .tag-lines-section__highlighted-text:hover {
136
+ opacity: 1;
137
+ }
141
138
 
142
- &__highlighted-text {
143
- transition: opacity ease-in-out 0.3s;
144
- }
139
+ .tag-lines-section__highlighted-text {
140
+ transition: opacity ease-in-out 0.3s;
141
+ }
145
142
 
146
- &:has(.tag-lines-section__highlighted-text:hover) {
147
- &::v-deep(.section-image__element) {
148
- opacity: 0;
149
- }
150
- }
143
+ .tag-lines-section:has(.tag-lines-section__highlighted-text:hover)::v-deep(.section-image__element) {
144
+ opacity: 0;
145
+ }
151
146
 
152
- &:has(.tag-lines-section__highlighted-text--1:hover)::v-deep(.section-image__element--1),
153
- &:has(.tag-lines-section__highlighted-text--2:hover)::v-deep(.section-image__element--2),
154
- &:has(.tag-lines-section__highlighted-text--3:hover)::v-deep(.section-image__element--3) {
155
- opacity: 1;
156
- }
147
+ .tag-lines-section:has(.tag-lines-section__highlighted-text--1:hover)::v-deep(.section-image__element--1),
148
+ .tag-lines-section:has(.tag-lines-section__highlighted-text--2:hover)::v-deep(.section-image__element--2),
149
+ .tag-lines-section:has(.tag-lines-section__highlighted-text--3:hover)::v-deep(.section-image__element--3) {
150
+ opacity: 1;
157
151
  }
158
152
  </style>
@@ -14,13 +14,13 @@ const props = defineProps<{
14
14
  const textStyle = computed<CSSProperties>(() => ({
15
15
  fontSize: props.design.size ? `${props.design.size}px` : undefined,
16
16
  fontFamily: props.design.font,
17
- color: props.design.color ? (props.design.color as Color).hex : undefined,
17
+ color: props.design.color ? (props.design.color as Color)?.hex : undefined,
18
18
  fontStyle: props.design.italic ? 'italic' : 'normal',
19
19
  fontWeight: props.design.bold ? 'bold' : 'normal',
20
20
  }));
21
21
  </script>
22
22
 
23
- <style lang="scss" scoped>
23
+ <style scoped>
24
24
  .highlighted-text {
25
25
  --font-size: v-bind(textStyle.fontSize);
26
26
  --font-family: v-bind(textStyle.fontFamily);
@@ -47,32 +47,32 @@ const imageClass = computed(() => [
47
47
  ]);
48
48
  </script>
49
49
 
50
- <style lang="scss" scoped>
50
+ <style scoped>
51
51
  .section-image {
52
52
  position: relative;
53
53
  overflow: hidden;
54
54
  aspect-ratio: 0.785;
55
+ }
55
56
 
56
- &--with-border-radius {
57
- border-radius: 24px;
57
+ .section-image--with-border-radius {
58
+ border-radius: 24px;
58
59
 
59
- @media screen and (min-width: 1200px) {
60
- border-radius: 32px;
61
- }
60
+ @media screen and (min-width: 1200px) {
61
+ border-radius: 32px;
62
62
  }
63
+ }
63
64
 
64
- &__element {
65
- position: absolute;
66
- top: 0;
67
- left: 0;
68
- width: 100%;
69
- height: 100%;
70
- object-fit: cover;
71
- transition: opacity 0.3s ease-in-out;
65
+ .section-image__element {
66
+ position: absolute;
67
+ top: 0;
68
+ left: 0;
69
+ width: 100%;
70
+ height: 100%;
71
+ object-fit: cover;
72
+ transition: opacity 0.3s ease-in-out;
73
+ }
72
74
 
73
- &--highlighted {
74
- opacity: 0;
75
- }
76
- }
75
+ .section-image__element--highlighted {
76
+ opacity: 0;
77
77
  }
78
78
  </style>
@@ -18,13 +18,13 @@ const titleDesign = useTextElementDesign<Design>('section_title');
18
18
  const titleStyle = computed<CSSProperties>(() => ({
19
19
  fontSize: `${titleDesign.size}px`,
20
20
  fontFamily: titleDesign.font,
21
- color: (titleDesign.color as Color).hex,
21
+ color: (titleDesign.color as Color)?.hex,
22
22
  fontStyle: titleDesign.italic ? 'italic' : 'normal',
23
23
  fontWeigh: titleDesign.bold ? 'bold' : 'normal',
24
24
  }));
25
25
  </script>
26
26
 
27
- <style lang="scss" scoped>
27
+ <style scoped>
28
28
  .title {
29
29
  --font-size: v-bind(titleStyle.fontSize);
30
30
  --font-family: v-bind(titleStyle.fontFamily);
@@ -1,16 +1,15 @@
1
+ import { content } from '@lightspeed/crane-api';
2
+
1
3
  export default {
2
- section_tagline: {
3
- type: 'INPUTBOX',
4
+ section_tagline: content.inputbox({
4
5
  label: '$label.content.tagline.label',
5
6
  placeholder: '$label.content.tagline.placeholder',
6
- },
7
- section_title: {
8
- type: 'INPUTBOX',
7
+ }),
8
+ section_title: content.inputbox({
9
9
  label: '$label.content.section_title.label',
10
10
  placeholder: '$label.content.section_title.placeholder',
11
- },
12
- highlighted_text: {
13
- type: 'DECK',
11
+ }),
12
+ highlighted_text: content.deck({
14
13
  label: '$label.content.highlighted_text_title.label',
15
14
  addButtonLabel: '$label.content.deck.highlighted_text.add_button',
16
15
  maxCards: 3,
@@ -18,21 +17,56 @@ export default {
18
17
  defaultCardContent: {
19
18
  label: '$label.content.highlighted_text.label',
20
19
  settings: {
21
- text: {
22
- type: 'INPUTBOX',
20
+ text: content.inputbox({
23
21
  label: '$label.content.deck.highlighted_text.label',
24
22
  placeholder: '$label.content.deck.highlighted_text.label',
25
- },
26
- image_content: {
27
- type: 'IMAGE',
23
+ }),
24
+ image_content: content.image({
28
25
  label: '$label.content.deck.highlighted_text_image_on_hover.label',
29
- },
26
+ defaults: {
27
+ imageData: {
28
+ set: {
29
+ MOBILE_WEBP_LOW_RES: {
30
+ url: 'fall_is_here.jpg',
31
+ },
32
+ MOBILE_WEBP_HI_RES: {
33
+ url: 'fall_is_here_preview.jpg',
34
+ },
35
+ WEBP_LOW_RES: {
36
+ url: 'fall_is_here.jpg',
37
+ },
38
+ WEBP_HI_2X_RES: {
39
+ url: 'fall_is_here_preview.jpg',
40
+ },
41
+ },
42
+ borderInfo: {},
43
+ },
44
+ },
45
+ }),
30
46
  },
31
47
  },
32
48
  },
33
- },
34
- section_image: {
35
- type: 'IMAGE',
49
+ }),
50
+ section_image: content.image({
36
51
  label: '$label.content.image_title.label',
37
- },
38
- } as const;
52
+ defaults: {
53
+ imageData: {
54
+ set: {
55
+ MOBILE_WEBP_LOW_RES: {
56
+ url: 'fall_is_here.jpg',
57
+ },
58
+ MOBILE_WEBP_HI_RES: {
59
+ url: 'fall_is_here.jpg',
60
+ },
61
+ WEBP_LOW_RES: {
62
+ url: 'fall_is_here.jpg',
63
+ },
64
+ WEBP_HI_2X_RES: {
65
+ url: 'fall_is_here.jpg',
66
+ },
67
+ },
68
+ borderInfo: {},
69
+ },
70
+ },
71
+ }),
72
+ };
@@ -1,15 +1,15 @@
1
+ import { design } from '@lightspeed/crane-api';
2
+
1
3
  export default {
2
- background: {
3
- type: 'BACKGROUND',
4
+ background: design.background({
4
5
  label: '$label.design.background.label',
5
6
  colors: ['#FFFFFF', '#000000', '#F4EFE3', '#FFBF24', '#6281C5', '#C5629A', '#BAA33E', '#8A91D0', '#C3455C'],
6
7
  defaults: {
7
8
  style: 'COLOR',
8
9
  color: '#FFFFFF',
9
10
  },
10
- },
11
- section_tagline: {
12
- type: 'TEXT',
11
+ }),
12
+ section_tagline: design.text({
13
13
  label: '$label.design.tagline.label',
14
14
  colors: ['#FFFFFF', '#000000', '#F4EFE3', '#FFBF24', '#6281C5', '#C5629A', '#BAA33E', '#8A91D0', '#C3455C'],
15
15
  sizes: [12, 13, 14, 15, 16, 17, 18, 20],
@@ -21,9 +21,8 @@ export default {
21
21
  color: '#F4EFE3',
22
22
  visible: true,
23
23
  },
24
- },
25
- section_title: {
26
- type: 'TEXT',
24
+ }),
25
+ section_title: design.text({
27
26
  label: '$label.design.section_title.label',
28
27
  colors: ['#FFFFFF', '#000000', '#F4EFE3', '#FFBF24', '#6281C5', '#C5629A', '#BAA33E', '#8A91D0', '#C3455C'],
29
28
  sizes: [18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60],
@@ -35,9 +34,8 @@ export default {
35
34
  color: '#000000',
36
35
  visible: true,
37
36
  },
38
- },
39
- highlighted_text_1: {
40
- type: 'TEXT',
37
+ }),
38
+ highlighted_text_1: design.text({
41
39
  label: '$label.design.highlighted_text_1.label',
42
40
  colors: ['#FFFFFF', '#000000', '#F4EFE3', '#FFBF24', '#6281C5', '#C5629A', '#BAA33E', '#8A91D0', '#C3455C'],
43
41
  sizes: [18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60],
@@ -49,9 +47,8 @@ export default {
49
47
  color: '#FFBF24',
50
48
  visible: true,
51
49
  },
52
- },
53
- highlighted_text_2: {
54
- type: 'TEXT',
50
+ }),
51
+ highlighted_text_2: design.text({
55
52
  label: '$label.design.highlighted_text_2.label',
56
53
  colors: ['#FFFFFF', '#000000', '#F4EFE3', '#FFBF24', '#6281C5', '#C5629A', '#BAA33E', '#8A91D0', '#C3455C'],
57
54
  sizes: [18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60],
@@ -63,9 +60,8 @@ export default {
63
60
  color: '#6281C5',
64
61
  visible: true,
65
62
  },
66
- },
67
- highlighted_text_3: {
68
- type: 'TEXT',
63
+ }),
64
+ highlighted_text_3: design.text({
69
65
  label: '$label.design.highlighted_text_3.label',
70
66
  colors: ['#FFFFFF', '#000000', '#F4EFE3', '#FFBF24', '#6281C5', '#C5629A', '#BAA33E', '#8A91D0', '#C3455C'],
71
67
  sizes: [18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60],
@@ -77,5 +73,5 @@ export default {
77
73
  color: '#C5629A',
78
74
  visible: true,
79
75
  },
80
- },
81
- } as const;
76
+ }),
77
+ };
@@ -1,12 +1,14 @@
1
+ import { layout } from '@lightspeed/crane-api';
2
+
1
3
  export default [
2
- {
4
+ layout.init({
3
5
  layoutId: 'Image_With_Border_Radius',
4
6
  selectedContentSettings: [],
5
7
  selectedDesignSettings: [],
6
- },
7
- {
8
+ }),
9
+ layout.init({
8
10
  layoutId: 'Image_Without_Border_Radius',
9
11
  selectedContentSettings: [],
10
12
  selectedDesignSettings: [],
11
- },
13
+ }),
12
14
  ];
@@ -1,4 +1,6 @@
1
- export default {
1
+ import { translation } from '@lightspeed/crane-api';
2
+
3
+ export default translation.init({
2
4
  en: {
3
5
  '$label.content.tagline.label': 'Tagline',
4
6
  '$label.content.section_title.label': 'Title',
@@ -58,4 +60,4 @@ export default {
58
60
  '$label.design.highlighted_text_2.label': 'Texte en surbrillance 2',
59
61
  '$label.design.highlighted_text_3.label': 'Texte en surbrillance 3',
60
62
  },
61
- } as const;
63
+ });
@@ -1,4 +1,10 @@
1
- export default {
1
+ import {
2
+ content,
3
+ design,
4
+ showcase,
5
+ } from '@lightspeed/crane-api';
6
+
7
+ export default showcase.init({
2
8
  showcaseId: '1',
3
9
  layoutId: 'Image_With_Border_Radius',
4
10
  previewImage: {
@@ -10,25 +16,20 @@ export default {
10
16
  },
11
17
  blockName: '$label.showcase_1.blockName',
12
18
  content: {
13
- section_tagline: {
14
- type: 'INPUTBOX',
19
+ section_tagline: content.default.inputbox({
15
20
  text: '$label.showcase_1.section_tagline.text',
16
- },
17
- section_title: {
18
- type: 'INPUTBOX',
21
+ }),
22
+ section_title: content.default.inputbox({
19
23
  text: '$label.showcase_1.section_title.text',
20
- },
21
- highlighted_text: {
22
- type: 'DECK',
24
+ }),
25
+ highlighted_text: content.default.deck({
23
26
  cards: [
24
27
  {
25
28
  settings: {
26
- text: {
27
- type: 'INPUTBOX',
29
+ text: content.default.inputbox({
28
30
  text: '$label.showcase_1.highlighted_text_1.text',
29
- },
30
- image_content: {
31
- type: 'IMAGE',
31
+ }),
32
+ image_content: content.default.image({
32
33
  imageData: {
33
34
  set: {
34
35
  MOBILE_WEBP_LOW_RES: {
@@ -46,17 +47,15 @@ export default {
46
47
  },
47
48
  borderInfo: {},
48
49
  },
49
- },
50
+ }),
50
51
  },
51
52
  },
52
53
  {
53
54
  settings: {
54
- text: {
55
- type: 'INPUTBOX',
55
+ text: content.default.inputbox({
56
56
  text: '$label.showcase_1.highlighted_text_2.text',
57
- },
58
- image_content: {
59
- type: 'IMAGE',
57
+ }),
58
+ image_content: content.default.image({
60
59
  imageData: {
61
60
  set: {
62
61
  MOBILE_WEBP_LOW_RES: {
@@ -74,17 +73,15 @@ export default {
74
73
  },
75
74
  borderInfo: {},
76
75
  },
77
- },
76
+ }),
78
77
  },
79
78
  },
80
79
  {
81
80
  settings: {
82
- text: {
83
- type: 'INPUTBOX',
81
+ text: content.default.inputbox({
84
82
  text: '$label.showcase_1.highlighted_text_3.text',
85
- },
86
- image_content: {
87
- type: 'IMAGE',
83
+ }),
84
+ image_content: content.default.image({
88
85
  imageData: {
89
86
  set: {
90
87
  MOBILE_WEBP_LOW_RES: {
@@ -102,13 +99,12 @@ export default {
102
99
  },
103
100
  borderInfo: {},
104
101
  },
105
- },
102
+ }),
106
103
  },
107
104
  },
108
105
  ],
109
- },
110
- section_image: {
111
- type: 'IMAGE',
106
+ }),
107
+ section_image: content.default.image({
112
108
  imageData: {
113
109
  set: {
114
110
  MOBILE_WEBP_LOW_RES: {
@@ -126,53 +122,47 @@ export default {
126
122
  },
127
123
  borderInfo: {},
128
124
  },
129
- },
125
+ }),
130
126
  },
131
127
  design: {
132
- background: {
133
- type: 'BACKGROUND',
128
+ background: design.default.background({
134
129
  style: 'COLOR',
135
130
  color: '#FFFFFF',
136
- },
137
- section_tagline: {
138
- type: 'TEXT',
131
+ }),
132
+ section_tagline: design.default.text({
139
133
  font: 'noto_serif',
140
134
  size: 16,
141
135
  bold: true,
142
136
  italic: false,
143
137
  color: '#F4EFE3',
144
- },
145
- section_title: {
146
- type: 'TEXT',
138
+ }),
139
+ section_title: design.default.text({
147
140
  font: 'noto_serif',
148
141
  size: 48,
149
142
  bold: true,
150
143
  italic: false,
151
144
  color: '#000000',
152
- },
153
- highlighted_text_1: {
154
- type: 'TEXT',
145
+ }),
146
+ highlighted_text_1: design.default.text({
155
147
  font: 'noto_serif',
156
148
  size: 48,
157
149
  bold: true,
158
150
  italic: false,
159
151
  color: '#FFBF24',
160
- },
161
- highlighted_text_2: {
162
- type: 'TEXT',
152
+ }),
153
+ highlighted_text_2: design.default.text({
163
154
  font: 'noto_serif',
164
155
  size: 48,
165
156
  bold: true,
166
157
  italic: false,
167
158
  color: '#6281C5',
168
- },
169
- highlighted_text_3: {
170
- type: 'TEXT',
159
+ }),
160
+ highlighted_text_3: design.default.text({
171
161
  font: 'noto_serif',
172
162
  size: 48,
173
163
  bold: true,
174
164
  italic: false,
175
165
  color: '#C5629A',
176
- },
166
+ }),
177
167
  },
178
- } as const;
168
+ });