@lightspeed/crane 1.0.3 → 1.1.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.
Files changed (44) hide show
  1. package/dist/app.d.mts +147 -10
  2. package/dist/app.d.ts +147 -10
  3. package/dist/app.mjs +1 -1
  4. package/dist/cli.mjs +22 -6
  5. package/package.json +7 -3
  6. package/template/footers/example-footer/ExampleFooter.vue +51 -0
  7. package/template/footers/example-footer/assets/example_footer_showcase_1_preview.png +0 -0
  8. package/template/footers/example-footer/assets/sample_image.jpg +0 -0
  9. package/template/footers/example-footer/client.ts +5 -0
  10. package/template/footers/example-footer/component/ReportAbuse.vue +18 -0
  11. package/template/footers/example-footer/entity/color.ts +4 -0
  12. package/template/footers/example-footer/server.ts +5 -0
  13. package/template/footers/example-footer/settings/content.ts +3 -0
  14. package/template/footers/example-footer/settings/design.ts +11 -0
  15. package/template/footers/example-footer/settings/translations.ts +12 -0
  16. package/template/footers/example-footer/showcases/1.ts +13 -0
  17. package/template/footers/example-footer/showcases/translations.ts +9 -0
  18. package/template/footers/example-footer/type.ts +5 -0
  19. package/template/headers/example-header/ExampleHeader.vue +30 -0
  20. package/template/headers/example-header/assets/cart.svg +20 -0
  21. package/template/headers/example-header/assets/example_header_showcase_1_preview.png +0 -0
  22. package/template/headers/example-header/assets/sample_image.jpg +0 -0
  23. package/template/headers/example-header/assets/search.svg +13 -0
  24. package/template/headers/example-header/client.ts +5 -0
  25. package/template/headers/example-header/component/Cart.vue +64 -0
  26. package/template/headers/example-header/component/SampleComponent.vue +11 -0
  27. package/template/headers/example-header/component/SearchForm.vue +89 -0
  28. package/template/headers/example-header/server.ts +5 -0
  29. package/template/headers/example-header/settings/content.ts +1 -0
  30. package/template/headers/example-header/settings/design.ts +1 -0
  31. package/template/headers/example-header/settings/layout.ts +1 -0
  32. package/template/headers/example-header/settings/translations.ts +5 -0
  33. package/template/headers/example-header/showcases/1.ts +11 -0
  34. package/template/headers/example-header/showcases/translations.ts +5 -0
  35. package/template/headers/example-header/type.ts +5 -0
  36. package/template/package.json +3 -2
  37. package/template/sections/example-section/component/image/ImagesGrid.vue +18 -37
  38. package/template/sections/example-section/settings/content.ts +53 -55
  39. package/template/sections/example-section/settings/translations.ts +27 -24
  40. package/template/sections/example-section/showcases/1.ts +143 -103
  41. package/template/sections/example-section/showcases/2.ts +127 -103
  42. package/template/sections/example-section/showcases/translations.ts +6 -0
  43. package/template/templates/template.ts +177 -118
  44. package/types.d.ts +14 -1
