@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,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: '2',
3
9
  layoutId: 'Image_Without_Border_Radius',
4
10
  previewImage: {
@@ -10,25 +16,20 @@ export default {
10
16
  },
11
17
  blockName: '$label.showcase_2.blockName',
12
18
  content: {
13
- section_tagline: {
14
- type: 'INPUTBOX',
19
+ section_tagline: content.default.inputbox({
15
20
  text: '$label.showcase_2.section_tagline.text',
16
- },
17
- section_title: {
18
- type: 'INPUTBOX',
21
+ }),
22
+ section_title: content.default.inputbox({
19
23
  text: '$label.showcase_2.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_2.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_2.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_2.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: 'GRADIENT',
135
130
  color: ['#131313', '#292929'],
136
- },
137
- section_tagline: {
138
- type: 'TEXT',
131
+ }),
132
+ section_tagline: design.default.text({
139
133
  font: 'pt_mono',
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: 'pt_mono',
148
141
  size: 48,
149
142
  bold: true,
150
143
  italic: false,
151
144
  color: '#FFFFFF',
152
- },
153
- highlighted_text_1: {
154
- type: 'TEXT',
145
+ }),
146
+ highlighted_text_1: design.default.text({
155
147
  font: 'pt_mono',
156
148
  size: 48,
157
149
  bold: true,
158
150
  italic: false,
159
151
  color: '#BAA33E',
160
- },
161
- highlighted_text_2: {
162
- type: 'TEXT',
152
+ }),
153
+ highlighted_text_2: design.default.text({
163
154
  font: 'pt_mono',
164
155
  size: 48,
165
156
  bold: true,
166
157
  italic: false,
167
158
  color: '#8A91D0',
168
- },
169
- highlighted_text_3: {
170
- type: 'TEXT',
159
+ }),
160
+ highlighted_text_3: design.default.text({
171
161
  font: 'pt_mono',
172
162
  size: 48,
173
163
  bold: true,
174
164
  italic: false,
175
165
  color: '#C3455C',
176
- },
166
+ }),
177
167
  },
178
- } as const;
168
+ });
@@ -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 – Tag lines',
4
6
  '$label.showcase_1.section_tagline.text': 'Seasonal',
@@ -46,4 +48,4 @@ export default {
46
48
  '$label.showcase_2.highlighted_text_2.text': 'vélos hybrides',
47
49
  '$label.showcase_2.highlighted_text_3.text': 'vélos pliants',
48
50
  },
49
- } as const;
51
+ });
@@ -54,7 +54,7 @@ const backgroundStyle = computed<CSSProperties>(() => {
54
54
  });
55
55
  </script>
56
56
 
