@eldrajs/theme-cli 0.0.0 → 0.2.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 (485) hide show
  1. package/CHANGELOG.md +77 -0
  2. package/LICENSE +21 -0
  3. package/README.md +26 -1
  4. package/dist/cli.d.ts +1 -0
  5. package/dist/cli.js +203 -0
  6. package/dist/index.d.ts +174 -0
  7. package/dist/index.js +3 -0
  8. package/dist/validate-DprFpjV7.js +535 -0
  9. package/package.json +50 -2
  10. package/template/.eldra/block-types.d.ts +429 -0
  11. package/template/.eldra/manifest.json +9378 -0
  12. package/template/.eldra/previews.json +36 -0
  13. package/template/.github/workflows/eldra-deploy.yml +24 -0
  14. package/template/.gitlab-ci.yml +16 -0
  15. package/template/.storybook/eldra.ts +123 -0
  16. package/template/.storybook/i18n.ts +23 -0
  17. package/template/.storybook/main.ts +59 -0
  18. package/template/.storybook/nuxt-link-stub.ts +23 -0
  19. package/template/.storybook/preview.ts +53 -0
  20. package/template/.storybook/shims-vue.d.ts +10 -0
  21. package/template/.storybook/virtual-eldra.d.ts +32 -0
  22. package/template/README.md +293 -0
  23. package/template/app/app.vue +126 -0
  24. package/template/app/assets/main.css +404 -0
  25. package/template/app/components/EldraIcon.vue +66 -0
  26. package/template/app/components/EldraRouterLink.vue +62 -0
  27. package/template/app/components/ui/UiImage.stories.ts +30 -0
  28. package/template/app/components/ui/UiImage.vue +224 -0
  29. package/template/app/components/ui/__tests__/UiImage.spec.ts +292 -0
  30. package/template/app/composables/iconComponent.ts +84 -0
  31. package/template/app/composables/iconFetcher.ts +14 -0
  32. package/template/app/composables/useBlockData.ts +30 -0
  33. package/template/app/composables/useEditing.ts +31 -0
  34. package/template/app/composables/useEldraIcon.ts +46 -0
  35. package/template/app/composables/useRevalidating.ts +69 -0
  36. package/template/app/composables/useRichTextScrollRegions.ts +80 -0
  37. package/template/app/composables/useStorefront.ts +18 -0
  38. package/template/app/composables/useStorefrontFeedback.ts +49 -0
  39. package/template/app/composables/useUiId.ts +18 -0
  40. package/template/app/composables/useWishlist.ts +42 -0
  41. package/template/app/i18n.d.ts +28 -0
  42. package/template/app/icons.ts +185 -0
  43. package/template/app/pages/[...slug].vue +134 -0
  44. package/template/app/plugins/eldra-i18n.ts +98 -0
  45. package/template/app/plugins/eldra-storefront.ts +288 -0
  46. package/template/app/plugins/eldra-ui-messages.ts +112 -0
  47. package/template/app/storefront/cart.ts +245 -0
  48. package/template/app/storefront/categories.ts +283 -0
  49. package/template/app/storefront/collectionSelector.ts +60 -0
  50. package/template/app/storefront/commerce.ts +58 -0
  51. package/template/app/storefront/demo.ts +1313 -0
  52. package/template/app/storefront/facets.ts +476 -0
  53. package/template/app/storefront/feedback.ts +122 -0
  54. package/template/app/storefront/gateway.ts +2256 -0
  55. package/template/app/storefront/history.ts +233 -0
  56. package/template/app/storefront/money.ts +248 -0
  57. package/template/app/storefront/options.ts +71 -0
  58. package/template/app/storefront/prerender.ts +77 -0
  59. package/template/app/storefront/refresh.ts +222 -0
  60. package/template/app/storefront/toProductCard.ts +154 -0
  61. package/template/app/storefront/types.ts +815 -0
  62. package/template/app/storefront/volatile.ts +211 -0
  63. package/template/app/templates.ts +544 -0
  64. package/template/app/utils/classes.ts +40 -0
  65. package/template/app/utils/links.ts +70 -0
  66. package/template/app/utils/pageStructure.ts +77 -0
  67. package/template/app/utils/pageTitle.ts +37 -0
  68. package/template/app/virtual-eldra.d.ts +12 -0
  69. package/template/bitbucket-pipelines.yml +19 -0
  70. package/template/blocks/announcement-bar/Block.vue +203 -0
  71. package/template/blocks/announcement-bar/__tests__/Block.spec.ts +227 -0
  72. package/template/blocks/announcement-bar/block.json +45 -0
  73. package/template/blocks/announcement-bar/mock.json +7 -0
  74. package/template/blocks/announcement-bar/preview.png +0 -0
  75. package/template/blocks/article/Block.vue +317 -0
  76. package/template/blocks/article/__tests__/Block.spec.ts +229 -0
  77. package/template/blocks/article/block.json +148 -0
  78. package/template/blocks/article/mock.json +512 -0
  79. package/template/blocks/article/preview.json +16 -0
  80. package/template/blocks/article/preview.png +0 -0
  81. package/template/blocks/article-list/Block.vue +343 -0
  82. package/template/blocks/article-list/__tests__/Block.spec.ts +279 -0
  83. package/template/blocks/article-list/block.json +181 -0
  84. package/template/blocks/article-list/mock.json +68 -0
  85. package/template/blocks/article-list/preview.json +84 -0
  86. package/template/blocks/article-list/preview.png +0 -0
  87. package/template/blocks/breadcrumbs/Block.vue +278 -0
  88. package/template/blocks/breadcrumbs/__tests__/Block.spec.ts +461 -0
  89. package/template/blocks/breadcrumbs/block.json +89 -0
  90. package/template/blocks/breadcrumbs/mock.json +11 -0
  91. package/template/blocks/breadcrumbs/preview.json +3 -0
  92. package/template/blocks/breadcrumbs/preview.png +0 -0
  93. package/template/blocks/cart/Block.vue +372 -0
  94. package/template/blocks/cart/__tests__/Block.spec.ts +561 -0
  95. package/template/blocks/cart/__tests__/ShippingBar.spec.ts +78 -0
  96. package/template/blocks/cart/__tests__/Summary.spec.ts +245 -0
  97. package/template/blocks/cart/block.json +74 -0
  98. package/template/blocks/cart/mock.json +11 -0
  99. package/template/blocks/cart/parts/CartLines.vue +257 -0
  100. package/template/blocks/cart/parts/ShippingBar.vue +105 -0
  101. package/template/blocks/cart/parts/Summary.vue +291 -0
  102. package/template/blocks/cart/preview.png +0 -0
  103. package/template/blocks/collection-grid/Block.vue +1832 -0
  104. package/template/blocks/collection-grid/__tests__/Block.spec.ts +3037 -0
  105. package/template/blocks/collection-grid/__tests__/groups.spec.ts +731 -0
  106. package/template/blocks/collection-grid/block.json +187 -0
  107. package/template/blocks/collection-grid/mock.json +23 -0
  108. package/template/blocks/collection-grid/parts/groups.ts +861 -0
  109. package/template/blocks/collection-grid/preview.json +7 -0
  110. package/template/blocks/collection-grid/preview.png +0 -0
  111. package/template/blocks/collection-header/Block.vue +533 -0
  112. package/template/blocks/collection-header/__tests__/Block.spec.ts +381 -0
  113. package/template/blocks/collection-header/block.json +140 -0
  114. package/template/blocks/collection-header/mock.json +28 -0
  115. package/template/blocks/collection-header/preview.json +14 -0
  116. package/template/blocks/collection-header/preview.png +0 -0
  117. package/template/blocks/contact/Block.vue +621 -0
  118. package/template/blocks/contact/__tests__/Block.spec.ts +347 -0
  119. package/template/blocks/contact/block.json +174 -0
  120. package/template/blocks/contact/mock.json +28 -0
  121. package/template/blocks/contact/preview.json +9 -0
  122. package/template/blocks/contact/preview.png +0 -0
  123. package/template/blocks/cta/Block.vue +383 -0
  124. package/template/blocks/cta/__tests__/Block.spec.ts +309 -0
  125. package/template/blocks/cta/block.json +86 -0
  126. package/template/blocks/cta/mock.json +10 -0
  127. package/template/blocks/cta/preview.json +9 -0
  128. package/template/blocks/cta/preview.png +0 -0
  129. package/template/blocks/faq/Block.vue +254 -0
  130. package/template/blocks/faq/__tests__/Block.spec.ts +312 -0
  131. package/template/blocks/faq/block.json +113 -0
  132. package/template/blocks/faq/mock.json +115 -0
  133. package/template/blocks/faq/preview.png +0 -0
  134. package/template/blocks/feature-grid/Block.vue +241 -0
  135. package/template/blocks/feature-grid/__tests__/Block.spec.ts +311 -0
  136. package/template/blocks/feature-grid/block.json +106 -0
  137. package/template/blocks/feature-grid/mock.json +29 -0
  138. package/template/blocks/feature-grid/preview.json +45 -0
  139. package/template/blocks/feature-grid/preview.png +0 -0
  140. package/template/blocks/footer/Block.vue +652 -0
  141. package/template/blocks/footer/__tests__/Block.spec.ts +700 -0
  142. package/template/blocks/footer/block.json +240 -0
  143. package/template/blocks/footer/mock.json +161 -0
  144. package/template/blocks/footer/preview.png +0 -0
  145. package/template/blocks/gallery/Block.vue +416 -0
  146. package/template/blocks/gallery/__tests__/Block.spec.ts +289 -0
  147. package/template/blocks/gallery/block.json +87 -0
  148. package/template/blocks/gallery/mock.json +16 -0
  149. package/template/blocks/gallery/preview.json +64 -0
  150. package/template/blocks/gallery/preview.png +0 -0
  151. package/template/blocks/hero/Block.vue +378 -0
  152. package/template/blocks/hero/__tests__/Block.spec.ts +324 -0
  153. package/template/blocks/hero/block.json +146 -0
  154. package/template/blocks/hero/mock.json +11 -0
  155. package/template/blocks/hero/preview.json +55 -0
  156. package/template/blocks/hero/preview.png +0 -0
  157. package/template/blocks/image/Block.vue +232 -0
  158. package/template/blocks/image/__tests__/Block.spec.ts +224 -0
  159. package/template/blocks/image/block.json +67 -0
  160. package/template/blocks/image/mock.json +7 -0
  161. package/template/blocks/image/preview.json +9 -0
  162. package/template/blocks/image/preview.png +0 -0
  163. package/template/blocks/logo-cloud/Block.vue +206 -0
  164. package/template/blocks/logo-cloud/__tests__/Block.spec.ts +210 -0
  165. package/template/blocks/logo-cloud/block.json +79 -0
  166. package/template/blocks/logo-cloud/mock.json +15 -0
  167. package/template/blocks/logo-cloud/preview.json +92 -0
  168. package/template/blocks/logo-cloud/preview.png +0 -0
  169. package/template/blocks/navigation/Block.vue +1348 -0
  170. package/template/blocks/navigation/__tests__/Block.spec.ts +2030 -0
  171. package/template/blocks/navigation/block.json +167 -0
  172. package/template/blocks/navigation/mock.json +191 -0
  173. package/template/blocks/navigation/preview.png +0 -0
  174. package/template/blocks/navigation/useMegaMenuKeys.ts +276 -0
  175. package/template/blocks/newsletter/Block.vue +399 -0
  176. package/template/blocks/newsletter/__tests__/Block.spec.ts +365 -0
  177. package/template/blocks/newsletter/block.json +105 -0
  178. package/template/blocks/newsletter/mock.json +31 -0
  179. package/template/blocks/newsletter/preview.png +0 -0
  180. package/template/blocks/order-status/Block.vue +754 -0
  181. package/template/blocks/order-status/__tests__/Block.spec.ts +515 -0
  182. package/template/blocks/order-status/block.json +138 -0
  183. package/template/blocks/order-status/mock.json +19 -0
  184. package/template/blocks/order-status/preview.png +0 -0
  185. package/template/blocks/pricing-table/Block.vue +297 -0
  186. package/template/blocks/pricing-table/__tests__/Block.spec.ts +357 -0
  187. package/template/blocks/pricing-table/block.json +155 -0
  188. package/template/blocks/pricing-table/mock.json +47 -0
  189. package/template/blocks/pricing-table/preview.png +0 -0
  190. package/template/blocks/product-carousel/Block.vue +459 -0
  191. package/template/blocks/product-carousel/__tests__/Block.spec.ts +957 -0
  192. package/template/blocks/product-carousel/block.json +71 -0
  193. package/template/blocks/product-carousel/mock.json +9 -0
  194. package/template/blocks/product-carousel/preview.json +7 -0
  195. package/template/blocks/product-carousel/preview.png +0 -0
  196. package/template/blocks/product-detail/Block.vue +886 -0
  197. package/template/blocks/product-detail/__tests__/Block.spec.ts +1492 -0
  198. package/template/blocks/product-detail/__tests__/stock.spec.ts +119 -0
  199. package/template/blocks/product-detail/block.json +155 -0
  200. package/template/blocks/product-detail/mock.json +113 -0
  201. package/template/blocks/product-detail/parts/Gallery.vue +181 -0
  202. package/template/blocks/product-detail/parts/StickyBuyBar.vue +99 -0
  203. package/template/blocks/product-detail/preview.png +0 -0
  204. package/template/blocks/product-detail/stock.ts +150 -0
  205. package/template/blocks/quote/Block.vue +206 -0
  206. package/template/blocks/quote/__tests__/Block.spec.ts +265 -0
  207. package/template/blocks/quote/block.json +76 -0
  208. package/template/blocks/quote/mock.json +9 -0
  209. package/template/blocks/quote/preview.json +16 -0
  210. package/template/blocks/quote/preview.png +0 -0
  211. package/template/blocks/rich-text/Block.vue +143 -0
  212. package/template/blocks/rich-text/__tests__/Block.spec.ts +191 -0
  213. package/template/blocks/rich-text/block.json +57 -0
  214. package/template/blocks/rich-text/mock.json +87 -0
  215. package/template/blocks/rich-text/preview.png +0 -0
  216. package/template/blocks/search/Block.vue +589 -0
  217. package/template/blocks/search/PopularChips.vue +40 -0
  218. package/template/blocks/search/TypeSection.vue +148 -0
  219. package/template/blocks/search/__tests__/Block.spec.ts +718 -0
  220. package/template/blocks/search/__tests__/results.spec.ts +166 -0
  221. package/template/blocks/search/block.json +102 -0
  222. package/template/blocks/search/mock.json +18 -0
  223. package/template/blocks/search/preview.png +0 -0
  224. package/template/blocks/search/results.ts +85 -0
  225. package/template/blocks/split-content/Block.vue +195 -0
  226. package/template/blocks/split-content/__tests__/Block.spec.ts +225 -0
  227. package/template/blocks/split-content/block.json +70 -0
  228. package/template/blocks/split-content/mock.json +45 -0
  229. package/template/blocks/split-content/preview.json +58 -0
  230. package/template/blocks/split-content/preview.png +0 -0
  231. package/template/blocks/stats/Block.vue +159 -0
  232. package/template/blocks/stats/__tests__/Block.spec.ts +194 -0
  233. package/template/blocks/stats/block.json +73 -0
  234. package/template/blocks/stats/mock.json +12 -0
  235. package/template/blocks/stats/preview.png +0 -0
  236. package/template/blocks/tabs/Block.vue +278 -0
  237. package/template/blocks/tabs/__tests__/Block.spec.ts +303 -0
  238. package/template/blocks/tabs/block.json +97 -0
  239. package/template/blocks/tabs/mock.json +129 -0
  240. package/template/blocks/tabs/preview.json +153 -0
  241. package/template/blocks/tabs/preview.png +0 -0
  242. package/template/blocks/team/Block.vue +288 -0
  243. package/template/blocks/team/__tests__/Block.spec.ts +221 -0
  244. package/template/blocks/team/block.json +125 -0
  245. package/template/blocks/team/mock.json +39 -0
  246. package/template/blocks/team/preview.json +62 -0
  247. package/template/blocks/team/preview.png +0 -0
  248. package/template/blocks/testimonials/Block.vue +408 -0
  249. package/template/blocks/testimonials/__tests__/Block.spec.ts +319 -0
  250. package/template/blocks/testimonials/block.json +121 -0
  251. package/template/blocks/testimonials/mock.json +46 -0
  252. package/template/blocks/testimonials/preview.json +68 -0
  253. package/template/blocks/testimonials/preview.png +0 -0
  254. package/template/blocks/timeline/Block.vue +274 -0
  255. package/template/blocks/timeline/__tests__/Block.spec.ts +310 -0
  256. package/template/blocks/timeline/block.json +98 -0
  257. package/template/blocks/timeline/mock.json +27 -0
  258. package/template/blocks/timeline/preview.png +0 -0
  259. package/template/blocks/trust-strip/Block.vue +330 -0
  260. package/template/blocks/trust-strip/__tests__/Block.spec.ts +290 -0
  261. package/template/blocks/trust-strip/block.json +117 -0
  262. package/template/blocks/trust-strip/mock.json +37 -0
  263. package/template/blocks/trust-strip/preview.png +0 -0
  264. package/template/blocks/video-embed/Block.vue +354 -0
  265. package/template/blocks/video-embed/__tests__/Block.spec.ts +219 -0
  266. package/template/blocks/video-embed/__tests__/embed.spec.ts +76 -0
  267. package/template/blocks/video-embed/block.json +94 -0
  268. package/template/blocks/video-embed/embed.ts +84 -0
  269. package/template/blocks/video-embed/mock.json +13 -0
  270. package/template/blocks/video-embed/preview.json +9 -0
  271. package/template/blocks/video-embed/preview.png +0 -0
  272. package/template/blocks/wishlist/Block.vue +367 -0
  273. package/template/blocks/wishlist/__tests__/Block.spec.ts +508 -0
  274. package/template/blocks/wishlist/block.json +42 -0
  275. package/template/blocks/wishlist/mock.json +9 -0
  276. package/template/blocks/wishlist/preview.png +0 -0
  277. package/template/i18n/en-US.json +602 -0
  278. package/template/i18n/is-IS.json +602 -0
  279. package/template/nuxt.config.ts +156 -0
  280. package/template/package.json +56 -0
  281. package/template/pages/article.page.json +731 -0
  282. package/template/pages/cart.page.json +85 -0
  283. package/template/pages/category.page.json +133 -0
  284. package/template/pages/collection.page.json +194 -0
  285. package/template/pages/home.page.json +353 -0
  286. package/template/pages/product.page.json +323 -0
  287. package/template/pages/products.page.json +144 -0
  288. package/template/pages/search.page.json +83 -0
  289. package/template/pages/wishlist.page.json +88 -0
  290. package/template/public/apple-touch-icon.png +0 -0
  291. package/template/public/demo/article-cover.svg +1 -0
  292. package/template/public/demo/article-figure.svg +1 -0
  293. package/template/public/demo/avatar-1.svg +3 -0
  294. package/template/public/demo/avatar-2.svg +3 -0
  295. package/template/public/demo/avatar-3.svg +3 -0
  296. package/template/public/demo/avatar-4.svg +3 -0
  297. package/template/public/demo/avatar-5.svg +3 -0
  298. package/template/public/demo/avatar-6.svg +3 -0
  299. package/template/public/demo/avatar-7.svg +3 -0
  300. package/template/public/demo/avatar-8.svg +3 -0
  301. package/template/public/demo/collection-1.svg +1 -0
  302. package/template/public/demo/collection-2.svg +1 -0
  303. package/template/public/demo/cta-split.svg +1 -0
  304. package/template/public/demo/feature-1.svg +1 -0
  305. package/template/public/demo/feature-2.svg +1 -0
  306. package/template/public/demo/feature-3.svg +1 -0
  307. package/template/public/demo/feature-4.svg +1 -0
  308. package/template/public/demo/gallery-1.svg +1 -0
  309. package/template/public/demo/gallery-2.svg +1 -0
  310. package/template/public/demo/gallery-3.svg +1 -0
  311. package/template/public/demo/gallery-4.svg +1 -0
  312. package/template/public/demo/gallery-5.svg +1 -0
  313. package/template/public/demo/gallery-6.svg +1 -0
  314. package/template/public/demo/gallery-7.svg +1 -0
  315. package/template/public/demo/gallery-8.svg +1 -0
  316. package/template/public/demo/hero-slide-1.svg +1 -0
  317. package/template/public/demo/hero-slide-2.svg +1 -0
  318. package/template/public/demo/hero-slide-3.svg +1 -0
  319. package/template/public/demo/hero-slide-4.svg +1 -0
  320. package/template/public/demo/hero-wide.svg +1 -0
  321. package/template/public/demo/hero.svg +1 -0
  322. package/template/public/demo/logo-1.svg +4 -0
  323. package/template/public/demo/logo-2.svg +4 -0
  324. package/template/public/demo/logo-3.svg +4 -0
  325. package/template/public/demo/logo-4.svg +4 -0
  326. package/template/public/demo/logo-5.svg +4 -0
  327. package/template/public/demo/logo-6.svg +4 -0
  328. package/template/public/demo/logo-7.svg +4 -0
  329. package/template/public/demo/logo-8.svg +4 -0
  330. package/template/public/demo/logo.svg +3 -0
  331. package/template/public/demo/map.svg +1 -0
  332. package/template/public/demo/poster.svg +1 -0
  333. package/template/public/demo/product-1.svg +4 -0
  334. package/template/public/demo/product-10.svg +4 -0
  335. package/template/public/demo/product-11.svg +4 -0
  336. package/template/public/demo/product-12.svg +4 -0
  337. package/template/public/demo/product-2.svg +4 -0
  338. package/template/public/demo/product-3.svg +4 -0
  339. package/template/public/demo/product-4.svg +4 -0
  340. package/template/public/demo/product-5.svg +4 -0
  341. package/template/public/demo/product-6.svg +4 -0
  342. package/template/public/demo/product-7.svg +4 -0
  343. package/template/public/demo/product-8.svg +4 -0
  344. package/template/public/demo/product-9.svg +4 -0
  345. package/template/public/demo/product-square-1.svg +4 -0
  346. package/template/public/demo/product-square-2.svg +4 -0
  347. package/template/public/demo/product-square-3.svg +4 -0
  348. package/template/public/demo/product-square-4.svg +4 -0
  349. package/template/public/demo/product-square-5.svg +4 -0
  350. package/template/public/demo/product-square-6.svg +4 -0
  351. package/template/public/demo/quote-portrait.svg +4 -0
  352. package/template/public/demo/split-1.svg +1 -0
  353. package/template/public/demo/split-2.svg +1 -0
  354. package/template/public/demo/split-3.svg +1 -0
  355. package/template/public/demo/split-4.svg +1 -0
  356. package/template/public/demo/team-1.svg +4 -0
  357. package/template/public/demo/team-2.svg +4 -0
  358. package/template/public/demo/team-3.svg +4 -0
  359. package/template/public/demo/team-4.svg +4 -0
  360. package/template/public/favicon.ico +0 -0
  361. package/template/scripts/demo-images.mjs +393 -0
  362. package/template/scripts/generate-stories.mjs +156 -0
  363. package/template/scripts/previewHash.mjs +125 -0
  364. package/template/scripts/previews.mjs +149 -0
  365. package/template/stories/generated/announcement-bar.stories.ts +44 -0
  366. package/template/stories/generated/article-list.stories.ts +87 -0
  367. package/template/stories/generated/article.stories.ts +27 -0
  368. package/template/stories/generated/breadcrumbs.stories.ts +39 -0
  369. package/template/stories/generated/cart.stories.ts +38 -0
  370. package/template/stories/generated/collection-grid.stories.ts +117 -0
  371. package/template/stories/generated/collection-header.stories.ts +51 -0
  372. package/template/stories/generated/contact.stories.ts +45 -0
  373. package/template/stories/generated/cta.stories.ts +51 -0
  374. package/template/stories/generated/faq.stories.ts +56 -0
  375. package/template/stories/generated/feature-grid.stories.ts +69 -0
  376. package/template/stories/generated/footer.stories.ts +50 -0
  377. package/template/stories/generated/gallery.stories.ts +81 -0
  378. package/template/stories/generated/hero.stories.ts +75 -0
  379. package/template/stories/generated/image.stories.ts +99 -0
  380. package/template/stories/generated/logo-cloud.stories.ts +57 -0
  381. package/template/stories/generated/navigation.stories.ts +62 -0
  382. package/template/stories/generated/newsletter.stories.ts +68 -0
  383. package/template/stories/generated/order-status.stories.ts +32 -0
  384. package/template/stories/generated/pricing-table.stories.ts +44 -0
  385. package/template/stories/generated/product-carousel.stories.ts +75 -0
  386. package/template/stories/generated/product-detail.stories.ts +62 -0
  387. package/template/stories/generated/quote.stories.ts +69 -0
  388. package/template/stories/generated/rich-text.stories.ts +50 -0
  389. package/template/stories/generated/search.stories.ts +56 -0
  390. package/template/stories/generated/split-content.stories.ts +39 -0
  391. package/template/stories/generated/stats.stories.ts +68 -0
  392. package/template/stories/generated/tabs.stories.ts +45 -0
  393. package/template/stories/generated/team.stories.ts +45 -0
  394. package/template/stories/generated/testimonials.stories.ts +69 -0
  395. package/template/stories/generated/timeline.stories.ts +80 -0
  396. package/template/stories/generated/trust-strip.stories.ts +62 -0
  397. package/template/stories/generated/video-embed.stories.ts +63 -0
  398. package/template/stories/generated/wishlist.stories.ts +26 -0
  399. package/template/stories/pages/article.stories.ts +51 -0
  400. package/template/stories/pages/cart.stories.ts +56 -0
  401. package/template/stories/pages/category.stories.ts +56 -0
  402. package/template/stories/pages/collection.stories.ts +51 -0
  403. package/template/stories/pages/home.stories.ts +51 -0
  404. package/template/stories/pages/product.stories.ts +47 -0
  405. package/template/stories/pages/products.stories.ts +58 -0
  406. package/template/stories/pages/search.stories.ts +54 -0
  407. package/template/stories/pages/wishlist.stories.ts +53 -0
  408. package/template/stories/support/pageBlocks.ts +115 -0
  409. package/template/test/blocksEmptyData.spec.ts +52 -0
  410. package/template/test/carouselKeyboard.spec.ts +272 -0
  411. package/template/test/carouselRing.browser.spec.ts +193 -0
  412. package/template/test/carouselSlideWidth.browser.spec.ts +102 -0
  413. package/template/test/cartDrawer.spec.ts +295 -0
  414. package/template/test/cartToast.spec.ts +86 -0
  415. package/template/test/countPill.browser.spec.ts +196 -0
  416. package/template/test/demoImages.spec.ts +140 -0
  417. package/template/test/deps.spec.ts +102 -0
  418. package/template/test/eldraIcon.spec.ts +58 -0
  419. package/template/test/framing.spec.ts +76 -0
  420. package/template/test/i18n.spec.ts +200 -0
  421. package/template/test/iconComponent.spec.ts +91 -0
  422. package/template/test/inlineEditable.spec.ts +335 -0
  423. package/template/test/localePrefix.spec.ts +342 -0
  424. package/template/test/mainCss.spec.ts +107 -0
  425. package/template/test/mockGatewayContract.spec.ts +122 -0
  426. package/template/test/mocks/blocks.ts +20 -0
  427. package/template/test/mocks/breakpoints.ts +7 -0
  428. package/template/test/mocks/manifest.ts +11 -0
  429. package/template/test/moneyFormatting.spec.ts +85 -0
  430. package/template/test/pageTitle.spec.ts +49 -0
  431. package/template/test/pages/article.spec.ts +231 -0
  432. package/template/test/pages/category.spec.ts +185 -0
  433. package/template/test/pages/collection.spec.ts +396 -0
  434. package/template/test/pages/home.spec.ts +295 -0
  435. package/template/test/pages/hydration.spec.ts +557 -0
  436. package/template/test/pages/product.spec.ts +396 -0
  437. package/template/test/pages/seededPages.spec.ts +190 -0
  438. package/template/test/pages/ssr.spec.ts +387 -0
  439. package/template/test/prerenderCommerce.spec.ts +134 -0
  440. package/template/test/prerenderFailure.spec.ts +130 -0
  441. package/template/test/prerenderRefresh.browser.spec.ts +1431 -0
  442. package/template/test/previewsFresh.spec.ts +56 -0
  443. package/template/test/richText.spec.ts +164 -0
  444. package/template/test/richTextTypography.spec.ts +182 -0
  445. package/template/test/setup.ts +21 -0
  446. package/template/test/slugPage.spec.ts +244 -0
  447. package/template/test/slugPageTemplate.spec.ts +194 -0
  448. package/template/test/starter.spec.ts +1416 -0
  449. package/template/test/storefront/cart.spec.ts +404 -0
  450. package/template/test/storefront/categories.spec.ts +235 -0
  451. package/template/test/storefront/collectionSelector.spec.ts +74 -0
  452. package/template/test/storefront/demo.spec.ts +555 -0
  453. package/template/test/storefront/facets.spec.ts +425 -0
  454. package/template/test/storefront/feedback.spec.ts +97 -0
  455. package/template/test/storefront/gateway.spec.ts +2673 -0
  456. package/template/test/storefront/gatewayCart.spec.ts +289 -0
  457. package/template/test/storefront/gatewayPrerender.spec.ts +1037 -0
  458. package/template/test/storefront/history.spec.ts +341 -0
  459. package/template/test/storefront/money.spec.ts +170 -0
  460. package/template/test/storefront/toProductCard.spec.ts +138 -0
  461. package/template/test/storefront/volatile.spec.ts +284 -0
  462. package/template/test/support/axe.ts +14 -0
  463. package/template/test/support/dialog.ts +51 -0
  464. package/template/test/support/hydrate.ts +118 -0
  465. package/template/test/support/i18nText.ts +11 -0
  466. package/template/test/support/mockGateway.ts +1017 -0
  467. package/template/test/support/mountBlock.ts +194 -0
  468. package/template/test/support/mountPage.spec.ts +72 -0
  469. package/template/test/support/mountPage.ts +254 -0
  470. package/template/test/support/mountProbe.client.ts +69 -0
  471. package/template/test/support/renderSsr.ts +97 -0
  472. package/template/test/support/staticServer.ts +96 -0
  473. package/template/test/themeIcons.spec.ts +140 -0
  474. package/template/test/toastAnnouncement.spec.ts +133 -0
  475. package/template/test/tokens.spec.ts +102 -0
  476. package/template/test/uiMessagesPlugin.spec.ts +104 -0
  477. package/template/test/useBlockData.spec.ts +49 -0
  478. package/template/test/useEditing.spec.ts +54 -0
  479. package/template/test/useEldraIcon.spec.ts +126 -0
  480. package/template/test/useUiId.spec.ts +40 -0
  481. package/template/tokens.json +149 -0
  482. package/template/tsconfig.json +3 -0
  483. package/template/tsconfig.storybook.json +17 -0
  484. package/template/vitest-axe.d.ts +13 -0
  485. package/template/vitest.config.ts +44 -0
