@eldrajs/theme-cli 0.2.8 → 0.2.9

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 (163) hide show
  1. package/CHANGELOG.md +2 -1
  2. package/package.json +1 -1
  3. package/template/.eldra/block-types.d.ts +28 -7
  4. package/template/.eldra/manifest.json +1034 -355
  5. package/template/.eldra/previews.json +35 -35
  6. package/template/README.md +32 -0
  7. package/template/app/assets/main.css +23 -0
  8. package/template/app/plugins/eldra-storefront.ts +3 -0
  9. package/template/app/storefront/demo.ts +75 -24
  10. package/template/app/storefront/gateway.ts +16 -2
  11. package/template/blocks/announcement-bar/preview.png +0 -0
  12. package/template/blocks/article/preview.json +4 -4
  13. package/template/blocks/article/preview.png +0 -0
  14. package/template/blocks/article-list/Block.vue +48 -19
  15. package/template/blocks/article-list/__tests__/Block.spec.ts +15 -0
  16. package/template/blocks/article-list/preview.json +43 -43
  17. package/template/blocks/article-list/preview.png +0 -0
  18. package/template/blocks/breadcrumbs/preview.png +0 -0
  19. package/template/blocks/cart/preview.png +0 -0
  20. package/template/blocks/collection-grid/Block.vue +260 -9
  21. package/template/blocks/collection-grid/__tests__/Block.spec.ts +202 -0
  22. package/template/blocks/collection-grid/block.json +3 -3
  23. package/template/blocks/collection-grid/preview.png +0 -0
  24. package/template/blocks/collection-header/Block.vue +65 -52
  25. package/template/blocks/collection-header/preview.json +4 -4
  26. package/template/blocks/collection-header/preview.png +0 -0
  27. package/template/blocks/contact/preview.png +0 -0
  28. package/template/blocks/cta/preview.json +4 -4
  29. package/template/blocks/cta/preview.png +0 -0
  30. package/template/blocks/faq/preview.png +0 -0
  31. package/template/blocks/feature-grid/Block.vue +73 -4
  32. package/template/blocks/feature-grid/__tests__/Block.spec.ts +43 -1
  33. package/template/blocks/feature-grid/block.json +2 -2
  34. package/template/blocks/feature-grid/preview.json +49 -24
  35. package/template/blocks/feature-grid/preview.png +0 -0
  36. package/template/blocks/footer/Block.vue +186 -71
  37. package/template/blocks/footer/__tests__/Block.spec.ts +127 -32
  38. package/template/blocks/footer/block.json +42 -4
  39. package/template/blocks/footer/mock.json +31 -34
  40. package/template/blocks/footer/preview.png +0 -0
  41. package/template/blocks/form/preview.png +0 -0
  42. package/template/blocks/gallery/preview.json +24 -24
  43. package/template/blocks/gallery/preview.png +0 -0
  44. package/template/blocks/hero/Block.vue +117 -19
  45. package/template/blocks/hero/__tests__/Block.spec.ts +46 -0
  46. package/template/blocks/hero/block.json +36 -1
  47. package/template/blocks/hero/preview.json +33 -25
  48. package/template/blocks/hero/preview.png +0 -0
  49. package/template/blocks/image/preview.json +4 -4
  50. package/template/blocks/image/preview.png +0 -0
  51. package/template/blocks/logo-cloud/preview.png +0 -0
  52. package/template/blocks/navigation/Block.vue +622 -184
  53. package/template/blocks/navigation/__tests__/Block.spec.ts +406 -68
  54. package/template/blocks/navigation/__tests__/fixtures/menu.json +182 -0
  55. package/template/blocks/navigation/block.json +102 -6
  56. package/template/blocks/navigation/mock.json +279 -52
  57. package/template/blocks/navigation/preview.json +311 -0
  58. package/template/blocks/navigation/preview.png +0 -0
  59. package/template/blocks/newsletter/Block.vue +248 -144
  60. package/template/blocks/newsletter/__tests__/Block.spec.ts +42 -0
  61. package/template/blocks/newsletter/block.json +61 -2
  62. package/template/blocks/newsletter/preview.json +35 -0
  63. package/template/blocks/newsletter/preview.png +0 -0
  64. package/template/blocks/order-status/preview.png +0 -0
  65. package/template/blocks/pricing-table/preview.png +0 -0
  66. package/template/blocks/product-carousel/Block.vue +272 -26
  67. package/template/blocks/product-carousel/__tests__/Block.spec.ts +90 -0
  68. package/template/blocks/product-carousel/block.json +61 -0
  69. package/template/blocks/product-carousel/preview.json +12 -0
  70. package/template/blocks/product-carousel/preview.png +0 -0
  71. package/template/blocks/product-detail/Block.vue +148 -96
  72. package/template/blocks/product-detail/__tests__/Block.spec.ts +98 -74
  73. package/template/blocks/product-detail/block.json +11 -4
  74. package/template/blocks/product-detail/mock.json +53 -22
  75. package/template/blocks/product-detail/parts/Gallery.vue +52 -103
  76. package/template/blocks/product-detail/preview.png +0 -0
  77. package/template/blocks/quote/preview.png +0 -0
  78. package/template/blocks/rich-text/preview.png +0 -0
  79. package/template/blocks/search/Block.vue +1 -0
  80. package/template/blocks/search/TypeSection.vue +1 -0
  81. package/template/blocks/search/__tests__/Block.spec.ts +23 -0
  82. package/template/blocks/search/preview.png +0 -0
  83. package/template/blocks/split-content/Block.vue +98 -20
  84. package/template/blocks/split-content/__tests__/Block.spec.ts +57 -18
  85. package/template/blocks/split-content/block.json +72 -6
  86. package/template/blocks/split-content/preview.json +34 -13
  87. package/template/blocks/split-content/preview.png +0 -0
  88. package/template/blocks/stats/preview.png +0 -0
  89. package/template/blocks/tabs/preview.json +16 -16
  90. package/template/blocks/tabs/preview.png +0 -0
  91. package/template/blocks/team/preview.png +0 -0
  92. package/template/blocks/testimonials/preview.png +0 -0
  93. package/template/blocks/timeline/preview.png +0 -0
  94. package/template/blocks/trust-strip/Block.vue +67 -1
  95. package/template/blocks/trust-strip/__tests__/Block.spec.ts +30 -1
  96. package/template/blocks/trust-strip/block.json +4 -4
  97. package/template/blocks/trust-strip/preview.json +21 -0
  98. package/template/blocks/trust-strip/preview.png +0 -0
  99. package/template/blocks/video-embed/preview.png +0 -0
  100. package/template/blocks/wishlist/preview.png +0 -0
  101. package/template/i18n/en-US.json +16 -9
  102. package/template/i18n/is-IS.json +16 -9
  103. package/template/pages/article.page.json +19 -18
  104. package/template/pages/cart.page.json +3 -13
  105. package/template/pages/category.page.json +15 -7
  106. package/template/pages/collection.page.json +15 -14
  107. package/template/pages/home.page.json +217 -182
  108. package/template/pages/product.page.json +46 -36
  109. package/template/pages/products.page.json +3 -13
  110. package/template/pages/search.page.json +3 -13
  111. package/template/pages/wishlist.page.json +3 -13
  112. package/template/public/images/CREDITS.md +28 -0
  113. package/template/public/images/clay-hands.webp +0 -0
  114. package/template/public/images/coffee-table.webp +0 -0
  115. package/template/public/images/cup.webp +0 -0
  116. package/template/public/images/enamel-cups.webp +0 -0
  117. package/template/public/images/hero.webp +0 -0
  118. package/template/public/images/kitchen.webp +0 -0
  119. package/template/public/images/mug.webp +0 -0
  120. package/template/public/images/northwind-mark.svg +1 -0
  121. package/template/public/images/planters.webp +0 -0
  122. package/template/public/images/plates.webp +0 -0
  123. package/template/public/images/reading.webp +0 -0
  124. package/template/public/images/sweater.webp +0 -0
  125. package/template/public/images/terracotta.webp +0 -0
  126. package/template/public/images/throws.webp +0 -0
  127. package/template/public/images/vase.webp +0 -0
  128. package/template/public/images/wheel.webp +0 -0
  129. package/template/public/images/yarn-tools.webp +0 -0
  130. package/template/public/images/yarn.webp +0 -0
  131. package/template/stories/generated/collection-grid.stories.ts +6 -0
  132. package/template/stories/generated/feature-grid.stories.ts +6 -0
  133. package/template/stories/generated/footer.stories.ts +4 -4
  134. package/template/stories/generated/hero.stories.ts +6 -0
  135. package/template/stories/generated/navigation.stories.ts +14 -1
  136. package/template/stories/generated/newsletter.stories.ts +2 -1
  137. package/template/stories/generated/product-carousel.stories.ts +12 -0
  138. package/template/stories/generated/split-content.stories.ts +12 -0
  139. package/template/stories/generated/trust-strip.stories.ts +8 -1
  140. package/template/stories/pages/article.stories.ts +2 -1
  141. package/template/stories/pages/cart.stories.ts +2 -1
  142. package/template/stories/pages/category.stories.ts +2 -1
  143. package/template/stories/pages/collection.stories.ts +2 -1
  144. package/template/stories/pages/home.stories.ts +2 -1
  145. package/template/stories/pages/product.stories.ts +2 -1
  146. package/template/stories/pages/products.stories.ts +2 -1
  147. package/template/stories/pages/search.stories.ts +2 -1
  148. package/template/stories/pages/wishlist.stories.ts +2 -1
  149. package/template/stories/support/demoChrome.ts +32 -0
  150. package/template/stories/support/pageBlocks.ts +2 -4
  151. package/template/test/countPill.browser.spec.ts +21 -13
  152. package/template/test/localePrefix.spec.ts +11 -6
  153. package/template/test/pages/article.spec.ts +1 -1
  154. package/template/test/pages/category.spec.ts +34 -11
  155. package/template/test/pages/collection.spec.ts +182 -148
  156. package/template/test/pages/home.spec.ts +35 -40
  157. package/template/test/pages/hydration.spec.ts +4 -4
  158. package/template/test/pages/product.spec.ts +17 -14
  159. package/template/test/pages/seededPages.spec.ts +11 -6
  160. package/template/test/prerenderRefresh.browser.spec.ts +36 -15
  161. package/template/test/starter.spec.ts +31 -15
  162. package/template/test/storefront/gatewayPrerender.spec.ts +26 -0
  163. package/template/tokens.json +13 -13