57
- <style lang="scss" scoped>
57
+ <style scoped>
58
58
  .categories-wrapper {
59
59
  display: flex;
60
60
  flex-wrap: wrap;
@@ -6,6 +6,9 @@
6
6
  class="category"
7
7
  >
8
8
  <img v-if="category.imageUrl" class="category_image" :src="category.imageUrl" :alt="category.name" />
9
+ <div v-else class="category__background">
10
+ <div class="category__background__name">{{ category.name }}</div>
11
+ </div>
9
12
  <h4 class="category__title">{{ category.name }}</h4>
10
13
  </a>
11
14
  </template>
@@ -18,7 +21,7 @@
18
21
  const { category } = defineProps<Props>()
19
22
  </script>
20
23
 
21
- <style scoped lang="scss">
24
+ <style scoped>
22
25
  .category {
23
26
  display: flex;
24
27
  flex-direction: column;
@@ -59,4 +62,18 @@
59
62
  color: #111;
60
63
  text-align: center;
61
64
  }
65
+
66
+ .category__background {
67
+ display: flex;
68
+ align-items: center;
69
+ justify-content: center;
70
+ height: auto;
71
+ aspect-ratio: 3/4;
72
+
73
+ background-color: rgba(0, 0, 0, 0.1);
74
+ }
75
+
76
+ .category__background__name {
77
+ text-align: center;
78
+ }
62
79
  </style>
@@ -18,13 +18,13 @@ const titleDesign = useTextElementDesign<Design>('section_title');
18
18
  const titleStyle = computed(() => ({
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
  'font-style': titleDesign.italic ? 'italic' : 'normal',
23
23
  'font-weight': titleDesign.bold ? 'bold' : 'normal',
24
24
  }));
25
25
  </script>
26
26
 
27
- <style scoped lang="scss">
27
+ <style scoped>
28
28
  .section-title {
29
29
  margin-bottom: 1rem;
30
30
  text-align: center;
@@ -1,14 +1,12 @@
1
+ import { content } from '@lightspeed/crane-api';
2
+
1
3
  export default {
2
- section_title: {
3
- type: 'INPUTBOX',
4
+ section_title: content.inputbox({
4
5
  label: '$label.section_title.label',
5
6
  placeholder: '$label.section_title.placeholder',
6
- },
7
- trending_categories: {
8
- type: 'CATEGORY_SELECTOR',
7
+ }),
8
+ trending_categories: content.categorySelector({
9
9
  label: '$label.trending_categories.label',
10
- defaults: {
11
- maxCategories: 4,
12
- },
13
- },
14
- } as const;
10
+ maxCategories: 4,
11
+ }),
12
+ };
@@ -1,6 +1,7 @@
1
+ import { design } from '@lightspeed/crane-api';
2
+
1
3
  export default {
2
- section_title: {
3
- type: 'TEXT',
4
+ section_title: design.text({
4
5
  label: '$label.section_title.label',
5
6
  colors: ['#FFFFFF66', '#0000004D', '#00000099', '#64C7FF66', '#F9947266', '#C794CD66', '#FFD17466'],
6
7
  sizes: [18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60],
@@ -12,9 +13,8 @@ export default {
12
13
  color: '#313131',
13
14
  visible: true,
14
15
  },
15
- },
16
- background: {
17
- type: 'BACKGROUND',
16
+ }),
17
+ background: design.background({
18
18
  label: '$label.background.label',
19
19
  colors: [
20
20
  '#FFFFFF66',
@@ -29,5 +29,5 @@ export default {
29
29
  style: 'COLOR',
30
30
  color: 'global.color.background',
31
31
  },
32
- },
33
- } as const;
32
+ }),
33
+ };
@@ -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.section_title.label': 'Main title',
4
6
  '$label.section_title.placeholder':
@@ -21,4 +23,4 @@ export default {
21
23
  'Ce sera le titre principal de cette section',
22
24
  '$label.trending_categories.label': 'Catégories tendance',
23
25
  },
24
- } as const;
26
+ });
@@ -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
  previewImage: {
4
10
  set: {
@@ -9,28 +15,21 @@ export default {
9
15
  },
10
16
  blockName: '$label.showcase_1.blockName',
11
17
  content: {
12
- section_title: {
13
- type: 'INPUTBOX',
18
+ section_title: content.default.inputbox({
14
19
  text: '$label.showcase_1.section_title.text',
15
- },
16
- trending_categories: {
17
- type: 'CATEGORY_SELECTOR',
18
- maxCategories: 4,
19
- },
20
+ }),
20
21
  },
21
22
  design: {
22
- section_title: {
23
- type: 'TEXT',
23
+ section_title: design.default.text({
24
24
  font: 'global.fontFamily.body',
25
25
  size: 44,
26
26
  bold: true,
27
27
  italic: false,
28
28
  color: '#333',
29
- },
30
- background: {
31
- type: 'BACKGROUND',
29
+ }),
30
+ background: design.default.background({
32
31
  style: 'COLOR',
33
32
  color: 'global.color.background',
34
- },
33
+ }),
35
34
  },
36
- } as const;
35
+ });
@@ -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 — Trending Categories',
4
6
  '$label.showcase_1.section_title.text': 'Trending categories',
@@ -19,4 +21,4 @@ export default {
19
21
  '$label.showcase_1.section_description.text':
20
22
  'Découvrez nos catégories tendance',
21
23
  },
22
- } as const;
24
+ });
@@ -78,7 +78,7 @@ const buttonStyles = computed<CSSProperties>(() => {
78
78
  });
79
79
  </script>
80
80
 
