@lightspeed/crane 2.0.5 → 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 +34 -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 +108 -72
  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 +40 -40
  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 +42 -43
  75. package/template/reference/sections/intro-slider/component/Title.vue +7 -7
  76. package/template/reference/sections/intro-slider/settings/content.ts +33 -36
  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 +1 -1
  85. package/template/reference/sections/tag-lines/component/SectionImage.vue +18 -18
  86. package/template/reference/sections/tag-lines/component/Title.vue +1 -1
  87. package/template/reference/sections/tag-lines/settings/content.ts +47 -47
  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 +1 -1
  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,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
+ };
@@ -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: '2',
7
- },
8
- {
9
- type: 'custom',
8
+ }),
9
+ section.custom({
10
10
  id: 'example-section',
11
11
  showcase_id: '3',
12
- },
13
- {
14
- type: 'custom',
12
+ }),
13
+ section.custom({
15
14
  id: 'tag-lines',
16
15
  showcase_id: '2',
17
- },
18
- {
19
- type: 'custom',
16
+ }),
17
+ section.custom({
20
18
  id: 'about-us',
21
19
  showcase_id: '2',
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
+ };
@@ -48,10 +48,8 @@ const backgroundStyle = computed(() => {
48
48
  });
49
49
  </script>
50
50
 
51
- <style lang="scss" scoped>
52
- .example-section {
53
- &__blank_space {
54
- height: 40px;
55
- }
51
+ <style scoped>
52
+ .example-section__blank_space {
53
+ height: 40px;
56
54
  }
57
55
  </style>
@@ -26,7 +26,7 @@ import arrowIcon from '../../assets/arrow.svg';
26
26
  const button = useButtonElementContent<Content>('button');
27
27
  </script>
28
28
 
29
- <style lang="scss" scoped>
29
+ <style scoped>
30
30
  .button-content {
31
31
  display: flex;
32
32
  justify-content: center;
@@ -105,60 +105,60 @@ const textStyle = computed(() => ({
105
105
  }));
106
106
  </script>
107
107
 
108
- <style lang="scss" scoped>
108
+ <style scoped>
109
109
  .image-section {
110
110
  height: 100%;
111
111
  position: relative;
112
+ }
112
113
 
113
- &__link {
114
- height: 100%;
115
- width: 100%;
116
- display: flex;
117
- }
114
+ .image-section__link {
115
+ height: 100%;
116
+ width: 100%;
117
+ display: flex;
118
+ }
118
119
 
119
- &__link-wrap {
120
- height: 100%;
121
- width: 100%;
122
- display: flex;
123
- position: relative;
124
- z-index: 999;
125
- }
120
+ .image-section__link-wrap {
121
+ height: 100%;
122
+ width: 100%;
123
+ display: flex;
124
+ position: relative;
125
+ z-index: 999;
126
+ }
126
127
 
127
- &__content {
128
- display:block;
129
- height: 100%;
130
- width: 100%;
131
- object-fit: cover;
132
- z-index: -1;
133
- }
128
+ .image-section__content {
129
+ display: block;
130
+ height: 100%;
131
+ width: 100%;
132
+ object-fit: cover;
133
+ z-index: -1;
134
+ }
134
135
 
135
- &__content-block {
136
- display: flex;
137
- width: 100%;
136
+ .image-section__content-block {
137
+ display: flex;
138
+ width: 100%;
139
+ }
138
140
 
139
- &-position-on {
140
- height: 100%;
141
- }
141
+ .image-section__content-block-position-on {
142
+ height: 100%;
143
+ }
142
144
 
143
- &-position-under {
144
- height: calc(100% - 60px);
145
- }
146
- }
145
+ .image-section__content-block-position-under {
146
+ height: calc(100% - 60px);
147
+ }
147
148
 
148
- &__text {
149
- position: absolute;
150
- bottom: 0;
151
- width: 100%;
152
- align-content: center;
153
- padding: 16px;
149
+ .image-section__text {
150
+ position: absolute;
151
+ bottom: 0;
152
+ width: 100%;
153
+ align-content: center;
154
+ padding: 16px;
155
+ }
154
156
 
155
- &-position-on {
156
- height: auto;
157
- }
157
+ .image-section__text-position-on {
158
+ height: auto;
159
+ }
158
160
 
159
- &-position-under {
160
- height: 60px;
161
- }
162
- }
161
+ .image-section__text-position-under {
162
+ height: 60px;
163
163
  }
164
164
  </style>
@@ -46,46 +46,41 @@ window.addEventListener('resize', onWidthChange);
46
46
  const smallWindow = computed(() => windowWidth.value <= 768);
47
47
  </script>
48
48
 
49
- <style lang="scss" scoped>
50
- @mixin image-grid {
49
+ <style scoped>
50
+ /* Base grid styles (previously @mixin image-grid) */
51
+ /* Container only (not .image-grid__content-* cells) */
52
+ [class^="image-grid__"]:not([class*="image-grid__content"]) {
51
53
  display: grid;
52
54
  grid-gap: 20px;
55
+
53
56
  @media screen and (min-width: 900px) {
54
57
  aspect-ratio: 1/0.55;
55
58
  }
56
59
  }
57
60
 
58
61
  .image-grid__1 {
59
- @include image-grid;
60
-
61
- & {
62
- grid-template-columns: [col1-start] 1fr [col1-end];
63
- grid-template-rows: [row1-start] 1fr [row1-end];
64
- }
62
+ grid-template-columns: [col1-start] 1fr [col1-end];
63
+ grid-template-rows: [row1-start] 1fr [row1-end];
65
64
 
66
65
  @media screen and (max-width: 900px) {
67
66
  aspect-ratio: 1;
68
67
  }
69
68
 
70
- .image-grid__content-1 {
69
+ & .image-grid__content-1 {
71
70
  grid-column: col1-start / col1-end;
72
71
  grid-row: row1-start / row1-end;
73
72
  }
74
73
  }
75
74
 
76
75
  .image-grid__2 {
77
- @include image-grid;
78
-
79
- & {
80
- grid-template-columns: [col1-start] 11fr [col2-start] 9fr [col2-end];
81
- grid-template-rows: [row1-start] 4.5fr [row2-start] 2.75fr [row2-end];
82
- }
76
+ grid-template-columns: [col1-start] 11fr [col2-start] 9fr [col2-end];
77
+ grid-template-rows: [row1-start] 4.5fr [row2-start] 2.75fr [row2-end];
83
78
 
84
79
  @media screen and (max-width: 900px) {
85
80
  aspect-ratio: 4.5/7.25;
86
81
  }
87
82
 
88
- .image-grid__content-1 {
83
+ & .image-grid__content-1 {
89
84
  @media screen and (min-width: 900px) {
90
85
  grid-column: col1-start / col2-start;
91
86
  grid-row: row1-start / row2-end;
@@ -97,7 +92,7 @@ const smallWindow = computed(() => windowWidth.value <= 768);
97
92
  }
98
93
  }
99
94
 
100
- .image-grid__content-2 {
95
+ & .image-grid__content-2 {
101
96
  @media screen and (min-width: 900px) {
102
97
  grid-column: col2-start / col2-end;
103
98
  grid-row: row1-start / row2-end;
@@ -111,18 +106,14 @@ const smallWindow = computed(() => windowWidth.value <= 768);
111
106
  }
112
107
 
113
108
  .image-grid__3 {
114
- @include image-grid;
115
-
116
- & {
117
- grid-template-columns: [col1-start] 11fr [col2-start] 9fr [col2-end];
118
- grid-template-rows: [row1-start] 4.5fr [row2-start] 0.5fr [row3-start] 2.25fr [row4-start] 2.75fr [row4-end];
119
- }
109
+ grid-template-columns: [col1-start] 11fr [col2-start] 9fr [col2-end];
110
+ grid-template-rows: [row1-start] 4.5fr [row2-start] 0.5fr [row3-start] 2.25fr [row4-start] 2.75fr [row4-end];
120
111
 
121
112
  @media screen and (max-width: 900px) {
122
113
  aspect-ratio: 0.45;
123
114
  }
124
115
 
125
- .image-grid__content-1 {
116
+ & .image-grid__content-1 {
126
117
  @media screen and (min-width: 900px) {
127
118
  grid-column: col1-start / col2-start;
128
119
  grid-row: row1-start / row4-end;
@@ -134,7 +125,7 @@ const smallWindow = computed(() => windowWidth.value <= 768);
134
125
  }
135
126
  }
136
127
 
137
- .image-grid__content-2 {
128
+ & .image-grid__content-2 {
138
129
  @media screen and (min-width: 900px) {
139
130
  grid-column: col2-start / col2-end;
140
131
  grid-row: row1-start / row3-start;
@@ -146,7 +137,7 @@ const smallWindow = computed(() => windowWidth.value <= 768);
146
137
  }
147
138
  }
148
139
 
149
- .image-grid__content-3 {
140
+ & .image-grid__content-3 {
150
141
  @media screen and (min-width: 900px) {
151
142
  grid-column: col2-start / col2-end;
152
143
  grid-row: row3-start / row4-end;
@@ -160,8 +151,6 @@ const smallWindow = computed(() => windowWidth.value <= 768);
160
151
  }
161
152
 
162
153
  .image-grid__4 {
163
- @include image-grid;
164
-
165
154
  @media screen and (min-width: 900px) {
166
155
  grid-template-columns: [col1-start] 11fr [col2-start] 4.5fr [col3-start] 4.5fr [col3-end];
167
156
  grid-template-rows: [row1-start] 1fr [row2-start] 1fr [row2-end];
@@ -174,7 +163,7 @@ const smallWindow = computed(() => windowWidth.value <= 768);
174
163
  aspect-ratio: 0.45;
175
164
  }
176
165
 
177
- .image-grid__content-1 {
166
+ & .image-grid__content-1 {
178
167
  @media screen and (min-width: 900px) {
179
168
  grid-column: col1-start / col2-start;
180
169
  grid-row: row1-start / row2-end;
@@ -186,7 +175,7 @@ const smallWindow = computed(() => windowWidth.value <= 768);
186
175
  }
187
176
  }
188
177
 
189
- .image-grid__content-2 {
178
+ & .image-grid__content-2 {
190
179
  @media screen and (min-width: 900px) {
191
180
  grid-column: col2-start / col3-end;
192
181
  grid-row: row1-start / row2-start;
@@ -198,7 +187,7 @@ const smallWindow = computed(() => windowWidth.value <= 768);
198
187
  }
199
188
  }
200
189
 
201
- .image-grid__content-3 {
190
+ & .image-grid__content-3 {
202
191
  @media screen and (min-width: 900px) {
203
192
  grid-column: col2-start / col3-start;
204
193
  grid-row: row2-start / row2-end;
@@ -210,7 +199,7 @@ const smallWindow = computed(() => windowWidth.value <= 768);
210
199
  }
211
200
  }
212
201
 
213
- .image-grid__content-4 {
202
+ & .image-grid__content-4 {
214
203
  @media screen and (min-width: 900px) {
215
204
  grid-column: col3-start / col3-end;
216
205
  grid-row: row2-start / row2-end;
@@ -24,7 +24,7 @@ const backgroundColor = computed(() => {
24
24
  const textColor = computed(() => (isDark(backgroundColor.value) ? 'white' : 'black'));
25
25
  </script>
26
26
 
27
- <style lang="scss" scoped>
27
+ <style scoped>
28
28
  .control-item {
29
29
  margin: 20px 0;
30
30
  display: flex;
@@ -49,7 +49,7 @@ const descriptionStyle = computed(() => ({
49
49
  }));
50
50
  </script>
51
51
 
52
- <style lang="scss" scoped>
52
+ <style scoped>
53
53
  .title-section__description {
54
54
  max-width: 80%;
55
55
  }
@@ -24,7 +24,7 @@ const backgroundColor = computed(() => {
24
24
  const textColor = computed(() => (isDark(backgroundColor.value) ? 'white' : 'black'));
25
25
  </script>
26
26
 
27
- <style lang="scss" scoped>
27
+ <style scoped>
28
28
  .custom-block {
29
29
  padding: 50px;
30
30
  background-color: #f8f8f8;
@@ -36,10 +36,10 @@ const textColor = computed(() => (isDark(backgroundColor.value) ? 'white' : 'bla
36
36
  @media screen and (min-width: 1200px) {
37
37
  padding: 100px;
38
38
  }
39
+ }
39
40
 
40
- &__blank_space {
41
- height: 40px;
42
- }
41
+ .custom-block__blank_space {
42
+ height: 40px;
43
43
  }
44
44
 
45
45
  .control-item {
@@ -1,20 +1,18 @@
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
- section_description: {
8
- type: 'TEXTAREA',
7
+ }),
8
+ section_description: content.textarea({
9
9
  label: '$label.section_description.label',
10
10
  placeholder: '$label.section_description.placeholder',
11
- },
12
- divider: {
13
- type: 'DIVIDER',
11
+ }),
12
+ divider: content.divider({
14
13
  label: '$label.divider.label',
15
- },
16
- images: {
17
- type: 'DECK',
14
+ }),
15
+ images: content.deck({
18
16
  label: '$label.images.deck_title',
19
17
  addButtonLabel: '$label.images.add_card_button',
20
18
  maxCards: 5,
@@ -22,8 +20,7 @@ export default {
22
20
  defaultCardContent: {
23
21
  label: '$label.images.card_title',
24
22
  settings: {
25
- image_content: {
26
- type: 'IMAGE',
23
+ image_content: content.image({
27
24
  label: '$label.image_content_1.label',
28
25
  defaults: {
29
26
  imageData: {
@@ -44,46 +41,41 @@ export default {
44
41
  borderInfo: {},
45
42
  },
46
43
  },
47
- },
48
- image_text: {
49
- type: 'TEXTAREA',
44
+ }),
45
+ image_text: content.textarea({
50
46
  label: '$label.image_text_1.label',
51
47
  placeholder: '$label.image_text.placeholder',
52
48
  defaults: {
53
49
  text: '$label.images.default.image_text',
54
50
  },
55
- },
56
- image_link: {
57
- type: 'INPUTBOX',
51
+ }),
52
+ image_link: content.inputbox({
58
53
  label: '$label.image_link_1.label',
59
54
  placeholder: '$label.image_link.placeholder',
60
55
  defaults: {
61
56
  text: '$label.images.default.image_link.text',
62
57
  },
63
- },
58
+ }),
64
59
  },
65
60
  },
66
61
  },
67
- },
68
- button: {
69
- type: 'BUTTON',
62
+ }),
63
+ button: content.button({
70
64
  label: '$label.button.label',
71
65
  defaults: {
72
66
  title: '$label.button.defaults.title',
73
67
  buttonType: 'HYPER_LINK',
74
68
  link: 'https://www.example.com',
75
69
  },
76
- },
77
- toggle: {
78
- type: 'TOGGLE',
70
+ }),
71
+ toggle: content.toggle({
79
72
  label: '$label.toggle.label',
80
73
  description: '$label.toggle.description',
81
74
  defaults: {
82
75
  enabled: true,
83
76
  },
84
- },
85
- selectbox: {
86
- type: 'SELECTBOX',
77
+ }),
78
+ selectbox: content.selectbox({
87
79
  placeholder: '$label.selectbox.placeholder',
88
80
  label: '$label.selectbox.label',
89
81
  description: '$label.selectbox.description',
@@ -100,14 +92,13 @@ export default {
100
92
  defaults: {
101
93
  value: 'one',
102
94
  },
103
- },
104
- info: {
105
- type: 'INFO',
95
+ }),
96
+ info: content.info({
106
97
  label: '$label.info.label',
107
98
  description: '$label.info.description',
108
99
  button: {
109
100
  label: '$label.info.button.label',
110
101
  link: 'https://example.com',
111
102
  },
112
- },
113
- } as const;
103
+ }),
104
+ };