@shopify/cli-hydrogen 4.0.0-alpha.9 → 4.0.1

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 (383) hide show
  1. package/dist/commands/hydrogen/build.d.ts +20 -0
  2. package/dist/commands/hydrogen/build.js +36 -33
  3. package/dist/commands/hydrogen/check.d.ts +18 -0
  4. package/dist/commands/hydrogen/check.js +35 -0
  5. package/dist/commands/hydrogen/dev.d.ts +14 -0
  6. package/dist/commands/hydrogen/dev.js +56 -60
  7. package/dist/commands/hydrogen/generate/route.d.ts +34 -0
  8. package/dist/commands/hydrogen/generate/route.js +165 -0
  9. package/dist/commands/hydrogen/generate/route.test.d.ts +1 -0
  10. package/dist/commands/hydrogen/generate/route.test.js +126 -0
  11. package/dist/commands/hydrogen/generate/routes.d.ts +16 -0
  12. package/dist/commands/hydrogen/generate/routes.js +22 -0
  13. package/dist/commands/hydrogen/init.d.ts +22 -0
  14. package/dist/commands/hydrogen/init.js +169 -25
  15. package/dist/commands/hydrogen/preview.d.ts +17 -0
  16. package/dist/commands/hydrogen/preview.js +2 -2
  17. package/dist/create-app.d.ts +1 -0
  18. package/dist/create-app.js +4 -0
  19. package/dist/{templates/demo-store/app/routes/($lang) → generator-templates/routes}/[robots.txt].tsx +2 -1
  20. package/dist/{templates/demo-store/app/routes/($lang) → generator-templates/routes}/[sitemap.xml].tsx +8 -6
  21. package/dist/generator-templates/routes/account/login.tsx +74 -0
  22. package/dist/generator-templates/routes/account/register.tsx +74 -0
  23. package/dist/generator-templates/routes/cart.tsx +43 -0
  24. package/dist/generator-templates/routes/collections/$collectionHandle.tsx +65 -0
  25. package/dist/{templates/demo-store/app → generator-templates}/routes/graphiql.tsx +0 -0
  26. package/dist/{templates/hello-world/app → generator-templates}/routes/index.tsx +0 -0
  27. package/dist/generator-templates/routes/pages/$pageHandle.tsx +74 -0
  28. package/dist/{templates/demo-store/app/routes/($lang) → generator-templates/routes}/policies/$policyHandle.tsx +9 -38
  29. package/dist/generator-templates/routes/policies/index.tsx +65 -0
  30. package/dist/generator-templates/routes/products/$productHandle.tsx +57 -0
  31. package/dist/hooks/init.d.ts +5 -0
  32. package/dist/utils/check-lockfile.d.ts +3 -0
  33. package/dist/utils/check-lockfile.js +78 -0
  34. package/dist/utils/check-version.d.ts +3 -0
  35. package/dist/utils/check-version.js +50 -0
  36. package/dist/utils/config.d.ts +18 -0
  37. package/dist/utils/config.js +116 -43
  38. package/dist/utils/flags.d.ts +10 -0
  39. package/dist/utils/flags.js +15 -3
  40. package/dist/utils/flags.test.d.ts +1 -0
  41. package/dist/utils/flags.test.js +18 -0
  42. package/dist/utils/log.d.ts +5 -0
  43. package/dist/utils/mini-oxygen.d.ts +11 -0
  44. package/dist/utils/mini-oxygen.js +7 -4
  45. package/dist/utils/missing-routes.d.ts +6 -0
  46. package/dist/utils/missing-routes.js +71 -0
  47. package/dist/utils/template-downloader.d.ts +11 -0
  48. package/dist/utils/template-downloader.js +66 -0
  49. package/dist/utils/transpile-ts.d.ts +16 -0
  50. package/dist/utils/transpile-ts.js +169 -0
  51. package/dist/utils/virtual-routes.d.ts +7 -0
  52. package/dist/utils/virtual-routes.js +47 -0
  53. package/dist/utils/virtual-routes.test.d.ts +1 -0
  54. package/dist/utils/virtual-routes.test.js +46 -0
  55. package/dist/virtual-routes/assets/dummy.d.ts +1 -0
  56. package/dist/virtual-routes/assets/dummy.js +1 -0
  57. package/dist/virtual-routes/assets/dummy.ts +1 -0
  58. package/dist/{templates/demo-store/dist/client → virtual-routes/assets}/favicon.svg +0 -0
  59. package/dist/virtual-routes/assets/styles.css +207 -0
  60. package/dist/virtual-routes/components/HydrogenLogoBaseBW.jsx +7 -0
  61. package/dist/virtual-routes/components/HydrogenLogoBaseColor.jsx +13 -0
  62. package/dist/virtual-routes/components/IconBanner.jsx +47 -0
  63. package/dist/virtual-routes/components/IconDiscord.jsx +4 -0
  64. package/dist/virtual-routes/components/IconError.jsx +20 -0
  65. package/dist/virtual-routes/components/IconGithub.jsx +4 -0
  66. package/dist/virtual-routes/components/IconTwitter.jsx +4 -0
  67. package/dist/virtual-routes/components/Layout.jsx +6 -0
  68. package/dist/virtual-routes/routes/graphiql.jsx +5 -0
  69. package/dist/virtual-routes/routes/index.jsx +140 -0
  70. package/dist/virtual-routes/virtual-root.jsx +38 -0
  71. package/oclif.manifest.json +1 -131
  72. package/package.json +36 -7
  73. package/dist/templates/demo-store/.cache/content-v2/sha512/02/76/13bbea15bb42b81a204b0dc5f14726e0bfa8d012a7b284f887cc2e3c92195d6b07a78f199f990b311ca5fafa9079563503cdd81808cd9b7e496d86c72732 +0 -1
  74. package/dist/templates/demo-store/.cache/content-v2/sha512/08/56/c9a478b8c5c2fbfb6eed219f0861db568eceecbb45155124491ca25125ca421aac7e1b10d29151e5294a776ae10e02e01dc2da3561da793d111c4f908502 +0 -1
  75. package/dist/templates/demo-store/.cache/content-v2/sha512/0f/d5/950a1e0708f440217f567601ee2bfed73c56ada7491058d1ebb769f9a348484d29d4c3897d848d5f9123b0cfb8be69de4ebddc9d964a368e779e2927be5b +0 -1
  76. package/dist/templates/demo-store/.cache/content-v2/sha512/10/31/47b4061a63eaedea6368416dff9248ab2e51a4bea4004882a27c1437490c8150a4709438d28bbd8fd71a7516c9af612204f6116b0604e18902b5c6f69453 +0 -1
  77. package/dist/templates/demo-store/.cache/content-v2/sha512/13/f6/b7f804d45a961ca1e392429e75ad80f23ba46cbba0e960c6a70f8de81f3f3763af59651474176798d1a1a4bd2a5109b1d441f6d1c8ba070b678b38378adf +0 -1
  78. package/dist/templates/demo-store/.cache/content-v2/sha512/28/7c/c71b0c6367bdf7307a8061fe1c4568c9f1e9603d835b6fc917fe8042535a867c37154e35376a01ad6bdb3c2d6f29b88b41902fd6f20b1227e02081682d01 +0 -1
  79. package/dist/templates/demo-store/.cache/content-v2/sha512/29/62/a788055902cff8e9403b901ebd715b56541b0ee4dc9f13cb739cd906ae89ae1fa7199831d613ab21c3ee5d84c5456608dc8707d9199ae3d8ba5e9fd7ce95 +0 -1
  80. package/dist/templates/demo-store/.cache/content-v2/sha512/2b/b2/d5a8e11c89553d08b26b4a7ba8b901de31c0b182f745f8c5d1c5aba44bf46d0d69e3d8042f5917728d0b69d5eba102e3de332f8141aef67a12d215a66843 +0 -1
  81. package/dist/templates/demo-store/.cache/content-v2/sha512/34/dd/ec66f7075936ba94dd741485089904914960fd50a4886c31783c27c27ca08852be43dea712e8aaea6f5197b83ccf1949c8a24c27ff61f5280377917d722e +0 -1
  82. package/dist/templates/demo-store/.cache/content-v2/sha512/46/04/af285aee74d96b28b24f75d7911de65e6c7bb26475ab5219fe5308028fda55060cf45650dfa09c0731ec73ece453c1e24e0c38715e8d4c5c80fd6365a1f4 +0 -1
  83. package/dist/templates/demo-store/.cache/content-v2/sha512/4e/ea/2fe739931285fa2839b54fe6c91470491475eac2d960e35ef0c6750313c08fbf2b2d784c0bb71c5fb2ef6c4a27f2202a4c29199b53bf7fd43c5721f90ecf +0 -1
  84. package/dist/templates/demo-store/.cache/content-v2/sha512/51/ab/e165384df6374c7b2d0ebebc8642ecb0e0c14f7c5b57970ec5d2e17f7d1643e0b01eda69e5ffbefde85ecba6d613bcc5175c5564e36bfb73d966c8ea4153 +0 -1
  85. package/dist/templates/demo-store/.cache/content-v2/sha512/54/b2/a99146d18769ec698b6c61e4c3e63689a24110cca7c671d926fc1320f5a2ac5cdbf143db9074dcfb383359307c50ccbe2512f2d9ee992eb53f2ed98997af +0 -1
  86. package/dist/templates/demo-store/.cache/content-v2/sha512/57/7e/37b69b357be4c488e5fca37c009c908201ac2107ddaa589143bcb108e9c5f7e4ca91a36f068b3f88bb0da655d7832bd040dcbef25d807faf0804a7f93c9a +0 -1
  87. package/dist/templates/demo-store/.cache/content-v2/sha512/6d/d8/5ad2b238dcc09122c8977b26e2a2eb94e12b1cda5181a020ec77d9364ea2efdc2ddddaf2ba766ced871d8cc33e5862fb4ae0c6591080b7523e5e779dceb5 +0 -1
  88. package/dist/templates/demo-store/.cache/content-v2/sha512/72/e4/3df1f2ae672aa3148b6afde9bd16b5371250464c301be7a4ca40e459768db712d39fb7039ce9710264f726b531b7dd346e43fe260b53789206a05f665393 +0 -1
  89. package/dist/templates/demo-store/.cache/content-v2/sha512/73/40/c822831f11f08a9ceea944d0145b072ba6164a3e2e75f98fda5437cda6dfddf9ca9450445c1f3236228d6259ac95e4cde9bb6e5996490ed00b7b13b06121 +0 -1
  90. package/dist/templates/demo-store/.cache/content-v2/sha512/73/ad/c5cb88faf344aa1be4c7f263610bbf4e5b4b4122a277e9f8adb20bdaabf46a65f647d902bf885172c5e17f16d63c69d9f0213938ad0648099d627bcdc7a3 +0 -1
  91. package/dist/templates/demo-store/.cache/content-v2/sha512/79/6a/c7905d20904ce592cd04dabc941dcfb9ae88a2936f564c6ca21dba66c7b89f44c697504d1fef3427d5121f3ce0abfc72225a25a5985cc2f823c50cb1a4e0 +0 -1
  92. package/dist/templates/demo-store/.cache/content-v2/sha512/7e/bd/739d3492efb96a9a5952538eee6f83dd7123c59a4b48538a5a554b8684ba84a1e65dd626b5aa9c6dc74c96734c46e3303ab93e6a5fcc56ecb4150c036aea +0 -1
  93. package/dist/templates/demo-store/.cache/content-v2/sha512/88/76/d18fdfbb05293909609d42368642fc6da4bd138c5864ec2f721212b52e595b84ae46f48021ed3e6240edf443f78bdea557d56d700e3da848459ea3077a80 +0 -1
  94. package/dist/templates/demo-store/.cache/content-v2/sha512/88/d0/847cc94057b70b5352a6f097d172883a789eedabfe597475672bec5495d323bc41e185cd5a6477aa691befeb69bd6f19f77b4735ebd8f230d39491bdabae +0 -1
  95. package/dist/templates/demo-store/.cache/content-v2/sha512/93/6b/e60098157f6bff8ba570cab2ffd97a14983109006f7fa87e4432728366f96dfb19e957d28754daa45f1b6cb2421d26ab59bbd5ce5a448d6102e8e662403d +0 -1
  96. package/dist/templates/demo-store/.cache/content-v2/sha512/bc/1c/74650cdfe58d3295c52501b3572b71ca4d0bcebe895291b39d63fc57d60b1924315d5b6292c825bec288196d39acf45d63688726fd77e85d99ce18e52f28 +0 -1
  97. package/dist/templates/demo-store/.cache/content-v2/sha512/bc/33/6e26ece5ac53d9eac9ac8a192ef39faf2a587a5808253c659fb1d371c477fc8074d428c8d1929b0d85dd1fec66fc79ea6b9fcb01507e2efec75fb7fbc2cc +0 -1
  98. package/dist/templates/demo-store/.cache/content-v2/sha512/cb/63/324e426b4c93a3fa8db83dab506b9abbe2d7628897dfd1369642f19d66f140c090e1c3834728d5082f8cffe846f7c54d112e11f5d934d629ed996d177a1f +0 -1
  99. package/dist/templates/demo-store/.cache/content-v2/sha512/d6/bd/656ddf1b02384b21b4fb55c615f28bba616f85c0992a8555bfbc3b0cf0692e2b3f20a534b4c3baef86e7c9ccf36b8d3a9239747b3d8422ff4dbe7dd2d0a6 +0 -1
  100. package/dist/templates/demo-store/.cache/content-v2/sha512/da/84/b6d27e02f9b109d7cff3095b08e2e2ed1802c8b6829c98f6e297d1c404059f8bacfdc278afd07e2f81cbc487318396a3775037b678ab6aff9a5231c94c0d +0 -1
  101. package/dist/templates/demo-store/.cache/content-v2/sha512/e8/ae/9b467e1d23913d4584d9417875b3cdc25f6dfed8b228f3a0c818129010b778aae1af1eb200b015ab428e79afe0ef1061262392fbdb96ed7da95efbe7f758 +0 -1
  102. package/dist/templates/demo-store/.cache/content-v2/sha512/f4/ba/e578b89fa1a4a0549fa2e68e0ba078fa8c9207c376189d1550a7ae0e54c4c0548d0a29a0cef532ca613e25832b9343e74f6a8bc7338fcc28d51e6e3d7898 +0 -1
  103. package/dist/templates/demo-store/.cache/content-v2/sha512/fb/75/9195d7f913bc6ae5a345003e0863e0c38c00e744334e2ae61feba1a3099be8207599085a8264590dbd0fd9e1fff1d58037183d106cdbc750c7ad6f979d88 +0 -1
  104. package/dist/templates/demo-store/.cache/content-v2/sha512/fd/ef/df6382410602f345da5bb420585629c22c350bc028c87eb6da71e611f381c5ccba09b435b9b5fb31d7c8beb5b8abfa87abdb874b189a3211efe61840fbac +0 -1
  105. package/dist/templates/demo-store/.cache/content-v2/sha512/fd/f3/986b7ee5ea5ad1d89af5c08de69d43c025b54381092e0a19fd7e7a1e0352552aa85c056315ce5e11a46ec75a252b1a44e2083abb73cd6df8407dfdb0ac48 +0 -1
  106. package/dist/templates/demo-store/.cache/index-v5/05/44/bebd201ef5e9e9a7c41bd789ff110691a32c7f7fbbbdd630f33d96667cd1 +0 -2
  107. package/dist/templates/demo-store/.cache/index-v5/26/b5/113aeb17f9f4ef406a1f8b143895199ca545fd0cc1e7972435a092910963 +0 -2
  108. package/dist/templates/demo-store/.cache/index-v5/2c/09/e60b5cd818510e0cbec908aae3b74175e35e446f4383e87c21489433a11e +0 -2
  109. package/dist/templates/demo-store/.cache/index-v5/38/21/c3fb7841590b85142018ba88a01045ef1249ac34211342579f0129eae294 +0 -2
  110. package/dist/templates/demo-store/.cache/index-v5/3a/98/8858fe7de4bf85d37c71adc322cc95335b498bef9a4ae41db324bf5696cc +0 -2
  111. package/dist/templates/demo-store/.cache/index-v5/3e/40/7021422a7cae2c05484b491fb5b85edd82b325e598ac9e5c6afb858049da +0 -2
  112. package/dist/templates/demo-store/.cache/index-v5/47/2f/8e9ec62247eca3464d07de774855bb30a56145adc6525b907490e0c1bda0 +0 -2
  113. package/dist/templates/demo-store/.cache/index-v5/5e/83/14bed234cd143eaf4043de721fcf4250a5adc7008e76d663365e8a322c88 +0 -2
  114. package/dist/templates/demo-store/.cache/index-v5/5f/87/f79366b4aab5423acdda7930c6c989c49dd1c6607885df3afaa5e6873c9f +0 -2
  115. package/dist/templates/demo-store/.cache/index-v5/6e/9e/dc622ea9b5c66089a08f3e8b7a0e62a29e85bab337da0a3b28d6126185ec +0 -2
  116. package/dist/templates/demo-store/.cache/index-v5/71/4c/401eb7f3b2db5e56857a3ddd90e61181e636a5d01cc569ff8671ddf7f14b +0 -2
  117. package/dist/templates/demo-store/.cache/index-v5/78/84/46021cf9ede94313b5bc2cbf2355909ae811d4879a7747f9e2341f6b5bfb +0 -2
  118. package/dist/templates/demo-store/.cache/index-v5/79/2e/b0dd8fcd37a11ecb71cfd33184651560cabda672e55e0b244fc6f825190c +0 -2
  119. package/dist/templates/demo-store/.cache/index-v5/7b/e1/807e64f6a84e568bf9163283e9d49b77b24ff24bd8eed751d9fd94ea404a +0 -2
  120. package/dist/templates/demo-store/.cache/index-v5/85/07/e0c4be5b8442583f11be2d0b6f09171d22721437456b745eb2c977294995 +0 -2
  121. package/dist/templates/demo-store/.cache/index-v5/87/4d/89bc172664efe0dc7f86d8e67559073b2900ae079bd42ae9e3c015d38ab0 +0 -2
  122. package/dist/templates/demo-store/.cache/index-v5/8c/0d/a633a8771437b330d83eef0fdd99a81c41356b2bdc81f80ec9277f92b060 +0 -2
  123. package/dist/templates/demo-store/.cache/index-v5/a3/fc/e2e503290d165b9b0e20c6880bc23ff8ec39a440482418b5103c36be66b9 +0 -2
  124. package/dist/templates/demo-store/.cache/index-v5/a5/bc/d87ab9468457cb872d6c360f8acecd05e0f88b7239b50754f120706fabd4 +0 -2
  125. package/dist/templates/demo-store/.cache/index-v5/a5/c0/8e6e4f498a17b6198e54f204247ba544e6404b282d4ce3065d85fa69a8a4 +0 -2
  126. package/dist/templates/demo-store/.cache/index-v5/af/65/89b0c9eb41779c1658ace443604fea125c524bc95cfc71c9b6300da2dc81 +0 -2
  127. package/dist/templates/demo-store/.cache/index-v5/b2/75/51549baf010c977c70017db497fd9bd20e1efa9b658a6d52761c559f9c0b +0 -2
  128. package/dist/templates/demo-store/.cache/index-v5/b3/75/d3e7a4a5df68530007409daf1d2e66ab789c8b658d1819d7e5fd183f5f57 +0 -2
  129. package/dist/templates/demo-store/.cache/index-v5/bb/db/9dc2cbdcdc6ff352f9a34463a02e198aa2123a4c2e4ef37fea8b8ccae413 +0 -2
  130. package/dist/templates/demo-store/.cache/index-v5/d0/c4/d960260ece228d28f70e317741b3f3f3df05c53956d870235837ae2b73b4 +0 -2
  131. package/dist/templates/demo-store/.cache/index-v5/d3/ca/ff5860148f0bedafb91dab72b54462de81a32a21210324c45a051b197b48 +0 -2
  132. package/dist/templates/demo-store/.cache/index-v5/d4/55/296e80e87e2652f4cf1aebd5419fe73ef16c94ab20cd0400166d44ea1746 +0 -2
  133. package/dist/templates/demo-store/.cache/index-v5/da/7a/4b6977be684885e550a0d8fd21c955d0195371ffc3a9535a5a7b950a5ac9 +0 -2
  134. package/dist/templates/demo-store/.cache/index-v5/dd/aa/599a1cd855476ba058c63ae75a9c006ca11f7fbc2efc00b361d7f1b95cb4 +0 -2
  135. package/dist/templates/demo-store/.cache/index-v5/df/d2/bcfa3853e61309abab85dbd561dbc632ad0ea79b24f1b77c95f861eead5f +0 -2
  136. package/dist/templates/demo-store/.cache/index-v5/df/f5/cc3a1197c607eac768ab1b1cdb7b53a7f87b67c23c92da957d45a5bd0bda +0 -2
  137. package/dist/templates/demo-store/.cache/index-v5/e4/bd/743967c269ef70a14ba6b5dd223d26759eae9295d79f165c66f514b7d8d3 +0 -2
  138. package/dist/templates/demo-store/.cache/index-v5/e5/d3/0de6bfbb93ef9271b53f0ded9696291312b19ff087c2826d679ee2c74c01 +0 -2
  139. package/dist/templates/demo-store/.editorconfig +0 -8
  140. package/dist/templates/demo-store/.eslintignore +0 -4
  141. package/dist/templates/demo-store/.eslintrc.js +0 -16
  142. package/dist/templates/demo-store/.graphqlrc.yml +0 -1
  143. package/dist/templates/demo-store/.prettierignore +0 -2
  144. package/dist/templates/demo-store/_env +0 -6
  145. package/dist/templates/demo-store/_gitignore +0 -13
  146. package/dist/templates/demo-store/app/components/AccountAddressBook.tsx +0 -97
  147. package/dist/templates/demo-store/app/components/AccountDetails.tsx +0 -41
  148. package/dist/templates/demo-store/app/components/AddToCartButton.tsx +0 -42
  149. package/dist/templates/demo-store/app/components/Breadcrumbs.tsx +0 -36
  150. package/dist/templates/demo-store/app/components/Button.tsx +0 -56
  151. package/dist/templates/demo-store/app/components/Cart.tsx +0 -431
  152. package/dist/templates/demo-store/app/components/CartLoading.tsx +0 -50
  153. package/dist/templates/demo-store/app/components/CountrySelector.tsx +0 -180
  154. package/dist/templates/demo-store/app/components/Drawer.tsx +0 -115
  155. package/dist/templates/demo-store/app/components/FeaturedCollections.tsx +0 -54
  156. package/dist/templates/demo-store/app/components/FeaturedProducts.tsx +0 -116
  157. package/dist/templates/demo-store/app/components/FeaturedSection.tsx +0 -39
  158. package/dist/templates/demo-store/app/components/GenericError.tsx +0 -58
  159. package/dist/templates/demo-store/app/components/Grid.tsx +0 -44
  160. package/dist/templates/demo-store/app/components/Hero.tsx +0 -129
  161. package/dist/templates/demo-store/app/components/Icon.tsx +0 -253
  162. package/dist/templates/demo-store/app/components/Input.tsx +0 -24
  163. package/dist/templates/demo-store/app/components/Layout.tsx +0 -492
  164. package/dist/templates/demo-store/app/components/Link.tsx +0 -46
  165. package/dist/templates/demo-store/app/components/Modal.tsx +0 -46
  166. package/dist/templates/demo-store/app/components/NotFound.tsx +0 -22
  167. package/dist/templates/demo-store/app/components/OrderCard.tsx +0 -82
  168. package/dist/templates/demo-store/app/components/Pagination.tsx +0 -277
  169. package/dist/templates/demo-store/app/components/ProductCard.tsx +0 -140
  170. package/dist/templates/demo-store/app/components/ProductGallery.tsx +0 -114
  171. package/dist/templates/demo-store/app/components/ProductGrid.tsx +0 -93
  172. package/dist/templates/demo-store/app/components/ProductSwimlane.tsx +0 -30
  173. package/dist/templates/demo-store/app/components/Skeleton.tsx +0 -24
  174. package/dist/templates/demo-store/app/components/SortFilter.tsx +0 -414
  175. package/dist/templates/demo-store/app/components/Text.tsx +0 -192
  176. package/dist/templates/demo-store/app/components/index.ts +0 -28
  177. package/dist/templates/demo-store/app/data/countries.ts +0 -194
  178. package/dist/templates/demo-store/app/data/index.ts +0 -1027
  179. package/dist/templates/demo-store/app/entry.client.tsx +0 -4
  180. package/dist/templates/demo-store/app/entry.server.tsx +0 -26
  181. package/dist/templates/demo-store/app/hooks/useCartFetchers.tsx +0 -14
  182. package/dist/templates/demo-store/app/hooks/useIsHydrated.tsx +0 -12
  183. package/dist/templates/demo-store/app/lib/const.ts +0 -10
  184. package/dist/templates/demo-store/app/lib/placeholders.ts +0 -244
  185. package/dist/templates/demo-store/app/lib/seo/common.tsx +0 -367
  186. package/dist/templates/demo-store/app/lib/seo/debugger.tsx +0 -175
  187. package/dist/templates/demo-store/app/lib/seo/image.tsx +0 -32
  188. package/dist/templates/demo-store/app/lib/seo/index.ts +0 -4
  189. package/dist/templates/demo-store/app/lib/seo/seo.tsx +0 -24
  190. package/dist/templates/demo-store/app/lib/seo/types.ts +0 -84
  191. package/dist/templates/demo-store/app/lib/session.server.ts +0 -57
  192. package/dist/templates/demo-store/app/lib/type.ts +0 -21
  193. package/dist/templates/demo-store/app/lib/utils.ts +0 -310
  194. package/dist/templates/demo-store/app/root.tsx +0 -279
  195. package/dist/templates/demo-store/app/routes/($lang)/$.tsx +0 -7
  196. package/dist/templates/demo-store/app/routes/($lang)/account/__private/address/$id.tsx +0 -320
  197. package/dist/templates/demo-store/app/routes/($lang)/account/__private/edit.tsx +0 -273
  198. package/dist/templates/demo-store/app/routes/($lang)/account/__private/logout.ts +0 -25
  199. package/dist/templates/demo-store/app/routes/($lang)/account/__private/orders.$id.tsx +0 -322
  200. package/dist/templates/demo-store/app/routes/($lang)/account/__public/activate.$id.$activationToken.tsx +0 -218
  201. package/dist/templates/demo-store/app/routes/($lang)/account/__public/login.tsx +0 -197
  202. package/dist/templates/demo-store/app/routes/($lang)/account/__public/recover.tsx +0 -144
  203. package/dist/templates/demo-store/app/routes/($lang)/account/__public/register.tsx +0 -184
  204. package/dist/templates/demo-store/app/routes/($lang)/account/__public/reset.$id.$resetToken.tsx +0 -214
  205. package/dist/templates/demo-store/app/routes/($lang)/account.tsx +0 -188
  206. package/dist/templates/demo-store/app/routes/($lang)/api/countries.tsx +0 -22
  207. package/dist/templates/demo-store/app/routes/($lang)/api/products.tsx +0 -116
  208. package/dist/templates/demo-store/app/routes/($lang)/cart.tsx +0 -510
  209. package/dist/templates/demo-store/app/routes/($lang)/collections/$collectionHandle.tsx +0 -300
  210. package/dist/templates/demo-store/app/routes/($lang)/collections/all.tsx +0 -5
  211. package/dist/templates/demo-store/app/routes/($lang)/collections/index.tsx +0 -188
  212. package/dist/templates/demo-store/app/routes/($lang)/discounts.$code.tsx +0 -60
  213. package/dist/templates/demo-store/app/routes/($lang)/featured-products.tsx +0 -58
  214. package/dist/templates/demo-store/app/routes/($lang)/index.tsx +0 -241
  215. package/dist/templates/demo-store/app/routes/($lang)/journal/$journalHandle.tsx +0 -141
  216. package/dist/templates/demo-store/app/routes/($lang)/journal/index.tsx +0 -152
  217. package/dist/templates/demo-store/app/routes/($lang)/og-image.tsx +0 -19
  218. package/dist/templates/demo-store/app/routes/($lang)/pages/$pageHandle.tsx +0 -75
  219. package/dist/templates/demo-store/app/routes/($lang)/policies/index.tsx +0 -97
  220. package/dist/templates/demo-store/app/routes/($lang)/products/$productHandle.tsx +0 -551
  221. package/dist/templates/demo-store/app/routes/($lang)/products/index.tsx +0 -148
  222. package/dist/templates/demo-store/app/routes/($lang)/search.tsx +0 -198
  223. package/dist/templates/demo-store/app/styles/app.css +0 -4203
  224. package/dist/templates/demo-store/app/styles/custom-font.css +0 -13
  225. package/dist/templates/demo-store/app/styles/fonts/IBMPlexSerif-Text.woff2 +0 -0
  226. package/dist/templates/demo-store/app/styles/fonts/IBMPlexSerif-TextItalic.woff2 +0 -0
  227. package/dist/templates/demo-store/dist/client/build/_assets/IBMPlexSerif-Text-YFMZNZW6.woff2 +0 -0
  228. package/dist/templates/demo-store/dist/client/build/_assets/IBMPlexSerif-TextItalic-CS6L5H7S.woff2 +0 -0
  229. package/dist/templates/demo-store/dist/client/build/_assets/app-PPSD2NK6.css +0 -1
  230. package/dist/templates/demo-store/dist/client/build/_assets/custom-font-WVPOFKHF.css +0 -1
  231. package/dist/templates/demo-store/dist/client/build/_assets/favicon-5FIZBM2K.svg +0 -28
  232. package/dist/templates/demo-store/dist/client/build/_shared/chunk-7CASD2US.js +0 -9
  233. package/dist/templates/demo-store/dist/client/build/_shared/chunk-7CASD2US.js.map +0 -7
  234. package/dist/templates/demo-store/dist/client/build/_shared/chunk-7CKXJRLM.js +0 -2
  235. package/dist/templates/demo-store/dist/client/build/_shared/chunk-7CKXJRLM.js.map +0 -7
  236. package/dist/templates/demo-store/dist/client/build/_shared/chunk-AYHDHSL7.js +0 -2
  237. package/dist/templates/demo-store/dist/client/build/_shared/chunk-AYHDHSL7.js.map +0 -7
  238. package/dist/templates/demo-store/dist/client/build/_shared/chunk-EW52HEI6.js +0 -133
  239. package/dist/templates/demo-store/dist/client/build/_shared/chunk-EW52HEI6.js.map +0 -7
  240. package/dist/templates/demo-store/dist/client/build/_shared/chunk-MEPKJ2VW.js +0 -2
  241. package/dist/templates/demo-store/dist/client/build/_shared/chunk-MEPKJ2VW.js.map +0 -7
  242. package/dist/templates/demo-store/dist/client/build/_shared/chunk-NIVT6A2W.js +0 -2
  243. package/dist/templates/demo-store/dist/client/build/_shared/chunk-NIVT6A2W.js.map +0 -7
  244. package/dist/templates/demo-store/dist/client/build/_shared/chunk-SYP5DAMV.js +0 -2
  245. package/dist/templates/demo-store/dist/client/build/_shared/chunk-SYP5DAMV.js.map +0 -7
  246. package/dist/templates/demo-store/dist/client/build/_shared/chunk-SZCP6RSO.js +0 -7
  247. package/dist/templates/demo-store/dist/client/build/_shared/chunk-SZCP6RSO.js.map +0 -7
  248. package/dist/templates/demo-store/dist/client/build/_shared/chunk-YCAWB56Y.js +0 -31
  249. package/dist/templates/demo-store/dist/client/build/_shared/chunk-YCAWB56Y.js.map +0 -7
  250. package/dist/templates/demo-store/dist/client/build/entry.client-3PUQSZFF.js +0 -2
  251. package/dist/templates/demo-store/dist/client/build/entry.client-3PUQSZFF.js.map +0 -7
  252. package/dist/templates/demo-store/dist/client/build/manifest-E4E22121.js +0 -1
  253. package/dist/templates/demo-store/dist/client/build/root-6BHVTOEY.js +0 -14
  254. package/dist/templates/demo-store/dist/client/build/root-6BHVTOEY.js.map +0 -7
  255. package/dist/templates/demo-store/dist/client/build/routes/($lang)/$-HDBACFGJ.js +0 -2
  256. package/dist/templates/demo-store/dist/client/build/routes/($lang)/$-HDBACFGJ.js.map +0 -7
  257. package/dist/templates/demo-store/dist/client/build/routes/($lang)/[robots.txt]-KDA3EX2G.js +0 -2
  258. package/dist/templates/demo-store/dist/client/build/routes/($lang)/[robots.txt]-KDA3EX2G.js.map +0 -7
  259. package/dist/templates/demo-store/dist/client/build/routes/($lang)/[sitemap.xml]-AAQRJL2R.js +0 -2
  260. package/dist/templates/demo-store/dist/client/build/routes/($lang)/[sitemap.xml]-AAQRJL2R.js.map +0 -7
  261. package/dist/templates/demo-store/dist/client/build/routes/($lang)/account/__private/address/$id-3WQU2LQT.js +0 -2
  262. package/dist/templates/demo-store/dist/client/build/routes/($lang)/account/__private/address/$id-3WQU2LQT.js.map +0 -7
  263. package/dist/templates/demo-store/dist/client/build/routes/($lang)/account/__private/edit-3XQ4BLHS.js +0 -2
  264. package/dist/templates/demo-store/dist/client/build/routes/($lang)/account/__private/edit-3XQ4BLHS.js.map +0 -7
  265. package/dist/templates/demo-store/dist/client/build/routes/($lang)/account/__private/logout-7KXWFBCX.js +0 -2
  266. package/dist/templates/demo-store/dist/client/build/routes/($lang)/account/__private/logout-7KXWFBCX.js.map +0 -7
  267. package/dist/templates/demo-store/dist/client/build/routes/($lang)/account/__private/orders.$id-7VQDCWO5.js +0 -2
  268. package/dist/templates/demo-store/dist/client/build/routes/($lang)/account/__private/orders.$id-7VQDCWO5.js.map +0 -7
  269. package/dist/templates/demo-store/dist/client/build/routes/($lang)/account/__public/activate.$id.$activationToken-Z5BQE6J5.js +0 -2
  270. package/dist/templates/demo-store/dist/client/build/routes/($lang)/account/__public/activate.$id.$activationToken-Z5BQE6J5.js.map +0 -7
  271. package/dist/templates/demo-store/dist/client/build/routes/($lang)/account/__public/login-K6QUN2VF.js +0 -2
  272. package/dist/templates/demo-store/dist/client/build/routes/($lang)/account/__public/login-K6QUN2VF.js.map +0 -7
  273. package/dist/templates/demo-store/dist/client/build/routes/($lang)/account/__public/recover-UV5PLPS5.js +0 -2
  274. package/dist/templates/demo-store/dist/client/build/routes/($lang)/account/__public/recover-UV5PLPS5.js.map +0 -7
  275. package/dist/templates/demo-store/dist/client/build/routes/($lang)/account/__public/register-SZW3ORRR.js +0 -2
  276. package/dist/templates/demo-store/dist/client/build/routes/($lang)/account/__public/register-SZW3ORRR.js.map +0 -7
  277. package/dist/templates/demo-store/dist/client/build/routes/($lang)/account/__public/reset.$id.$resetToken-WOUXQWZU.js +0 -2
  278. package/dist/templates/demo-store/dist/client/build/routes/($lang)/account/__public/reset.$id.$resetToken-WOUXQWZU.js.map +0 -7
  279. package/dist/templates/demo-store/dist/client/build/routes/($lang)/account-PRE5HSJE.js +0 -25
  280. package/dist/templates/demo-store/dist/client/build/routes/($lang)/account-PRE5HSJE.js.map +0 -7
  281. package/dist/templates/demo-store/dist/client/build/routes/($lang)/api/countries-UD6BGYL2.js +0 -2
  282. package/dist/templates/demo-store/dist/client/build/routes/($lang)/api/countries-UD6BGYL2.js.map +0 -7
  283. package/dist/templates/demo-store/dist/client/build/routes/($lang)/api/products-KIFIWUFE.js +0 -2
  284. package/dist/templates/demo-store/dist/client/build/routes/($lang)/api/products-KIFIWUFE.js.map +0 -7
  285. package/dist/templates/demo-store/dist/client/build/routes/($lang)/cart-3AJ7UOZX.js +0 -55
  286. package/dist/templates/demo-store/dist/client/build/routes/($lang)/cart-3AJ7UOZX.js.map +0 -7
  287. package/dist/templates/demo-store/dist/client/build/routes/($lang)/collections/$collectionHandle-ORDYEBM3.js +0 -83
  288. package/dist/templates/demo-store/dist/client/build/routes/($lang)/collections/$collectionHandle-ORDYEBM3.js.map +0 -7
  289. package/dist/templates/demo-store/dist/client/build/routes/($lang)/collections/all-IXDFOKCK.js +0 -2
  290. package/dist/templates/demo-store/dist/client/build/routes/($lang)/collections/all-IXDFOKCK.js.map +0 -7
  291. package/dist/templates/demo-store/dist/client/build/routes/($lang)/collections/index-3AJFWRDR.js +0 -2
  292. package/dist/templates/demo-store/dist/client/build/routes/($lang)/collections/index-3AJFWRDR.js.map +0 -7
  293. package/dist/templates/demo-store/dist/client/build/routes/($lang)/discounts.$code-GYKQBNLQ.js +0 -2
  294. package/dist/templates/demo-store/dist/client/build/routes/($lang)/discounts.$code-GYKQBNLQ.js.map +0 -7
  295. package/dist/templates/demo-store/dist/client/build/routes/($lang)/featured-products-KNUST6DD.js +0 -2
  296. package/dist/templates/demo-store/dist/client/build/routes/($lang)/featured-products-KNUST6DD.js.map +0 -7
  297. package/dist/templates/demo-store/dist/client/build/routes/($lang)/index-4US2D5XK.js +0 -32
  298. package/dist/templates/demo-store/dist/client/build/routes/($lang)/index-4US2D5XK.js.map +0 -7
  299. package/dist/templates/demo-store/dist/client/build/routes/($lang)/journal/$journalHandle-BCHHYOJX.js +0 -2
  300. package/dist/templates/demo-store/dist/client/build/routes/($lang)/journal/$journalHandle-BCHHYOJX.js.map +0 -7
  301. package/dist/templates/demo-store/dist/client/build/routes/($lang)/journal/index-LZR4YNUM.js +0 -2
  302. package/dist/templates/demo-store/dist/client/build/routes/($lang)/journal/index-LZR4YNUM.js.map +0 -7
  303. package/dist/templates/demo-store/dist/client/build/routes/($lang)/og-image-KUOACO4J.js +0 -2
  304. package/dist/templates/demo-store/dist/client/build/routes/($lang)/og-image-KUOACO4J.js.map +0 -7
  305. package/dist/templates/demo-store/dist/client/build/routes/($lang)/pages/$pageHandle-5WR6PFRU.js +0 -2
  306. package/dist/templates/demo-store/dist/client/build/routes/($lang)/pages/$pageHandle-5WR6PFRU.js.map +0 -7
  307. package/dist/templates/demo-store/dist/client/build/routes/($lang)/policies/$policyHandle-C5ATUMN6.js +0 -2
  308. package/dist/templates/demo-store/dist/client/build/routes/($lang)/policies/$policyHandle-C5ATUMN6.js.map +0 -7
  309. package/dist/templates/demo-store/dist/client/build/routes/($lang)/policies/index-MJDYZG5P.js +0 -2
  310. package/dist/templates/demo-store/dist/client/build/routes/($lang)/policies/index-MJDYZG5P.js.map +0 -7
  311. package/dist/templates/demo-store/dist/client/build/routes/($lang)/products/$productHandle-IB2WTXB6.js +0 -68
  312. package/dist/templates/demo-store/dist/client/build/routes/($lang)/products/$productHandle-IB2WTXB6.js.map +0 -7
  313. package/dist/templates/demo-store/dist/client/build/routes/($lang)/products/index-266HKDAN.js +0 -24
  314. package/dist/templates/demo-store/dist/client/build/routes/($lang)/products/index-266HKDAN.js.map +0 -7
  315. package/dist/templates/demo-store/dist/client/build/routes/($lang)/search-CH57YG7S.js +0 -54
  316. package/dist/templates/demo-store/dist/client/build/routes/($lang)/search-CH57YG7S.js.map +0 -7
  317. package/dist/templates/demo-store/dist/client/build/routes/graphiql-ZHVT5SA7.js +0 -2
  318. package/dist/templates/demo-store/dist/client/build/routes/graphiql-ZHVT5SA7.js.map +0 -7
  319. package/dist/templates/demo-store/dist/worker/_assets/IBMPlexSerif-Text-YFMZNZW6.woff2 +0 -0
  320. package/dist/templates/demo-store/dist/worker/_assets/IBMPlexSerif-TextItalic-CS6L5H7S.woff2 +0 -0
  321. package/dist/templates/demo-store/dist/worker/index.js +0 -1385
  322. package/dist/templates/demo-store/dist/worker/index.js.map +0 -7
  323. package/dist/templates/demo-store/package.json +0 -67
  324. package/dist/templates/demo-store/playwright.config.ts +0 -109
  325. package/dist/templates/demo-store/postcss.config.js +0 -10
  326. package/dist/templates/demo-store/public/favicon.svg +0 -28
  327. package/dist/templates/demo-store/remix.env.d.ts +0 -40
  328. package/dist/templates/demo-store/remix.init/index.js +0 -25
  329. package/dist/templates/demo-store/remix.init/package.json +0 -7
  330. package/dist/templates/demo-store/server.ts +0 -73
  331. package/dist/templates/demo-store/styles/app.css +0 -182
  332. package/dist/templates/demo-store/tailwind.config.js +0 -70
  333. package/dist/templates/demo-store/tests/cart.test.ts +0 -70
  334. package/dist/templates/demo-store/tests/seo.test.ts +0 -36
  335. package/dist/templates/demo-store/tests/utils.ts +0 -100
  336. package/dist/templates/demo-store/tsconfig.json +0 -25
  337. package/dist/templates/hello-world/.cache/content-v2/sha512/13/f6/b7f804d45a961ca1e392429e75ad80f23ba46cbba0e960c6a70f8de81f3f3763af59651474176798d1a1a4bd2a5109b1d441f6d1c8ba070b678b38378adf +0 -1
  338. package/dist/templates/hello-world/.cache/content-v2/sha512/4b/d3/aedf0c5a14c0f852936adb81a3bbd15ad1d5d9964ffe11a40d56bbdb2f2a4c7588ffa1d1ee657a3c3be4f6e6194465365f5d4213ef3b4e5086aa4bf0a5a4 +0 -1
  339. package/dist/templates/hello-world/.cache/content-v2/sha512/fa/dd/9bc10a1cb1f145eabd96bdba509178e20484197fefd8469ace9f53bf277e875751db3c4dddf229807c48cbe8db19494fe2a5aab7d2a4b7ae8bebbd67509c +0 -1
  340. package/dist/templates/hello-world/.cache/index-v5/09/f6/fe4b05c4157320b8b59b3f84116195be0437d87357d743d21acd638a4606 +0 -2
  341. package/dist/templates/hello-world/.cache/index-v5/b3/75/d3e7a4a5df68530007409daf1d2e66ab789c8b658d1819d7e5fd183f5f57 +0 -2
  342. package/dist/templates/hello-world/.cache/index-v5/d0/c4/d960260ece228d28f70e317741b3f3f3df05c53956d870235837ae2b73b4 +0 -2
  343. package/dist/templates/hello-world/.eslintignore +0 -4
  344. package/dist/templates/hello-world/.eslintrc.js +0 -6
  345. package/dist/templates/hello-world/.graphqlrc.yml +0 -1
  346. package/dist/templates/hello-world/README.md +0 -20
  347. package/dist/templates/hello-world/_env +0 -6
  348. package/dist/templates/hello-world/_gitignore +0 -8
  349. package/dist/templates/hello-world/app/components/Layout.tsx +0 -15
  350. package/dist/templates/hello-world/app/components/index.ts +0 -1
  351. package/dist/templates/hello-world/app/entry.client.tsx +0 -4
  352. package/dist/templates/hello-world/app/entry.server.tsx +0 -21
  353. package/dist/templates/hello-world/app/root.tsx +0 -212
  354. package/dist/templates/hello-world/app/routes/graphiql.tsx +0 -10
  355. package/dist/templates/hello-world/app/styles/app.css +0 -38
  356. package/dist/templates/hello-world/dist/client/build/_assets/app-NBPUE4H5.css +0 -1
  357. package/dist/templates/hello-world/dist/client/build/_assets/favicon-5FIZBM2K.svg +0 -28
  358. package/dist/templates/hello-world/dist/client/build/_shared/chunk-MEPKJ2VW.js +0 -2
  359. package/dist/templates/hello-world/dist/client/build/_shared/chunk-MEPKJ2VW.js.map +0 -7
  360. package/dist/templates/hello-world/dist/client/build/_shared/chunk-SYP5DAMV.js +0 -2
  361. package/dist/templates/hello-world/dist/client/build/_shared/chunk-SYP5DAMV.js.map +0 -7
  362. package/dist/templates/hello-world/dist/client/build/_shared/chunk-UWGFS4PS.js +0 -31
  363. package/dist/templates/hello-world/dist/client/build/_shared/chunk-UWGFS4PS.js.map +0 -7
  364. package/dist/templates/hello-world/dist/client/build/entry.client-YKLPLTIJ.js +0 -9
  365. package/dist/templates/hello-world/dist/client/build/entry.client-YKLPLTIJ.js.map +0 -7
  366. package/dist/templates/hello-world/dist/client/build/manifest-5BEA23FF.js +0 -1
  367. package/dist/templates/hello-world/dist/client/build/root-YMCCM3GG.js +0 -2
  368. package/dist/templates/hello-world/dist/client/build/root-YMCCM3GG.js.map +0 -7
  369. package/dist/templates/hello-world/dist/client/build/routes/graphiql-ZHVT5SA7.js +0 -2
  370. package/dist/templates/hello-world/dist/client/build/routes/graphiql-ZHVT5SA7.js.map +0 -7
  371. package/dist/templates/hello-world/dist/client/build/routes/index-TH4MKESG.js +0 -2
  372. package/dist/templates/hello-world/dist/client/build/routes/index-TH4MKESG.js.map +0 -7
  373. package/dist/templates/hello-world/dist/client/favicon.svg +0 -28
  374. package/dist/templates/hello-world/dist/worker/index.js +0 -172
  375. package/dist/templates/hello-world/dist/worker/index.js.map +0 -7
  376. package/dist/templates/hello-world/package.json +0 -41
  377. package/dist/templates/hello-world/public/favicon.svg +0 -28
  378. package/dist/templates/hello-world/remix.env.d.ts +0 -35
  379. package/dist/templates/hello-world/remix.init/index.js +0 -25
  380. package/dist/templates/hello-world/remix.init/package.json +0 -7
  381. package/dist/templates/hello-world/server.ts +0 -129
  382. package/dist/templates/hello-world/tsconfig.json +0 -25
  383. package/dist/tmp-create-app.js +0 -33