81
- <style scoped lang="scss">
81
+ <style scoped>
82
82
  .button {
83
83
  --font-family: v-bind(buttonStyles.fontFamily);
84
84
  --background-color: v-bind(buttonStyles.backgroundColor);
@@ -103,11 +103,6 @@ const buttonStyles = computed<CSSProperties>(() => {
103
103
  }
104
104
  }
105
105
 
106
- &__icon {
107
- margin-left: 5px;
108
- transition: transform 0.3s ease;
109
- }
110
-
111
106
  &.pill {
112
107
  border-radius: 32px;
113
108
  }
@@ -148,4 +143,9 @@ const buttonStyles = computed<CSSProperties>(() => {
148
143
  padding: 0;
149
144
  }
150
145
  }
146
+
147
+ .button__icon {
148
+ margin-left: 5px;
149
+ transition: transform 0.3s ease;
150
+ }
151
151
  </style>
@@ -6,7 +6,7 @@
6
6
  </section>
7
7
  </template>
8
8
 
9
- <style lang="scss" scoped>
9
+ <style scoped>
10
10
  .section {
11
11
  padding: 60px 20px;
12
12
 
@@ -17,10 +17,10 @@
17
17
  @media screen and (min-width: 1200px) {
18
18
  padding: 100px;
19
19
  }
20
+ }
20
21
 
21
- &__wrapper {
22
- max-width: 1120px;
23
- margin: 0 auto;
24
- }
22
+ .section__wrapper {
23
+ max-width: 1120px;
24
+ margin: 0 auto;
25
25
  }
26
26
  </style>
@@ -12,23 +12,24 @@ const props = defineProps<{
12
12
  design: TextDesignData;
13
13
  }>();
14
14
 
15
- const backgroundLightness = computed<string>(() => `${(props.design.color as Color).hsl.l * 100}%`);
16
15
  const taglineStyles = computed<CSSProperties>(() => getTextStyles(props.design));
17
- </script>
18
-
19
- <style lang="scss" scoped>
20
- @function set-contrast-color($lightness) {
21
- $threshold: 60%;
22
- $contrastLightness: clamp(0%, calc((#{$lightness} - #{$threshold}) * -100), 100%);
23
16
 
24
- @return hsl(0, 0%, $contrastLightness);
25
- }
17
+ // Calculate contrast color: dark text for light backgrounds, light text for dark backgrounds
18
+ const contrastColor = computed<string>(() => {
19
+ const lightness = (props.design.color as Color).hsl.l * 100;
20
+ const threshold = 60;
21
+ // If background lightness > 60%, use dark text (0% lightness), else use light text (100% lightness)
22
+ const contrastLightness = Math.max(0, Math.min(100, (lightness - threshold) * -100));
23
+ return `hsl(0, 0%, ${contrastLightness}%)`;
24
+ });
25
+ </script>
26
26
 
27
+ <style scoped>
27
28
  .tagline {
28
29
  --font-size: v-bind(taglineStyles.fontSize);
29
30
  --font-family: v-bind(taglineStyles.fontFamily);
30
31
  --background-color: v-bind(taglineStyles.background);
31
- --background-color-l: v-bind(backgroundLightness);
32
+ --contrast-color: v-bind(contrastColor);
32
33
  --font-style: v-bind(taglineStyles.fontStyle);
33
34
  --font-weight: v-bind(taglineStyles.fontWeight);
34
35
 
@@ -38,7 +39,7 @@ const taglineStyles = computed<CSSProperties>(() => getTextStyles(props.design))
38
39
  font-size: var(--font-size);
39
40
  font-family: var(--font-family);
40
41
  background: var(--background-color);
41
- color: set-contrast-color(var(--background-color-l));
42
+ color: var(--contrast-color);
42
43
  font-style: var(--font-style);
43
44
  font-weight: var(--font-weight);
44
45
  }
@@ -1,4 +1,6 @@
1
- export default {
1
+ import { template, section } from '@lightspeed/crane-api';
2
+
3
+ export default template.configuration({
2
4
  metadata: {
3
5
  name: 'Reference Template — Apparel',
4
6
  description: 'This is a reference template geared towards apparel merchants to aid development and act as a starting point for your custom template.',
@@ -11,12 +13,10 @@ export default {
11
13
  },
12
14
  },
13
15
  },
14
- header: {
15
- type: 'default',
16
+ header: section.default({
16
17
  id: 'header',
17
- },
18
- footer: {
19
- type: 'default',
18
+ }),
19
+ footer: section.default({
20
20
  id: 'footer',
21
- },
22
- };
21
+ }),
22
+ });
@@ -1,10 +1,7 @@
1
- import { StorePageConfiguration } from '@lightspeed/crane-api';
1
+ import { section } from '@lightspeed/crane-api';
2
2
 
3
3
  export default {
4
4
  sections: [
5
- {
6
- type: 'store',
7
- id: undefined,
8
- },
5
+ section.store({}),
9
6
  ],
10
- } satisfies StorePageConfiguration;
7
+ };
@@ -1,10 +1,7 @@
1
- import { StorePageConfiguration } from '@lightspeed/crane-api';
1
+ import { section } from '@lightspeed/crane-api';
2
2
 
3
3
  export default {
4
4
  sections: [
5
- {
6
- type: 'store',
7
- id: undefined,
8
- },
5
+ section.store({}),
9
6
  ],
10
- } satisfies StorePageConfiguration;
7
+ };
@@ -1,34 +1,30 @@
1
+ import { section } from '@lightspeed/crane-api';
2
+
1
3
  export default {
2
4
  sections: [
3
- {
4
- type: 'custom',
5
+ section.custom({
5
6
  id: 'intro-slider',
6
7
  showcase_id: '1',
7
- },
8
- {
9
- type: 'custom',
8
+ }),
9
+ section.custom({
10
10
  id: 'tag-lines',
11
11
  showcase_id: '1',
12
- },
13
- {
14
- type: 'custom',
12
+ }),
13
+ section.custom({
15
14
  id: 'about-us',
16
15
  showcase_id: '1',
17
- },
18
- {
19
- type: 'custom',
16
+ }),
17
+ section.custom({
20
18
  id: 'example-section',
21
19
  showcase_id: '1',
22
- },
23
- {
24
- type: 'custom',
20
+ }),
21
+ section.custom({
25
22
  id: 'featured-products',
26
23
  showcase_id: '1',
27
- },
28
- {
29
- type: 'custom',
24
+ }),
25
+ section.custom({
30
26
  id: 'trending-categories',
31
27
  showcase_id: '1',
32
- },
28
+ }),
33
29
  ],
34
30
  };
@@ -1,10 +1,7 @@
1
- import { StorePageConfiguration } from '@lightspeed/crane-api';
1
+ import { section } from '@lightspeed/crane-api';
2
2
 
3
3
  export default {
4
4
  sections: [
5
- {
6
- type: 'store',
7
- id: undefined,
8
- },
5
+ section.store({}),
9
6
  ],
10
- } satisfies StorePageConfiguration;
7
+ };
@@ -1,7 +1,9 @@
1
- export default {
1
+ import { template, section } from '@lightspeed/crane-api';
2
+
3
+ export default template.configuration({
2
4
  metadata: {
3
5
  name: 'Reference Template — Bike',
4
- description: 'This is a reference template geared towards bike shops to aid development and act as a starting point for your custom template.',
6
+ description: 'This is a reference template geared towards bike shop to aid development and act as a starting point for your custom template.',
5
7
  preview_url: 'https://reference-template-bike.company.site/',
6
8
  cover_image: {
7
9
  set: {
@@ -11,12 +13,10 @@ export default {
11
13
  },
12
14
  },
13
15
  },
14
- header: {
15
- type: 'default',
16
+ header: section.default({
16
17
  id: 'header',
17
- },
18
- footer: {
19
- type: 'default',
18
+ }),
19
+ footer: section.default({
20
20
  id: 'footer',
21
- },
22
- };
21
+ }),
22
+ });
@@ -1,10 +1,7 @@
1
- import { StorePageConfiguration } from '@lightspeed/crane-api';
1
+ import { section } from '@lightspeed/crane-api';
2
2
 
3
3
  export default {
4
4
  sections: [
5
- {
6
- type: 'store',
7
- id: undefined,
8
- },
5
+ section.store({}),
9
6
  ],
10
- } satisfies StorePageConfiguration;
7
+ };
@@ -1,10 +1,7 @@
1
- import { StorePageConfiguration } from '@lightspeed/crane-api';
1
+ import { section } from '@lightspeed/crane-api';
2
2
 
3
3
  export default {
4
4
  sections: [
5
- {
6
- type: 'store',
7
- id: undefined,
8
- },
5
+ section.store({}),
9
6
  ],
10
- } satisfies StorePageConfiguration;
7
+ };