@@ -3,58 +3,65 @@
3
3
  "brandText": "Northwind Goods",
4
4
  "links": [
5
5
  {
6
- "kind": "collection",
7
- "target": {
8
- "_type": "collection",
9
- "slug": "knitwear"
10
- },
11
- "label": "Knitwear",
6
+ "kind": "url",
7
+ "url": "/products",
8
+ "label": "Shop",
12
9
  "sections": [
13
10
  {
14
- "heading": "Women",
11
+ "heading": "Ceramics",
12
+ "headingLink": {
13
+ "kind": "url",
14
+ "url": "/categories/home/ceramics",
15
+ "label": "Ceramics"
16
+ },
15
17
  "links": [
16
18
  {
17
19
  "kind": "collection",
18
20
  "target": {
19
21
  "_type": "collection",
20
- "slug": "womens-sweaters"
22
+ "slug": "mugs-cups"
21
23
  },
22
- "label": "Sweaters"
24
+ "label": "Mugs and cups"
23
25
  },
24
26
  {
25
27
  "kind": "collection",
26
28
  "target": {
27
29
  "_type": "collection",
28
- "slug": "womens-cardigans"
30
+ "slug": "bowls"
29
31
  },
30
- "label": "Cardigans"
32
+ "label": "Bowls"
31
33
  },
32
34
  {
33
35
  "kind": "collection",
34
36
  "target": {
35
37
  "_type": "collection",
36
- "slug": "scarves-wraps"
38
+ "slug": "plates-platters"
37
39
  },
38
- "label": "Scarves & wraps"
40
+ "label": "Plates and platters"
39
41
  },
40
42
  {
41
43
  "kind": "collection",
42
44
  "target": {
43
45
  "_type": "collection",
44
- "slug": "hats-gloves"
46
+ "slug": "vases"
45
47
  },
46
- "label": "Hats & gloves"
48
+ "label": "Vases"
47
49
  }
48
50
  ]
49
51
  },
50
52
  {
51
- "heading": "Men",
53
+ "heading": "Knitwear",
54
+ "headingLink": {
55
+ "kind": "url",
56
+ "url": "/categories/knitwear",
57
+ "label": "Knitwear"
58
+ },
52
59
  "links": [
53
60
  {
54
61
  "kind": "collection",
55
62
  "target": {
56
63
  "_type": "collection",
57
- "slug": "mens-sweaters"
64
+ "slug": "sweaters"
58
65
  },
59
66
  "label": "Sweaters"
60
67
  },
@@ -62,7 +69,7 @@
62
69
  "kind": "collection",
63
70
  "target": {
64
71
  "_type": "collection",
65
- "slug": "mens-cardigans"
72
+ "slug": "cardigans"
66
73
  },
67
74
  "label": "Cardigans"
68
75
  },
@@ -70,77 +77,108 @@
70
77
  "kind": "collection",
71
78
  "target": {
72
79
  "_type": "collection",
73
- "slug": "mens-scarves"
80
+ "slug": "hats-scarves"
74
81
  },
75
- "label": "Scarves"
82
+ "label": "Hats and scarves"
76
83
  },
77
84
  {
78
85
  "kind": "collection",
79
86
  "target": {
80
87
  "_type": "collection",
81
- "slug": "socks"
88
+ "slug": "yarn"
82
89
  },
83
- "label": "Socks"
90
+ "label": "Yarn"
84
91
  }
85
92
  ]
86
93
  },
87
94
  {
88
- "heading": "Collections",
95
+ "heading": "Kitchen",
96
+ "headingLink": {
97
+ "kind": "url",
98
+ "url": "/categories/home/kitchen",
99
+ "label": "Kitchen"
100
+ },
89
101
  "links": [
90
102
  {
91
103
  "kind": "collection",
92
104
  "target": {
93
105
  "_type": "collection",
94
- "slug": "merino-essentials"
106
+ "slug": "jugs-pitchers"
95
107
  },
96
- "label": "Merino essentials"
108
+ "label": "Jugs and pitchers"
97
109
  },
98
110
  {
99
111
  "kind": "collection",
100
112
  "target": {
101
113
  "_type": "collection",
102
- "slug": "heavy-winter-knits"
114
+ "slug": "boards"
103
115
  },
104
- "label": "Heavy winter knits"
116
+ "label": "Boards"
105
117
  },
106
118
  {
107
119
  "kind": "collection",
108
120
  "target": {
109
121
  "_type": "collection",
110
- "slug": "undyed-wool"
122
+ "slug": "utensils"
111
123
  },
112
- "label": "Undyed wool"
124
+ "label": "Utensils"
113
125
  },
114
126
  {
115
127
  "kind": "collection",
116
128
  "target": {
117
129
  "_type": "collection",
118
- "slug": "knitwear"
130
+ "slug": "table-linen"
131
+ },
132
+ "label": "Table linen"
133
+ }
134
+ ]
135
+ },
136
+ {
137
+ "heading": "Picked for you",
138
+ "display": "card",
139
+ "links": [
140
+ {
141
+ "kind": "product",
142
+ "target": {
143
+ "_type": "product",
144
+ "slug": "speckled-latte-mug"
145
+ },
146
+ "label": "Speckled latte mug",
147
+ "display": "card"
148
+ },
149
+ {
150
+ "kind": "product",
151
+ "target": {
152
+ "_type": "product",
153
+ "slug": "merino-crew-sweater"
119
154
  },
120
- "label": "Shop all knitwear"
155
+ "label": "Merino crew sweater",
156
+ "display": "card"
121
157
  }
122
158
  ]
123
159
  }
124
160
  ]
