create-magic-storefront 0.4.0 → 0.6.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 (143) hide show
  1. package/package.json +3 -3
  2. package/template/.claude/skills/storefront-design/SKILL.md +14 -10
  3. package/template/.env.example +5 -0
  4. package/template/AGENTS.md +36 -17
  5. package/template/DESIGN.md +117 -0
  6. package/template/PAGES.md +116 -29
  7. package/template/README.md +15 -3
  8. package/template/app/account/addresses/page.tsx +16 -0
  9. package/template/app/account/layout.tsx +14 -0
  10. package/template/app/account/loading.tsx +15 -0
  11. package/template/app/account/orders/[id]/page.tsx +15 -0
  12. package/template/app/account/page.tsx +12 -244
  13. package/template/app/account/profile/page.tsx +16 -0
  14. package/template/app/blog/(index)/loading.tsx +22 -0
  15. package/template/app/blog/{page.tsx → (index)/page.tsx} +42 -25
  16. package/template/app/blog/[handle]/page.tsx +92 -56
  17. package/template/app/blog/author/[handle]/page.tsx +1 -1
  18. package/template/app/cart/layout.tsx +14 -0
  19. package/template/app/cart/page.tsx +49 -101
  20. package/template/app/checkout/layout.tsx +14 -0
  21. package/template/app/checkout/page.tsx +98 -281
  22. package/template/app/collections/[handle]/layout.tsx +20 -0
  23. package/template/app/collections/[handle]/loading.tsx +23 -0
  24. package/template/app/collections/[handle]/page.tsx +131 -15
  25. package/template/app/collections/page.tsx +49 -0
  26. package/template/app/contacts/page.tsx +196 -0
  27. package/template/app/error.tsx +19 -8
  28. package/template/app/fonts/OFL.txt +93 -0
  29. package/template/app/fonts/index.ts +14 -0
  30. package/template/app/fonts/onest-variable.woff2 +0 -0
  31. package/template/app/globals.css +14 -518
  32. package/template/app/layout.tsx +74 -50
  33. package/template/app/not-found.tsx +34 -4
  34. package/template/app/page.tsx +1 -1
  35. package/template/app/pages/[handle]/page.tsx +1 -1
  36. package/template/app/products/[handle]/layout.tsx +20 -0
  37. package/template/app/products/[handle]/loading.tsx +25 -0
  38. package/template/app/products/[handle]/page.tsx +112 -15
  39. package/template/app/providers.tsx +20 -7
  40. package/template/app/search/loading.tsx +12 -0
  41. package/template/app/search/page.tsx +138 -25
  42. package/template/app/sitemap.ts +5 -1
  43. package/template/app/storefront-api/[...path]/route.ts +11 -66
  44. package/template/app/styles/base.css +138 -0
  45. package/template/app/styles/components.css +1108 -0
  46. package/template/app/styles/layout.css +455 -0
  47. package/template/app/styles/pages.css +1839 -0
  48. package/template/app/styles/reset.css +55 -0
  49. package/template/app/styles/sections.css +415 -0
  50. package/template/app/styles/tokens.css +167 -0
  51. package/template/app/styles/utilities.css +37 -0
  52. package/template/app/wishlist/page.tsx +26 -0
  53. package/template/components/account/account-shell.tsx +100 -0
  54. package/template/components/account/addresses.tsx +247 -0
  55. package/template/components/account/order-detail.tsx +281 -0
  56. package/template/components/account/order-list.tsx +94 -0
  57. package/template/components/account/order-status.tsx +19 -0
  58. package/template/components/account/profile.tsx +129 -0
  59. package/template/components/account/sign-in.tsx +164 -0
  60. package/template/components/article-body.tsx +3 -2
  61. package/template/components/article-card.tsx +37 -12
  62. package/template/components/cart/cart-drawer.tsx +149 -0
  63. package/template/components/cart/cart-lines.tsx +89 -0
  64. package/template/components/cart/cart-summary.tsx +191 -0
  65. package/template/components/catalog/catalog-form.tsx +107 -0
  66. package/template/components/catalog/catalog-layout.tsx +82 -0
  67. package/template/components/catalog/facets-shell.tsx +60 -0
  68. package/template/components/catalog/facets.tsx +216 -0
  69. package/template/components/checkout/order-summary.tsx +84 -0
  70. package/template/components/checkout/radio-card.tsx +34 -0
  71. package/template/components/checkout/step-indicator.tsx +56 -0
  72. package/template/components/checkout/steps.tsx +264 -0
  73. package/template/components/checkout/thank-you.tsx +48 -0
  74. package/template/components/checkout/use-checkout.ts +90 -0
  75. package/template/components/footer/site-footer.tsx +132 -0
  76. package/template/components/header/cart-button.tsx +43 -0
  77. package/template/components/header/desktop-nav.tsx +133 -0
  78. package/template/components/header/mobile-menu.tsx +102 -0
  79. package/template/components/header/site-header.tsx +78 -0
  80. package/template/components/page-loading.tsx +20 -0
  81. package/template/components/pager.tsx +3 -1
  82. package/template/components/product/buy-box.tsx +148 -0
  83. package/template/components/product/gallery.tsx +179 -0
  84. package/template/components/product/pre-order-form.tsx +93 -0
  85. package/template/components/product/product-selection.tsx +31 -0
  86. package/template/components/product/recommendations.tsx +26 -0
  87. package/template/components/product/review-list.tsx +159 -0
  88. package/template/components/product/reviews.tsx +80 -0
  89. package/template/components/product/variant-picker.tsx +75 -0
  90. package/template/components/product-card.tsx +103 -0
  91. package/template/components/product-grid.tsx +27 -57
  92. package/template/components/quick-add.tsx +62 -0
  93. package/template/components/search/predictive-search.tsx +282 -0
  94. package/template/components/sections/announcement-bar.tsx +1 -1
  95. package/template/components/sections/banner.tsx +1 -1
  96. package/template/components/sections/collections.tsx +50 -13
  97. package/template/components/sections/deal-of-day.tsx +2 -2
  98. package/template/components/sections/product-shelves.tsx +13 -5
  99. package/template/components/sections/shoppable-stories.tsx +2 -2
  100. package/template/components/sections/store-reviews.tsx +10 -4
  101. package/template/components/share-button.tsx +42 -0
  102. package/template/components/ui/accordion.tsx +35 -0
  103. package/template/components/ui/badge.tsx +20 -0
  104. package/template/components/ui/breadcrumbs.tsx +31 -0
  105. package/template/components/ui/button.tsx +90 -0
  106. package/template/components/ui/drawer.tsx +84 -0
  107. package/template/components/ui/empty-state.tsx +27 -0
  108. package/template/components/ui/field.tsx +33 -0
  109. package/template/components/ui/icon.tsx +112 -0
  110. package/template/components/ui/price.tsx +35 -0
  111. package/template/components/ui/quantity-stepper.tsx +91 -0
  112. package/template/components/ui/rating.tsx +48 -0
  113. package/template/components/ui/skeleton.tsx +46 -0
  114. package/template/components/wishlist/wishlist-view.tsx +134 -0
  115. package/template/lib/article-outline.ts +35 -0
  116. package/template/lib/catalog-params.ts +170 -0
  117. package/template/lib/contacts.ts +34 -0
  118. package/template/lib/errors.ts +29 -0
  119. package/template/lib/i18n.ts +484 -0
  120. package/template/lib/menu.ts +70 -0
  121. package/template/lib/theme-settings.ts +36 -0
  122. package/template/lib/upstream.ts +21 -0
  123. package/template/llms.txt +13 -0
  124. package/template/theme/index.ts +7 -1
  125. package/template/theme/sections/collapsible-content.tsx +75 -0
  126. package/template/theme/sections/collection-list.tsx +32 -4
  127. package/template/theme/sections/featured-collection.tsx +22 -2
  128. package/template/theme/sections/hero.tsx +94 -7
  129. package/template/theme/sections/image-with-text.tsx +19 -3
  130. package/template/theme/sections/multicolumn.tsx +113 -0
  131. package/template/theme/sections/page-content.tsx +10 -4
  132. package/template/theme/sections/product-shelf.tsx +26 -4
  133. package/template/theme/sections/rich-text.tsx +13 -1
  134. package/template/theme/sections/testimonials.tsx +14 -9
  135. package/template/theme/settings.ts +85 -1
  136. package/template/theme/templates/index.json +4 -2
  137. package/template/.screenshots/home-1280.png +0 -0
  138. package/template/.screenshots/home-390.png +0 -0
  139. package/template/.screenshots/home-filled-1280.png +0 -0
  140. package/template/.screenshots/home-filled-390.png +0 -0
  141. package/template/.screenshots/page-1280.png +0 -0
  142. package/template/components/buy-box.tsx +0 -89
  143. package/template/components/cart-link.tsx +0 -15
