@shopify/cli-hydrogen 9.0.2 → 9.0.3
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/CHANGELOG.md +814 -0
- package/dist/assets/hydrogen/starter/app/components/Aside.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/components/PaginatedResourceSection.tsx +3 -4
- package/dist/assets/hydrogen/starter/app/components/ProductForm.tsx +113 -44
- package/dist/assets/hydrogen/starter/app/components/SearchResults.tsx +8 -3
- package/dist/assets/hydrogen/starter/app/components/SearchResultsPredictive.tsx +6 -5
- package/dist/assets/hydrogen/starter/app/lib/variants.ts +3 -3
- package/dist/assets/hydrogen/starter/app/routes/account_.logout.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/routes/cart.tsx +9 -16
- package/dist/assets/hydrogen/starter/app/routes/collections.$handle.tsx +1 -10
- package/dist/assets/hydrogen/starter/app/routes/collections.all.tsx +1 -10
- package/dist/assets/hydrogen/starter/app/routes/products.$handle.tsx +50 -119
- package/dist/assets/hydrogen/starter/app/routes/search.tsx +42 -38
- package/dist/assets/hydrogen/starter/app/styles/app.css +25 -1
- package/dist/assets/hydrogen/starter/guides/predictiveSearch/predictiveSearch.md +23 -20
- package/dist/assets/hydrogen/starter/guides/search/search.md +27 -25
- package/dist/assets/hydrogen/starter/package.json +3 -3
- package/dist/assets/hydrogen/starter/storefrontapi.generated.d.ts +177 -194
- package/dist/assets/hydrogen/tailwind/tailwind.css +1 -1
- package/dist/commands/hydrogen/deploy.js +14 -3
- package/oclif.manifest.json +1 -1
- package/package.json +4 -4
|
@@ -89,31 +89,33 @@ const SEARCH_PRODUCT_FRAGMENT = `#graphql
|
|
|
89
89
|
title
|
|
90
90
|
trackingParameters
|
|
91
91
|
vendor
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
92
|
+
selectedOrFirstAvailableVariant(
|
|
93
|
+
selectedOptions: []
|
|
94
|
+
ignoreUnknownOptions: true
|
|
95
|
+
caseInsensitiveMatch: true
|
|
96
|
+
) {
|
|
97
|
+
id
|
|
98
|
+
image {
|
|
99
|
+
url
|
|
100
|
+
altText
|
|
101
|
+
width
|
|
102
|
+
height
|
|
103
|
+
}
|
|
104
|
+
price {
|
|
105
|
+
amount
|
|
106
|
+
currencyCode
|
|
107
|
+
}
|
|
108
|
+
compareAtPrice {
|
|
109
|
+
amount
|
|
110
|
+
currencyCode
|
|
111
|
+
}
|
|
112
|
+
selectedOptions {
|
|
113
|
+
name
|
|
114
|
+
value
|
|
115
|
+
}
|
|
116
|
+
product {
|
|
117
|
+
handle
|
|
118
|
+
title
|
|
117
119
|
}
|
|
118
120
|
}
|
|
119
121
|
}
|
|
@@ -299,19 +301,21 @@ const PREDICTIVE_SEARCH_PRODUCT_FRAGMENT = `#graphql
|
|
|
299
301
|
title
|
|
300
302
|
handle
|
|
301
303
|
trackingParameters
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
304
|
+
selectedOrFirstAvailableVariant(
|
|
305
|
+
selectedOptions: []
|
|
306
|
+
ignoreUnknownOptions: true
|
|
307
|
+
caseInsensitiveMatch: true
|
|
308
|
+
) {
|
|
309
|
+
id
|
|
310
|
+
image {
|
|
311
|
+
url
|
|
312
|
+
altText
|
|
313
|
+
width
|
|
314
|
+
height
|
|
315
|
+
}
|
|
316
|
+
price {
|
|
317
|
+
amount
|
|
318
|
+
currencyCode
|
|
315
319
|
}
|
|
316
320
|
}
|
|
317
321
|
}
|
|
@@ -12,6 +12,16 @@ img {
|
|
|
12
12
|
border-radius: 4px;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
+
/*
|
|
16
|
+
* --------------------------------------------------
|
|
17
|
+
* Non anchor links
|
|
18
|
+
* --------------------------------------------------
|
|
19
|
+
*/
|
|
20
|
+
.link:hover {
|
|
21
|
+
text-decoration: underline;
|
|
22
|
+
cursor: pointer;
|
|
23
|
+
}
|
|
24
|
+
|
|
15
25
|
/*
|
|
16
26
|
* --------------------------------------------------
|
|
17
27
|
* components/Aside
|
|
@@ -440,8 +450,22 @@ button.reset:hover:not(:has(> *)) {
|
|
|
440
450
|
grid-gap: 0.75rem;
|
|
441
451
|
}
|
|
442
452
|
|
|
443
|
-
.product-options-item
|
|
453
|
+
.product-options-item,
|
|
454
|
+
.product-options-item:disabled {
|
|
444
455
|
padding: 0.25rem 0.5rem;
|
|
456
|
+
background-color: transparent;
|
|
457
|
+
font-size: 1rem;
|
|
458
|
+
font-family: inherit;
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
.product-option-label-swatch {
|
|
462
|
+
width: 1.25rem;
|
|
463
|
+
height: 1.25rem;
|
|
464
|
+
margin: 0.25rem 0;
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
.product-option-label-swatch img {
|
|
468
|
+
width: 100%;
|
|
445
469
|
}
|
|
446
470
|
|
|
447
471
|
/*
|
|
@@ -87,19 +87,21 @@ const PREDICTIVE_SEARCH_PRODUCT_FRAGMENT = `#graphql
|
|
|
87
87
|
title
|
|
88
88
|
handle
|
|
89
89
|
trackingParameters
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
90
|
+
selectedOrFirstAvailableVariant(
|
|
91
|
+
selectedOptions: []
|
|
92
|
+
ignoreUnknownOptions: true
|
|
93
|
+
caseInsensitiveMatch: true
|
|
94
|
+
) {
|
|
95
|
+
id
|
|
96
|
+
image {
|
|
97
|
+
url
|
|
98
|
+
altText
|
|
99
|
+
width
|
|
100
|
+
height
|
|
101
|
+
}
|
|
102
|
+
price {
|
|
103
|
+
amount
|
|
104
|
+
currencyCode
|
|
103
105
|
}
|
|
104
106
|
}
|
|
105
107
|
}
|
|
@@ -157,7 +159,7 @@ const PREDICTIVE_SEARCH_QUERY = `#graphql
|
|
|
157
159
|
/**
|
|
158
160
|
* Predictive search fetcher
|
|
159
161
|
*/
|
|
160
|
-
async function
|
|
162
|
+
async function predictiveSearch({
|
|
161
163
|
request,
|
|
162
164
|
context,
|
|
163
165
|
}: Pick<ActionFunctionArgs, 'request' | 'context'>) {
|
|
@@ -358,7 +360,8 @@ SearchResultsPredictive.Products = function ({
|
|
|
358
360
|
trackingParams: product.trackingParameters,
|
|
359
361
|
term: term.current,
|
|
360
362
|
});
|
|
361
|
-
+ const
|
|
363
|
+
+ const price = product?.selectedOrFirstAvailableVariant?.price;
|
|
364
|
+
+ const image = product?.selectedOrFirstAvailableVariant?.image;
|
|
362
365
|
return (
|
|
363
366
|
<li className="predictive-search-result-item" key={product.id}>
|
|
364
367
|
<Link to={productUrl} onClick={closeSearch}>
|
|
@@ -373,11 +376,11 @@ SearchResultsPredictive.Products = function ({
|
|
|
373
376
|
<div>
|
|
374
377
|
<p>{product.title}</p>
|
|
375
378
|
<small>
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
379
|
+
+ {price && (
|
|
380
|
+
+ <Money
|
|
381
|
+
+ data={price}
|
|
382
|
+
+ />
|
|
383
|
+
+ )}
|
|
381
384
|
</small>
|
|
382
385
|
</div>
|
|
383
386
|
</Link>
|
|
@@ -41,31 +41,33 @@ const SEARCH_PRODUCT_FRAGMENT = `#graphql
|
|
|
41
41
|
title
|
|
42
42
|
trackingParameters
|
|
43
43
|
vendor
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
44
|
+
selectedOrFirstAvailableVariant(
|
|
45
|
+
selectedOptions: []
|
|
46
|
+
ignoreUnknownOptions: true
|
|
47
|
+
caseInsensitiveMatch: true
|
|
48
|
+
) {
|
|
49
|
+
id
|
|
50
|
+
image {
|
|
51
|
+
url
|
|
52
|
+
altText
|
|
53
|
+
width
|
|
54
|
+
height
|
|
55
|
+
}
|
|
56
|
+
price {
|
|
57
|
+
amount
|
|
58
|
+
currencyCode
|
|
59
|
+
}
|
|
60
|
+
compareAtPrice {
|
|
61
|
+
amount
|
|
62
|
+
currencyCode
|
|
63
|
+
}
|
|
64
|
+
selectedOptions {
|
|
65
|
+
name
|
|
66
|
+
value
|
|
67
|
+
}
|
|
68
|
+
product {
|
|
69
|
+
handle
|
|
70
|
+
title
|
|
69
71
|
}
|
|
70
72
|
}
|
|
71
73
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "skeleton",
|
|
3
3
|
"private": true,
|
|
4
4
|
"sideEffects": false,
|
|
5
|
-
"version": "2024.10.
|
|
5
|
+
"version": "2024.10.2",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"build": "shopify hydrogen build --codegen",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@remix-run/react": "^2.13.1",
|
|
18
18
|
"@remix-run/server-runtime": "^2.13.1",
|
|
19
|
-
"@shopify/hydrogen": "2024.10.
|
|
19
|
+
"@shopify/hydrogen": "2024.10.1",
|
|
20
20
|
"@shopify/remix-oxygen": "^2.0.9",
|
|
21
21
|
"graphql": "^16.6.0",
|
|
22
22
|
"graphql-tag": "^2.12.6",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"@graphql-codegen/cli": "5.0.2",
|
|
29
29
|
"@remix-run/dev": "^2.13.1",
|
|
30
30
|
"@remix-run/eslint-config": "^2.13.1",
|
|
31
|
-
"@shopify/cli": "~3.
|
|
31
|
+
"@shopify/cli": "~3.72.0",
|
|
32
32
|
"@shopify/hydrogen-codegen": "^0.3.2",
|
|
33
33
|
"@shopify/mini-oxygen": "^3.1.0",
|
|
34
34
|
"@shopify/oxygen-workers-types": "^4.1.2",
|