@shopify/cli 3.65.1 → 3.65.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.
Files changed (122) hide show
  1. package/dist/assets/hydrogen/i18n/domains.ts +4 -11
  2. package/dist/assets/hydrogen/i18n/mock-i18n-types.ts +4 -2
  3. package/dist/assets/hydrogen/i18n/subdomains.ts +4 -11
  4. package/dist/assets/hydrogen/i18n/subfolders.ts +4 -11
  5. package/dist/assets/hydrogen/starter/CHANGELOG.md +165 -0
  6. package/dist/assets/hydrogen/starter/app/components/CartLineItem.tsx +5 -2
  7. package/dist/assets/hydrogen/starter/app/components/CartMain.tsx +2 -2
  8. package/dist/assets/hydrogen/starter/app/components/PageLayout.tsx +65 -19
  9. package/dist/assets/hydrogen/starter/app/components/PaginatedResourceSection.tsx +42 -0
  10. package/dist/assets/hydrogen/starter/app/components/SearchForm.tsx +68 -0
  11. package/dist/assets/hydrogen/starter/app/components/SearchFormPredictive.tsx +76 -0
  12. package/dist/assets/hydrogen/starter/app/components/SearchResults.tsx +164 -0
  13. package/dist/assets/hydrogen/starter/app/components/SearchResultsPredictive.tsx +322 -0
  14. package/dist/assets/hydrogen/starter/app/entry.client.tsx +10 -8
  15. package/dist/assets/hydrogen/starter/app/entry.server.tsx +1 -1
  16. package/dist/assets/hydrogen/starter/app/lib/context.ts +43 -0
  17. package/dist/assets/hydrogen/starter/app/lib/fragments.ts +53 -0
  18. package/dist/assets/hydrogen/starter/app/lib/search.ts +74 -24
  19. package/dist/assets/hydrogen/starter/app/root.tsx +4 -7
  20. package/dist/assets/hydrogen/starter/app/routes/account.addresses.tsx +2 -3
  21. package/dist/assets/hydrogen/starter/app/routes/account.orders._index.tsx +5 -19
  22. package/dist/assets/hydrogen/starter/app/routes/blogs.$blogHandle._index.tsx +11 -24
  23. package/dist/assets/hydrogen/starter/app/routes/blogs._index.tsx +14 -27
  24. package/dist/assets/hydrogen/starter/app/routes/collections.$handle.tsx +12 -30
  25. package/dist/assets/hydrogen/starter/app/routes/collections._index.tsx +13 -27
  26. package/dist/assets/hydrogen/starter/app/routes/collections.all.tsx +9 -31
  27. package/dist/assets/hydrogen/starter/app/routes/search.tsx +312 -73
  28. package/dist/assets/hydrogen/starter/app/styles/reset.css +12 -2
  29. package/dist/assets/hydrogen/starter/env.d.ts +11 -30
  30. package/dist/assets/hydrogen/starter/guides/predictiveSearch/predictiveSearch.jpg +0 -0
  31. package/dist/assets/hydrogen/starter/guides/predictiveSearch/predictiveSearch.md +391 -0
  32. package/dist/assets/hydrogen/starter/guides/search/search.jpg +0 -0
  33. package/dist/assets/hydrogen/starter/guides/search/search.md +333 -0
  34. package/dist/assets/hydrogen/starter/package.json +4 -4
  35. package/dist/assets/hydrogen/starter/server.ts +18 -74
  36. package/dist/assets/hydrogen/starter/storefrontapi.generated.d.ts +242 -172
  37. package/dist/assets/hydrogen/virtual-routes/components/{PageLayout.jsx → Layout.jsx} +2 -2
  38. package/dist/assets/hydrogen/virtual-routes/virtual-root.jsx +7 -6
  39. package/dist/{chunk-H42RFZDD.js → chunk-3ABSSTBQ.js} +4 -4
  40. package/dist/{chunk-M7WMYV4S.js → chunk-3D4VZQOH.js} +2 -2
  41. package/dist/{chunk-J7BYFGNJ.js → chunk-3GSKXZGY.js} +2 -2
  42. package/dist/{chunk-TDWX3KIR.js → chunk-3LDWVYMD.js} +2 -2
  43. package/dist/{chunk-N2BXKOJG.js → chunk-646BIVHE.js} +4 -4
  44. package/dist/{chunk-CZ3SHYYH.js → chunk-7WAEFADN.js} +4 -4
  45. package/dist/{chunk-EKT2GUGH.js → chunk-7WGBIPDW.js} +2 -2
  46. package/dist/{chunk-M6KGRVDD.js → chunk-AX77SAMU.js} +3 -3
  47. package/dist/{chunk-4HAEQQTQ.js → chunk-BQBBVYYU.js} +4 -4
  48. package/dist/{chunk-5YD4FDOS.js → chunk-BZLNTDGG.js} +3 -3
  49. package/dist/{chunk-VWALMO2Z.js → chunk-CSCEGIBZ.js} +3 -3
  50. package/dist/{chunk-F2Y7KYHZ.js → chunk-EIUQV76I.js} +5 -5
  51. package/dist/{chunk-MODBIZ4R.js → chunk-GN74L7IW.js} +2 -2
  52. package/dist/{chunk-5EAVIJTQ.js → chunk-HYCRESCR.js} +2 -2
  53. package/dist/{chunk-GDARYUPU.js → chunk-K7KD247K.js} +188 -243
  54. package/dist/{chunk-PZM45AUI.js → chunk-KIUXMPTX.js} +3 -3
  55. package/dist/{chunk-PYMSCBPA.js → chunk-LAJ4OEME.js} +2 -2
  56. package/dist/{chunk-YVHV3H5H.js → chunk-MIQBXNSN.js} +4 -4
  57. package/dist/{chunk-BLKDGMHM.js → chunk-MV6A3QHA.js} +4 -4
  58. package/dist/{chunk-CFFAWVDL.js → chunk-N3YORLAS.js} +2 -2
  59. package/dist/{chunk-EU5ZOEUT.js → chunk-NBTEOGQW.js} +2 -2
  60. package/dist/{chunk-ZXJU6UP4.js → chunk-O3JOUAA5.js} +4 -4
  61. package/dist/{chunk-EZ5DG73H.js → chunk-PEAIOYXD.js} +4 -4
  62. package/dist/{chunk-YDS7NZBQ.js → chunk-R5GT4GBL.js} +4 -4
  63. package/dist/{chunk-6M65VRAT.js → chunk-S7FJTFYR.js} +5 -5
  64. package/dist/{chunk-DX2RXOQ5.js → chunk-S7RH664J.js} +3 -3
  65. package/dist/{chunk-WMECC32P.js → chunk-SKF2SKWO.js} +3 -3
  66. package/dist/{chunk-27HGZPUX.js → chunk-SMKCVFDT.js} +3 -3
  67. package/dist/{chunk-EID6L4PR.js → chunk-T4Y7NDNJ.js} +2 -2
  68. package/dist/{chunk-PY33KMCK.js → chunk-TWWJNMTO.js} +2 -2
  69. package/dist/{chunk-YXPGPWR2.js → chunk-U2PN6QZ2.js} +5 -5
  70. package/dist/{chunk-3REVOIEW.js → chunk-UBCH575K.js} +5 -5
  71. package/dist/{chunk-A4NQWDPT.js → chunk-XLURAR5E.js} +3 -3
  72. package/dist/{chunk-ZZKUI3DP.js → chunk-YPG7LXPN.js} +3 -3
  73. package/dist/cli/commands/auth/logout.js +10 -10
  74. package/dist/cli/commands/auth/logout.test.js +11 -11
  75. package/dist/cli/commands/debug/command-flags.js +9 -9
  76. package/dist/cli/commands/demo/catalog.js +10 -10
  77. package/dist/cli/commands/demo/generate-file.js +10 -10
  78. package/dist/cli/commands/demo/index.js +10 -10
  79. package/dist/cli/commands/demo/print-ai-prompt.js +10 -10
  80. package/dist/cli/commands/docs/generate.js +9 -9
  81. package/dist/cli/commands/docs/generate.test.js +9 -9
  82. package/dist/cli/commands/help.js +9 -9
  83. package/dist/cli/commands/kitchen-sink/async.js +10 -10
  84. package/dist/cli/commands/kitchen-sink/async.test.js +10 -10
  85. package/dist/cli/commands/kitchen-sink/index.js +12 -12
  86. package/dist/cli/commands/kitchen-sink/index.test.js +12 -12
  87. package/dist/cli/commands/kitchen-sink/prompts.js +10 -10
  88. package/dist/cli/commands/kitchen-sink/prompts.test.js +10 -10
  89. package/dist/cli/commands/kitchen-sink/static.js +10 -10
  90. package/dist/cli/commands/kitchen-sink/static.test.js +10 -10
  91. package/dist/cli/commands/search.js +10 -10
  92. package/dist/cli/commands/upgrade.js +9 -9
  93. package/dist/cli/commands/version.js +10 -10
  94. package/dist/cli/commands/version.test.js +10 -10
  95. package/dist/cli/services/commands/search.js +2 -2
  96. package/dist/cli/services/commands/search.test.js +2 -2
  97. package/dist/cli/services/commands/version.js +4 -4
  98. package/dist/cli/services/commands/version.test.js +5 -5
  99. package/dist/cli/services/demo.js +2 -2
  100. package/dist/cli/services/demo.test.js +2 -2
  101. package/dist/cli/services/kitchen-sink/async.js +2 -2
  102. package/dist/cli/services/kitchen-sink/prompts.js +2 -2
  103. package/dist/cli/services/kitchen-sink/static.js +2 -2
  104. package/dist/cli/services/upgrade.js +3 -3
  105. package/dist/cli/services/upgrade.test.js +5 -5
  106. package/dist/{custom-oclif-loader-JHNX2EGV.js → custom-oclif-loader-BT7EH2NN.js} +3 -3
  107. package/dist/{error-handler-4UJ6363X.js → error-handler-OSEY6KVA.js} +8 -8
  108. package/dist/hooks/postrun.js +6 -6
  109. package/dist/hooks/prerun.js +4 -4
  110. package/dist/index.js +1333 -1279
  111. package/dist/{local-V7RONWNU.js → local-OQXN5NM2.js} +2 -2
  112. package/dist/{morph-DN4AZJZW.js → morph-IQTWRBBT.js} +16 -12
  113. package/dist/{node-3H4OKRLA.js → node-YQVH3Y7J.js} +13 -13
  114. package/dist/{node-package-manager-XM7EXHQA.js → node-package-manager-VW2DN7R4.js} +3 -3
  115. package/dist/{system-F63VIZ5U.js → system-347PZWVP.js} +2 -2
  116. package/dist/tsconfig.tsbuildinfo +1 -1
  117. package/dist/{ui-BXWWRIFS.js → ui-S7L55PBH.js} +2 -2
  118. package/dist/{workerd-A5NCF6UA.js → workerd-OLKE7G4X.js} +12 -12
  119. package/oclif.manifest.json +39 -2
  120. package/package.json +7 -7
  121. package/dist/assets/hydrogen/starter/app/components/Search.tsx +0 -514
  122. package/dist/assets/hydrogen/starter/app/routes/api.predictive-search.tsx +0 -318
