@shopify/create-hydrogen 5.0.19 → 5.0.21
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.
- package/dist/assets/hydrogen/starter/.cursor/rules/cookbook-recipe-subscriptions.mdc +921 -0
- package/dist/assets/hydrogen/starter/CHANGELOG.md +81 -16
- package/dist/assets/hydrogen/starter/app/components/CartLineItem.tsx +15 -0
- package/dist/assets/hydrogen/starter/app/components/CartMain.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/components/ProductItem.tsx +44 -0
- package/dist/assets/hydrogen/starter/app/lib/redirect.ts +23 -0
- package/dist/assets/hydrogen/starter/app/root.tsx +45 -4
- package/dist/assets/hydrogen/starter/app/routes/_index.tsx +8 -23
- package/dist/assets/hydrogen/starter/app/routes/blogs.$blogHandle.$articleHandle.tsx +22 -2
- package/dist/assets/hydrogen/starter/app/routes/blogs.$blogHandle._index.tsx +4 -0
- package/dist/assets/hydrogen/starter/app/routes/collections.$handle.tsx +7 -41
- package/dist/assets/hydrogen/starter/app/routes/collections.all.tsx +11 -44
- package/dist/assets/hydrogen/starter/app/routes/pages.$handle.tsx +9 -1
- package/dist/assets/hydrogen/starter/app/routes/products.$handle.tsx +5 -1
- package/dist/assets/hydrogen/starter/app/routes.ts +4 -2
- package/dist/assets/hydrogen/starter/app/styles/app.css +15 -3
- package/dist/assets/hydrogen/starter/package.json +5 -5
- package/dist/assets/hydrogen/starter/storefrontapi.generated.d.ts +57 -36
- package/dist/create-app.js +61 -61
- package/package.json +1 -1
- package/dist/assets/hydrogen/starter/app/layout.tsx +0 -46
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import {flatRoutes} from '@remix-run/fs-routes';
|
|
2
|
-
import {
|
|
2
|
+
import {type RouteConfig} from '@remix-run/route-config';
|
|
3
3
|
import {hydrogenRoutes} from '@shopify/hydrogen';
|
|
4
4
|
|
|
5
5
|
export default hydrogenRoutes([
|
|
6
|
-
|
|
6
|
+
...(await flatRoutes()),
|
|
7
|
+
// Manual route definitions can be added to this array, in addition to or instead of using the `flatRoutes` file-based routing convention.
|
|
8
|
+
// See https://remix.run/docs/en/main/guides/routing for more details
|
|
7
9
|
]) satisfies RouteConfig;
|
|
@@ -27,12 +27,17 @@ img {
|
|
|
27
27
|
* components/Aside
|
|
28
28
|
* --------------------------------------------------
|
|
29
29
|
*/
|
|
30
|
+
@media (max-width: 45em) {
|
|
31
|
+
html:has(.overlay.expanded) {
|
|
32
|
+
overflow: hidden;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
30
36
|
aside {
|
|
31
37
|
background: var(--color-light);
|
|
32
38
|
box-shadow: 0 0 50px rgba(0, 0, 0, 0.3);
|
|
33
39
|
height: 100vh;
|
|
34
|
-
|
|
35
|
-
min-width: var(--aside-width);
|
|
40
|
+
width: min(var(--aside-width), 100vw);
|
|
36
41
|
position: fixed;
|
|
37
42
|
right: calc(-1 * var(--aside-width));
|
|
38
43
|
top: 0;
|
|
@@ -201,6 +206,11 @@ button.reset:hover:not(:has(> *)) {
|
|
|
201
206
|
margin-left: auto;
|
|
202
207
|
}
|
|
203
208
|
|
|
209
|
+
.header-ctas > * {
|
|
210
|
+
min-width: fit-content;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
|
|
204
214
|
/*
|
|
205
215
|
* --------------------------------------------------
|
|
206
216
|
* components/Footer
|
|
@@ -212,14 +222,16 @@ button.reset:hover:not(:has(> *)) {
|
|
|
212
222
|
}
|
|
213
223
|
|
|
214
224
|
.footer-menu {
|
|
215
|
-
|
|
225
|
+
justify-content: center;
|
|
216
226
|
display: flex;
|
|
227
|
+
flex-wrap: wrap;
|
|
217
228
|
grid-gap: 1rem;
|
|
218
229
|
padding: 1rem;
|
|
219
230
|
}
|
|
220
231
|
|
|
221
232
|
.footer-menu a {
|
|
222
233
|
color: var(--color-light);
|
|
234
|
+
min-width: fit-content;
|
|
223
235
|
}
|
|
224
236
|
|
|
225
237
|
/*
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "skeleton",
|
|
3
3
|
"private": true,
|
|
4
4
|
"sideEffects": false,
|
|
5
|
-
"version": "2025.1.
|
|
5
|
+
"version": "2025.1.7",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"build": "shopify hydrogen build --codegen",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"@remix-run/react": "^2.16.1",
|
|
18
18
|
"@remix-run/server-runtime": "^2.16.1",
|
|
19
19
|
"graphql": "^16.10.0",
|
|
20
|
-
"@shopify/hydrogen": "2025.1.
|
|
20
|
+
"@shopify/hydrogen": "2025.1.4",
|
|
21
21
|
"@shopify/remix-oxygen": "^2.0.12",
|
|
22
22
|
"graphql-tag": "^2.12.6",
|
|
23
23
|
"isbot": "^5.1.22",
|
|
@@ -32,9 +32,9 @@
|
|
|
32
32
|
"@remix-run/dev": "^2.16.1",
|
|
33
33
|
"@remix-run/fs-routes": "^2.16.1",
|
|
34
34
|
"@remix-run/route-config": "^2.16.1",
|
|
35
|
-
"@shopify/cli": "~3.
|
|
35
|
+
"@shopify/cli": "~3.78.1",
|
|
36
36
|
"@shopify/hydrogen-codegen": "^0.3.3",
|
|
37
|
-
"@shopify/mini-oxygen": "^3.1
|
|
37
|
+
"@shopify/mini-oxygen": "^3.2.1",
|
|
38
38
|
"@shopify/oxygen-workers-types": "^4.1.6",
|
|
39
39
|
"@shopify/prettier-config": "^1.1.2",
|
|
40
40
|
"@total-typescript/ts-reset": "^0.6.1",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"eslint-plugin-react-hooks": "^5.1.0",
|
|
56
56
|
"globals": "^15.14.0",
|
|
57
57
|
"typescript": "^5.2.2",
|
|
58
|
-
"vite": "^6.2.
|
|
58
|
+
"vite": "^6.2.4",
|
|
59
59
|
"vite-tsconfig-paths": "^4.3.1"
|
|
60
60
|
},
|
|
61
61
|
"engines": {
|
|
@@ -331,11 +331,9 @@ export type RecommendedProductFragment = Pick<
|
|
|
331
331
|
priceRange: {
|
|
332
332
|
minVariantPrice: Pick<StorefrontAPI.MoneyV2, 'amount' | 'currencyCode'>;
|
|
333
333
|
};
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
>;
|
|
338
|
-
};
|
|
334
|
+
featuredImage?: StorefrontAPI.Maybe<
|
|
335
|
+
Pick<StorefrontAPI.Image, 'id' | 'url' | 'altText' | 'width' | 'height'>
|
|
336
|
+
>;
|
|
339
337
|
};
|
|
340
338
|
|
|
341
339
|
export type RecommendedProductsQueryVariables = StorefrontAPI.Exact<{
|
|
@@ -353,14 +351,12 @@ export type RecommendedProductsQuery = {
|
|
|
353
351
|
'amount' | 'currencyCode'
|
|
354
352
|
>;
|
|
355
353
|
};
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
>;
|
|
363
|
-
};
|
|
354
|
+
featuredImage?: StorefrontAPI.Maybe<
|
|
355
|
+
Pick<
|
|
356
|
+
StorefrontAPI.Image,
|
|
357
|
+
'id' | 'url' | 'altText' | 'width' | 'height'
|
|
358
|
+
>
|
|
359
|
+
>;
|
|
364
360
|
}
|
|
365
361
|
>;
|
|
366
362
|
};
|
|
@@ -374,22 +370,29 @@ export type ArticleQueryVariables = StorefrontAPI.Exact<{
|
|
|
374
370
|
}>;
|
|
375
371
|
|
|
376
372
|
export type ArticleQuery = {
|
|
377
|
-
blog?: StorefrontAPI.Maybe<
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
373
|
+
blog?: StorefrontAPI.Maybe<
|
|
374
|
+
Pick<StorefrontAPI.Blog, 'handle'> & {
|
|
375
|
+
articleByHandle?: StorefrontAPI.Maybe<
|
|
376
|
+
Pick<
|
|
377
|
+
StorefrontAPI.Article,
|
|
378
|
+
'handle' | 'title' | 'contentHtml' | 'publishedAt'
|
|
379
|
+
> & {
|
|
380
|
+
author?: StorefrontAPI.Maybe<
|
|
381
|
+
Pick<StorefrontAPI.ArticleAuthor, 'name'>
|
|
382
|
+
>;
|
|
383
|
+
image?: StorefrontAPI.Maybe<
|
|
384
|
+
Pick<
|
|
385
|
+
StorefrontAPI.Image,
|
|
386
|
+
'id' | 'altText' | 'url' | 'width' | 'height'
|
|
387
|
+
>
|
|
388
|
+
>;
|
|
389
|
+
seo?: StorefrontAPI.Maybe<
|
|
390
|
+
Pick<StorefrontAPI.Seo, 'description' | 'title'>
|
|
391
|
+
>;
|
|
392
|
+
}
|
|
393
|
+
>;
|
|
394
|
+
}
|
|
395
|
+
>;
|
|
393
396
|
};
|
|
394
397
|
|
|
395
398
|
export type BlogQueryVariables = StorefrontAPI.Exact<{
|
|
@@ -407,7 +410,7 @@ export type BlogQueryVariables = StorefrontAPI.Exact<{
|
|
|
407
410
|
|
|
408
411
|
export type BlogQuery = {
|
|
409
412
|
blog?: StorefrontAPI.Maybe<
|
|
410
|
-
Pick<StorefrontAPI.Blog, 'title'> & {
|
|
413
|
+
Pick<StorefrontAPI.Blog, 'title' | 'handle'> & {
|
|
411
414
|
seo?: StorefrontAPI.Maybe<
|
|
412
415
|
Pick<StorefrontAPI.Seo, 'title' | 'description'>
|
|
413
416
|
>;
|
|
@@ -587,6 +590,24 @@ export type StoreCollectionsQuery = {
|
|
|
587
590
|
};
|
|
588
591
|
};
|
|
589
592
|
|
|
593
|
+
export type MoneyCollectionItemFragment = Pick<
|
|
594
|
+
StorefrontAPI.MoneyV2,
|
|
595
|
+
'amount' | 'currencyCode'
|
|
596
|
+
>;
|
|
597
|
+
|
|
598
|
+
export type CollectionItemFragment = Pick<
|
|
599
|
+
StorefrontAPI.Product,
|
|
600
|
+
'id' | 'handle' | 'title'
|
|
601
|
+
> & {
|
|
602
|
+
featuredImage?: StorefrontAPI.Maybe<
|
|
603
|
+
Pick<StorefrontAPI.Image, 'id' | 'altText' | 'url' | 'width' | 'height'>
|
|
604
|
+
>;
|
|
605
|
+
priceRange: {
|
|
606
|
+
minVariantPrice: Pick<StorefrontAPI.MoneyV2, 'amount' | 'currencyCode'>;
|
|
607
|
+
maxVariantPrice: Pick<StorefrontAPI.MoneyV2, 'amount' | 'currencyCode'>;
|
|
608
|
+
};
|
|
609
|
+
};
|
|
610
|
+
|
|
590
611
|
export type CatalogQueryVariables = StorefrontAPI.Exact<{
|
|
591
612
|
country?: StorefrontAPI.InputMaybe<StorefrontAPI.CountryCode>;
|
|
592
613
|
language?: StorefrontAPI.InputMaybe<StorefrontAPI.LanguageCode>;
|
|
@@ -637,7 +658,7 @@ export type PageQueryVariables = StorefrontAPI.Exact<{
|
|
|
637
658
|
|
|
638
659
|
export type PageQuery = {
|
|
639
660
|
page?: StorefrontAPI.Maybe<
|
|
640
|
-
Pick<StorefrontAPI.Page, 'id' | 'title' | 'body'> & {
|
|
661
|
+
Pick<StorefrontAPI.Page, 'handle' | 'id' | 'title' | 'body'> & {
|
|
641
662
|
seo?: StorefrontAPI.Maybe<
|
|
642
663
|
Pick<StorefrontAPI.Seo, 'description' | 'title'>
|
|
643
664
|
>;
|
|
@@ -1181,15 +1202,15 @@ interface GeneratedQueryTypes {
|
|
|
1181
1202
|
return: FeaturedCollectionQuery;
|
|
1182
1203
|
variables: FeaturedCollectionQueryVariables;
|
|
1183
1204
|
};
|
|
1184
|
-
'#graphql\n fragment RecommendedProduct on Product {\n id\n title\n handle\n priceRange {\n minVariantPrice {\n amount\n currencyCode\n }\n }\n
|
|
1205
|
+
'#graphql\n fragment RecommendedProduct on Product {\n id\n title\n handle\n priceRange {\n minVariantPrice {\n amount\n currencyCode\n }\n }\n featuredImage {\n id\n url\n altText\n width\n height\n }\n }\n query RecommendedProducts ($country: CountryCode, $language: LanguageCode)\n @inContext(country: $country, language: $language) {\n products(first: 4, sortKey: UPDATED_AT, reverse: true) {\n nodes {\n ...RecommendedProduct\n }\n }\n }\n': {
|
|
1185
1206
|
return: RecommendedProductsQuery;
|
|
1186
1207
|
variables: RecommendedProductsQueryVariables;
|
|
1187
1208
|
};
|
|
1188
|
-
'#graphql\n query Article(\n $articleHandle: String!\n $blogHandle: String!\n $country: CountryCode\n $language: LanguageCode\n ) @inContext(language: $language, country: $country) {\n blog(handle: $blogHandle) {\n articleByHandle(handle: $articleHandle) {\n title\n contentHtml\n publishedAt\n author: authorV2 {\n name\n }\n image {\n id\n altText\n url\n width\n height\n }\n seo {\n description\n title\n }\n }\n }\n }\n': {
|
|
1209
|
+
'#graphql\n query Article(\n $articleHandle: String!\n $blogHandle: String!\n $country: CountryCode\n $language: LanguageCode\n ) @inContext(language: $language, country: $country) {\n blog(handle: $blogHandle) {\n handle\n articleByHandle(handle: $articleHandle) {\n handle\n title\n contentHtml\n publishedAt\n author: authorV2 {\n name\n }\n image {\n id\n altText\n url\n width\n height\n }\n seo {\n description\n title\n }\n }\n }\n }\n': {
|
|
1189
1210
|
return: ArticleQuery;
|
|
1190
1211
|
variables: ArticleQueryVariables;
|
|
1191
1212
|
};
|
|
1192
|
-
'#graphql\n query Blog(\n $language: LanguageCode\n $blogHandle: String!\n $first: Int\n $last: Int\n $startCursor: String\n $endCursor: String\n ) @inContext(language: $language) {\n blog(handle: $blogHandle) {\n title\n seo {\n title\n description\n }\n articles(\n first: $first,\n last: $last,\n before: $startCursor,\n after: $endCursor\n ) {\n nodes {\n ...ArticleItem\n }\n pageInfo {\n hasPreviousPage\n hasNextPage\n hasNextPage\n endCursor\n startCursor\n }\n\n }\n }\n }\n fragment ArticleItem on Article {\n author: authorV2 {\n name\n }\n contentHtml\n handle\n id\n image {\n id\n altText\n url\n width\n height\n }\n publishedAt\n title\n blog {\n handle\n }\n }\n': {
|
|
1213
|
+
'#graphql\n query Blog(\n $language: LanguageCode\n $blogHandle: String!\n $first: Int\n $last: Int\n $startCursor: String\n $endCursor: String\n ) @inContext(language: $language) {\n blog(handle: $blogHandle) {\n title\n handle\n seo {\n title\n description\n }\n articles(\n first: $first,\n last: $last,\n before: $startCursor,\n after: $endCursor\n ) {\n nodes {\n ...ArticleItem\n }\n pageInfo {\n hasPreviousPage\n hasNextPage\n hasNextPage\n endCursor\n startCursor\n }\n\n }\n }\n }\n fragment ArticleItem on Article {\n author: authorV2 {\n name\n }\n contentHtml\n handle\n id\n image {\n id\n altText\n url\n width\n height\n }\n publishedAt\n title\n blog {\n handle\n }\n }\n': {
|
|
1193
1214
|
return: BlogQuery;
|
|
1194
1215
|
variables: BlogQueryVariables;
|
|
1195
1216
|
};
|
|
@@ -1205,11 +1226,11 @@ interface GeneratedQueryTypes {
|
|
|
1205
1226
|
return: StoreCollectionsQuery;
|
|
1206
1227
|
variables: StoreCollectionsQueryVariables;
|
|
1207
1228
|
};
|
|
1208
|
-
'#graphql\n query Catalog(\n $country: CountryCode\n $language: LanguageCode\n $first: Int\n $last: Int\n $startCursor: String\n $endCursor: String\n ) @inContext(country: $country, language: $language) {\n products(first: $first, last: $last, before: $startCursor, after: $endCursor) {\n nodes {\n ...
|
|
1229
|
+
'#graphql\n query Catalog(\n $country: CountryCode\n $language: LanguageCode\n $first: Int\n $last: Int\n $startCursor: String\n $endCursor: String\n ) @inContext(country: $country, language: $language) {\n products(first: $first, last: $last, before: $startCursor, after: $endCursor) {\n nodes {\n ...CollectionItem\n }\n pageInfo {\n hasPreviousPage\n hasNextPage\n startCursor\n endCursor\n }\n }\n }\n #graphql\n fragment MoneyCollectionItem on MoneyV2 {\n amount\n currencyCode\n }\n fragment CollectionItem on Product {\n id\n handle\n title\n featuredImage {\n id\n altText\n url\n width\n height\n }\n priceRange {\n minVariantPrice {\n ...MoneyCollectionItem\n }\n maxVariantPrice {\n ...MoneyCollectionItem\n }\n }\n }\n\n': {
|
|
1209
1230
|
return: CatalogQuery;
|
|
1210
1231
|
variables: CatalogQueryVariables;
|
|
1211
1232
|
};
|
|
1212
|
-
'#graphql\n query Page(\n $language: LanguageCode,\n $country: CountryCode,\n $handle: String!\n )\n @inContext(language: $language, country: $country) {\n page(handle: $handle) {\n id\n title\n body\n seo {\n description\n title\n }\n }\n }\n': {
|
|
1233
|
+
'#graphql\n query Page(\n $language: LanguageCode,\n $country: CountryCode,\n $handle: String!\n )\n @inContext(language: $language, country: $country) {\n page(handle: $handle) {\n handle\n id\n title\n body\n seo {\n description\n title\n }\n }\n }\n': {
|
|
1213
1234
|
return: PageQuery;
|
|
1214
1235
|
variables: PageQueryVariables;
|
|
1215
1236
|
};
|