@@ -0,0 +1,47 @@
1
+ import path from 'path';
2
+ import recursiveReaddir from 'recursive-readdir';
3
+
4
+ const VIRTUAL_ROUTES_DIR = "virtual-routes/routes";
5
+ const VIRTUAL_ROOT = "virtual-routes/virtual-root";
6
+ const INDEX_SUFFIX = "/index";
7
+ async function addVirtualRoutes(config) {
8
+ const userRouteList = Object.values(config.routes);
9
+ const distPath = new URL("..", import.meta.url).pathname;
10
+ const virtualRoutesPath = path.join(distPath, VIRTUAL_ROUTES_DIR);
11
+ for (const absoluteFilePath of await recursiveReaddir(virtualRoutesPath)) {
12
+ const relativeFilePath = path.relative(virtualRoutesPath, absoluteFilePath);
13
+ const routePath = new URL(`file:///${relativeFilePath}`).pathname.replace(
14
+ /\.[jt]sx?$/,
15
+ ""
16
+ );
17
+ const isIndex = routePath.endsWith(INDEX_SUFFIX);
18
+ const normalizedVirtualRoutePath = isIndex ? routePath.slice(0, -INDEX_SUFFIX.length) || void 0 : routePath.slice(1).replace(/\$/g, ":").replace(/[\[\]]/g, "");
19
+ const hasUserRoute = userRouteList.some(
20
+ (r) => r.parentId === "root" && r.path === normalizedVirtualRoutePath
21
+ );
22
+ if (!hasUserRoute) {
23
+ const id = VIRTUAL_ROUTES_DIR + routePath;
24
+ config.routes[id] = {
25
+ id,
26
+ parentId: VIRTUAL_ROOT,
27
+ path: normalizedVirtualRoutePath,
28
+ index: isIndex || void 0,
29
+ caseSensitive: void 0,
30
+ file: path.relative(config.appDirectory, absoluteFilePath)
31
+ };
32
+ if (!config.routes[VIRTUAL_ROOT]) {
33
+ config.routes[VIRTUAL_ROOT] = {
34
+ id: VIRTUAL_ROOT,
35
+ path: "",
36
+ file: path.relative(
37
+ config.appDirectory,
38
+ path.join(distPath, VIRTUAL_ROOT + ".jsx")
39
+ )
40
+ };
41
+ }
42
+ }
43
+ }
44
+ return config;
45
+ }
46
+
47
+ export { VIRTUAL_ROOT, VIRTUAL_ROUTES_DIR, addVirtualRoutes };
@@ -0,0 +1,46 @@
1
+ import { describe, it, expect } from 'vitest';
2
+ import { addVirtualRoutes, VIRTUAL_ROOT, VIRTUAL_ROUTES_DIR } from './virtual-routes.js';
3
+
4
+ describe("virtual routes", () => {
5
+ it("adds virtual routes", async () => {
6
+ const config = {
7
+ appDirectory: new URL("../virtual-test", import.meta.url).pathname,
8
+ routes: {}
9
+ };
10
+ await addVirtualRoutes(config);
11
+ expect(config.routes[VIRTUAL_ROOT]).toMatchObject({
12
+ path: "",
13
+ id: VIRTUAL_ROOT,
14
+ file: "../virtual-routes/virtual-root.jsx"
15
+ });
16
+ expect(config.routes[VIRTUAL_ROUTES_DIR + "/index"]).toMatchObject({
17
+ parentId: VIRTUAL_ROOT,
18
+ file: "../" + VIRTUAL_ROUTES_DIR + "/index.tsx"
19
+ });
20
+ expect(config.routes[VIRTUAL_ROUTES_DIR + "/graphiql"]).toMatchObject({
21
+ parentId: VIRTUAL_ROOT,
22
+ file: "../" + VIRTUAL_ROUTES_DIR + "/graphiql.tsx"
23
+ });
24
+ });
25
+ it("skips existing routes", async () => {
26
+ const existingIndexRoute = {
27
+ id: "routes/index",
28
+ index: true,
29
+ parentId: "root",
30
+ path: void 0,
31
+ file: "user-app/routes/index.tsx"
32
+ };
33
+ const config = {
34
+ appDirectory: new URL("../virtual-test", import.meta.url).pathname,
35
+ routes: {
36
+ [existingIndexRoute.id]: existingIndexRoute
37
+ }
38
+ };
39
+ await addVirtualRoutes(config);
40
+ expect(config.routes[existingIndexRoute.id]).toMatchObject(
41
+ existingIndexRoute
42
+ );
43
+ expect(config.routes[VIRTUAL_ROUTES_DIR + "/index"]).toBeFalsy();
44
+ expect(Object.values(config.routes).length).toBeGreaterThan(2);
45
+ });
46
+ });
@@ -0,0 +1 @@
1
+ // This file is an entry point for tsup to copy the assets.
@@ -0,0 +1,207 @@
1
+ * {
2
+ box-sizing: border-box;
3
+ }
4
+
5
+ h1,
6
+ h2,
7
+ p {
8
+ margin: 0;
9
+ padding: 0;
10
+ }
11
+
12
+ h1 {
13
+ font-size: 3rem;
14
+ font-weight: 700;
15
+ line-height: 1.4;
16
+ }
17
+
18
+ h2 {
19
+ font-size: 1.2rem;
20
+ font-weight: 700;
21
+ line-height: 1.4;
22
+ }
23
+
24
+ p {
25
+ font-size: 1rem;
26
+ line-height: 1.4;
27
+ }
28
+
29
+ body {
30
+ padding: 0;
31
+ margin: 0;
32
+ background: #ffffff;
33
+ font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
34
+ Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
35
+
36
+ min-height: 100vh;
37
+ display: flex;
38
+ flex-direction: column;
39
+ }
40
+
41
+ header {
42
+ display: flex;
43
+ flex-direction: row;
44
+ padding: 14px 20px;
45
+ width: 100%;
46
+ height: 48px;
47
+ background: #ffffff;
48
+ align-items: center;
49
+ color: #5c5f62;
50
+ }
51
+
52
+ header nav {
53
+ display: flex;
54
+ flex-direction: row;
55
+ align-items: center;
56
+ gap: 1rem;
57
+ margin-left: auto;
58
+ }
59
+
60
+ header h1 {
61
+ font-size: 0.75rem;
62
+ margin-right: 20px;
63
+ }
64
+
65
+ header p {
66
+ font-size: 0.875rem;
67
+ border: 1.5px solid #d2d5d8;
68
+ border-radius: 4px;
69
+ padding: 1px;
70
+ }
71
+
72
+ main {
73
+ padding: 2rem;
74
+ max-width: 50rem;
75
+ margin: auto;
76
+ }
77
+
78
+ footer {
79
+ background: #f6f6f7;
80
+ }
81
+
82
+ footer div {
83
+ display: block;
84
+ max-width: 50rem;
85
+ padding: 2rem;
86
+ margin: auto;
87
+ }
88
+
89
+ footer a {
90
+ color: #5c5f62;
91
+ text-decoration: none;
92
+ }
93
+
94
+ main h1 {
95
+ color: #202223;
96
+ }
97
+
98
+ main a {
99
+ color: #475f91;
100
+ font-size: 16px;
101
+ position: relative;
102
+ }
103
+
104
+ main a::after {
105
+ content: url("data:image/svg+xml,%3Csvg width='18' height='24' viewBox='0 0 18 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4.45312 19.3828H13.9297C15.5703 19.3828 16.3828 18.5703 16.3828 16.9609V7.42188C16.3828 5.8125 15.5703 5 13.9297 5H4.45312C2.82031 5 2 5.80469 2 7.42188V16.9609C2 18.5781 2.82031 19.3828 4.45312 19.3828ZM4.46875 18.125C3.6875 18.125 3.25781 17.7109 3.25781 16.8984V7.48438C3.25781 6.67188 3.6875 6.25781 4.46875 6.25781H13.9141C14.6875 6.25781 15.125 6.67188 15.125 7.48438V16.8984C15.125 17.7109 14.6875 18.125 13.9141 18.125H4.46875ZM11.6406 14.1172C11.9844 14.1172 12.2188 13.8516 12.2188 13.4922V9.80469C12.2188 9.34375 11.9609 9.16406 11.5625 9.16406H7.85938C7.49219 9.16406 7.25781 9.39062 7.25781 9.73438C7.25781 10.0781 7.5 10.3047 7.875 10.3047H9.29688L10.4531 10.1797L9.23438 11.3125L6.35156 14.1953C6.24219 14.3047 6.17188 14.4609 6.17188 14.6172C6.17188 14.9688 6.39844 15.1953 6.74219 15.1953C6.92969 15.1953 7.07812 15.125 7.1875 15.0156L10.0625 12.1406L11.1875 10.9375L11.0703 12.1562V13.5078C11.0703 13.875 11.2969 14.1172 11.6406 14.1172Z' fill='%23475F91'/%3E%3C/svg%3E%0A");
106
+ vertical-align: middle;
107
+ }
108
+
109
+ main {
110
+ display: flex;
111
+ flex-direction: column;
112
+ gap: 1rem;
113
+ }
114
+
115
+ .Links ul {
116
+ margin: 0;
117
+ padding: 0 0.5rem;
118
+ list-style: none;
119
+ }
120
+
121
+ .Links li {
122
+ margin-bottom: 1rem;
123
+ }
124
+
125
+ .Links li::before {
126
+ content: '\25fc';
127
+ color: #5c5f62;
128
+ display: inline-block;
129
+ vertical-align: text-bottom;
130
+ width: 1.2rem;
131
+ font-size: 0.8rem;
132
+ }
133
+
134
+ .Links h2 {
135
+ margin-bottom: 0.5rem;
136
+ font-size: 1.5rem;
137
+ color: #44474a;
138
+ }
139
+
140
+ .Banner {
141
+ box-sizing: border-box;
142
+ display: flex;
143
+ flex-direction: column;
144
+ align-items: flex-start;
145
+ padding: 16px;
146
+ gap: 8px;
147
+ box-shadow: 0px 2px 0px rgba(0, 0, 0, 0.1);
148
+ border-radius: 8px;
149
+ font-style: normal;
150
+ font-size: 16px;
151
+ line-height: 24px;
152
+ color: #5c5f62;
153
+ border: 1px solid #d2d5d8;
154
+ background: #fafbfb;
155
+ }
156
+
157
+ .Banner div {
158
+ display: flex;
159
+ flex-direction: row;
160
+ align-items: center;
161
+ gap: 16px;
162
+ }
163
+
164
+ .Banner p {
165
+ padding-left: 48px;
166
+ }
167
+
168
+ .Banner code {
169
+ background: #f6f6f7;
170
+ border: 1px solid #d2d5d8;
171
+ font-family: monospace;
172
+ border-radius: 4px;
173
+ padding: 2px;
174
+ }
175
+
176
+ .Banner > h2 {
177
+ font-size: 1rem;
178
+ }
179
+
180
+ .Banner.ErrorBanner {
181
+ color: #981c06;
182
+ border: 1px solid #fda9a5;
183
+ background: #fee9e8;
184
+ }
185
+
186
+ .Banner.ErrorBanner span {
187
+ background: #fef4f4;
188
+ border: 1px solid #fda9a5;
189
+ border-radius: 4px;
190
+ padding: 2px;
191
+ color: #74180c;
192
+ }
193
+
194
+ .Banner.ErrorBanner a {
195
+ color: #b92409;
196
+ }
197
+
198
+ .Banner.ErrorBanner a::after {
199
+ content: url("data:image/svg+xml,%3Csvg width='18' height='24' viewBox='0 0 18 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4.45312 19.3828H13.9297C15.5703 19.3828 16.3828 18.5703 16.3828 16.9609V7.42188C16.3828 5.8125 15.5703 5 13.9297 5H4.45312C2.82031 5 2 5.80469 2 7.42188V16.9609C2 18.5781 2.82031 19.3828 4.45312 19.3828ZM4.46875 18.125C3.6875 18.125 3.25781 17.7109 3.25781 16.8984V7.48438C3.25781 6.67188 3.6875 6.25781 4.46875 6.25781H13.9141C14.6875 6.25781 15.125 6.67188 15.125 7.48438V16.8984C15.125 17.7109 14.6875 18.125 13.9141 18.125H4.46875ZM11.6406 14.1172C11.9844 14.1172 12.2188 13.8516 12.2188 13.4922V9.80469C12.2188 9.34375 11.9609 9.16406 11.5625 9.16406H7.85938C7.49219 9.16406 7.25781 9.39062 7.25781 9.73438C7.25781 10.0781 7.5 10.3047 7.875 10.3047H9.29688L10.4531 10.1797L9.23438 11.3125L6.35156 14.1953C6.24219 14.3047 6.17188 14.4609 6.17188 14.6172C6.17188 14.9688 6.39844 15.1953 6.74219 15.1953C6.92969 15.1953 7.07812 15.125 7.1875 15.0156L10.0625 12.1406L11.1875 10.9375L11.0703 12.1562V13.5078C11.0703 13.875 11.2969 14.1172 11.6406 14.1172Z' fill='%23B92409'/%3E%3C/svg%3E%0A");
200
+ vertical-align: middle;
201
+ color: red;
202
+ }
203
+
204
+ .Banner.ErrorBanner > h2 {
205
+ font-size: 1rem;
206
+ color: #74180c;
207
+ }
@@ -0,0 +1,7 @@
1
+ const HydrogenLogoBaseBW = (props) => <svg width={81} height={82} fill="none" xmlns="http://www.w3.org/2000/svg" {...props}>
2
+ <path d="M39.955 81.28 2.138 61.19l12.933-6.818 14.562 7.733 12.218-6.441L27.29 47.93l12.933-6.833L78.04 61.189l-12.934 6.817L51.35 60.7l-12.236 6.457 13.774 7.308-12.933 6.817Z" fill="#000" />
3
+ <path fillRule="evenodd" clipRule="evenodd" d="m40.225 0 39.953 21.227-15.073 7.945-13.756-7.308-10.096 5.328 13.775 7.309-15.075 7.945L0 21.22l15.073-7.945 14.562 7.732 10.078-5.313-14.56-7.731L40.225 0ZM29.426 7.967l14.564 7.734L29.63 23.27 15.07 15.537l-10.794 5.69 35.68 18.956 10.793-5.688-13.773-7.307L51.352 19.6l13.757 7.308 10.794-5.69-35.68-18.956-10.797 5.704Z" fill="#000" />
4
+ </svg>;
5
+ export {
6
+ HydrogenLogoBaseBW
7
+ };
@@ -0,0 +1,13 @@
1
+ const HydrogenLogoBaseColor = (props) => <svg width={76} height={81} fill="none" xmlns="http://www.w3.org/2000/svg" {...props}>
2
+ <path d="M37.817 80.149 0 60.057l12.934-6.817 14.561 7.733 12.218-6.441-14.561-7.733 12.933-6.833 37.818 20.091-12.934 6.817-13.757-7.307-12.236 6.457 13.775 7.308-12.934 6.817Z" fill="#000" />
3
+ <path d="M37.818 40.183 0 20.092l12.934-6.818 14.562 7.733 12.218-6.441-14.562-7.733L38.086 0l37.817 20.091-12.934 6.817-13.756-7.307-12.236 6.457 13.774 7.308-12.933 6.817Z" fill="url(#a)" />
4
+ <defs><linearGradient id="a" x1={74.48} y1={21.654} x2={18.735} y2={51.694} gradientUnits="userSpaceOnUse">
5
+ <stop offset={2e-3} stopColor="#430470" />
6
+ <stop offset={0.385} stopColor="#8E01F0" />
7
+ <stop offset={0.635} stopColor="#354CF6" />
8
+ <stop offset={1} stopColor="#01FFFF" />
9
+ </linearGradient></defs>
10
+ </svg>;
11
+ export {
12
+ HydrogenLogoBaseColor
13
+ };
@@ -0,0 +1,47 @@
1
+ const IconBanner = (props) => <svg width={32} height={36} fill="none" xmlns="http://www.w3.org/2000/svg" {...props}>
2
+ <path fill="#000" d="M0 9.726h1.455v1.455H0z" />
3
+ <path fill="#E172AC" d="M1.454 9.726h1.455v1.455H1.454zM13.091 3.907h1.455v1.455h-1.455zM24.727 9.726h1.455v1.455h-1.455zM24.727 24.271h1.455v1.455h-1.455zM13.091 30.09h1.455v1.455h-1.455zM1.454 24.271h1.455v1.455H1.454z" />
4
+ <path fill="#AC217D" d="M5.818 9.726h1.455v1.455H5.818zM17.454 3.907h1.455v1.455h-1.455zM29.091 9.726h1.455v1.455h-1.455zM21.818 16.998h1.455v1.455h-1.455zM21.818 18.454h1.455v1.455h-1.455zM20.363 24.271h1.455v1.455h-1.455zM20.363 11.181h1.455v1.455h-1.455zM29.091 24.271h1.455v1.455h-1.455zM17.455 30.09h1.455v1.455h-1.455zM5.818 24.271h1.455v1.455H5.818z" />
5
+ <path fill="#000" d="M7.273 9.726h1.455v1.455H7.273zM1.454 8.271h1.455v1.455H1.454zM5.818 8.271h1.455v1.455H5.818zM2.909 6.817h1.455v1.455H2.909z" />
6
+ <path fill="#D43694" d="M2.909 9.726h1.455v1.455H2.909zM14.546 3.907h1.455v1.455h-1.455zM26.182 9.726h1.455v1.455h-1.455zM18.909 11.181h1.455v1.455h-1.455z" />
7
+ <path fill="#D43694" d="M20.363 12.635h1.455v1.455h-1.455zM20.363 14.09h1.455v1.455h-1.455z" />
8
+ <path fill="#D43694" d="M20.363 15.544h1.455v1.455h-1.455zM11.636 11.181h1.455v1.455h-1.455z" />
9
+ <path fill="#D43694" d="M10.182 12.635h1.455v1.455h-1.455zM10.182 14.09h1.455v1.455h-1.455z" />
10
+ <path fill="#D43694" d="M10.182 15.544h1.455v1.455h-1.455zM10.182 19.908h1.455v1.455h-1.455z" />
11
+ <path fill="#D43694" d="M10.182 21.362h1.455v1.455h-1.455zM10.182 22.817h1.455v1.455h-1.455z" />
12
+ <path fill="#D43694" d="M11.636 24.271h1.455v1.455h-1.455zM20.363 19.908h1.455v1.455h-1.455z" />
13
+ <path fill="#D43694" d="M20.363 21.362h1.455v1.455h-1.455zM20.363 22.817h1.455v1.455h-1.455z" />
14
+ <path fill="#D43694" d="M18.909 24.271h1.455v1.455h-1.455zM26.182 24.271h1.455v1.455h-1.455zM14.545 30.09H16v1.455h-1.455zM2.909 24.271h1.455v1.455H2.909zM2.909 11.181h1.455v1.455H2.909zM14.546 5.361h1.455v1.455h-1.455zM26.182 11.181h1.455v1.455h-1.455zM26.182 25.726h1.455v1.455h-1.455z" />
15
+ <path fill="#D43694" d="M14.546 31.544h1.455v1.455h-1.455zM2.909 25.726h1.455v1.455H2.909z" />
16
+ <path fill="#000" d="M4.364 6.817h1.455v1.455H4.364z" />
17
+ <path fill="#D43694" d="M4.364 9.726h1.455v1.455H4.364zM16 3.907h1.455v1.455H16zM27.637 9.726h1.455v1.455h-1.455zM27.637 24.271h1.455v1.455h-1.455zM16 30.09h1.455v1.455H16zM4.364 24.271h1.455v1.455H4.364z" />
18
+ <path fill="#D43694" d="M4.364 11.181h1.455v1.455H4.364zM16 5.361h1.455v1.455H16zM27.637 11.181h1.455v1.455h-1.455zM27.637 25.726h1.455v1.455h-1.455zM16 31.544h1.455v1.455H16zM4.364 25.726h1.455v1.455H4.364z" />
19
+ <path fill="#E172AC" d="M2.909 8.271h1.455v1.455H2.909zM14.545 2.453H16v1.455h-1.455zM26.182 8.271h1.455v1.455h-1.455zM26.182 22.817h1.455v1.455h-1.455zM14.546 28.635h1.455v1.455h-1.455zM2.909 22.817h1.455v1.455H2.909z" />
20
+ <path fill="#AC217D" d="M2.909 12.635h1.455v1.455H2.909zM14.545 6.817H16v1.455h-1.455zM26.182 12.635h1.455v1.455h-1.455zM26.182 27.181h1.455v1.455h-1.455zM14.546 32.998h1.455v1.455h-1.455zM2.909 27.181h1.455v1.455H2.909z" />
21
+ <path fill="#E172AC" d="M4.364 8.271h1.455v1.455H4.364zM16 2.453h1.455v1.455H16zM27.637 8.271h1.455v1.455h-1.455zM27.637 22.817h1.455v1.455h-1.455zM16 28.635h1.455v1.455H16zM4.364 22.817h1.455v1.455H4.364z" />
22
+ <path fill="#AC217D" d="M4.364 12.635h1.455v1.455H4.364zM16 6.817h1.455v1.455H16zM27.637 12.635h1.455v1.455h-1.455zM27.637 27.181h1.455v1.455h-1.455zM16 32.998h1.455v1.455H16zM4.364 27.181h1.455v1.455H4.364z" />
23
+ <path fill="#000" d="M2.909 14.09h1.455v1.455H2.909zM4.364 14.09h1.455v1.455H4.364zM0 11.181h1.455v1.455H0z" />
24
+ <path fill="#000" d="M1.454 12.635h1.455v1.455H1.454z" />
25
+ <path fill="#E172AC" d="M1.454 11.181h1.455v1.455H1.454zM8.727 16.998h1.455v1.455H8.727zM10.182 11.181h1.455v1.455h-1.455zM10.182 24.271h1.455v1.455h-1.455zM8.727 18.454h1.455v1.455H8.727zM13.091 5.361h1.455v1.455h-1.455zM24.727 11.181h1.455v1.455h-1.455zM24.727 25.726h1.455v1.455h-1.455zM13.091 31.544h1.455v1.455h-1.455zM1.454 25.726h1.455v1.455H1.454z" />
26
+ <path fill="#AC217D" d="M5.818 11.181h1.455v1.455H5.818zM17.454 5.361h1.455v1.455h-1.455zM29.091 11.181h1.455v1.455h-1.455zM29.091 25.726h1.455v1.455h-1.455zM17.454 31.544h1.455v1.455h-1.455zM5.818 25.726h1.455v1.455H5.818z" />
27
+ <path fill="#000" d="M5.818 12.635h1.455v1.455H5.818zM7.273 11.181h1.455v1.455H7.273zM0 24.271h1.455v1.455H0zM23.273 9.726h1.455v1.455h-1.455zM7.273 24.271h1.455v1.455H7.273zM30.546 9.726h1.455v1.455h-1.455zM1.455 22.817H2.91v1.455H1.455zM24.727 8.271h1.455v1.455h-1.455zM5.818 22.817h1.455v1.455H5.818zM29.091 8.271h1.455v1.455h-1.455zM2.909 21.362h1.455v1.455H2.909z" />
28
+ <path fill="#000" d="M26.182 6.817h1.455v1.455h-1.455zM4.364 21.362h1.455v1.455H4.364zM27.637 6.817h1.455v1.455h-1.455zM2.909 28.635h1.455v1.455H2.909zM26.182 14.09h1.455v1.455h-1.455zM4.364 28.635h1.455v1.455H4.364zM27.637 14.09h1.455v1.455h-1.455zM1.454 27.181h1.455v1.455H1.454zM24.727 12.635h1.455v1.455h-1.455zM0 25.726h1.455v1.455H0z" />
29
+ <path fill="#000" d="M23.273 11.181h1.455v1.455h-1.455zM5.818 27.181h1.455v1.455H5.818zM29.091 12.635h1.455v1.455h-1.455zM7.273 25.726h1.455v1.455H7.273zM30.546 11.181h1.455v1.455h-1.455zM23.273 24.271h1.455v1.455h-1.455zM11.636 30.09h1.455v1.455h-1.455zM11.636 3.907h1.455v1.455h-1.455zM18.909 30.09h1.455v1.455h-1.455zM30.546 24.271h1.455v1.455h-1.455zM13.091 28.635h1.455v1.455h-1.455zM18.909 3.907h1.455v1.455h-1.455zM17.454 28.635h1.455v1.455h-1.455z" />
30
+ <path fill="#000" d="M24.727 22.817h1.455v1.455h-1.455zM14.546 27.181h1.455v1.455h-1.455zM13.091 2.453h1.455v1.455h-1.455z" />
31
+ <path fill="#000" d="M16 27.181h1.455v1.455H16zM29.091 22.817h1.455v1.455h-1.455zM14.545 34.454H16v1.455h-1.455zM17.455 2.453h1.455v1.455h-1.455zM16 34.454h1.455v1.455H16zM26.182 21.362h1.455v1.455h-1.455zM13.091 32.998h1.455v1.455h-1.455zM14.546.998h1.455v1.455h-1.455zM11.636 31.544h1.455v1.455h-1.455zM27.637 21.362h1.455v1.455h-1.455zM17.454 32.998h1.455v1.455h-1.455z" />
32
+ <path fill="#000" d="M16 .998h1.455v1.455H16zM18.909 31.544h1.455v1.455h-1.455zM26.182 28.635h1.455v1.455h-1.455zM14.546 8.271h1.455v1.455h-1.455zM27.637 28.635h1.455v1.455h-1.455z" />
33
+ <path fill="#000" d="M16 8.271h1.455v1.455H16zM24.727 27.181h1.455v1.455h-1.455zM13.091 6.817h1.455v1.455h-1.455zM23.273 25.726h1.455v1.455h-1.455zM11.636 5.361h1.455v1.455h-1.455zM29.091 27.181h1.455v1.455h-1.455zM17.455 6.817h1.455v1.455h-1.455zM30.546 25.726h1.455v1.455h-1.455zM18.909 5.361h1.455v1.455h-1.455zM8.727 11.181h1.455v1.455H8.727z" />
34
+ <path fill="#000" d="M8.727 12.635h1.455v1.455H8.727zM8.727 19.908h1.455v1.455H8.727zM21.818 19.908h1.455v1.455h-1.455zM21.818 11.181h1.455v1.455h-1.455z" />
35
+ <path fill="#000" d="M8.727 21.362h1.455v1.455H8.727zM21.818 21.362h1.455v1.455h-1.455zM8.727 14.09h1.455v1.455H8.727zM21.818 12.635h1.455v1.455h-1.455zM8.727 22.817h1.455v1.455H8.727z" />
36
+ <path fill="#000" d="M8.727 24.271h1.455v1.455H8.727zM7.273 16.998h1.455v1.455H7.273zM21.818 22.817h1.455v1.455h-1.455zM23.273 16.998h1.455v1.455h-1.455z" />
37
+ <path fill="#000" d="M21.818 24.271h1.455v1.455h-1.455zM8.727 15.544h1.455v1.455H8.727zM21.818 14.09h1.455v1.455h-1.455zM7.273 18.454h1.455v1.455H7.273z" />
38
+ <path fill="#000" d="M21.818 15.544h1.455v1.455h-1.455zM23.273 18.454h1.455v1.455h-1.455zM11.636 12.635h1.455v1.455h-1.455zM11.636 19.908h1.455v1.455h-1.455zM18.909 19.908h1.455v1.455h-1.455zM18.909 12.635h1.455v1.455h-1.455zM11.636 14.09h1.455v1.455h-1.455z" />
39
+ <path fill="#000" d="M11.636 21.362h1.455v1.455h-1.455zM18.909 21.362h1.455v1.455h-1.455zM18.909 14.09h1.455v1.455h-1.455zM10.182 16.998h1.455v1.455h-1.455zM20.363 16.998h1.455v1.455h-1.455z" />
40
+ <path fill="#000" d="M11.636 15.544h1.455v1.455h-1.455zM11.636 22.817h1.455v1.455h-1.455zM18.909 22.817h1.455v1.455h-1.455zM18.909 15.544h1.455v1.455h-1.455zM13.091 24.271h1.455v1.455h-1.455zM17.454 24.271h1.455v1.455h-1.455zM13.091 25.726h1.455v1.455h-1.455zM17.454 25.726h1.455v1.455h-1.455zM11.636 25.726h1.455v1.455h-1.455zM20.363 25.726h1.455v1.455h-1.455z" />
41
+ <path fill="#000" d="M10.182 25.726h1.455v1.455h-1.455zM18.909 25.726h1.455v1.455h-1.455zM10.182 18.454h1.455v1.455h-1.455zM20.363 18.454h1.455v1.455h-1.455zM10.182 9.726h1.455v1.455h-1.455zM18.909 9.726h1.455v1.455h-1.455z" />
42
+ <path fill="#000" d="M11.636 9.726h1.455v1.455h-1.455zM20.363 9.726h1.455v1.455h-1.455zM13.091 9.726h1.455v1.455h-1.455zM17.454 9.726h1.455v1.455h-1.455z" />
43
+ <path fill="#000" d="M13.091 11.181h1.455v1.455h-1.455zM17.454 11.181h1.455v1.455h-1.455z" />
44
+ </svg>;
45
+ export {
46
+ IconBanner
47
+ };
@@ -0,0 +1,4 @@
1
+ const IconDiscord = (props) => <svg width={26} height={20} fill="none" xmlns="http://www.w3.org/2000/svg" {...props}><path d="M21.19 1.675A19.91 19.91 0 0 0 16.03 0c-.223.415-.482.973-.661 1.418a18.355 18.355 0 0 0-5.72 0A15.367 15.367 0 0 0 8.98 0a19.844 19.844 0 0 0-5.165 1.68C.55 6.776-.336 11.747.106 16.647c2.167 1.67 4.266 2.686 6.33 3.35.51-.724.964-1.495 1.356-2.306a13.149 13.149 0 0 1-2.135-1.073c.179-.137.354-.28.523-.428 4.116 1.989 8.588 1.989 12.655 0 .172.148.347.291.524.428a13.12 13.12 0 0 1-2.139 1.075c.392.81.844 1.582 1.356 2.306 2.066-.664 4.167-1.68 6.333-3.352.52-5.68-.887-10.606-3.718-14.973ZM8.353 13.635c-1.235 0-2.249-1.192-2.249-2.643 0-1.45.992-2.644 2.25-2.644 1.257 0 2.27 1.191 2.248 2.644.002 1.45-.991 2.642-2.249 2.642Zm8.311 0c-1.235 0-2.249-1.192-2.249-2.643 0-1.45.992-2.644 2.25-2.644 1.257 0 2.27 1.191 2.248 2.644 0 1.45-.991 2.642-2.249 2.642Z" fill="#5C5F62" /></svg>;
2
+ export {
3
+ IconDiscord
4
+ };
@@ -0,0 +1,20 @@
1
+ const IconError = (props) => <svg width={32} height={32} fill="none" xmlns="http://www.w3.org/2000/svg" {...props}>
2
+ <path fill="#000" d="M6 18h20v2H6zM30 8h2v16h-2zM0 8h2v16H0z" />
3
+ <path fill="#F63310" d="M2 8h2v16H2zM4 6h2v4H4zM6 4h2v4H6zM8 2h2v4H8zM24 4h2v2h-2zM26 6h2v2h-2z" />
4
+ <path fill="#74170B" d="M26 24h2v2h-2zM28 22h2v2h-2zM24 26h2v2h-2zM22 28h2v2h-2z" />
5
+ <path fill="#971C06" d="M6 26h2v2H6zM4 24h2v2H4zM4 18h2v2H4zM26 18h2v2h-2zM26 12h2v2h-2z" />
6
+ <path fill="#D62C0D" d="M26 8h2v4h-2zM4 10h2v2H4zM8 6h18v2H8zM10 4h14v2H10zM6 8h20v2H6z" />
7
+ <path fill="#971C06" d="M28 10h2v12h-2zM8 28h14v2H8z" />
8
+ <path fill="#D62C0D" d="M26 20h2v2h-2zM4 20h2v2H4z" />
9
+ <path fill="#F63310" d="M4 12h2v2H4z" />
10
+ <path fill="#971C06" d="M6 20h20v2H6z" />
11
+ <path fill="#F63310" d="M28 8h2v2h-2zM10 2h14v2H10zM6 10h20v2H6z" />
12
+ <path fill="#D62C0D" d="M4 22h24v2H4zM6 24h20v2H6zM8 26h16v2H8z" />
13
+ <path fill="#000" d="M6 12h20v2H6z" />
14
+ <path fill="#fff" d="M6 14h20v2H6zM6 16h2v2H6z" />
15
+ <path fill="#ECEDEE" d="M8 16h18v2H8z" />
16
+ <path fill="#000" d="M4 14h2v4H4zM26 14h2v4h-2zM2 6h2v2H2zM4 4h2v2H4zM6 2h2v2H6zM24 2h2v2h-2zM26 4h2v2h-2zM26 26h2v2h-2zM24 28h2v2h-2zM6 28h2v2H6zM4 26h2v2H4zM2 24h2v2H2zM8 30h16v2H8zM28 6h2v2h-2zM28 24h2v2h-2zM8 0h16v2H8z" />
17
+ </svg>;
18
+ export {
19
+ IconError
20
+ };
@@ -0,0 +1,4 @@
1
+ const IconGithub = (props) => <svg width={20} height={20} fill="none" xmlns="http://www.w3.org/2000/svg" {...props}><path fillRule="evenodd" clipRule="evenodd" d="M9.997 0C4.473 0 0 4.588 0 10.253c0 4.537 2.862 8.369 6.835 9.727.5.09.687-.218.687-.487 0-.243-.012-1.05-.012-1.91-2.512.475-3.161-.627-3.361-1.204-.113-.295-.6-1.205-1.025-1.448-.35-.192-.85-.667-.013-.68.788-.012 1.35.744 1.537 1.052.9 1.55 2.337 1.114 2.912.845.087-.666.35-1.115.637-1.371-2.224-.256-4.548-1.14-4.548-5.062 0-1.115.387-2.038 1.024-2.756-.1-.256-.45-1.307.1-2.717 0 0 .838-.269 2.75 1.051.8-.23 1.649-.346 2.499-.346.85 0 1.699.115 2.499.346 1.912-1.333 2.749-1.05 2.749-1.05.55 1.409.2 2.46.1 2.716.637.718 1.025 1.628 1.025 2.756 0 3.934-2.337 4.806-4.561 5.062.362.32.674.936.674 1.897 0 1.371-.012 2.473-.012 2.82 0 .268.187.589.687.486a10.036 10.036 0 0 0 4.93-3.74 10.45 10.45 0 0 0 1.88-5.987C19.993 4.588 15.52 0 9.997 0Z" fill="#5C5F62" /></svg>;
2
+ export {
3
+ IconGithub
4
+ };
@@ -0,0 +1,4 @@
1
+ const IconTwitter = (props) => <svg width={23} height={20} fill="none" xmlns="http://www.w3.org/2000/svg" {...props}><path d="M20.53 4.979c.014.217.014.434.014.653C20.544 12.305 15.824 20 7.193 20v-.004C4.643 20 2.146 19.214 0 17.732c.37.048.743.072 1.117.073 2.113.002 4.165-.76 5.828-2.166-2.008-.04-3.77-1.45-4.384-3.506a4.356 4.356 0 0 0 2.118-.087C2.49 11.57.915 9.5.915 7.096v-.064a4.414 4.414 0 0 0 2.13.632C.983 6.18.348 3.229 1.593.92c2.382 3.155 5.897 5.073 9.67 5.276-.378-1.754.139-3.592 1.358-4.825 1.89-1.912 4.862-1.814 6.639.22A9.023 9.023 0 0 0 22.24.364c-.35 1.17-1.084 2.162-2.063 2.793a8.822 8.822 0 0 0 2.694-.795A9.97 9.97 0 0 1 20.53 4.98Z" fill="#5C5F62" /></svg>;
2
+ export {
3
+ IconTwitter
4
+ };
@@ -0,0 +1,6 @@
1
+ function Layout(props) {
2
+ return <div className="hydrogen-virtual-route">{props.children}</div>;
3
+ }
4
+ export {
5
+ Layout
6
+ };
@@ -0,0 +1,5 @@
1
+ import { graphiqlLoader } from "@shopify/hydrogen";
2
+ const loader = graphiqlLoader;
3
+ export {
4
+ loader
5
+ };
@@ -0,0 +1,140 @@
1
+ import { useLoaderData } from "@remix-run/react";
2
+ import { HydrogenLogoBaseBW } from "../components/HydrogenLogoBaseBW.jsx";
3
+ import { HydrogenLogoBaseColor } from "../components/HydrogenLogoBaseColor.jsx";
4
+ import { IconDiscord } from "../components/IconDiscord.jsx";
5
+ import { IconGithub } from "../components/IconGithub.jsx";
6
+ import { IconTwitter } from "../components/IconTwitter.jsx";
7
+ import { IconBanner } from "../components/IconBanner.jsx";
8
+ import { IconError } from "../components/IconError.jsx";
9
+ import favicon from "../assets/favicon.svg";
10
+ const meta = () => {
11
+ return {
12
+ title: "Hydrogen",
13
+ description: "A custom storefront powered by Hydrogen",
14
+ charset: "utf-8",
15
+ viewport: "width=device-width,initial-scale=1"
16
+ };
17
+ };
18
+ const links = () => [
19
+ {
20
+ rel: "icon",
21
+ type: "image/svg+xml",
22
+ href: favicon
23
+ }
24
+ ];
25
+ async function loader({ context }) {
26
+ const layout = await context.storefront.query(LAYOUT_QUERY);
27
+ return { layout };
28
+ }
29
+ const HYDROGEN_SHOP_ID = "gid://shopify/Shop/55145660472";
30
+ function CatchBoundary() {
31
+ return <ErrorPage />;
32
+ }
33
+ function ErrorBoundary() {
34
+ return <ErrorPage />;
35
+ }
36
+ function Index() {
37
+ const data = useLoaderData();
38
+ const { name: shopName, id: shopId } = data.layout.shop;
39
+ const configDone = shopId !== HYDROGEN_SHOP_ID;
40
+ return <><Layout shopName={shopName}>
41
+ {configDone ? <HydrogenLogoBaseColor /> : <HydrogenLogoBaseBW />}
42
+ <h1>
43
+ {"Hello, "}
44
+ {shopName || "Hydrogen"}
45
+ </h1>
46
+ <p>Welcome to your new custom storefront</p>
47
+ <section className="Banner">
48
+ <div>
49
+ <IconBanner />
50
+ <h2>Configure storefront token</h2>
51
+ </div>
52
+ <p>
53
+ {"You\u2019re seeing this because you have not yet configured your storefront token. To get started, edit "}
54
+ {` `}
55
+ <code>.env</code>
56
+ {". Then, create your first route with the file "}
57
+ {` `}
58
+ <code>/app/routes/index.jsx</code>
59
+ {". Learn more about"}
60
+ {` `}
61
+ <a href="https://shopify.dev/custom-storefronts/hydrogen/getting-started/quickstart">{"connecting a\xA0storefront"}</a>
62
+ {"."}
63
+ </p>
64
+ </section>
65
+ <ResourcesLinks />
66
+ </Layout></>;
67
+ }
68
+ function ErrorPage() {
69
+ return <><Layout shopName="Hydrogen">
70
+ <HydrogenLogoBaseBW />
71
+ <h1>Hello, Hydrogen</h1>
72
+ <p>Welcome to your new custom storefront</p>
73
+ <section className="Banner ErrorBanner">
74
+ <div>
75
+ <IconError />
76
+ <h2>{"There\u2019s a problem with your storefront"}</h2>
77
+ </div>
78
+ <p>
79
+ {"Check your domain and API token in your "}
80
+ <code>.env</code>
81
+ {" file. Read the documentation on"}
82
+ {` `}
83
+ <a target="_blank" rel="norefferer noopener" href="https://shopify.dev/custom-storefronts/hydrogen/getting-started/quickstart">{"how to configure your\xA0storefront"}</a>
84
+ {"."}
85
+ </p>
86
+ </section>
87
+ <ResourcesLinks />
88
+ </Layout></>;
89
+ }
90
+ function ResourcesLinks() {
91
+ return <><section className="Links">
92
+ <h2>Start building</h2>
93
+ <ul>
94
+ <li><a target="_blank" rel="norefferer noopener" href="https://shopify.dev/custom-storefronts/hydrogen/building/collection-page">Collection template</a></li>
95
+ <li><a target="_blank" rel="norefferer noopener" href="https://shopify.dev/custom-storefronts/hydrogen/building/product-details-page">Product template</a></li>
96
+ <li><a target="_blank" rel="norefferer noopener" href="https://shopify.dev/custom-storefronts/hydrogen/building/cart">Cart</a></li>
97
+ </ul>
98
+ <h2>Resources</h2>
99
+ <ul>
100
+ <li><a target="_blank" rel="norefferer noopener" href="https://shopify.dev/custom-storefronts/hydrogen">Hydrogen docs</a></li>
101
+ <li><a target="_blank" rel="norefferer noopener" href="https://shopify.dev/custom-storefronts/hydrogen/project-structure">Remix and project structure</a></li>
102
+ <li><a target="_blank" rel="norefferer noopener" href="https://shopify.dev/custom-storefronts/hydrogen/data-fetching/fetch-data">Data queries and fetching</a></li>
103
+ </ul>
104
+ </section></>;
105
+ }
106
+ function Layout({
107
+ shopName,
108
+ children
109
+ }) {
110
+ return <>
111
+ <header>
112
+ <h1>{shopName?.toUpperCase()}</h1>
113
+ <p>{"\xA0Dev Mode\xA0"}</p>
114
+ <nav>
115
+ <a href="https://discord.com/invite/shopifydevs"><IconDiscord /></a>
116
+ <a href="https://github.com/Shopify/hydrogen"><IconGithub /></a>
117
+ <a href="https://twitter.com/shopifydevs?lang=en"><IconTwitter /></a>
118
+ </nav>
119
+ </header>
120
+ <main>{children}</main>
121
+ <footer><div><a href="https://shopify.com" target="_blank" rel="noreferrer noopener">Powered by Shopify</a></div></footer>
122
+ </>;
123
+ }
124
+ const LAYOUT_QUERY = `#graphql
125
+ query layout {
126
+ shop {
127
+ name
128
+ id
129
+ }
130
+ }
131
+ `;
132
+ export {
133
+ CatchBoundary,
134
+ ErrorBoundary,
135
+ HYDROGEN_SHOP_ID,
136
+ Index as default,
137
+ links,
138
+ loader,
139
+ meta
140
+ };
@@ -0,0 +1,38 @@
1
+ import {
2
+ Links,
3
+ Meta,
4
+ Outlet,
5
+ Scripts,
6
+ ScrollRestoration
7
+ } from "@remix-run/react";
8
+ import styles from "./assets/styles.css";
9
+ import favicon from "./assets/favicon.svg";
10
+ import { Layout } from "./components/Layout.jsx";
11
+ const links = () => {
12
+ return [
13
+ { rel: "stylesheet", href: styles },
14
+ { rel: "icon", type: "image/svg+xml", href: favicon }
15
+ ];
16
+ };
17
+ const meta = () => ({
18
+ charset: "utf-8",
19
+ viewport: "width=device-width,initial-scale=1"
20
+ });
21
+ function App() {
22
+ return <html lang="en">
23
+ <head>
24
+ <Meta />
25
+ <Links />
26
+ </head>
27
+ <body>
28
+ <Layout><Outlet /></Layout>
29
+ <ScrollRestoration />
30
+ <Scripts />
31
+ </body>
32
+ </html>;
33
+ }
34
+ export {
35
+ App as default,
36
+ links,
37
+ meta
38
+ };