@@ -0,0 +1,290 @@
1
+ // @vitest-environment jsdom
2
+ import { mount } from '@vue/test-utils';
3
+ import { nextTick } from 'vue';
4
+ import { ELDRA_KEY } from '@eldrajs/theme-vue';
5
+ import { axe } from '../../../test/support/axe';
6
+ import { afterEach, describe, expect, it } from 'vitest';
7
+ import Block from '../Block.vue';
8
+ import mock from '../mock.json';
9
+ import { mountOptions } from '../../../test/support/mountBlock';
10
+
11
+ /** The genuinely minimal fixture: only the fields the block requires. */
12
+ const bare = {
13
+ variant: 'columns',
14
+ items: [{ icon: 'truck', title: 'Free shipping' }],
15
+ };
16
+
17
+ /** The injected fetcher still resolves through a promise; flush one microtask/macrotask turn
18
+ * before asserting on icon markup — the same wait `feature-grid`'s own spec uses. */
19
+ async function flushIcons(): Promise<void> {
20
+ await new Promise((resolve) => setTimeout(resolve));
21
+ }
22
+
23
+ function mountBlock(data: Record<string, unknown>, options: { editing?: boolean } = {}) {
24
+ const base = mountOptions({ entry: { id: 'e1', data } });
25
+ const opts = {
26
+ ...base,
27
+ };
28
+ if (options.editing) {
29
+ const context = opts.global.provide[ELDRA_KEY] as {
30
+ preview: { active: boolean; mode: string };
31
+ };
32
+ context.preview.active = true;
33
+ context.preview.mode = 'edit';
34
+ }
35
+ return mount(Block, opts);
36
+ }
37
+
38
+ /**
39
+ * `Block.vue` measures the list's own `scrollWidth`/`clientWidth` through a `ResizeObserver` (see
40
+ * its module doc comment) to decide whether the `mobileLayout: "scroll"` list is actually
41
+ * overflowing before making it a tab stop. jsdom has no `ResizeObserver` at all (confirmed: it is
42
+ * `undefined` in this suite's environment), so most specs exercise the real "guarded, no observer"
43
+ * path for free. The two tests below need to *drive* that measurement directly: this stub replaces
44
+ * `globalThis.ResizeObserver` with a fake that only captures the callback the component passes
45
+ * (`observe`/`unobserve`/`disconnect` are no-ops — nothing here needs real layout), so a test can
46
+ * call `trigger()` after changing the element's `scrollWidth`/`clientWidth` to simulate a resize.
47
+ */
48
+ function stubResizeObserver(): { trigger: () => void; restore: () => void } {
49
+ let captured: ResizeObserverCallback | null = null;
50
+ class FakeResizeObserver {
51
+ constructor(callback: ResizeObserverCallback) {
52
+ captured = callback;
53
+ }
54
+ observe(): void {}
55
+ unobserve(): void {}
56
+ disconnect(): void {}
57
+ }
58
+ const original = (globalThis as { ResizeObserver?: typeof ResizeObserver }).ResizeObserver;
59
+ (globalThis as { ResizeObserver?: unknown }).ResizeObserver = FakeResizeObserver;
60
+ return {
61
+ trigger: () => captured?.([] as unknown as ResizeObserverEntry[], {} as ResizeObserver),
62
+ restore: () => {
63
+ (globalThis as { ResizeObserver?: typeof ResizeObserver }).ResizeObserver = original;
64
+ },
65
+ };
66
+ }
67
+
68
+ /** jsdom's `scrollWidth`/`clientWidth` are always `0`; shadow them with own properties so the
69
+ * element reads as overflowing (or not) the way a real, narrower-than-its-content list would. */
70
+ function setOverflowing(el: Element, overflowing: boolean): void {
71
+ Object.defineProperty(el, 'scrollWidth', { value: overflowing ? 800 : 400, configurable: true });
72
+ Object.defineProperty(el, 'clientWidth', { value: 400, configurable: true });
73
+ }
74
+
75
+ describe('trust-strip block', () => {
76
+ it('renders the full mock content with no axe violations', async () => {
77
+ const wrapper = mountBlock(mock);
78
+ for (const item of mock.items) expect(wrapper.text()).toContain(item.title);
79
+ expect(wrapper.text()).toContain(mock.paymentsLabel);
80
+ await flushIcons();
81
+ expect(await axe(wrapper.element)).toHaveNoViolations();
82
+ });
83
+
84
+ it('renders the bare, required-fields-only content with no axe violations', async () => {
85
+ const wrapper = mountBlock(bare);
86
+ expect(wrapper.text()).toContain('Free shipping');
87
+ await flushIcons();
88
+ expect(await axe(wrapper.element)).toHaveNoViolations();
89
+ });
90
+
91
+ it.each(['columns', 'inline'] as const)(
92
+ 'renders variant "%s" with no axe violations',
93
+ async (variant) => {
94
+ const wrapper = mountBlock({ ...mock, variant });
95
+ await flushIcons();
96
+ expect(await axe(wrapper.element)).toHaveNoViolations();
97
+ }
98
+ );
99
+
100
+ it('has no axe violations with mobileLayout "scroll"', async () => {
101
+ const wrapper = mountBlock({ ...mock, mobileLayout: 'scroll' });
102
+ await flushIcons();
103
+ expect(await axe(wrapper.element)).toHaveNoViolations();
104
+ });
105
+
106
+ it('has no axe violations with mobileLayout "scroll" while the list is actually overflowing', async () => {
107
+ const stub = stubResizeObserver();
108
+ try {
109
+ const wrapper = mountBlock({ ...mock, mobileLayout: 'scroll' });
110
+ setOverflowing(wrapper.get('ul').element, true);
111
+ stub.trigger();
112
+ await nextTick();
113
+ await flushIcons();
114
+ expect(wrapper.get('ul').attributes('tabindex')).toBe('0');
115
+ expect(await axe(wrapper.element)).toHaveNoViolations();
116
+ } finally {
117
+ stub.restore();
118
+ }
119
+ });
120
+
121
+ it('labels the section with the hidden h2', () => {
122
+ const wrapper = mountBlock(mock);
123
+ const heading = wrapper.get('h2');
124
+ expect(heading.classes()).toContain('sr-only');
125
+ expect(wrapper.get('section').attributes('aria-labelledby')).toBe(heading.attributes('id'));
126
+ expect(heading.text()).toBe('Why shop with Northwind');
127
+ });
128
+
129
+ it('keeps every item icon aria-hidden', async () => {
130
+ const wrapper = mountBlock(mock);
131
+ await flushIcons();
132
+ const svgs = wrapper.findAll('svg');
133
+ expect(svgs.length).toBeGreaterThan(0);
134
+ for (const svg of svgs) {
135
+ if (svg.attributes('aria-hidden') !== 'true') {
136
+ throw new Error('expected every icon svg to be aria-hidden');
137
+ }
138
+ }
139
+ });
140
+
141
+ it('names every payment mark inside the labelled payments list, monochrome icon included', async () => {
142
+ const wrapper = mountBlock(mock);
143
+ await flushIcons();
144
+ const list = wrapper.get('ul[aria-label="Accepted payment methods"]');
145
+ const marks = list.findAll('li');
146
+ expect(marks).toHaveLength(4);
147
+ const names = marks.map((mark) => mark.text());
148
+ expect(names).toEqual(['Visa', 'Mastercard', 'PayPal', 'Apple Pay']);
149
+ for (const mark of marks) {
150
+ expect(mark.get('svg').attributes('aria-hidden')).toBe('true');
151
+ }
152
+ });
153
+
154
+ it('renders apple-pay as the brand-apple icon while keeping the "Apple Pay" hidden name', async () => {
155
+ const wrapper = mountBlock({ ...mock, payments: [{ brand: 'apple-pay' }] });
156
+ await flushIcons();
157
+ const mark = wrapper.get('ul[aria-label="Accepted payment methods"] li');
158
+ expect(mark.text()).toBe('Apple Pay');
159
+ });
160
+
161
+ it('caps items at four: a fifth is not rendered', () => {
162
+ const fifth = { icon: 'gift', title: 'Gift wrapping', text: 'Free on request.' };
163
+ const wrapper = mountBlock({ ...mock, items: [...mock.items, fifth] });
164
+ expect(wrapper.text()).not.toContain('Gift wrapping');
165
+ expect(wrapper.findAll('h2').length + wrapper.findAll('p').length).toBeGreaterThan(0);
166
+ });
167
+
168
+ it('renders nothing live when no item has a title', () => {
169
+ const wrapper = mountBlock({
170
+ ...mock,
171
+ items: [
172
+ { icon: 'truck', title: '' },
173
+ { icon: 'lock', title: ' ' },
174
+ ],
175
+ });
176
+ expect(wrapper.find('section').exists()).toBe(false);
177
+ expect(wrapper.text()).toBe('');
178
+ });
179
+
180
+ it('skips only the untitled item, keeping titled siblings, live', () => {
181
+ const wrapper = mountBlock({
182
+ ...mock,
183
+ items: [{ icon: 'truck', title: '' }, ...mock.items.slice(1)],
184
+ });
185
+ expect(wrapper.text()).not.toContain(mock.items[0]!.title);
186
+ for (const item of mock.items.slice(1)) expect(wrapper.text()).toContain(item.title);
187
+ });
188
+
189
+ it('shows an editor-only hint for a still-empty item, and renders it live as nothing', async () => {
190
+ const data = { ...mock, items: [{ icon: 'truck', title: '' }] };
191
+ const live = mountBlock(data);
192
+ expect(live.find('section').exists()).toBe(false);
193
+
194
+ const editing = mountBlock(data, { editing: true });
195
+ expect(editing.find('section').exists()).toBe(true);
196
+ expect(editing.text()).toContain('Add a promise');
197
+ expect(await axe(editing.element)).toHaveNoViolations();
198
+ });
199
+
200
+ describe('the mobileLayout "scroll" region is focusable only while it actually overflows', () => {
201
+ afterEach(() => {
202
+ // Belt and braces: every test in this block restores the global itself too, but a thrown
203
+ // assertion before that `restore()` call must not leak a fake `ResizeObserver` into a later
204
+ // test file — `enableAutoUnmount` only unmounts components, it does not know about globals.
205
+ delete (globalThis as { ResizeObserver?: unknown }).ResizeObserver;
206
+ });
207
+
208
+ it('under plain jsdom (no ResizeObserver, scrollWidth/clientWidth both 0) it is not a tab stop, in either layout', () => {
209
+ expect(typeof globalThis.ResizeObserver).toBe('undefined');
210
+ for (const mobileLayout of ['grid', 'scroll'] as const) {
211
+ const wrapper = mountBlock({ ...mock, mobileLayout });
212
+ expect(wrapper.find('[tabindex]').exists()).toBe(false);
213
+ expect(wrapper.get('ul').attributes('aria-label')).toBeUndefined();
214
+ }
215
+ });
216
+
217
+ it('becomes a focusable, named list with the standard focus ring once it overflows, and loses all three once it no longer does', async () => {
218
+ const stub = stubResizeObserver();
219
+ try {
220
+ const wrapper = mountBlock({ ...mock, mobileLayout: 'scroll' });
221
+ const list = wrapper.get('ul');
222
+
223
+ setOverflowing(list.element, true);
224
+ stub.trigger();
225
+ await nextTick();
226
+ expect(list.attributes('tabindex')).toBe('0');
227
+ expect(list.attributes('aria-label')).toBe('Why shop with us, scrolls sideways');
228
+ expect(list.classes()).toContain('focus-visible:ring-2');
229
+
230
+ setOverflowing(list.element, false);
231
+ stub.trigger();
232
+ await nextTick();
233
+ expect(list.attributes('tabindex')).toBeUndefined();
234
+ expect(list.attributes('aria-label')).toBeUndefined();
235
+ expect(list.classes()).not.toContain('focus-visible:ring-2');
236
+ } finally {
237
+ stub.restore();
238
+ }
239
+ });
240
+
241
+ it('the grid layout carries no tabindex anywhere, even while the list overflows', async () => {
242
+ const stub = stubResizeObserver();
243
+ try {
244
+ const wrapper = mountBlock({ ...mock, mobileLayout: 'grid' });
245
+ setOverflowing(wrapper.get('ul').element, true);
246
+ stub.trigger();
247
+ await nextTick();
248
+ expect(wrapper.find('[tabindex]').exists()).toBe(false);
249
+ } finally {
250
+ stub.restore();
251
+ }
252
+ });
253
+ });
254
+
255
+ it('Tab reaches only the item links, in reading order — nothing else carries a tabindex', () => {
256
+ const wrapper = mountBlock(mock);
257
+ const hrefs = wrapper.findAll('a').map((a) => a.attributes('href'));
258
+ const expected = mock.items
259
+ .filter((item) => 'href' in item)
260
+ .map((item) => (item as { href: string }).href);
261
+ expect(hrefs).toEqual(expected);
262
+ expect(wrapper.findAll('[tabindex]')).toHaveLength(0);
263
+ });
264
+
265
+ it('has no transition or animation class anywhere in the block', () => {
266
+ const wrapper = mountBlock({ ...mock, mobileLayout: 'scroll' });
267
+ for (const element of wrapper.element.querySelectorAll('*')) {
268
+ for (const className of element.classList) {
269
+ expect(className.startsWith('transition-')).toBe(false);
270
+ expect(className.startsWith('animate-')).toBe(false);
271
+ }
272
+ }
273
+ });
274
+
275
+ it('re-measures overflow when the rendered items change, not only when the list box resizes', async () => {
276
+ const wrapper = mountBlock({ ...mock, mobileLayout: 'scroll', items: mock.items.slice(0, 1) });
277
+ const list = wrapper.get('ul').element as HTMLUListElement;
278
+ Object.defineProperty(list, 'clientWidth', { configurable: true, value: 300 });
279
+ Object.defineProperty(list, 'scrollWidth', { configurable: true, value: 300 });
280
+ expect(wrapper.get('ul').attributes('tabindex')).toBeUndefined();
281
+
282
+ Object.defineProperty(list, 'scrollWidth', { configurable: true, value: 900 });
283
+ await wrapper.setProps({
284
+ entry: { ...(wrapper.props('entry') as object), data: { ...mock, mobileLayout: 'scroll' } },
285
+ });
286
+ await nextTick();
287
+ await nextTick();
288
+ expect(wrapper.get('ul').attributes('tabindex')).toBe('0');
289
+ });
290
+ });
@@ -0,0 +1,117 @@
1
+ {
2
+ "apiId": "trust-strip",
3
+ "name": "Trust strip",
4
+ "description": "A quiet strip of 3-4 store promises (shipping, returns, secure payment, handmade), each an icon with a short line, with an optional row of accepted payment marks.",
5
+ "icon": "shield-check",
6
+ "category": "commerce",
7
+ "version": 1,
8
+ "fields": [
9
+ {
10
+ "fieldId": "variant",
11
+ "name": "Variant",
12
+ "type": "select",
13
+ "helpText": "columns is the default. columns shows icon, title and one line; inline shows icon and title only, in one centred row.",
14
+ "metadata": { "options": ["columns", "inline"] },
15
+ "validators": { "required": true }
16
+ },
17
+ {
18
+ "fieldId": "items",
19
+ "name": "Items",
20
+ "type": "list",
21
+ "helpText": "3-4 items. A fifth is not shown.",
22
+ "metadata": {
23
+ "item": {
24
+ "fieldId": "item",
25
+ "name": "Promise",
26
+ "type": "composite",
27
+ "metadata": {
28
+ "fields": [
29
+ {
30
+ "fieldId": "icon",
31
+ "name": "Icon",
32
+ "type": "tabler-icon",
33
+ "helpText": "For example truck, arrow-back-up, shield-check or needle-thread.",
34
+ "validators": { "required": true }
35
+ },
36
+ {
37
+ "fieldId": "title",
38
+ "name": "Title",
39
+ "type": "string",
40
+ "localized": true,
41
+ "helpText": "2-5 words, e.g. \"30-day returns\".",
42
+ "validators": { "required": true }
43
+ },
44
+ {
45
+ "fieldId": "text",
46
+ "name": "Text",
47
+ "type": "string",
48
+ "localized": true,
49
+ "helpText": "One line, up to about 60 characters. Only shown in the columns variant.",
50
+ "validators": { "maxLength": 60 }
51
+ },
52
+ {
53
+ "fieldId": "linkLabel",
54
+ "name": "Link label",
55
+ "type": "string",
56
+ "localized": true,
57
+ "helpText": "Makes the title a link. Used as its accessible name."
58
+ },
59
+ { "fieldId": "href", "name": "Link URL", "type": "string" }
60
+ ]
61
+ }
62
+ }
63
+ }
64
+ },
65
+ {
66
+ "fieldId": "mobileLayout",
67
+ "name": "Mobile layout",
68
+ "type": "select",
69
+ "helpText": "grid is the default: a 2x2 grid below 48rem. scroll is a single row that scrolls sideways.",
70
+ "metadata": { "options": ["grid", "scroll"] }
71
+ },
72
+ {
73
+ "fieldId": "showPayments",
74
+ "name": "Show payment marks",
75
+ "type": "bool",
76
+ "helpText": "On by default."
77
+ },
78
+ {
79
+ "fieldId": "paymentsLabel",
80
+ "name": "Payments label",
81
+ "type": "string",
82
+ "localized": true,
83
+ "helpText": "\"Secure checkout with\" is the usual choice."
84
+ },
85
+ {
86
+ "fieldId": "payments",
87
+ "name": "Payment marks",
88
+ "type": "list",
89
+ "helpText": "Visa, Mastercard, PayPal and Apple Pay by default. Each renders as a monochrome icon plus a hidden name.",
90
+ "metadata": {
91
+ "item": {
92
+ "fieldId": "item",
93
+ "name": "Payment mark",
94
+ "type": "composite",
95
+ "metadata": {
96
+ "fields": [
97
+ {
98
+ "fieldId": "brand",
99
+ "name": "Brand",
100
+ "type": "select",
101
+ "metadata": { "options": ["visa", "mastercard", "paypal", "apple-pay"] },
102
+ "validators": { "required": true }
103
+ }
104
+ ]
105
+ }
106
+ }
107
+ }
108
+ },
109
+ {
110
+ "fieldId": "background",
111
+ "name": "Section background",
112
+ "type": "select",
113
+ "helpText": "surface is the default.",
114
+ "metadata": { "options": ["surface", "none"] }
115
+ }
116
+ ]
117
+ }
@@ -0,0 +1,37 @@
1
+ {
2
+ "variant": "columns",
3
+ "items": [
4
+ {
5
+ "icon": "truck",
6
+ "title": "Free shipping over $80",
7
+ "text": "Delivered in 2–4 business days, carbon-neutral."
8
+ },
9
+ {
10
+ "icon": "arrow-back-up",
11
+ "title": "30-day returns",
12
+ "text": "Changed your mind? Send it back free of charge.",
13
+ "linkLabel": "30-day returns",
14
+ "href": "/pages/returns"
15
+ },
16
+ {
17
+ "icon": "shield-check",
18
+ "title": "Secure payment",
19
+ "text": "Encrypted checkout, and we never store card details."
20
+ },
21
+ {
22
+ "icon": "needle-thread",
23
+ "title": "Made by hand",
24
+ "text": "In small batches by four family-run workshops."
25
+ }
26
+ ],
27
+ "mobileLayout": "grid",
28
+ "showPayments": true,
29
+ "paymentsLabel": "Secure checkout with",
30
+ "payments": [
31
+ { "brand": "visa" },
32
+ { "brand": "mastercard" },
33
+ { "brand": "paypal" },
34
+ { "brand": "apple-pay" }
35
+ ],
36
+ "background": "surface"
37
+ }