@@ -2,7 +2,7 @@
2
2
  "name": "skeleton",
3
3
  "private": true,
4
4
  "sideEffects": false,
5
- "version": "2024.7.2",
5
+ "version": "2024.7.4",
6
6
  "type": "module",
7
7
  "scripts": {
8
8
  "build": "shopify hydrogen build --codegen",
@@ -16,8 +16,8 @@
16
16
  "dependencies": {
17
17
  "@remix-run/react": "^2.10.1",
18
18
  "@remix-run/server-runtime": "^2.10.1",
19
- "@shopify/hydrogen": "2024.7.1",
20
- "@shopify/remix-oxygen": "^2.0.5",
19
+ "@shopify/hydrogen": "2024.7.3",
20
+ "@shopify/remix-oxygen": "^2.0.6",
21
21
  "graphql": "^16.6.0",
22
22
  "graphql-tag": "^2.12.6",
23
23
  "isbot": "^3.8.0",
@@ -28,7 +28,7 @@
28
28
  "@graphql-codegen/cli": "5.0.2",
29
29
  "@remix-run/dev": "^2.10.1",
30
30
  "@remix-run/eslint-config": "^2.10.1",
31
- "@shopify/cli": "^3.64.0",
31
+ "@shopify/cli": "3.65.1",
32
32
  "@shopify/hydrogen-codegen": "^0.3.1",
33
33
  "@shopify/mini-oxygen": "^3.0.4",
34
34
  "@shopify/oxygen-workers-types": "^4.1.2",
@@ -1,21 +1,9 @@
1
1
  // @ts-ignore
2
2
  // Virtual entry point for the app
3
3
  import * as remixBuild from 'virtual:remix/server-build';
4
- import {
5
- cartGetIdDefault,
6
- cartSetIdDefault,
7
- createCartHandler,
8
- createStorefrontClient,
9
- storefrontRedirect,
10
- createCustomerAccountClient,
11
- } from '@shopify/hydrogen';
12
- import {
13
- createRequestHandler,
14
- getStorefrontHeaders,
15
- type AppLoadContext,
16
- } from '@shopify/remix-oxygen';
17
- import {AppSession} from '~/lib/session';
18
- import {CART_QUERY_FRAGMENT} from '~/lib/fragments';
4
+ import {storefrontRedirect} from '@shopify/hydrogen';
5
+ import {createRequestHandler} from '@shopify/remix-oxygen';
6
+ import {createAppLoadContext} from '~/lib/context';
19
7
 
20
8
  /**
21
9
  * Export a fetch handler in module format.
@@ -27,55 +15,11 @@ export default {
27
15
  executionContext: ExecutionContext,
28
16
  ): Promise<Response> {
29
17
  try {
30
- /**
31
- * Open a cache instance in the worker and a custom session instance.
32
- */
33
- if (!env?.SESSION_SECRET) {
34
- throw new Error('SESSION_SECRET environment variable is not set');
35
- }
36
-
37
- const waitUntil = executionContext.waitUntil.bind(executionContext);
38
- const [cache, session] = await Promise.all([
39
- caches.open('hydrogen'),
40
- AppSession.init(request, [env.SESSION_SECRET]),
41
- ]);
42
-
43
- /**
44
- * Create Hydrogen's Storefront client.
45
- */
46
- const {storefront} = createStorefrontClient({
47
- cache,
48
- waitUntil,
49
- i18n: {language: 'EN', country: 'US'},
50
- publicStorefrontToken: env.PUBLIC_STOREFRONT_API_TOKEN,
51
- privateStorefrontToken: env.PRIVATE_STOREFRONT_API_TOKEN,
52
- storeDomain: env.PUBLIC_STORE_DOMAIN,
53
- storefrontId: env.PUBLIC_STOREFRONT_ID,
54
- storefrontHeaders: getStorefrontHeaders(request),
55
- });
56
-
57
- /**
58
- * Create a client for Customer Account API.
59
- */
60
- const customerAccount = createCustomerAccountClient({
61
- waitUntil,
18
+ const appLoadContext = await createAppLoadContext(
62
19
  request,
63
- session,
64
- customerAccountId: env.PUBLIC_CUSTOMER_ACCOUNT_API_CLIENT_ID,
65
- customerAccountUrl: env.PUBLIC_CUSTOMER_ACCOUNT_API_URL,
66
- });
67
-
68
- /*
69
- * Create a cart handler that will be used to
70
- * create and update the cart in the session.
71
- */
72
- const cart = createCartHandler({
73
- storefront,
74
- customerAccount,
75
- getCartId: cartGetIdDefault(request.headers),
76
- setCartId: cartSetIdDefault(),
77
- cartQueryFragment: CART_QUERY_FRAGMENT,
78
- });
20
+ env,
21
+ executionContext,
22
+ );
79
23
 
80
24
  /**
81
25
  * Create a Remix request handler and pass
@@ -84,20 +28,16 @@ export default {
84
28
  const handleRequest = createRequestHandler({
85
29
  build: remixBuild,
86
30
  mode: process.env.NODE_ENV,
87
- getLoadContext: (): AppLoadContext => ({
88
- session,
89
- storefront,
90
- customerAccount,
91
- cart,
92
- env,
93
- waitUntil,
94
- }),
31
+ getLoadContext: () => appLoadContext,
95
32
  });
96
33
 
97
34
  const response = await handleRequest(request);
98
35
 
99
- if (session.isPending) {
100
- response.headers.set('Set-Cookie', await session.commit());
36
+ if (appLoadContext.session.isPending) {
37
+ response.headers.set(
38
+ 'Set-Cookie',
39
+ await appLoadContext.session.commit(),
40
+ );
101
41
  }
102
42
 
103
43
  if (response.status === 404) {
@@ -106,7 +46,11 @@ export default {
106
46
  * If the redirect doesn't exist, then `storefrontRedirect`
107
47
  * will pass through the 404 response.
108
48
  */
109
- return storefrontRedirect({request, response, storefront});
49
+ return storefrontRedirect({
50
+ request,
51
+ response,
52
+ storefront: appLoadContext.storefront,
53
+ });
110
54
  }
111
55
 
112
56
  return response;
@@ -38,6 +38,36 @@ export type CartLineFragment = Pick<
38
38
  };