125
161
  },
126
162
  {
127
- "kind": "collection",
128
- "target": {
129
- "_type": "collection",
130
- "slug": "ceramics"
131
- },
163
+ "kind": "url",
164
+ "url": "/categories/home/ceramics",
132
165
  "label": "Ceramics",
133
166
  "sections": [
134
167
  {
135
- "heading": "Tableware",
168
+ "heading": "By type",
169
+ "headingLink": {
170
+ "kind": "url",
171
+ "url": "/categories/home/ceramics",
172
+ "label": "By type"
173
+ },
136
174
  "links": [
137
175
  {
138
176
  "kind": "collection",
139
177
  "target": {
140
178
  "_type": "collection",
141
- "slug": "plates"
179
+ "slug": "mugs-cups"
142
180
  },
143
- "label": "Plates"
181
+ "label": "Mugs and cups"
144
182
  },
145
183
  {
146
184
  "kind": "collection",
@@ -154,35 +192,192 @@
154
192
  "kind": "collection",
155
193
  "target": {
156
194
  "_type": "collection",
157
- "slug": "mugs-cups"
195
+ "slug": "plates-platters"
196
+ },
197
+ "label": "Plates and platters"
198
+ },
199
+ {
200
+ "kind": "collection",
201
+ "target": {
202
+ "_type": "collection",
203
+ "slug": "vases"
204
+ },
205
+ "label": "Vases",
206
+ "badge": "New"
207
+ },
208
+ {
209
+ "kind": "collection",
210
+ "target": {
211
+ "_type": "collection",
212
+ "slug": "planters"
213
+ },
214
+ "label": "Planters"
215
+ }
216
+ ],
217
+ "seeAll": {
218
+ "label": "All ceramics",
219
+ "link": {
220
+ "kind": "url",
221
+ "url": "/categories/home/ceramics",
222
+ "label": "Ceramics"
223
+ }
224
+ }
225
+ },
226
+ {
227
+ "heading": "By glaze",
228
+ "links": [
229
+ {
230
+ "kind": "collection",
231
+ "target": {
232
+ "_type": "collection",
233
+ "slug": "speckled"
234
+ },
235
+ "label": "Speckled"
236
+ },
237
+ {
238
+ "kind": "collection",
239
+ "target": {
240
+ "_type": "collection",
241
+ "slug": "celadon"
242
+ },
243
+ "label": "Celadon"
244
+ },
245
+ {
246
+ "kind": "collection",
247
+ "target": {
248
+ "_type": "collection",
249
+ "slug": "cobalt-on-white"
250
+ },
251
+ "label": "Cobalt on white"
252
+ },
253
+ {
254
+ "kind": "collection",
255
+ "target": {
256
+ "_type": "collection",
257
+ "slug": "raw-clay"
258
+ },
259
+ "label": "Raw clay"
260
+ }
261
+ ]
262
+ },
263
+ {
264
+ "heading": "Makers",
265
+ "headingLink": {
266
+ "kind": "url",
267
+ "url": "/pages/makers",
268
+ "label": "Makers"
269
+ },
270
+ "links": [
271
+ {
272
+ "kind": "url",
273
+ "url": "/pages/makers/harbour-pottery",
274
+ "label": "Harbour Pottery"
275
+ },
276
+ {
277
+ "kind": "url",
278
+ "url": "/pages/makers/kiln-lane",
279
+ "label": "Kiln Lane"
280
+ },
281
+ {
282
+ "kind": "url",
283
+ "url": "/pages/makers/studio-ash",
284
+ "label": "Studio Ash"
285
+ }
286
+ ],
287
+ "seeAll": {
288
+ "label": "Meet the makers",
289
+ "link": {
290
+ "kind": "url",
291
+ "url": "/pages/makers",
292
+ "label": "Makers"
293
+ }
294
+ }
295
+ },
296
+ {
297
+ "heading": "Best sellers",
298
+ "display": "card",
299
+ "links": [
300
+ {
301
+ "kind": "product",
302
+ "target": {
303
+ "_type": "product",
304
+ "slug": "speckled-latte-mug"
305
+ },
306
+ "label": "Speckled latte mug",
307
+ "display": "card"
308
+ },
309
+ {
310
+ "kind": "product",
311
+ "target": {
312
+ "_type": "product",
313
+ "slug": "hand-thrown-serving-bowl"
158
314
  },
159
- "label": "Mugs & cups"
315
+ "label": "Hand-thrown serving bowl",
316
+ "display": "card"
160
317
  }
161
318
  ]
162
319
  }
163
320
  ]
164
321
  },