@@ -0,0 +1,138 @@
1
+ /* Elements without classes: type, links, form controls, focus. */
2
+ @layer base {
3
+ html {
4
+ scroll-padding-top: calc(var(--header-h) + var(--space-4));
5
+ }
6
+ body {
7
+ min-height: 100dvh;
8
+ display: flex;
9
+ flex-direction: column;
10
+ font-size: var(--text-base);
11
+ line-height: var(--leading-normal);
12
+ background: var(--bg);
13
+ color: var(--fg);
14
+ -webkit-font-smoothing: antialiased;
15
+ }
16
+ html[data-telegram] body {
17
+ /* Telegram's stable viewport (the sheet can be dragged), the dynamic viewport outside it. */
18
+ min-height: var(--tg-viewport-stable-height, 100dvh);
19
+ padding-left: max(env(safe-area-inset-left), var(--tg-safe-area-inset-left, 0px));
20
+ padding-right: max(env(safe-area-inset-right), var(--tg-safe-area-inset-right, 0px));
21
+ padding-bottom: max(env(safe-area-inset-bottom), var(--tg-safe-area-inset-bottom, 0px));
22
+ }
23
+
24
+ h1,
25
+ h2,
26
+ h3,
27
+ h4 {
28
+ font-family: var(--font-heading);
29
+ font-weight: var(--weight-heading);
30
+ line-height: var(--leading-tight);
31
+ letter-spacing: -0.01em;
32
+ text-wrap: balance;
33
+ }
34
+ h1 {
35
+ font-size: var(--text-3xl);
36
+ }
37
+ h2 {
38
+ font-size: var(--text-2xl);
39
+ }
40
+ h3 {
41
+ font-size: var(--text-lg);
42
+ line-height: var(--leading-snug);
43
+ }
44
+ p {
45
+ text-wrap: pretty;
46
+ }
47
+ a {
48
+ color: inherit;
49
+ text-underline-offset: 0.2em;
50
+ text-decoration-thickness: 1px;
51
+ }
52
+ s {
53
+ text-decoration-thickness: 1px;
54
+ }
55
+ hr {
56
+ border: 0;
57
+ border-top: 1px solid var(--line);
58
+ margin: var(--space-5) 0;
59
+ }
60
+
61
+ :focus-visible {
62
+ outline: 2px solid var(--fg);
63
+ outline-offset: 2px;
64
+ }
65
+
66
+ /* Bare controls get a calm default; .button and the form components refine them. */
67
+ button {
68
+ min-height: 44px;
69
+ padding: 0 var(--space-4);
70
+ border: 1px solid var(--line-strong);
71
+ border-radius: var(--radius-sm);
72
+ background: var(--surface);
73
+ color: var(--fg);
74
+ transition:
75
+ background-color var(--duration-fast) var(--ease),
76
+ border-color var(--duration-fast) var(--ease);
77
+ }
78
+ button:disabled {
79
+ opacity: 0.5;
80
+ cursor: not-allowed;
81
+ }
82
+ button[aria-pressed='true'] {
83
+ border-color: var(--fg);
84
+ box-shadow: inset 0 0 0 1px var(--fg);
85
+ }
86
+ input:not([type='checkbox'], [type='radio'], [type='range']),
87
+ select,
88
+ textarea {
89
+ width: 100%;
90
+ min-height: 44px;
91
+ padding: var(--space-2) var(--space-3);
92
+ /* 16px at least: smaller makes iOS zoom into the field. */
93
+ font-size: max(var(--text-base), 16px);
94
+ background: var(--surface);
95
+ color: var(--fg);
96
+ border: 1px solid var(--line-strong);
97
+ border-radius: var(--radius-sm);
98
+ }
99
+ input:focus-visible,
100
+ select:focus-visible,
101
+ textarea:focus-visible {
102
+ outline: 2px solid var(--fg);
103
+ outline-offset: 0;
104
+ border-color: var(--fg);
105
+ }
106
+ input::placeholder,
107
+ textarea::placeholder {
108
+ color: var(--muted);
109
+ }
110
+ input[type='checkbox'],
111
+ input[type='radio'] {
112
+ width: 1.125rem;
113
+ height: 1.125rem;
114
+ margin: 0;
115
+ accent-color: var(--fg);
116
+ }
117
+ label {
118
+ cursor: pointer;
119
+ }
120
+ table {
121
+ width: 100%;
122
+ border-collapse: collapse;
123
+ }
124
+ td,
125
+ th {
126
+ padding: var(--space-3) var(--space-2);
127
+ border-bottom: 1px solid var(--line);
128
+ text-align: start;
129
+ vertical-align: middle;
130
+ }
131
+ blockquote {
132
+ margin: 0;
133
+ }
134
+ progress {
135
+ width: 100%;
136
+ accent-color: var(--accent);
137
+ }
138
+ }