39
39
  };
40
40
 
41
+ export type CartLineComponentFragment = Pick<
42
+ StorefrontAPI.ComponentizableCartLine,
43
+ 'id' | 'quantity'
44
+ > & {
45
+ attributes: Array<Pick<StorefrontAPI.Attribute, 'key' | 'value'>>;
46
+ cost: {
47
+ totalAmount: Pick<StorefrontAPI.MoneyV2, 'currencyCode' | 'amount'>;
48
+ amountPerQuantity: Pick<StorefrontAPI.MoneyV2, 'currencyCode' | 'amount'>;
49
+ compareAtAmountPerQuantity?: StorefrontAPI.Maybe<
50
+ Pick<StorefrontAPI.MoneyV2, 'currencyCode' | 'amount'>
51
+ >;
52
+ };
53
+ merchandise: Pick<
54
+ StorefrontAPI.ProductVariant,
55
+ 'id' | 'availableForSale' | 'requiresShipping' | 'title'
56
+ > & {
57
+ compareAtPrice?: StorefrontAPI.Maybe<
58
+ Pick<StorefrontAPI.MoneyV2, 'currencyCode' | 'amount'>
59
+ >;
60
+ price: Pick<StorefrontAPI.MoneyV2, 'currencyCode' | 'amount'>;
61
+ image?: StorefrontAPI.Maybe<
62
+ Pick<StorefrontAPI.Image, 'id' | 'url' | 'altText' | 'width' | 'height'>
63
+ >;
64
+ product: Pick<StorefrontAPI.Product, 'handle' | 'title' | 'id' | 'vendor'>;
65
+ selectedOptions: Array<
66
+ Pick<StorefrontAPI.SelectedOption, 'name' | 'value'>
67
+ >;
68
+ };
69
+ };
70
+
41
71
  export type CartApiQueryFragment = Pick<