@@ -2,7 +2,7 @@ export default {
2
2
  metadata: {
3
3
  name: 'Example Template :: Standard Preset',
4
4
  description: 'Standard Preset for the Example template',
5
- test_site_id: 1,
5
+ preview_url: 'https://template_preview.company.site',
6
6
  cover_image: {
7
7
  set: {
8
8
  ORIGINAL: {
@@ -23,139 +23,198 @@ export default {
23
23
  {
24
24
  type: 'custom',
25
25
  id: 'example-section',
26
+ showcase_id: '1',
26
27
  },
27
28
  {
28
29
  type: 'custom',
29
30
  id: 'example-section',
30
- content: {
31
- section_title: {
32
- type: 'INPUTBOX',
33
- label: '$label.section_title.label',
34
- placeholder: '$label.section_title.placeholder',
35
- },
36
- section_description: {
37
- type: 'TEXTAREA',
38
- label: '$label.section_description.label',
39
- placeholder: '$label.section_description.placeholder',
40
- },
41
- image_content_1: {
42
- type: 'IMAGE',
43
- label: '$label.image_content_1.label',
44
- },
45
- image_text_1: {
46
- type: 'TEXTAREA',
47
- label: '$label.image_text_1.label',
48
- placeholder: '$label.image_text.placeholder',
49
- },
50
- image_link_1: {
51
- type: 'INPUTBOX',
52
- label: '$label.image_link_1.label',
53
- placeholder: '$label.image_link.placeholder',
54
- },
55
- image_content_2: {
56
- type: 'IMAGE',
57
- label: '$label.image_content_2.label',
58
- },
59
- image_text_2: {
60
- type: 'TEXTAREA',
61
- label: '$label.image_text_2.label',
62
- placeholder: '$label.image_text.placeholder',
63
- },
64
- image_link_2: {
65
- type: 'INPUTBOX',
66
- label: '$label.image_link_2.label',
67
- placeholder: '$label.image_link.placeholder',
68
- },
69
- image_content_3: {
70
- type: 'IMAGE',
71
- label: '$label.image_content_3.label',
72
- },
73
- image_text_3: {
74
- type: 'TEXTAREA',
75
- label: '$label.image_text_3.label',
76
- placeholder: '$label.image_text.placeholder',
77
- },
78
- image_link_3: {
79
- type: 'INPUTBOX',
80
- label: '$label.image_link_3.label',
81
- placeholder: '$label.image_link.placeholder',
82
- },
83
- image_content_4: {
84
- type: 'IMAGE',
85
- label: '$label.image_content_4.label',
86
- },
87
- image_text_4: {
88
- type: 'TEXTAREA',
89
- label: '$label.image_text_4.label',
90
- placeholder: '$label.image_text.placeholder',
91
- },
92
- image_link_4: {
93
- type: 'INPUTBOX',
94
- label: '$label.image_link_4.label',
95
- placeholder: '$label.image_link.placeholder',
96
- },
97
- },
98
- design: {
99
- section_title: {
100
- type: 'TEXT',
101
- label: '$label.section_title.label',
102
- colors: ['#FFFFFF66', '#0000004D', '#00000099', '#64C7FF66', '#F9947266', '#C794CD66', '#FFD17466'],
103
- sizes: [18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60],
104
- defaults: {
105
- font: 'global.fontFamily.body',
106
- size: 40,
107
- bold: true,
108
- italic: false,
109
- color: '#313131',
110
- visible: true,
31
+ showcase_overrides: {
32
+ content: {
33
+ section_title: {
34
+ type: 'INPUTBOX',
35
+ text: '$label.template_standard_showcase_1.section_title.text',
36
+ },
37
+
38
+ images: {
39
+ type: 'DECK',
40
+ cards: [
41
+ {
42
+ settings: {
43
+ image_text: {
44
+ type: 'TEXTAREA',
45
+ text: '$label.showcase_1.image_text_1.text',
46
+ },
47
+
48
+ image_content: {
49
+ type: 'IMAGE',
50
+ imageData: {
51
+ set: {
52
+ LOW_RES: {
53
+ url: 'new_arrivals_mobile_low.jpeg',
54
+ },
55
+ MOBILE_WEBP_LOW_RES: {
56
+ url: 'new_arrivals_mobile_low.jpeg',
57
+ },
58
+ MOBILE_WEBP_HI_RES: {
59
+ url: 'new_arrivals_mobile_high.jpeg',
60
+ },
61
+ WEBP_LOW_RES: {
62
+ url: 'new_arrivals_pc_low.jpeg',
63
+ },
64
+ WEBP_HI_2X_RES: {
65
+ url: 'new_arrivals_pc_high.jpeg',
66
+ },
67
+ },
68
+ borderInfo: {},
69
+ },
70
+ },
71
+
72
+ image_link: {
73
+ type: 'INPUTBOX',
74
+ text: '$label.showcase_1.image_link_1.text',
75
+ },
76
+ },
77
+ },
78
+
79
+ {
80
+ settings: {
81
+ image_text: {
82
+ type: 'TEXTAREA',
83
+ text: '$label.showcase_1.image_text_2.text',
84
+ },
85
+
86
+ image_content: {
87
+ type: 'IMAGE',
88
+ imageData: {
89
+ set: {
90
+ LOW_RES: {
91
+ url: 'sport_look_mobile_low.jpeg',
92
+ },
93
+ MOBILE_WEBP_LOW_RES: {
94
+ url: 'sport_look_mobile_low.jpeg',
95
+ },
96
+ MOBILE_WEBP_HI_RES: {
97
+ url: 'sport_look_mobile_high.jpeg',
98
+ },
99
+ WEBP_LOW_RES: {
100
+ url: 'sport_look_pc_low.jpeg',
101
+ },
102
+ WEBP_HI_2X_RES: {
103
+ url: 'sport_look_pc_high.jpeg',
104
+ },
105
+ },
106
+ borderInfo: {},
107
+ },
108
+ },
109
+
110
+ image_link: {
111
+ type: 'INPUTBOX',
112
+ text: '$label.showcase_1.image_link_1.text',
113
+ },
114
+ },
115
+ },
116
+
117
+ {
118
+ settings: {
119
+ image_text: {
120
+ type: 'TEXTAREA',
121
+ text: '$label.showcase_1.image_text_3.text',
122
+ },
123
+
124
+ image_content: {
125
+ type: 'IMAGE',
126
+ imageData: {
127
+ set: {
128
+ LOW_RES: {
129
+ url: 'summer_accessories_mobile_low.jpeg',
130
+ },
131
+ MOBILE_WEBP_LOW_RES: {
132
+ url: 'summer_accessories_mobile_low.jpeg',
133
+ },
134
+ MOBILE_WEBP_HI_RES: {
135
+ url: 'summer_accessories_mobile_high.jpeg',
136
+ },
137
+ WEBP_LOW_RES: {
138
+ url: 'summer_accessories_pc_low.jpeg',
139
+ },
140
+ WEBP_HI_2X_RES: {
141
+ url: 'summer_accessories_pc_high.jpeg',
142
+ },
143
+ },
144
+ borderInfo: {},
145
+ },
146
+ },
147
+
148
+ image_link: {
149
+ type: 'INPUTBOX',
150
+ text: '$label.showcase_1.image_link_1.text',
151
+ },
152
+ },
153
+ },
154
+
155
+ {
156
+ settings: {
157
+ image_text: {
158
+ type: 'TEXTAREA',
159
+ text: '$label.showcase_1.image_text_4.text',
160
+ },
161
+
162
+ image_content: {
163
+ type: 'IMAGE',
164
+ imageData: {
165
+ set: {
166
+ LOW_RES: {
167
+ url: 'trending_footwear_mobile_low.jpeg',
168
+ },
169
+ MOBILE_WEBP_LOW_RES: {
170
+ url: 'trending_footwear_mobile_low.jpeg',
171
+ },
172
+ MOBILE_WEBP_HI_RES: {
173
+ url: 'trending_footwear_mobile_high.jpeg',
174
+ },
175
+ WEBP_LOW_RES: {
176
+ url: 'trending_footwear_pc_low.jpeg',
177
+ },
178
+ WEBP_HI_2X_RES: {
179
+ url: 'trending_footwear_pc_high.jpeg',
180
+ },
181
+ },
182
+ borderInfo: {},
183
+ },
184
+ },
185
+ },
186
+ },
187
+ ],
111
188
  },
112
189
  },
113
- section_description: {
114
- type: 'TEXT',
115
- label: '$label.section_description.label',
116
- colors: ['#FFFFFF66', '#0000004D', '#00000099', '#64C7FF66', '#F9947266', '#C794CD66', '#FFD17466'],
117
- sizes: [12, 13, 14, 15, 16, 17, 18, 20],
118
- defaults: {
190
+ design: {
191
+ section_title: {
192
+ type: 'TEXT',
119
193
  font: 'global.fontFamily.body',
120
- size: 18,
121
- bold: false,
194
+ size: 42,
195
+ bold: true,
122
196
  italic: true,
123
- color: '#313131',
124
- visible: true,
197
+ color: '#222',
125
198
  },
126
- },
127
- image_text: {
128
- type: 'TEXT',
129
- label: '$label.image_text.label',
130
- colors: ['#FFFFFF66', '#0000004D', '#00000099', '#64C7FF66', '#F9947266', '#C794CD66', '#FFD17466'],
131
- sizes: [12, 13, 14, 15, 16, 17, 18, 20],
132
- defaults: {
133
- font: 'global.fontFamily.body',
134
- size: 16,
199
+ image_text: {
200
+ type: 'TEXT',
201
+ size: 22,
135
202
  bold: false,
136
203
  italic: true,
137
- color: '#FFFFFF',
138
- visible: true,
139
- },
140
- },
141
- image_content: {
142
- type: 'IMAGE',
143
- label: '$label.image_content.label',
144
- colors: ['#FFFFFF66', '#0000004D', '#00000099', '#64C7FF66', '#F9947266', '#C794CD66', '#FFD17466'],
145
- defaults: {
146
- overlay: 'COLOR',
147
- color: '#333',
148
204
  },
149
- },
150
- background: {
151
- type: 'BACKGROUND',
152
- label: '$label.background.label',
153
- colors: ['#FFFFFF66', '#0000004D', '#00000099', '#64C7FF66', '#F9947266', '#C794CD66', '#FFD17466'],
154
- defaults: {
205
+ background: {
206
+ type: 'BACKGROUND',
155
207
  style: 'COLOR',
156
208
  color: 'global.color.background',
157
209
  },
210
+ image_content: {
211
+ type: 'IMAGE',
212
+ overlay: 'GRADIENT',
213
+ color: ['#FFFFFF', '#CCCCCC'],
214
+ },
158
215
  },
216
+ layoutId: 'Caption_Under_Image',
217
+ blockName: '$label.showcase_1.blockName',
159
218
  },
160
219
  },
161
220
  {
package/types.d.ts CHANGED
@@ -12,7 +12,8 @@ type ButtonType =
12
12
  | 'HYPER_LINK'
13
13
  | 'MAIL_LINK'
14
14
  | 'TEL_LINK'
15
- | 'GO_TO_STORE_LINK';
15
+ | 'GO_TO_STORE_LINK'
16
+ | 'GO_TO_PAGE';
16
17
 
17
18
  interface ButtonContentData {
18
19
  readonly title: string;
@@ -21,6 +22,8 @@ interface ButtonContentData {
21
22
  readonly email?: string;
22
23
  readonly phone?: string;
23
24
  readonly tileId?: string;
25
+ readonly pageId?: string;
26
+ readonly pageUrl?: string;
24
27
  }
25
28
 
26
29
  interface ImageInfoData {
@@ -191,6 +194,16 @@ interface TextareaContentEditor {
191
194
  readonly placeholder: Record<string, string>;
192
195
  }
193
196
 
197
+ interface ExternalContentData {
198
+ readonly reportAbuse?: ReportAbuse;
199
+ }
200
+
201
+ interface ReportAbuse {
202
+ readonly url: string,
203
+ readonly title: string,
204
+ readonly target: string,
205
+ }
206
+
194
207
  interface ButtonContentEditor {
195
208
  readonly type: 'BUTTON';
196
209
  readonly label: Record<string, string>;