165
322
  {
166
- "kind": "collection",
167
- "target": {
168
- "_type": "collection",
169
- "slug": "kitchen"
170
- },
323
+ "kind": "url",
324
+ "url": "/categories/knitwear",
325
+ "label": "Knitwear"
326
+ },
327
+ {
328
+ "kind": "url",
329
+ "url": "/categories/home/kitchen",
171
330
  "label": "Kitchen"
172
331
  },
173
332
  {
174
333
  "kind": "url",
175
334
  "url": "/journal",
176
- "label": "Journal"
335
+ "label": "Journal",
336
+ "sections": [
337
+ {
338
+ "links": [
339
+ {
340
+ "kind": "url",
341
+ "url": "/journal/care",
342
+ "label": "Care guides",
343
+ "description": "Washing linen, seasoning boards, storing wool"
344
+ },
345
+ {
346
+ "kind": "url",
347
+ "url": "/journal/workshops",
348
+ "label": "Workshop visits",
349
+ "description": "Mornings with the people who make our goods"
350
+ },
351
+ {
352
+ "kind": "url",
353
+ "url": "/journal/at-home",
354
+ "label": "At home",
355
+ "description": "Small rituals and slow mornings"
356
+ }
357
+ ],
358
+ "seeAll": {
359
+ "label": "All articles",
360
+ "link": {
361
+ "kind": "url",
362
+ "url": "/journal",
363
+ "label": "Journal"
364
+ }
365
+ }
366
+ }
367
+ ]
177
368
  },