42
72
  StorefrontAPI.Cart,
43
73
  'updatedAt' | 'id' | 'checkoutUrl' | 'totalQuantity' | 'note'
@@ -55,41 +85,76 @@ export type CartApiQueryFragment = Pick<
55
85
  };
56
86
  lines: {
57
87
  nodes: Array<
58
- Pick<StorefrontAPI.CartLine, 'id' | 'quantity'> & {
59
- attributes: Array<Pick<StorefrontAPI.Attribute, 'key' | 'value'>>;
60
- cost: {
61
- totalAmount: Pick<StorefrontAPI.MoneyV2, 'currencyCode' | 'amount'>;
62
- amountPerQuantity: Pick<
63
- StorefrontAPI.MoneyV2,
64
- 'currencyCode' | 'amount'
65
- >;
66
- compareAtAmountPerQuantity?: StorefrontAPI.Maybe<
67
- Pick<StorefrontAPI.MoneyV2, 'currencyCode' | 'amount'>
68
- >;
69
- };
70
- merchandise: Pick<
71
- StorefrontAPI.ProductVariant,
72
- 'id' | 'availableForSale' | 'requiresShipping' | 'title'
73
- > & {
74
- compareAtPrice?: StorefrontAPI.Maybe<
75
- Pick<StorefrontAPI.MoneyV2, 'currencyCode' | 'amount'>
76
- >;
77
- price: Pick<StorefrontAPI.MoneyV2, 'currencyCode' | 'amount'>;
78
- image?: StorefrontAPI.Maybe<
79
- Pick<
80
- StorefrontAPI.Image,
81
- 'id' | 'url' | 'altText' | 'width' | 'height'
82
- >
83
- >;
84
- product: Pick<
85
- StorefrontAPI.Product,
86
- 'handle' | 'title' | 'id' | 'vendor'
87
- >;
88
- selectedOptions: Array<
89
- Pick<StorefrontAPI.SelectedOption, 'name' | 'value'>
90
- >;
91
- };
92
- }
88
+ | (Pick<StorefrontAPI.CartLine, 'id' | 'quantity'> & {
89
+ attributes: Array<Pick<StorefrontAPI.Attribute, 'key' | 'value'>>;
90
+ cost: {
91
+ totalAmount: Pick<StorefrontAPI.MoneyV2, 'currencyCode' | 'amount'>;
92
+ amountPerQuantity: Pick<
93
+ StorefrontAPI.MoneyV2,
94
+ 'currencyCode' | 'amount'
95
+ >;
96
+ compareAtAmountPerQuantity?: StorefrontAPI.Maybe<
97
+ Pick<StorefrontAPI.MoneyV2, 'currencyCode' | 'amount'>
98
+ >;
99
+ };
100
+ merchandise: Pick<
101
+ StorefrontAPI.ProductVariant,
102
+ 'id' | 'availableForSale' | 'requiresShipping' | 'title'
103
+ > & {
104
+ compareAtPrice?: StorefrontAPI.Maybe<
105
+ Pick<StorefrontAPI.MoneyV2, 'currencyCode' | 'amount'>
106
+ >;
107
+ price: Pick<StorefrontAPI.MoneyV2, 'currencyCode' | 'amount'>;
108
+ image?: StorefrontAPI.Maybe<
109
+ Pick<
110
+ StorefrontAPI.Image,
111
+ 'id' | 'url' | 'altText' | 'width' | 'height'
112
+ >
113
+ >;
114
+ product: Pick<
115
+ StorefrontAPI.Product,
116
+ 'handle' | 'title' | 'id' | 'vendor'
117
+ >;
118
+ selectedOptions: Array<
119
+ Pick<StorefrontAPI.SelectedOption, 'name' | 'value'>
120
+ >;
121
+ };
122
+ })
123
+ | (Pick<StorefrontAPI.ComponentizableCartLine, 'id' | 'quantity'> & {
124
+ attributes: Array<Pick<StorefrontAPI.Attribute, 'key' | 'value'>>;
125
+ cost: {
126
+ totalAmount: Pick<StorefrontAPI.MoneyV2, 'currencyCode' | 'amount'>;
127
+ amountPerQuantity: Pick<
128
+ StorefrontAPI.MoneyV2,
129
+ 'currencyCode' | 'amount'
130
+ >;
131
+ compareAtAmountPerQuantity?: StorefrontAPI.Maybe<
132
+ Pick<StorefrontAPI.MoneyV2, 'currencyCode' | 'amount'>
133
+ >;
134
+ };
135
+ merchandise: Pick<
136
+ StorefrontAPI.ProductVariant,
137
+ 'id' | 'availableForSale' | 'requiresShipping' | 'title'
138
+ > & {
139
+ compareAtPrice?: StorefrontAPI.Maybe<
140
+ Pick<StorefrontAPI.MoneyV2, 'currencyCode' | 'amount'>
141
+ >;
142
+ price: Pick<StorefrontAPI.MoneyV2, 'currencyCode' | 'amount'>;
143
+ image?: StorefrontAPI.Maybe<
144
+ Pick<
145
+ StorefrontAPI.Image,
146
+ 'id' | 'url' | 'altText' | 'width' | 'height'
147
+ >
148
+ >;
149
+ product: Pick<
150
+ StorefrontAPI.Product,
151
+ 'handle' | 'title' | 'id' | 'vendor'
152
+ >;
153
+ selectedOptions: Array<
154
+ Pick<StorefrontAPI.SelectedOption, 'name' | 'value'>
155
+ >;
156
+ };
157
+ })
93
158
  >;
94
159
  };
