hydrogen-forge 0.1.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 (118) hide show
  1. package/README.md +212 -0
  2. package/dist/commands/add.d.ts +7 -0
  3. package/dist/commands/add.d.ts.map +1 -0
  4. package/dist/commands/add.js +123 -0
  5. package/dist/commands/add.js.map +1 -0
  6. package/dist/commands/create.d.ts +8 -0
  7. package/dist/commands/create.d.ts.map +1 -0
  8. package/dist/commands/create.js +160 -0
  9. package/dist/commands/create.js.map +1 -0
  10. package/dist/commands/setup-mcp.d.ts +7 -0
  11. package/dist/commands/setup-mcp.d.ts.map +1 -0
  12. package/dist/commands/setup-mcp.js +179 -0
  13. package/dist/commands/setup-mcp.js.map +1 -0
  14. package/dist/index.d.ts +3 -0
  15. package/dist/index.d.ts.map +1 -0
  16. package/dist/index.js +50 -0
  17. package/dist/index.js.map +1 -0
  18. package/dist/lib/generators.d.ts +6 -0
  19. package/dist/lib/generators.d.ts.map +1 -0
  20. package/dist/lib/generators.js +470 -0
  21. package/dist/lib/generators.js.map +1 -0
  22. package/dist/lib/utils.d.ts +17 -0
  23. package/dist/lib/utils.d.ts.map +1 -0
  24. package/dist/lib/utils.js +101 -0
  25. package/dist/lib/utils.js.map +1 -0
  26. package/package.json +54 -0
  27. package/templates/starter/.env.example +21 -0
  28. package/templates/starter/.graphqlrc.ts +27 -0
  29. package/templates/starter/README.md +117 -0
  30. package/templates/starter/app/assets/favicon.svg +28 -0
  31. package/templates/starter/app/components/AddToCartButton.tsx +102 -0
  32. package/templates/starter/app/components/Aside.tsx +136 -0
  33. package/templates/starter/app/components/CartLineItem.tsx +229 -0
  34. package/templates/starter/app/components/CartMain.tsx +131 -0
  35. package/templates/starter/app/components/CartSummary.tsx +315 -0
  36. package/templates/starter/app/components/CollectionFilters.tsx +330 -0
  37. package/templates/starter/app/components/CollectionGrid.tsx +141 -0
  38. package/templates/starter/app/components/Footer.tsx +218 -0
  39. package/templates/starter/app/components/Header.tsx +296 -0
  40. package/templates/starter/app/components/PageLayout.tsx +174 -0
  41. package/templates/starter/app/components/PaginatedResourceSection.tsx +41 -0
  42. package/templates/starter/app/components/ProductCard.tsx +151 -0
  43. package/templates/starter/app/components/ProductForm.tsx +156 -0
  44. package/templates/starter/app/components/ProductGallery.tsx +164 -0
  45. package/templates/starter/app/components/ProductGrid.tsx +64 -0
  46. package/templates/starter/app/components/ProductImage.tsx +23 -0
  47. package/templates/starter/app/components/ProductItem.tsx +44 -0
  48. package/templates/starter/app/components/ProductPrice.tsx +97 -0
  49. package/templates/starter/app/components/SearchDialog.tsx +599 -0
  50. package/templates/starter/app/components/SearchForm.tsx +68 -0
  51. package/templates/starter/app/components/SearchFormPredictive.tsx +76 -0
  52. package/templates/starter/app/components/SearchResults.tsx +161 -0
  53. package/templates/starter/app/components/SearchResultsPredictive.tsx +461 -0
  54. package/templates/starter/app/entry.client.tsx +21 -0
  55. package/templates/starter/app/entry.server.tsx +53 -0
  56. package/templates/starter/app/graphql/customer-account/CustomerAddressMutations.ts +64 -0
  57. package/templates/starter/app/graphql/customer-account/CustomerDetailsQuery.ts +40 -0
  58. package/templates/starter/app/graphql/customer-account/CustomerOrderQuery.ts +90 -0
  59. package/templates/starter/app/graphql/customer-account/CustomerOrdersQuery.ts +63 -0
  60. package/templates/starter/app/graphql/customer-account/CustomerUpdateMutation.ts +25 -0
  61. package/templates/starter/app/lib/context.ts +60 -0
  62. package/templates/starter/app/lib/fragments.ts +234 -0
  63. package/templates/starter/app/lib/orderFilters.ts +90 -0
  64. package/templates/starter/app/lib/redirect.ts +23 -0
  65. package/templates/starter/app/lib/search.ts +79 -0
  66. package/templates/starter/app/lib/session.ts +72 -0
  67. package/templates/starter/app/lib/variants.ts +46 -0
  68. package/templates/starter/app/root.tsx +209 -0
  69. package/templates/starter/app/routes/$.tsx +11 -0
  70. package/templates/starter/app/routes/[robots.txt].tsx +117 -0
  71. package/templates/starter/app/routes/[sitemap.xml].tsx +16 -0
  72. package/templates/starter/app/routes/_index.tsx +167 -0
  73. package/templates/starter/app/routes/account.$.tsx +9 -0
  74. package/templates/starter/app/routes/account._index.tsx +5 -0
  75. package/templates/starter/app/routes/account.addresses.tsx +516 -0
  76. package/templates/starter/app/routes/account.orders.$id.tsx +222 -0
  77. package/templates/starter/app/routes/account.orders._index.tsx +222 -0
  78. package/templates/starter/app/routes/account.profile.tsx +133 -0
  79. package/templates/starter/app/routes/account.tsx +97 -0
  80. package/templates/starter/app/routes/account_.authorize.tsx +5 -0
  81. package/templates/starter/app/routes/account_.login.tsx +7 -0
  82. package/templates/starter/app/routes/account_.logout.tsx +11 -0
  83. package/templates/starter/app/routes/api.$version.[graphql.json].tsx +14 -0
  84. package/templates/starter/app/routes/blogs.$blogHandle.$articleHandle.tsx +129 -0
  85. package/templates/starter/app/routes/blogs.$blogHandle._index.tsx +175 -0
  86. package/templates/starter/app/routes/blogs._index.tsx +109 -0
  87. package/templates/starter/app/routes/cart.$lines.tsx +70 -0
  88. package/templates/starter/app/routes/cart.tsx +117 -0
  89. package/templates/starter/app/routes/collections.$handle.tsx +161 -0
  90. package/templates/starter/app/routes/collections._index.tsx +133 -0
  91. package/templates/starter/app/routes/collections.all.tsx +122 -0
  92. package/templates/starter/app/routes/discount.$code.tsx +48 -0
  93. package/templates/starter/app/routes/pages.$handle.tsx +88 -0
  94. package/templates/starter/app/routes/policies.$handle.tsx +93 -0
  95. package/templates/starter/app/routes/policies._index.tsx +69 -0
  96. package/templates/starter/app/routes/products.$handle.tsx +232 -0
  97. package/templates/starter/app/routes/search.tsx +426 -0
  98. package/templates/starter/app/routes/sitemap.$type.$page[.xml].tsx +23 -0
  99. package/templates/starter/app/routes.ts +9 -0
  100. package/templates/starter/app/styles/app.css +574 -0
  101. package/templates/starter/app/styles/reset.css +139 -0
  102. package/templates/starter/app/styles/tailwind.css +116 -0
  103. package/templates/starter/customer-accountapi.generated.d.ts +543 -0
  104. package/templates/starter/env.d.ts +7 -0
  105. package/templates/starter/eslint.config.js +247 -0
  106. package/templates/starter/guides/predictiveSearch/predictiveSearch.jpg +0 -0
  107. package/templates/starter/guides/predictiveSearch/predictiveSearch.md +394 -0
  108. package/templates/starter/guides/search/search.jpg +0 -0
  109. package/templates/starter/guides/search/search.md +335 -0
  110. package/templates/starter/package.json +71 -0
  111. package/templates/starter/postcss.config.js +6 -0
  112. package/templates/starter/public/.gitkeep +0 -0
  113. package/templates/starter/react-router.config.ts +13 -0
  114. package/templates/starter/server.ts +59 -0
  115. package/templates/starter/storefrontapi.generated.d.ts +1264 -0
  116. package/templates/starter/tailwind.config.js +83 -0
  117. package/templates/starter/tsconfig.json +67 -0
  118. package/templates/starter/vite.config.ts +32 -0