178
369
  {
179
- "kind": "url",
180
- "url": "/pages/visit",
181
- "label": "Visit the studio"
370
+ "kind": "collection",
371
+ "target": {
372
+ "_type": "collection",
373
+ "slug": "sale"
374
+ },
375
+ "label": "Sale"
182
376
  }
183
377
  ],
378
+ "drawerLayout": "accordion",
184
379
  "showSearch": true,
185
- "searchStyle": "icon",
380
+ "searchStyle": "field",
186
381
  "ctaLabel": "Shop gifts",
187
382
  "cta": {
188
383
  "kind": "collection",
@@ -192,5 +387,37 @@
192
387
  }
193
388
  },
194
389
  "sticky": true,
195
- "transparentOverHero": false
390
+ "transparentOverHero": false,
391
+ "infoItems": [
392
+ {
393
+ "text": "Free delivery over $80",
394
+ "icon": "truck",
395
+ "placement": "start"
396
+ },
397
+ {
398
+ "text": "30-day returns",
399
+ "icon": "arrow-back-up",
400
+ "placement": "start"
401
+ },
402
+ {
403
+ "text": "Shop open today 10–18",
404
+ "icon": "clock",
405
+ "placement": "start"
406
+ },
407
+ {
408
+ "text": "Help",
409
+ "href": "/pages/help",
410
+ "placement": "end"
411
+ },
412
+ {
413
+ "text": "Order status",
414
+ "href": "/pages/order-status",
415
+ "placement": "end"
416
+ },
417
+ {
418
+ "text": "(555) 014-2290",
419
+ "href": "tel:+15550142290",
420
+ "placement": "end"
421
+ }
422
+ ]
196
423
  }