95
160
  cost: {
@@ -326,123 +391,6 @@ export type RecommendedProductsQuery = {
326
391
  };
327
392
  };
328
393
 
329
- export type PredictiveArticleFragment = {__typename: 'Article'} & Pick<
330
- StorefrontAPI.Article,
331
- 'id' | 'title' | 'handle' | 'trackingParameters'
332
- > & {
333
- blog: Pick<StorefrontAPI.Blog, 'handle'>;
334
- image?: StorefrontAPI.Maybe<
335
- Pick<StorefrontAPI.Image, 'url' | 'altText' | 'width' | 'height'>
336
- >;
337
- };
338
-
339
- export type PredictiveCollectionFragment = {__typename: 'Collection'} & Pick<
340
- StorefrontAPI.Collection,
341
- 'id' | 'title' | 'handle' | 'trackingParameters'
342
- > & {
343
- image?: StorefrontAPI.Maybe<
344
- Pick<StorefrontAPI.Image, 'url' | 'altText' | 'width' | 'height'>
345
- >;
346
- };
347
-
348
- export type PredictivePageFragment = {__typename: 'Page'} & Pick<
349
- StorefrontAPI.Page,
350
- 'id' | 'title' | 'handle' | 'trackingParameters'
351
- >;
352
-
353
- export type PredictiveProductFragment = {__typename: 'Product'} & Pick<
354
- StorefrontAPI.Product,
355
- 'id' | 'title' | 'handle' | 'trackingParameters'
356
- > & {
357
- variants: {
358
- nodes: Array<
359
- Pick<StorefrontAPI.ProductVariant, 'id'> & {
360
- image?: StorefrontAPI.Maybe<
361
- Pick<StorefrontAPI.Image, 'url' | 'altText' | 'width' | 'height'>
362
- >;
363
- price: Pick<StorefrontAPI.MoneyV2, 'amount' | 'currencyCode'>;
364
- }
365
- >;
366
- };
367
- };
368
-
369
- export type PredictiveQueryFragment = {
370
- __typename: 'SearchQuerySuggestion';
371
- } & Pick<
372
- StorefrontAPI.SearchQuerySuggestion,
373
- 'text' | 'styledText' | 'trackingParameters'
374
- >;
375
-
376
- export type PredictiveSearchQueryVariables = StorefrontAPI.Exact<{
377
- country?: StorefrontAPI.InputMaybe<StorefrontAPI.CountryCode>;
378
- language?: StorefrontAPI.InputMaybe<StorefrontAPI.LanguageCode>;
379
- limit: StorefrontAPI.Scalars['Int']['input'];
380
- limitScope: StorefrontAPI.PredictiveSearchLimitScope;
381
- searchTerm: StorefrontAPI.Scalars['String']['input'];
382
- types?: StorefrontAPI.InputMaybe<
383
- | Array<StorefrontAPI.PredictiveSearchType>
384
- | StorefrontAPI.PredictiveSearchType
385
- >;
386
- }>;
387
-
388
- export type PredictiveSearchQuery = {
389
- predictiveSearch?: StorefrontAPI.Maybe<{
390
- articles: Array<
391
- {__typename: 'Article'} & Pick<
392
- StorefrontAPI.Article,
393
- 'id' | 'title' | 'handle' | 'trackingParameters'
394
- > & {
395
- blog: Pick<StorefrontAPI.Blog, 'handle'>;
396
- image?: StorefrontAPI.Maybe<
397
- Pick<StorefrontAPI.Image, 'url' | 'altText' | 'width' | 'height'>
398
- >;
399
- }
400
- >;
401
- collections: Array<
402
- {__typename: 'Collection'} & Pick<
403
- StorefrontAPI.Collection,
404
- 'id' | 'title' | 'handle' | 'trackingParameters'
405
- > & {
406
- image?: StorefrontAPI.Maybe<
407
- Pick<StorefrontAPI.Image, 'url' | 'altText' | 'width' | 'height'>
408
- >;
409
- }
410
- >;
411
- pages: Array<
412
- {__typename: 'Page'} & Pick<
413
- StorefrontAPI.Page,
414
- 'id' | 'title' | 'handle' | 'trackingParameters'
415
- >
416
- >;
417
- products: Array<
418
- {__typename: 'Product'} & Pick<
419
- StorefrontAPI.Product,
420
- 'id' | 'title' | 'handle' | 'trackingParameters'
421
- > & {
422
- variants: {
423
- nodes: Array<
424
- Pick<StorefrontAPI.ProductVariant, 'id'> & {
425
- image?: StorefrontAPI.Maybe<
426
- Pick<
427
- StorefrontAPI.Image,
428
- 'url' | 'altText' | 'width' | 'height'
429
- >
430
- >;
431
- price: Pick<StorefrontAPI.MoneyV2, 'amount' | 'currencyCode'>;
432
- }
433
- >;
434
- };
435
- }
436
- >;
437
- queries: Array<
438
- {__typename: 'SearchQuerySuggestion'} & Pick<
439
- StorefrontAPI.SearchQuerySuggestion,
440
- 'text' | 'styledText' | 'trackingParameters'
441
- >
442
- >;
443
- }>;
444
- };
445
-
446
394
  export type ArticleQueryVariables = StorefrontAPI.Exact<{
447
395
  articleHandle: StorefrontAPI.Scalars['String']['input'];
448
396
  blogHandle: StorefrontAPI.Scalars['String']['input'];
@@ -1053,7 +1001,12 @@ export type SearchArticleFragment = {__typename: 'Article'} & Pick<
1053
1001
  'handle' | 'id' | 'title' | 'trackingParameters'
1054
1002
  >;
1055
1003
 
1056
- export type SearchQueryVariables = StorefrontAPI.Exact<{
1004
+ export type PageInfoFragmentFragment = Pick<
1005
+ StorefrontAPI.PageInfo,
1006
+ 'hasNextPage' | 'hasPreviousPage' | 'startCursor' | 'endCursor'
1007
+ >;
1008
+
1009
+ export type RegularSearchQueryVariables = StorefrontAPI.Exact<{
1057
1010
  country?: StorefrontAPI.InputMaybe<StorefrontAPI.CountryCode>;
1058
1011
  endCursor?: StorefrontAPI.InputMaybe<
1059
1012
  StorefrontAPI.Scalars['String']['input']
@@ -1061,13 +1014,29 @@ export type SearchQueryVariables = StorefrontAPI.Exact<{
1061
1014
  first?: StorefrontAPI.InputMaybe<StorefrontAPI.Scalars['Int']['input']>;
1062
1015
  language?: StorefrontAPI.InputMaybe<StorefrontAPI.LanguageCode>;
1063
1016
  last?: StorefrontAPI.InputMaybe<StorefrontAPI.Scalars['Int']['input']>;
1064
- query: StorefrontAPI.Scalars['String']['input'];
1017
+ term: StorefrontAPI.Scalars['String']['input'];
1065
1018
  startCursor?: StorefrontAPI.InputMaybe<
1066
1019
  StorefrontAPI.Scalars['String']['input']
1067
1020
  >;
1068
1021
  }>;
1069
1022
 
1070
- export type SearchQuery = {
1023
+ export type RegularSearchQuery = {
1024
+ articles: {
1025
+ nodes: Array<
1026
+ {__typename: 'Article'} & Pick<
1027
+ StorefrontAPI.Article,
1028
+ 'handle' | 'id' | 'title' | 'trackingParameters'
1029
+ >
1030
+ >;
1031
+ };
1032
+ pages: {
1033
+ nodes: Array<
1034
+ {__typename: 'Page'} & Pick<
1035
+ StorefrontAPI.Page,
1036
+ 'handle' | 'id' | 'title' | 'trackingParameters'
1037
+ >
1038
+ >;
1039
+ };
1071
1040
  products: {
1072
1041
  nodes: Array<
1073
1042
  {__typename: 'Product'} & Pick<
@@ -1106,22 +1075,123 @@ export type SearchQuery = {
1106
1075
  'hasNextPage' | 'hasPreviousPage' | 'startCursor' | 'endCursor'
1107
1076
  >;
1108
1077
  };
1109
- pages: {
1110
- nodes: Array<
1111
- {__typename: 'Page'} & Pick<
1112
- StorefrontAPI.Page,
1113
- 'handle' | 'id' | 'title' | 'trackingParameters'
1114
- >
1078
+ };
1079
+
1080
+ export type PredictiveArticleFragment = {__typename: 'Article'} & Pick<
1081
+ StorefrontAPI.Article,
1082
+ 'id' | 'title' | 'handle' | 'trackingParameters'
1083
+ > & {
1084
+ blog: Pick<StorefrontAPI.Blog, 'handle'>;
1085
+ image?: StorefrontAPI.Maybe<
1086
+ Pick<StorefrontAPI.Image, 'url' | 'altText' | 'width' | 'height'>
1115
1087
  >;
1116
1088
  };
1117
- articles: {
1118
- nodes: Array<
1089
+
1090
+ export type PredictiveCollectionFragment = {__typename: 'Collection'} & Pick<
1091
+ StorefrontAPI.Collection,
1092
+ 'id' | 'title' | 'handle' | 'trackingParameters'
1093
+ > & {
1094
+ image?: StorefrontAPI.Maybe<
1095
+ Pick<StorefrontAPI.Image, 'url' | 'altText' | 'width' | 'height'>
1096
+ >;
1097
+ };
1098
+
1099
+ export type PredictivePageFragment = {__typename: 'Page'} & Pick<
1100
+ StorefrontAPI.Page,
1101
+ 'id' | 'title' | 'handle' | 'trackingParameters'
1102
+ >;
1103
+
1104
+ export type PredictiveProductFragment = {__typename: 'Product'} & Pick<
1105
+ StorefrontAPI.Product,
1106
+ 'id' | 'title' | 'handle' | 'trackingParameters'
1107
+ > & {
1108
+ variants: {
1109
+ nodes: Array<
1110
+ Pick<StorefrontAPI.ProductVariant, 'id'> & {
1111
+ image?: StorefrontAPI.Maybe<
1112
+ Pick<StorefrontAPI.Image, 'url' | 'altText' | 'width' | 'height'>
1113
+ >;
1114
+ price: Pick<StorefrontAPI.MoneyV2, 'amount' | 'currencyCode'>;
1115
+ }
1116
+ >;
1117
+ };
1118
+ };
1119
+
1120
+ export type PredictiveQueryFragment = {
1121
+ __typename: 'SearchQuerySuggestion';
1122
+ } & Pick<
1123
+ StorefrontAPI.SearchQuerySuggestion,
1124
+ 'text' | 'styledText' | 'trackingParameters'
1125
+ >;
1126
+
1127
+ export type PredictiveSearchQueryVariables = StorefrontAPI.Exact<{
1128
+ country?: StorefrontAPI.InputMaybe<StorefrontAPI.CountryCode>;
1129
+ language?: StorefrontAPI.InputMaybe<StorefrontAPI.LanguageCode>;
1130
+ limit: StorefrontAPI.Scalars['Int']['input'];
1131
+ limitScope: StorefrontAPI.PredictiveSearchLimitScope;
1132
+ term: StorefrontAPI.Scalars['String']['input'];
1133
+ types?: StorefrontAPI.InputMaybe<
1134
+ | Array<StorefrontAPI.PredictiveSearchType>
1135
+ | StorefrontAPI.PredictiveSearchType
1136
+ >;
1137
+ }>;
1138
+
1139
+ export type PredictiveSearchQuery = {
1140
+ predictiveSearch?: StorefrontAPI.Maybe<{
1141
+ articles: Array<
1119
1142
  {__typename: 'Article'} & Pick<
1120
1143
  StorefrontAPI.Article,
1121
- 'handle' | 'id' | 'title' | 'trackingParameters'
1144
+ 'id' | 'title' | 'handle' | 'trackingParameters'
1145
+ > & {
1146
+ blog: Pick<StorefrontAPI.Blog, 'handle'>;
1147
+ image?: StorefrontAPI.Maybe<
1148
+ Pick<StorefrontAPI.Image, 'url' | 'altText' | 'width' | 'height'>
1149
+ >;
1150
+ }
1151
+ >;
1152
+ collections: Array<
1153
+ {__typename: 'Collection'} & Pick<
1154
+ StorefrontAPI.Collection,
1155
+ 'id' | 'title' | 'handle' | 'trackingParameters'
1156
+ > & {
1157
+ image?: StorefrontAPI.Maybe<
1158
+ Pick<StorefrontAPI.Image, 'url' | 'altText' | 'width' | 'height'>
1159
+ >;
1160
+ }
1161
+ >;
1162
+ pages: Array<
1163
+ {__typename: 'Page'} & Pick<
1164
+ StorefrontAPI.Page,
1165
+ 'id' | 'title' | 'handle' | 'trackingParameters'
1122
1166
  >
1123
1167
  >;
1124
- };
1168
+ products: Array<
1169
+ {__typename: 'Product'} & Pick<
1170
+ StorefrontAPI.Product,
1171
+ 'id' | 'title' | 'handle' | 'trackingParameters'
1172
+ > & {
1173
+ variants: {
1174
+ nodes: Array<
1175
+ Pick<StorefrontAPI.ProductVariant, 'id'> & {
1176
+ image?: StorefrontAPI.Maybe<
1177
+ Pick<
1178
+ StorefrontAPI.Image,
1179
+ 'url' | 'altText' | 'width' | 'height'
1180
+ >
1181
+ >;
1182
+ price: Pick<StorefrontAPI.MoneyV2, 'amount' | 'currencyCode'>;
1183
+ }
1184
+ >;
1185
+ };
1186
+ }
1187
+ >;
1188
+ queries: Array<
1189
+ {__typename: 'SearchQuerySuggestion'} & Pick<
1190
+ StorefrontAPI.SearchQuerySuggestion,
1191
+ 'text' | 'styledText' | 'trackingParameters'
1192
+ >
1193
+ >;
1194
+ }>;
1125
1195
  };
1126
1196
 
1127
1197
  interface GeneratedQueryTypes {
@@ -1149,10 +1219,6 @@ interface GeneratedQueryTypes {
1149
1219
  return: RecommendedProductsQuery;
1150
1220
  variables: RecommendedProductsQueryVariables;
1151
1221
  };
1152
- '#graphql\n fragment PredictiveArticle on Article {\n __typename\n id\n title\n handle\n blog {\n handle\n }\n image {\n url\n altText\n width\n height\n }\n trackingParameters\n }\n fragment PredictiveCollection on Collection {\n __typename\n id\n title\n handle\n image {\n url\n altText\n width\n height\n }\n trackingParameters\n }\n fragment PredictivePage on Page {\n __typename\n id\n title\n handle\n trackingParameters\n }\n fragment PredictiveProduct on Product {\n __typename\n id\n title\n handle\n trackingParameters\n variants(first: 1) {\n nodes {\n id\n image {\n url\n altText\n width\n height\n }\n price {\n amount\n currencyCode\n }\n }\n }\n }\n fragment PredictiveQuery on SearchQuerySuggestion {\n __typename\n text\n styledText\n trackingParameters\n }\n query predictiveSearch(\n $country: CountryCode\n $language: LanguageCode\n $limit: Int!\n $limitScope: PredictiveSearchLimitScope!\n $searchTerm: String!\n $types: [PredictiveSearchType!]\n ) @inContext(country: $country, language: $language) {\n predictiveSearch(\n limit: $limit,\n limitScope: $limitScope,\n query: $searchTerm,\n types: $types,\n ) {\n articles {\n ...PredictiveArticle\n }\n collections {\n ...PredictiveCollection\n }\n pages {\n ...PredictivePage\n }\n products {\n ...PredictiveProduct\n }\n queries {\n ...PredictiveQuery\n }\n }\n }\n': {
1153
- return: PredictiveSearchQuery;
1154
- variables: PredictiveSearchQueryVariables;
1155
- };
1156
1222
  '#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': {
1157
1223
  return: ArticleQuery;
1158
1224
  variables: ArticleQueryVariables;
@@ -1197,9 +1263,13 @@ interface GeneratedQueryTypes {
1197
1263
  return: ProductVariantsQuery;
1198
1264
  variables: ProductVariantsQueryVariables;
1199
1265
  };
1200
- '#graphql\n fragment SearchProduct on Product {\n __typename\n handle\n id\n publishedAt\n title\n trackingParameters\n vendor\n variants(first: 1) {\n nodes {\n id\n image {\n url\n altText\n width\n height\n }\n price {\n amount\n currencyCode\n }\n compareAtPrice {\n amount\n currencyCode\n }\n selectedOptions {\n name\n value\n }\n product {\n handle\n title\n }\n }\n }\n }\n fragment SearchPage on Page {\n __typename\n handle\n id\n title\n trackingParameters\n }\n fragment SearchArticle on Article {\n __typename\n handle\n id\n title\n trackingParameters\n }\n query search(\n $country: CountryCode\n $endCursor: String\n $first: Int\n $language: LanguageCode\n $last: Int\n $query: String!\n $startCursor: String\n ) @inContext(country: $country, language: $language) {\n products: search(\n query: $query,\n unavailableProducts: HIDE,\n types: [PRODUCT],\n first: $first,\n sortKey: RELEVANCE,\n last: $last,\n before: $startCursor,\n after: $endCursor\n ) {\n nodes {\n ...on Product {\n ...SearchProduct\n }\n }\n pageInfo {\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n }\n }\n pages: search(\n query: $query,\n types: [PAGE],\n first: 10\n ) {\n nodes {\n ...on Page {\n ...SearchPage\n }\n }\n }\n articles: search(\n query: $query,\n types: [ARTICLE],\n first: 10\n ) {\n nodes {\n ...on Article {\n ...SearchArticle\n }\n }\n }\n }\n': {
1201
- return: SearchQuery;
1202
- variables: SearchQueryVariables;
1266
+ '#graphql\n query RegularSearch(\n $country: CountryCode\n $endCursor: String\n $first: Int\n $language: LanguageCode\n $last: Int\n $term: String!\n $startCursor: String\n ) @inContext(country: $country, language: $language) {\n articles: search(\n query: $term,\n types: [ARTICLE],\n first: $first,\n ) {\n nodes {\n ...on Article {\n ...SearchArticle\n }\n }\n }\n pages: search(\n query: $term,\n types: [PAGE],\n first: $first,\n ) {\n nodes {\n ...on Page {\n ...SearchPage\n }\n }\n }\n products: search(\n after: $endCursor,\n before: $startCursor,\n first: $first,\n last: $last,\n query: $term,\n sortKey: RELEVANCE,\n types: [PRODUCT],\n unavailableProducts: HIDE,\n ) {\n nodes {\n ...on Product {\n ...SearchProduct\n }\n }\n pageInfo {\n ...PageInfoFragment\n }\n }\n }\n #graphql\n fragment SearchProduct on Product {\n __typename\n handle\n id\n publishedAt\n title\n trackingParameters\n vendor\n variants(first: 1) {\n nodes {\n id\n image {\n url\n altText\n width\n height\n }\n price {\n amount\n currencyCode\n }\n compareAtPrice {\n amount\n currencyCode\n }\n selectedOptions {\n name\n value\n }\n product {\n handle\n title\n }\n }\n }\n }\n\n #graphql\n fragment SearchPage on Page {\n __typename\n handle\n id\n title\n trackingParameters\n }\n\n #graphql\n fragment SearchArticle on Article {\n __typename\n handle\n id\n title\n trackingParameters\n }\n\n #graphql\n fragment PageInfoFragment on PageInfo {\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n }\n\n': {
1267
+ return: RegularSearchQuery;
1268
+ variables: RegularSearchQueryVariables;
1269
+ };
1270
+ '#graphql\n query PredictiveSearch(\n $country: CountryCode\n $language: LanguageCode\n $limit: Int!\n $limitScope: PredictiveSearchLimitScope!\n $term: String!\n $types: [PredictiveSearchType!]\n ) @inContext(country: $country, language: $language) {\n predictiveSearch(\n limit: $limit,\n limitScope: $limitScope,\n query: $term,\n types: $types,\n ) {\n articles {\n ...PredictiveArticle\n }\n collections {\n ...PredictiveCollection\n }\n pages {\n ...PredictivePage\n }\n products {\n ...PredictiveProduct\n }\n queries {\n ...PredictiveQuery\n }\n }\n }\n #graphql\n fragment PredictiveArticle on Article {\n __typename\n id\n title\n handle\n blog {\n handle\n }\n image {\n url\n altText\n width\n height\n }\n trackingParameters\n }\n\n #graphql\n fragment PredictiveCollection on Collection {\n __typename\n id\n title\n handle\n image {\n url\n altText\n width\n height\n }\n trackingParameters\n }\n\n #graphql\n fragment PredictivePage on Page {\n __typename\n id\n title\n handle\n trackingParameters\n }\n\n #graphql\n fragment PredictiveProduct on Product {\n __typename\n id\n title\n handle\n trackingParameters\n variants(first: 1) {\n nodes {\n id\n image {\n url\n altText\n width\n height\n }\n price {\n amount\n currencyCode\n }\n }\n }\n }\n\n #graphql\n fragment PredictiveQuery on SearchQuerySuggestion {\n __typename\n text\n styledText\n trackingParameters\n }\n\n': {
1271
+ return: PredictiveSearchQuery;
1272
+ variables: PredictiveSearchQueryVariables;
1203
1273
  };
1204
1274
  }
1205
1275
 
@@ -1,7 +1,7 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
- function PageLayout(props) {
2
+ function Layout(props) {
3
3
  return /* @__PURE__ */ jsx("div", { className: "hydrogen-virtual-route", children: props.children });
4
4
  }
5
5
  export {
6
- PageLayout
6
+ Layout
7
7
  };