@@ -0,0 +1,116 @@
1
+ @tailwind base;
2
+ @tailwind components;
3
+ @tailwind utilities;
4
+
5
+ /* Custom CSS Variables */
6
+ :root {
7
+ --aside-width: 400px;
8
+ --cart-aside-summary-height-with-discount: 300px;
9
+ --cart-aside-summary-height: 250px;
10
+ --grid-item-width: 355px;
11
+ --header-height: 64px;
12
+ --color-dark: #000;
13
+ --color-light: #fff;
14
+ }
15
+
16
+ /* Base layer customizations */
17
+ @layer base {
18
+ html {
19
+ @apply antialiased;
20
+ }
21
+
22
+ body {
23
+ @apply bg-white text-secondary-900;
24
+ }
25
+
26
+ img {
27
+ @apply rounded;
28
+ }
29
+
30
+ a {
31
+ @apply transition-colors duration-200;
32
+ }
33
+
34
+ h1,
35
+ h2,
36
+ h3,
37
+ h4,
38
+ h5,
39
+ h6 {
40
+ @apply font-semibold tracking-tight;
41
+ }
42
+ }
43
+
44
+ /* Component layer - reusable component classes */
45
+ @layer components {
46
+ /* Button variants */
47
+ .btn {
48
+ @apply inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50;
49
+ }
50
+
51
+ .btn-primary {
52
+ @apply btn bg-primary-600 text-white hover:bg-primary-700 focus:ring-primary-500;
53
+ }
54
+
55
+ .btn-secondary {
56
+ @apply btn bg-secondary-100 text-secondary-900 hover:bg-secondary-200 focus:ring-secondary-500;
57
+ }
58
+
59
+ .btn-outline {
60
+ @apply btn border border-secondary-300 bg-transparent hover:bg-secondary-50 focus:ring-secondary-500;
61
+ }
62
+
63
+ /* Input styles */
64
+ .input {
65
+ @apply block w-full rounded-md border border-secondary-300 px-3 py-2 text-sm placeholder:text-secondary-400 focus:border-primary-500 focus:outline-none focus:ring-1 focus:ring-primary-500;
66
+ }
67
+
68
+ /* Card styles */
69
+ .card {
70
+ @apply rounded-lg border border-secondary-200 bg-white p-4 shadow-sm;
71
+ }
72
+
73
+ /* Link styles */
74
+ .link {
75
+ @apply text-primary-600 hover:text-primary-700 hover:underline;
76
+ }
77
+
78
+ /* Badge styles */
79
+ .badge {
80
+ @apply inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium;
81
+ }
82
+
83
+ .badge-primary {
84
+ @apply badge bg-primary-100 text-primary-800;
85
+ }
86
+
87
+ .badge-sale {
88
+ @apply badge bg-red-100 text-red-800;
89
+ }
90
+
91
+ /* Product grid */
92
+ .product-grid {
93
+ @apply grid grid-cols-1 gap-4 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4;
94
+ }
95
+
96
+ /* Container */
97
+ .container-narrow {
98
+ @apply mx-auto max-w-7xl px-4 sm:px-6 lg:px-8;
99
+ }
100
+ }
101
+
102
+ /* Utility layer - custom utilities */
103
+ @layer utilities {
104
+ .text-balance {
105
+ text-wrap: balance;
106
+ }
107
+
108
+ .scrollbar-hide {
109
+ -ms-overflow-style: none;
110
+ scrollbar-width: none;
111
+ }
112
+
113
+ .scrollbar-hide::-webkit-scrollbar {
114
+ display: none;
115
+ }
116
+ }
@@ -0,0 +1,543 @@
1
+ /* eslint-disable eslint-comments/disable-enable-pair */
2
+ /* eslint-disable eslint-comments/no-unlimited-disable */
3
+ /* eslint-disable */
4
+ import type * as CustomerAccountAPI from '@shopify/hydrogen/customer-account-api-types';
5
+
6
+ export type CustomerAddressUpdateMutationVariables = CustomerAccountAPI.Exact<{
7
+ address: CustomerAccountAPI.CustomerAddressInput;
8
+ addressId: CustomerAccountAPI.Scalars['ID']['input'];
9
+ defaultAddress?: CustomerAccountAPI.InputMaybe<
10
+ CustomerAccountAPI.Scalars['Boolean']['input']
11
+ >;
12
+ language?: CustomerAccountAPI.InputMaybe<CustomerAccountAPI.LanguageCode>;
13
+ }>;
14
+
15
+ export type CustomerAddressUpdateMutation = {
16
+ customerAddressUpdate?: CustomerAccountAPI.Maybe<{
17
+ customerAddress?: CustomerAccountAPI.Maybe<
18
+ Pick<CustomerAccountAPI.CustomerAddress, 'id'>
19
+ >;
20
+ userErrors: Array<
21
+ Pick<
22
+ CustomerAccountAPI.UserErrorsCustomerAddressUserErrors,
23
+ 'code' | 'field' | 'message'
24
+ >
25
+ >;
26
+ }>;
27
+ };
28
+
29
+ export type CustomerAddressDeleteMutationVariables = CustomerAccountAPI.Exact<{
30
+ addressId: CustomerAccountAPI.Scalars['ID']['input'];
31
+ language?: CustomerAccountAPI.InputMaybe<CustomerAccountAPI.LanguageCode>;
32
+ }>;
33
+
34
+ export type CustomerAddressDeleteMutation = {
35
+ customerAddressDelete?: CustomerAccountAPI.Maybe<
36
+ Pick<
37
+ CustomerAccountAPI.CustomerAddressDeletePayload,
38
+ 'deletedAddressId'
39
+ > & {
40
+ userErrors: Array<
41
+ Pick<
42
+ CustomerAccountAPI.UserErrorsCustomerAddressUserErrors,
43
+ 'code' | 'field' | 'message'
44
+ >
45
+ >;
46
+ }
47
+ >;
48
+ };
49
+
50
+ export type CustomerAddressCreateMutationVariables = CustomerAccountAPI.Exact<{
51
+ address: CustomerAccountAPI.CustomerAddressInput;
52
+ defaultAddress?: CustomerAccountAPI.InputMaybe<
53
+ CustomerAccountAPI.Scalars['Boolean']['input']
54
+ >;
55
+ language?: CustomerAccountAPI.InputMaybe<CustomerAccountAPI.LanguageCode>;
56
+ }>;
57
+
58
+ export type CustomerAddressCreateMutation = {
59
+ customerAddressCreate?: CustomerAccountAPI.Maybe<{
60
+ customerAddress?: CustomerAccountAPI.Maybe<
61
+ Pick<CustomerAccountAPI.CustomerAddress, 'id'>
62
+ >;
63
+ userErrors: Array<
64
+ Pick<
65
+ CustomerAccountAPI.UserErrorsCustomerAddressUserErrors,
66
+ 'code' | 'field' | 'message'
67
+ >
68
+ >;
69
+ }>;
70
+ };
71
+
72
+ export type CustomerFragment = Pick<
73
+ CustomerAccountAPI.Customer,
74
+ 'id' | 'firstName' | 'lastName'
75
+ > & {
76
+ defaultAddress?: CustomerAccountAPI.Maybe<
77
+ Pick<
78
+ CustomerAccountAPI.CustomerAddress,
79
+ | 'id'
80
+ | 'formatted'
81
+ | 'firstName'
82
+ | 'lastName'
83
+ | 'company'
84
+ | 'address1'
85
+ | 'address2'
86
+ | 'territoryCode'
87
+ | 'zoneCode'
88
+ | 'city'
89
+ | 'zip'
90
+ | 'phoneNumber'
91
+ >
92
+ >;
93
+ addresses: {
94
+ nodes: Array<
95
+ Pick<
96
+ CustomerAccountAPI.CustomerAddress,
97
+ | 'id'
98
+ | 'formatted'
99
+ | 'firstName'
100
+ | 'lastName'
101
+ | 'company'
102
+ | 'address1'
103
+ | 'address2'
104
+ | 'territoryCode'
105
+ | 'zoneCode'
106
+ | 'city'
107
+ | 'zip'
108
+ | 'phoneNumber'
109
+ >
110
+ >;
111
+ };
112
+ };
113
+
114
+ export type AddressFragment = Pick<
115
+ CustomerAccountAPI.CustomerAddress,
116
+ | 'id'
117
+ | 'formatted'
118
+ | 'firstName'
119
+ | 'lastName'
120
+ | 'company'
121
+ | 'address1'
122
+ | 'address2'
123
+ | 'territoryCode'
124
+ | 'zoneCode'
125
+ | 'city'
126
+ | 'zip'
127
+ | 'phoneNumber'
128
+ >;
129
+
130
+ export type CustomerDetailsQueryVariables = CustomerAccountAPI.Exact<{
131
+ language?: CustomerAccountAPI.InputMaybe<CustomerAccountAPI.LanguageCode>;
132
+ }>;
133
+
134
+ export type CustomerDetailsQuery = {
135
+ customer: Pick<
136
+ CustomerAccountAPI.Customer,
137
+ 'id' | 'firstName' | 'lastName'
138
+ > & {
139
+ defaultAddress?: CustomerAccountAPI.Maybe<
140
+ Pick<
141
+ CustomerAccountAPI.CustomerAddress,
142
+ | 'id'
143
+ | 'formatted'
144
+ | 'firstName'
145
+ | 'lastName'
146
+ | 'company'
147
+ | 'address1'
148
+ | 'address2'
149
+ | 'territoryCode'
150
+ | 'zoneCode'
151
+ | 'city'
152
+ | 'zip'
153
+ | 'phoneNumber'
154
+ >
155
+ >;
156
+ addresses: {
157
+ nodes: Array<
158
+ Pick<
159
+ CustomerAccountAPI.CustomerAddress,
160
+ | 'id'
161
+ | 'formatted'
162
+ | 'firstName'
163
+ | 'lastName'
164
+ | 'company'
165
+ | 'address1'
166
+ | 'address2'
167
+ | 'territoryCode'
168
+ | 'zoneCode'
169
+ | 'city'
170
+ | 'zip'
171
+ | 'phoneNumber'
172
+ >
173
+ >;
174
+ };
175
+ };
176
+ };
177
+
178
+ export type OrderMoneyFragment = Pick<
179
+ CustomerAccountAPI.MoneyV2,
180
+ 'amount' | 'currencyCode'
181
+ >;
182
+
183
+ export type DiscountApplicationFragment = {
184
+ value:
185
+ | ({__typename: 'MoneyV2'} & Pick<
186
+ CustomerAccountAPI.MoneyV2,
187
+ 'amount' | 'currencyCode'
188
+ >)
189
+ | ({__typename: 'PricingPercentageValue'} & Pick<
190
+ CustomerAccountAPI.PricingPercentageValue,
191
+ 'percentage'
192
+ >);
193
+ };
194
+
195
+ export type OrderLineItemFullFragment = Pick<
196
+ CustomerAccountAPI.LineItem,
197
+ 'id' | 'title' | 'quantity' | 'variantTitle'
198
+ > & {
199
+ price?: CustomerAccountAPI.Maybe<
200
+ Pick<CustomerAccountAPI.MoneyV2, 'amount' | 'currencyCode'>
201
+ >;
202
+ discountAllocations: Array<{
203
+ allocatedAmount: Pick<
204
+ CustomerAccountAPI.MoneyV2,
205
+ 'amount' | 'currencyCode'
206
+ >;
207
+ discountApplication: {
208
+ value:
209
+ | ({__typename: 'MoneyV2'} & Pick<
210
+ CustomerAccountAPI.MoneyV2,
211
+ 'amount' | 'currencyCode'
212
+ >)
213
+ | ({__typename: 'PricingPercentageValue'} & Pick<
214
+ CustomerAccountAPI.PricingPercentageValue,
215
+ 'percentage'
216
+ >);
217
+ };
218
+ }>;
219
+ totalDiscount: Pick<CustomerAccountAPI.MoneyV2, 'amount' | 'currencyCode'>;
220
+ image?: CustomerAccountAPI.Maybe<
221
+ Pick<
222
+ CustomerAccountAPI.Image,
223
+ 'altText' | 'height' | 'url' | 'id' | 'width'
224
+ >
225
+ >;
226
+ };
227
+
228
+ export type OrderFragment = Pick<
229
+ CustomerAccountAPI.Order,
230
+ | 'id'
231
+ | 'name'
232
+ | 'confirmationNumber'
233
+ | 'statusPageUrl'
234
+ | 'fulfillmentStatus'
235
+ | 'processedAt'
236
+ > & {
237
+ fulfillments: {nodes: Array<Pick<CustomerAccountAPI.Fulfillment, 'status'>>};
238
+ totalTax?: CustomerAccountAPI.Maybe<
239
+ Pick<CustomerAccountAPI.MoneyV2, 'amount' | 'currencyCode'>
240
+ >;
241
+ totalPrice: Pick<CustomerAccountAPI.MoneyV2, 'amount' | 'currencyCode'>;
242
+ subtotal?: CustomerAccountAPI.Maybe<
243
+ Pick<CustomerAccountAPI.MoneyV2, 'amount' | 'currencyCode'>
244
+ >;
245
+ shippingAddress?: CustomerAccountAPI.Maybe<
246
+ Pick<
247
+ CustomerAccountAPI.CustomerAddress,
248
+ 'name' | 'formatted' | 'formattedArea'
249
+ >
250
+ >;
251
+ discountApplications: {
252
+ nodes: Array<{
253
+ value:
254
+ | ({__typename: 'MoneyV2'} & Pick<
255
+ CustomerAccountAPI.MoneyV2,
256
+ 'amount' | 'currencyCode'
257
+ >)
258
+ | ({__typename: 'PricingPercentageValue'} & Pick<
259
+ CustomerAccountAPI.PricingPercentageValue,
260
+ 'percentage'
261
+ >);
262
+ }>;
263
+ };
264
+ lineItems: {
265
+ nodes: Array<
266
+ Pick<
267
+ CustomerAccountAPI.LineItem,
268
+ 'id' | 'title' | 'quantity' | 'variantTitle'
269
+ > & {
270
+ price?: CustomerAccountAPI.Maybe<
271
+ Pick<CustomerAccountAPI.MoneyV2, 'amount' | 'currencyCode'>
272
+ >;
273
+ discountAllocations: Array<{
274
+ allocatedAmount: Pick<
275
+ CustomerAccountAPI.MoneyV2,
276
+ 'amount' | 'currencyCode'
277
+ >;
278
+ discountApplication: {
279
+ value:
280
+ | ({__typename: 'MoneyV2'} & Pick<
281
+ CustomerAccountAPI.MoneyV2,
282
+ 'amount' | 'currencyCode'
283
+ >)
284
+ | ({__typename: 'PricingPercentageValue'} & Pick<
285
+ CustomerAccountAPI.PricingPercentageValue,
286
+ 'percentage'
287
+ >);
288
+ };
289
+ }>;
290
+ totalDiscount: Pick<
291
+ CustomerAccountAPI.MoneyV2,
292
+ 'amount' | 'currencyCode'
293
+ >;
294
+ image?: CustomerAccountAPI.Maybe<
295
+ Pick<
296
+ CustomerAccountAPI.Image,
297
+ 'altText' | 'height' | 'url' | 'id' | 'width'
298
+ >
299
+ >;
300
+ }
301
+ >;
302
+ };
303
+ };
304
+
305
+ export type OrderQueryVariables = CustomerAccountAPI.Exact<{
306
+ orderId: CustomerAccountAPI.Scalars['ID']['input'];
307
+ language?: CustomerAccountAPI.InputMaybe<CustomerAccountAPI.LanguageCode>;
308
+ }>;
309
+
310
+ export type OrderQuery = {
311
+ order?: CustomerAccountAPI.Maybe<
312
+ Pick<
313
+ CustomerAccountAPI.Order,
314
+ | 'id'
315
+ | 'name'
316
+ | 'confirmationNumber'
317
+ | 'statusPageUrl'
318
+ | 'fulfillmentStatus'
319
+ | 'processedAt'
320
+ > & {
321
+ fulfillments: {
322
+ nodes: Array<Pick<CustomerAccountAPI.Fulfillment, 'status'>>;
323
+ };
324
+ totalTax?: CustomerAccountAPI.Maybe<
325
+ Pick<CustomerAccountAPI.MoneyV2, 'amount' | 'currencyCode'>
326
+ >;
327
+ totalPrice: Pick<CustomerAccountAPI.MoneyV2, 'amount' | 'currencyCode'>;
328
+ subtotal?: CustomerAccountAPI.Maybe<
329
+ Pick<CustomerAccountAPI.MoneyV2, 'amount' | 'currencyCode'>
330
+ >;
331
+ shippingAddress?: CustomerAccountAPI.Maybe<
332
+ Pick<
333
+ CustomerAccountAPI.CustomerAddress,
334
+ 'name' | 'formatted' | 'formattedArea'
335
+ >
336
+ >;
337
+ discountApplications: {
338
+ nodes: Array<{
339
+ value:
340
+ | ({__typename: 'MoneyV2'} & Pick<
341
+ CustomerAccountAPI.MoneyV2,
342
+ 'amount' | 'currencyCode'
343
+ >)
344
+ | ({__typename: 'PricingPercentageValue'} & Pick<
345
+ CustomerAccountAPI.PricingPercentageValue,
346
+ 'percentage'
347
+ >);
348
+ }>;
349
+ };
350
+ lineItems: {
351
+ nodes: Array<
352
+ Pick<
353
+ CustomerAccountAPI.LineItem,
354
+ 'id' | 'title' | 'quantity' | 'variantTitle'
355
+ > & {
356
+ price?: CustomerAccountAPI.Maybe<
357
+ Pick<CustomerAccountAPI.MoneyV2, 'amount' | 'currencyCode'>
358
+ >;
359
+ discountAllocations: Array<{
360
+ allocatedAmount: Pick<
361
+ CustomerAccountAPI.MoneyV2,
362
+ 'amount' | 'currencyCode'
363
+ >;
364
+ discountApplication: {
365
+ value:
366
+ | ({__typename: 'MoneyV2'} & Pick<
367
+ CustomerAccountAPI.MoneyV2,
368
+ 'amount' | 'currencyCode'
369
+ >)
370
+ | ({__typename: 'PricingPercentageValue'} & Pick<
371
+ CustomerAccountAPI.PricingPercentageValue,
372
+ 'percentage'
373
+ >);
374
+ };
375
+ }>;
376
+ totalDiscount: Pick<
377
+ CustomerAccountAPI.MoneyV2,
378
+ 'amount' | 'currencyCode'
379
+ >;
380
+ image?: CustomerAccountAPI.Maybe<
381
+ Pick<
382
+ CustomerAccountAPI.Image,
383
+ 'altText' | 'height' | 'url' | 'id' | 'width'
384
+ >
385
+ >;
386
+ }
387
+ >;
388
+ };
389
+ }
390
+ >;
391
+ };
392
+
393
+ export type OrderItemFragment = Pick<
394
+ CustomerAccountAPI.Order,
395
+ | 'financialStatus'
396
+ | 'fulfillmentStatus'
397
+ | 'id'
398
+ | 'number'
399
+ | 'confirmationNumber'
400
+ | 'processedAt'
401
+ > & {
402
+ totalPrice: Pick<CustomerAccountAPI.MoneyV2, 'amount' | 'currencyCode'>;
403
+ fulfillments: {nodes: Array<Pick<CustomerAccountAPI.Fulfillment, 'status'>>};
404
+ };
405
+
406
+ export type CustomerOrdersFragment = {
407
+ orders: {
408
+ nodes: Array<
409
+ Pick<
410
+ CustomerAccountAPI.Order,
411
+ | 'financialStatus'
412
+ | 'fulfillmentStatus'
413
+ | 'id'
414
+ | 'number'
415
+ | 'confirmationNumber'
416
+ | 'processedAt'
417
+ > & {
418
+ totalPrice: Pick<CustomerAccountAPI.MoneyV2, 'amount' | 'currencyCode'>;
419
+ fulfillments: {
420
+ nodes: Array<Pick<CustomerAccountAPI.Fulfillment, 'status'>>;
421
+ };
422
+ }
423
+ >;
424
+ pageInfo: Pick<
425
+ CustomerAccountAPI.PageInfo,
426
+ 'hasPreviousPage' | 'hasNextPage' | 'endCursor' | 'startCursor'
427
+ >;
428
+ };
429
+ };
430
+
431
+ export type CustomerOrdersQueryVariables = CustomerAccountAPI.Exact<{
432
+ endCursor?: CustomerAccountAPI.InputMaybe<
433
+ CustomerAccountAPI.Scalars['String']['input']
434
+ >;
435
+ first?: CustomerAccountAPI.InputMaybe<
436
+ CustomerAccountAPI.Scalars['Int']['input']
437
+ >;
438
+ last?: CustomerAccountAPI.InputMaybe<
439
+ CustomerAccountAPI.Scalars['Int']['input']
440
+ >;
441
+ startCursor?: CustomerAccountAPI.InputMaybe<
442
+ CustomerAccountAPI.Scalars['String']['input']
443
+ >;
444
+ query?: CustomerAccountAPI.InputMaybe<
445
+ CustomerAccountAPI.Scalars['String']['input']
446
+ >;
447
+ language?: CustomerAccountAPI.InputMaybe<CustomerAccountAPI.LanguageCode>;
448
+ }>;
449
+
450
+ export type CustomerOrdersQuery = {
451
+ customer: {
452
+ orders: {
453
+ nodes: Array<
454
+ Pick<
455
+ CustomerAccountAPI.Order,
456
+ | 'financialStatus'
457
+ | 'fulfillmentStatus'
458
+ | 'id'
459
+ | 'number'
460
+ | 'confirmationNumber'
461
+ | 'processedAt'
462
+ > & {
463
+ totalPrice: Pick<
464
+ CustomerAccountAPI.MoneyV2,
465
+ 'amount' | 'currencyCode'
466
+ >;
467
+ fulfillments: {
468
+ nodes: Array<Pick<CustomerAccountAPI.Fulfillment, 'status'>>;
469
+ };
470
+ }
471
+ >;
472
+ pageInfo: Pick<
473
+ CustomerAccountAPI.PageInfo,
474
+ 'hasPreviousPage' | 'hasNextPage' | 'endCursor' | 'startCursor'
475
+ >;
476
+ };
477
+ };
478
+ };
479
+
480
+ export type CustomerUpdateMutationVariables = CustomerAccountAPI.Exact<{
481
+ customer: CustomerAccountAPI.CustomerUpdateInput;
482
+ language?: CustomerAccountAPI.InputMaybe<CustomerAccountAPI.LanguageCode>;
483
+ }>;
484
+
485
+ export type CustomerUpdateMutation = {
486
+ customerUpdate?: CustomerAccountAPI.Maybe<{
487
+ customer?: CustomerAccountAPI.Maybe<
488
+ Pick<CustomerAccountAPI.Customer, 'firstName' | 'lastName'> & {
489
+ emailAddress?: CustomerAccountAPI.Maybe<
490
+ Pick<CustomerAccountAPI.CustomerEmailAddress, 'emailAddress'>
491
+ >;
492
+ phoneNumber?: CustomerAccountAPI.Maybe<
493
+ Pick<CustomerAccountAPI.CustomerPhoneNumber, 'phoneNumber'>
494
+ >;
495
+ }
496
+ >;
497
+ userErrors: Array<
498
+ Pick<
499
+ CustomerAccountAPI.UserErrorsCustomerUserErrors,
500
+ 'code' | 'field' | 'message'
501
+ >
502
+ >;
503
+ }>;
504
+ };
505
+
506
+ interface GeneratedQueryTypes {
507
+ '#graphql\n query CustomerDetails($language: LanguageCode) @inContext(language: $language) {\n customer {\n ...Customer\n }\n }\n #graphql\n fragment Customer on Customer {\n id\n firstName\n lastName\n defaultAddress {\n ...Address\n }\n addresses(first: 6) {\n nodes {\n ...Address\n }\n }\n }\n fragment Address on CustomerAddress {\n id\n formatted\n firstName\n lastName\n company\n address1\n address2\n territoryCode\n zoneCode\n city\n zip\n phoneNumber\n }\n\n': {
508
+ return: CustomerDetailsQuery;
509
+ variables: CustomerDetailsQueryVariables;
510
+ };
511
+ '#graphql\n fragment OrderMoney on MoneyV2 {\n amount\n currencyCode\n }\n fragment DiscountApplication on DiscountApplication {\n value {\n __typename\n ... on MoneyV2 {\n ...OrderMoney\n }\n ... on PricingPercentageValue {\n percentage\n }\n }\n }\n fragment OrderLineItemFull on LineItem {\n id\n title\n quantity\n price {\n ...OrderMoney\n }\n discountAllocations {\n allocatedAmount {\n ...OrderMoney\n }\n discountApplication {\n ...DiscountApplication\n }\n }\n totalDiscount {\n ...OrderMoney\n }\n image {\n altText\n height\n url\n id\n width\n }\n variantTitle\n }\n fragment Order on Order {\n id\n name\n confirmationNumber\n statusPageUrl\n fulfillmentStatus\n processedAt\n fulfillments(first: 1) {\n nodes {\n status\n }\n }\n totalTax {\n ...OrderMoney\n }\n totalPrice {\n ...OrderMoney\n }\n subtotal {\n ...OrderMoney\n }\n shippingAddress {\n name\n formatted(withName: true)\n formattedArea\n }\n discountApplications(first: 100) {\n nodes {\n ...DiscountApplication\n }\n }\n lineItems(first: 100) {\n nodes {\n ...OrderLineItemFull\n }\n }\n }\n query Order($orderId: ID!, $language: LanguageCode)\n @inContext(language: $language) {\n order(id: $orderId) {\n ... on Order {\n ...Order\n }\n }\n }\n': {
512
+ return: OrderQuery;
513
+ variables: OrderQueryVariables;
514
+ };
515
+ '#graphql\n #graphql\n fragment CustomerOrders on Customer {\n orders(\n sortKey: PROCESSED_AT,\n reverse: true,\n first: $first,\n last: $last,\n before: $startCursor,\n after: $endCursor,\n query: $query\n ) {\n nodes {\n ...OrderItem\n }\n pageInfo {\n hasPreviousPage\n hasNextPage\n endCursor\n startCursor\n }\n }\n }\n #graphql\n fragment OrderItem on Order {\n totalPrice {\n amount\n currencyCode\n }\n financialStatus\n fulfillmentStatus\n fulfillments(first: 1) {\n nodes {\n status\n }\n }\n id\n number\n confirmationNumber\n processedAt\n }\n\n\n query CustomerOrders(\n $endCursor: String\n $first: Int\n $last: Int\n $startCursor: String\n $query: String\n $language: LanguageCode\n ) @inContext(language: $language) {\n customer {\n ...CustomerOrders\n }\n }\n': {
516
+ return: CustomerOrdersQuery;
517
+ variables: CustomerOrdersQueryVariables;
518
+ };
519
+ }
520
+
521
+ interface GeneratedMutationTypes {
522
+ '#graphql\n mutation customerAddressUpdate(\n $address: CustomerAddressInput!\n $addressId: ID!\n $defaultAddress: Boolean\n $language: LanguageCode\n ) @inContext(language: $language) {\n customerAddressUpdate(\n address: $address\n addressId: $addressId\n defaultAddress: $defaultAddress\n ) {\n customerAddress {\n id\n }\n userErrors {\n code\n field\n message\n }\n }\n }\n': {
523
+ return: CustomerAddressUpdateMutation;
524
+ variables: CustomerAddressUpdateMutationVariables;
525
+ };
526
+ '#graphql\n mutation customerAddressDelete(\n $addressId: ID!\n $language: LanguageCode\n ) @inContext(language: $language) {\n customerAddressDelete(addressId: $addressId) {\n deletedAddressId\n userErrors {\n code\n field\n message\n }\n }\n }\n': {
527
+ return: CustomerAddressDeleteMutation;
528
+ variables: CustomerAddressDeleteMutationVariables;
529
+ };
530
+ '#graphql\n mutation customerAddressCreate(\n $address: CustomerAddressInput!\n $defaultAddress: Boolean\n $language: LanguageCode\n ) @inContext(language: $language) {\n customerAddressCreate(\n address: $address\n defaultAddress: $defaultAddress\n ) {\n customerAddress {\n id\n }\n userErrors {\n code\n field\n message\n }\n }\n }\n': {
531
+ return: CustomerAddressCreateMutation;
532
+ variables: CustomerAddressCreateMutationVariables;
533
+ };
534
+ '#graphql\n mutation customerUpdate(\n $customer: CustomerUpdateInput!\n $language: LanguageCode\n ) @inContext(language: $language) {\n customerUpdate(input: $customer) {\n customer {\n firstName\n lastName\n emailAddress {\n emailAddress\n }\n phoneNumber {\n phoneNumber\n }\n }\n userErrors {\n code\n field\n message\n }\n }\n }\n': {
535
+ return: CustomerUpdateMutation;
536
+ variables: CustomerUpdateMutationVariables;
537
+ };
538
+ }
539
+
540
+ declare module '@shopify/hydrogen' {
541
+ interface CustomerAccountQueries extends GeneratedQueryTypes {}
542
+ interface CustomerAccountMutations extends GeneratedMutationTypes {}
543
+ }
@@ -0,0 +1,7 @@
1
+ /// <reference types="vite/client" />
2
+ /// <reference types="react-router" />
3
+ /// <reference types="@shopify/oxygen-workers-types" />
4
+ /// <reference types="@shopify/hydrogen/react-router-types" />
5
+
6
+ // Enhance TypeScript's built-in typings.
7
+ import '@total-typescript/ts-reset';