@shopify/cli-hydrogen 4.0.0-alpha.8 → 4.0.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 (584) hide show
  1. package/dist/commands/hydrogen/build.d.ts +20 -0
  2. package/dist/commands/hydrogen/build.js +42 -37
  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 +57 -61
  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 → generator-templates}/routes/[robots.txt].tsx +2 -1
  20. package/dist/{templates/demo-store/app → generator-templates}/routes/[sitemap.xml].tsx +6 -4
  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 → generator-templates}/routes/policies/$policyHandle.tsx +8 -37
  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 +161 -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/00/06/24c89d558123b63259495c8099c0f959320fa2e54d907b3544baca5e0e6116c6c817c33423097ae1ba93f9506f6870cc37df232b376f8c264573b7aa72b5 +0 -1
  74. package/dist/templates/demo-store/.cache/content-v2/sha512/02/76/13bbea15bb42b81a204b0dc5f14726e0bfa8d012a7b284f887cc2e3c92195d6b07a78f199f990b311ca5fafa9079563503cdd81808cd9b7e496d86c72732 +0 -1
  75. package/dist/templates/demo-store/.cache/content-v2/sha512/08/56/c9a478b8c5c2fbfb6eed219f0861db568eceecbb45155124491ca25125ca421aac7e1b10d29151e5294a776ae10e02e01dc2da3561da793d111c4f908502 +0 -1
  76. package/dist/templates/demo-store/.cache/content-v2/sha512/11/0c/195071c290a61e22dd825b300c9f93e5315b2effefc3e5545440ac704d629e177bc877333ce73232ac72703bcc69fb425632d84b3caefe7f5c0fd12537ee +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/15/61/a4cf6ccc2120c217346ecee6299fddf06e5555f6c9371305f118fdb382ff88588b31ec36b034ed785d36e3b18a8e8751702bbed4e101a97396f92ea35612 +0 -1
  79. package/dist/templates/demo-store/.cache/content-v2/sha512/17/08/03dabbacd40d4a2b132018a520d1dbcf29ffb2c659bbe01cb91f700202d5016ab4104831b95a05b98535549be4a6520ddcd6504ba361692549a5cd0458ee +0 -1
  80. package/dist/templates/demo-store/.cache/content-v2/sha512/27/a0/d277ff364ced6a2d01639f1e2b8675ef95eff3a4aa4d2fda0990392526e0f18def66116a8623096d1bdafabe1dc8efc56ef0956054b3370dfa9ad6596a29 +0 -1
  81. package/dist/templates/demo-store/.cache/content-v2/sha512/28/53/96d2a5c3d4b08a7191e545d4d961f7690f814a331dc8efcc11e45854fbccd04f825ec8d3a1070b05aca51dd63e06c778316395446055cc3cfc90c8b30615 +0 -1
  82. package/dist/templates/demo-store/.cache/content-v2/sha512/28/7c/c71b0c6367bdf7307a8061fe1c4568c9f1e9603d835b6fc917fe8042535a867c37154e35376a01ad6bdb3c2d6f29b88b41902fd6f20b1227e02081682d01 +0 -1
  83. package/dist/templates/demo-store/.cache/content-v2/sha512/29/2e/db501d168869cc6b7d5e51bfbf399e920773ed905b9e2b782ebfb29c5260f05b67d0b7d4599e8c5666253789d545ecfdfdb9e020da8ac262d99d0e69e5b0 +0 -1
  84. package/dist/templates/demo-store/.cache/content-v2/sha512/2b/05/f4684d5f729778c589ac1c471d21826137034b5f1163d67118f6cd0e1672e92cc3e2408a50da44d156bd3e574f7512a2245558ecdce896af8924cf966c73 +0 -1
  85. package/dist/templates/demo-store/.cache/content-v2/sha512/32/c2/8f62057f7082cddef5cd3d912d1a4c2c8eb9be28edefeb3d398181606f5bed84eac45a2edd8bb390d05278ca3ff6964e7594d8be9a0200cc8193f3dbb025 +0 -1
  86. package/dist/templates/demo-store/.cache/content-v2/sha512/35/3c/f46f8adbcf210210bac8ab00267ab16c16393ab4a95920f69c4452b298a83c9785d3d2c2bb4a63937cb4eed028197a18f0d2929024ebae18b0751f07ebf5 +0 -1
  87. package/dist/templates/demo-store/.cache/content-v2/sha512/36/3e/ece5cc6633a23301aa4f05fc1efddd8876aec2d8bf7afe504526e2866ed67263e99bffbb1e0d99a65622a7246f9d662217032aca47f70b6f0f13b75e7df1 +0 -1
  88. package/dist/templates/demo-store/.cache/content-v2/sha512/37/19/de54f68ea7b2a79f86d12ec1107e99d04217817fb6de9a5ba2dc5cdd16d16e1dda4cc9f7cf2b6ece5a6330f47ca20fa27a08aeffc17eb23fd11399e601fd +0 -1
  89. package/dist/templates/demo-store/.cache/content-v2/sha512/39/3e/7839c7699ead2ece5a07c6f0116dcbdd4cd5fce00cb6fafb349d3ab4ff6fdb626f056c05f1dd25ad453996209e5a1870f7b937714791c3fe2c43887d8dfa +0 -1
  90. package/dist/templates/demo-store/.cache/content-v2/sha512/46/04/af285aee74d96b28b24f75d7911de65e6c7bb26475ab5219fe5308028fda55060cf45650dfa09c0731ec73ece453c1e24e0c38715e8d4c5c80fd6365a1f4 +0 -1
  91. package/dist/templates/demo-store/.cache/content-v2/sha512/46/1c/c69c5b9150a9f76dff13c0d6a768540636e6569f4f3f56795d1b4c494045d5908674f292815212ac52e6d8a597b4ad35783506113f195a09f1057f09f00c +0 -1
  92. package/dist/templates/demo-store/.cache/content-v2/sha512/46/70/1f052bc78bf18274412ed7e7305d42fb50cbe5a6a0fbf62e0f9a775e667a541bc17352850fa8759a26f51b3459cfc6834fbf4a8b15527dc432be6ca76852 +0 -1
  93. package/dist/templates/demo-store/.cache/content-v2/sha512/4b/48/ca635670e7d1b1a5550d32f51389a5754234da55c6d7c900f348c8bf1ccc84bdcefc620e08979b7aa1d04a49a1138b46346f126d20c0126eb0c3261deb5b +0 -1
  94. package/dist/templates/demo-store/.cache/content-v2/sha512/51/ab/e165384df6374c7b2d0ebebc8642ecb0e0c14f7c5b57970ec5d2e17f7d1643e0b01eda69e5ffbefde85ecba6d613bcc5175c5564e36bfb73d966c8ea4153 +0 -1
  95. package/dist/templates/demo-store/.cache/content-v2/sha512/54/86/917224aeb3e04e19a51534244f5ed28f3529d85276452f52af9af3657798246c97a0948bcf62c707394ab80f0062a87e7079bd71c05e0d16f927091617d2 +0 -1
  96. package/dist/templates/demo-store/.cache/content-v2/sha512/56/bf/57423492125064302f4b06c3e3ebb8c0263ad049865c299eedb7026b56de4cc3d0790bc370d0fe1bc448cb8df31f38a8fe3f6644b91d9f88e85764205ef2 +0 -1
  97. package/dist/templates/demo-store/.cache/content-v2/sha512/65/a8/8322f339f24b58dc82746c373ccaff8847aa0f315db64e6efa4ae357e8a24d36d2664cf60d387582a6d60155940e6c72c6edd5a68ca3066d6173d4e04f13 +0 -1
  98. package/dist/templates/demo-store/.cache/content-v2/sha512/69/8b/226dd183d716cf3d632e447afc7dfab45d90664f1d0cbb51c9d69a65e9811484c7ba5940e045306824d1dffeb4abb8f2e51b4a3289d4afeee445cfc4e6af +0 -1
  99. package/dist/templates/demo-store/.cache/content-v2/sha512/69/e4/b067c1beb51c176168380eef47aee15632f7e50c24c8a66d9675fdecd8ac5bd6a294a634228e926894cc8b96789432103a7e6e01f3d58daf793178fc85ff +0 -1
  100. package/dist/templates/demo-store/.cache/content-v2/sha512/6b/6d/71211d4cebfd1e1c86788ede5784a53cf366a85f4e2646a300c820958a5219bfa5492b169d1cca1b431e946b41d15a526ee7f77db65a6e730dead281f777 +0 -1
  101. package/dist/templates/demo-store/.cache/content-v2/sha512/6e/ae/615197316ce9be03e9d63a85984c0752583325087b827210d5e681f52dd532738371a0dab76a42d3eb68c2f21808974d13847b5514a92450af40d578e973 +0 -1
  102. package/dist/templates/demo-store/.cache/content-v2/sha512/70/ec/37e2f634bc66cf777929488d19db018d338d1a1d2ccd338b1cb99d2d67a23dcaad2e46f77f63ce1280b7125038523a5d3ea42873780e8fb04cf408c08a4c +0 -1
  103. package/dist/templates/demo-store/.cache/content-v2/sha512/73/40/c822831f11f08a9ceea944d0145b072ba6164a3e2e75f98fda5437cda6dfddf9ca9450445c1f3236228d6259ac95e4cde9bb6e5996490ed00b7b13b06121 +0 -1
  104. package/dist/templates/demo-store/.cache/content-v2/sha512/75/02/c799e50ebd6988abb7b1090074668ce459a711a347069f905971e11126c3779d0f6c14b89f8350b7bf4f0712e8fbf48290205b1b5c2d427f21a80c32190c +0 -1
  105. package/dist/templates/demo-store/.cache/content-v2/sha512/77/fd/28951020ad9dc57df6e80976e714302d5b639eb69e28a184d9e4a4ee1322f39980bf3906f4176d62ab97d899bbced462187ea2a71a750694ac743c99cd9e +0 -1
  106. package/dist/templates/demo-store/.cache/content-v2/sha512/7a/4d/47fb716aef6fb90bd6883dccba9e1359e409cf1291762a0a2c6b7ad56097e67267b617ab8ebf3cb57ef256c00d22f778a8d6688df388ed181b866fcda132 +0 -1
  107. package/dist/templates/demo-store/.cache/content-v2/sha512/7b/15/d1749be8fa73f2f123e5e9a0807f343cdfa14fd263f9073fe7cd73352b7318b976a43687096a06acbbed2a2f0f86119d45cdd1e9ad6d09208c06b6232db2 +0 -1
  108. package/dist/templates/demo-store/.cache/content-v2/sha512/87/97/27cde85115daefca4a74cd9a2e87c66cf71e68ad7ca1a53c3d8a95f0b78dc50e89cc2d73aa293747b1b10650c9c703a97e17ecad24b46a50eac73aa0602f +0 -1
  109. package/dist/templates/demo-store/.cache/content-v2/sha512/88/76/d18fdfbb05293909609d42368642fc6da4bd138c5864ec2f721212b52e595b84ae46f48021ed3e6240edf443f78bdea557d56d700e3da848459ea3077a80 +0 -1
  110. package/dist/templates/demo-store/.cache/content-v2/sha512/8a/d1/ca384452cdc8a2fb92fa1c70a4db303dd5f9887475e0e4ddf4bc711b5ebceb684ba5fd8bf596c3d491ab8598bd52ffe20f98564f8110da0730f46f39e790 +0 -1
  111. package/dist/templates/demo-store/.cache/content-v2/sha512/8c/51/88e1fc4d8365cb6ad1a755e8bca81fbb64abb1c8ef08a8314471952910e0e29eadfa283d482233d500893a57b57470171ab98ebacb4b93780b37e7a87c93 +0 -1
  112. package/dist/templates/demo-store/.cache/content-v2/sha512/8f/81/8e238bb1d4654dcc554d661194c9415fe36dc6f20624dd26e47c0043f06ee69d1abd49947b11954508bfd01823fdf97a3ca9196521f05cb471473095c5c5 +0 -1
  113. package/dist/templates/demo-store/.cache/content-v2/sha512/91/39/2d6842760bb34dde16e9aad46162f546e8cab25d2440a69cb01bf4b2ed8fb3122490666d3eb9b70225259f7ed47e182bc6b83fe455647dde30d61cefa07d +0 -1
  114. package/dist/templates/demo-store/.cache/content-v2/sha512/93/6b/e60098157f6bff8ba570cab2ffd97a14983109006f7fa87e4432728366f96dfb19e957d28754daa45f1b6cb2421d26ab59bbd5ce5a448d6102e8e662403d +0 -1
  115. package/dist/templates/demo-store/.cache/content-v2/sha512/94/4a/a539de5a6348e4ecc4e05ea18301c0077a30ed452550660f8b13440a40f7e3858a03ef0aad25b559c49dbbe51455cc5d8e2a7b6c2b0c57e31875b5f8e6be +0 -1
  116. package/dist/templates/demo-store/.cache/content-v2/sha512/9e/2e/945fdc4a4fb8c2186645c71b48ef341e6f0da2a6b3ddd38761210fcf713c2249160f87387ac66547fa30732269fbf9ad6b24b6c6a50ae914284b96be8571 +0 -1
  117. package/dist/templates/demo-store/.cache/content-v2/sha512/9e/42/2999364d90a1a410573f5de0dea3765defcb24ccf54937c92995a3fcaf1fffe8fca06c15ab433d60b595617e89707ba1a292b66cbb9aae8d8e617bc59879 +0 -1
  118. package/dist/templates/demo-store/.cache/content-v2/sha512/9f/76/504ec4500726300092be4c0d162b3694e388778e8a59ace118572149b8f31da4661b3bee2f950ea6608154f0cc105422f39f92f8fddda49053712b5cc81d +0 -1
  119. package/dist/templates/demo-store/.cache/content-v2/sha512/9f/e5/f8840af1702b9e2e9005708f2513779d889a88d8d7379d5d93cf28390fd6c0300ba5cac0fe429d67a22ddeb884f85917c73f4ae286328a5cf437f568b73f +0 -1
  120. package/dist/templates/demo-store/.cache/content-v2/sha512/9f/f7/d8f3eb03a1a2eefae7d7e52b2a15391b7012eab4507c37385ccfcfcad13c095c93a99dcfc2a6a44b73ab2fa50be0e3b64ab1153f56bd833536b7a3f06852 +0 -1
  121. package/dist/templates/demo-store/.cache/content-v2/sha512/a0/92/dc5bc315864cebde3ccd84e2a2e4228d8f467aa14efdcc3ef13b8815abbf495afeccb531cc4e049fe4d81d0b3e5afc0139b4450fb2cfca2b2c82cdd450ac +0 -1
  122. package/dist/templates/demo-store/.cache/content-v2/sha512/ad/44/f00b1b89c5d7778be4cd40cff421c77e97a937e945491777256fafa6ac80cc334b7118b4248fd13c3cb7fb37d86e1b54afaf688b295542694f276d359082 +0 -1
  123. package/dist/templates/demo-store/.cache/content-v2/sha512/b0/02/9ef55507e114e4391048df8e43101c006d5b3852e33450030d3ba974d438dd3ac489b084b15445ff5e1747e642eda2d969a13c8ba5a778669f9ab019789a +0 -1
  124. package/dist/templates/demo-store/.cache/content-v2/sha512/ba/08/9238d2f1bec0536eed757ab6583e384da966814a1c83896409f032bb673a056d62bb6f3b8a5bef36d61daf0e15617154b106b3bbc721354690bc930bb649 +0 -1
  125. package/dist/templates/demo-store/.cache/content-v2/sha512/bb/58/6a8a15508eab54d23bb1ae0dc4e28925c945258fffbf51d126a8ad3413d5396b3b2211493be551641d5b55dbf0c84d34cc06de906c3127e84b04eb46080d +0 -1
  126. package/dist/templates/demo-store/.cache/content-v2/sha512/bc/33/6e26ece5ac53d9eac9ac8a192ef39faf2a587a5808253c659fb1d371c477fc8074d428c8d1929b0d85dd1fec66fc79ea6b9fcb01507e2efec75fb7fbc2cc +0 -1
  127. package/dist/templates/demo-store/.cache/content-v2/sha512/c2/66/bc5f0b229dcdcab36104e3a3b531e3adc88a84622db081d73664f13cd7f6f4639d94e0d85ec075309735d51aa30bb26ea05ccff534f7e1ced5bf8115077a +0 -1
  128. package/dist/templates/demo-store/.cache/content-v2/sha512/c3/02/833766a7cfde6705e73ecd14cfa40f18bb470af44b39b856473411d00b9bda679d93ff62e49267263318aba287a74a1395b7e1559e786d955a19d8ba5ad7 +0 -1
  129. package/dist/templates/demo-store/.cache/content-v2/sha512/c9/bf/f82a49d275c8c16097122d6c71e3e64e45902413b6973b56974ed0f03bf8e0974328cfb006067036348f9473ef241927a68562848a1bdb2a8a9ce7d3cd9d +0 -1
  130. package/dist/templates/demo-store/.cache/content-v2/sha512/d1/fd/7a54f9c08d3a6e60f396a8033b49ce9c1129e877eef39bfa18467b04cd39c6c94423ef7e099fde8a8cca3a2b405d4725d7b2d51abf2be59853454afebfc5 +0 -1
  131. package/dist/templates/demo-store/.cache/content-v2/sha512/da/84/b6d27e02f9b109d7cff3095b08e2e2ed1802c8b6829c98f6e297d1c404059f8bacfdc278afd07e2f81cbc487318396a3775037b678ab6aff9a5231c94c0d +0 -1
  132. package/dist/templates/demo-store/.cache/content-v2/sha512/e8/ae/9b467e1d23913d4584d9417875b3cdc25f6dfed8b228f3a0c818129010b778aae1af1eb200b015ab428e79afe0ef1061262392fbdb96ed7da95efbe7f758 +0 -1
  133. package/dist/templates/demo-store/.cache/content-v2/sha512/ec/30/c2d6a93b0ab69c9d176e1db911bc276c6b81ef13d4ac2241bf2b6824979a157817f26c8a508ca87697f89b98afd86e8d7203878bb02e60e8442ab4620d8c +0 -1
  134. package/dist/templates/demo-store/.cache/content-v2/sha512/ed/15/aabcbf6d4b36151e7bb25d8751396c6c22a4a38b0505f9b244a060634e97399617ba8936870dc4ad25a3a1ad1fb1e4428d9989b2d52ff61070bfbca5ef1a +0 -1
  135. package/dist/templates/demo-store/.cache/content-v2/sha512/fd/f3/986b7ee5ea5ad1d89af5c08de69d43c025b54381092e0a19fd7e7a1e0352552aa85c056315ce5e11a46ec75a252b1a44e2083abb73cd6df8407dfdb0ac48 +0 -1
  136. package/dist/templates/demo-store/.cache/index-v5/06/7e/7376a38676aa7f0543ab03fc451602dab8ad66e6ddebc44d94ee6f5c1df2 +0 -2
  137. package/dist/templates/demo-store/.cache/index-v5/06/84/719070270981ac7d003eefa98569d499d2d93dd2f1828da9825b87d03160 +0 -2
  138. package/dist/templates/demo-store/.cache/index-v5/08/b4/0d9cf6db265587df0990c07ef4bc1e61fa9fe85d6cfe4d6cbbf839c2313c +0 -2
  139. package/dist/templates/demo-store/.cache/index-v5/09/f6/fe4b05c4157320b8b59b3f84116195be0437d87357d743d21acd638a4606 +0 -2
  140. package/dist/templates/demo-store/.cache/index-v5/0a/75/d3baf53012b62018cb60557f47601d810ec57c564bdc0b24c4990c73a833 +0 -2
  141. package/dist/templates/demo-store/.cache/index-v5/0c/43/721b2c2b054af973286c2ea3c51c612d347365682b5aae5b9e98554f91e1 +0 -2
  142. package/dist/templates/demo-store/.cache/index-v5/12/83/1a44e36774d9014fe186e18a3691e1ec3f37f2c30c22d38787a3cd157d7f +0 -2
  143. package/dist/templates/demo-store/.cache/index-v5/13/bd/14a326bd4cb6fb280eb85ecca60d6519738bf7e80df5285ec626d129baf3 +0 -2
  144. package/dist/templates/demo-store/.cache/index-v5/19/b1/b0877b4141a2ee6f7c173e2407c0b26958c0919238934a89a03049397aec +0 -2
  145. package/dist/templates/demo-store/.cache/index-v5/1b/6a/418ff1309326b48db3963d5ad40eacb0728d138b7f24896390e484b34c50 +0 -2
  146. package/dist/templates/demo-store/.cache/index-v5/24/d9/e0e8006f3c8deb17314475a674698161e207f116d9056bf0e1aabfa6c430 +0 -2
  147. package/dist/templates/demo-store/.cache/index-v5/28/f4/466108ec4c6619222c94f178cc3962ed49f5f9a1e3783ad55335de0cdad3 +0 -2
  148. package/dist/templates/demo-store/.cache/index-v5/2e/ae/45167cd92f49c852d660e05a29b7484c886b3c0579fb9c148162b1a88fb6 +0 -2
  149. package/dist/templates/demo-store/.cache/index-v5/35/95/be51ab071b6bd2259e4acb91185c5e0affeee223c15a822ba226607d5616 +0 -2
  150. package/dist/templates/demo-store/.cache/index-v5/36/74/12368a4a642be74c83dfdb5eaca244dc624ca78c3528edc49262807f9f96 +0 -2
  151. package/dist/templates/demo-store/.cache/index-v5/37/56/4cbfef349acf26ffb05aa7f17742913d7bd956c920a5bb1941ca0dda3a22 +0 -2
  152. package/dist/templates/demo-store/.cache/index-v5/3b/e5/5841b3445af43a34c7b560d6cf329ade1bfb64584b85fbb10ac4a7313ef4 +0 -2
  153. package/dist/templates/demo-store/.cache/index-v5/40/67/0807c50d176836338cf5fe4864622d377a143dc97f0a86a702bf11dd7d72 +0 -2
  154. package/dist/templates/demo-store/.cache/index-v5/45/4b/1a3af253b3e2ef123d3872ad54d71865cc788ff5373a00414d2ae0243421 +0 -2
  155. package/dist/templates/demo-store/.cache/index-v5/4f/8a/4672c73b9b76b90b7b378fbf9bc1a09426d0b5dbe97404e1f1f5a354013c +0 -2
  156. package/dist/templates/demo-store/.cache/index-v5/51/da/70f3331e7c62bab563cf9f86297b1bda6f6215420807d7710aaee0b8ca5d +0 -2
  157. package/dist/templates/demo-store/.cache/index-v5/55/0e/4666f091383137a5168d8052b246b3a7a28e05215dc7d8ff7f6b921f0142 +0 -2
  158. package/dist/templates/demo-store/.cache/index-v5/58/93/287077465c80a2bfba306f218e51893019895137562df4a116326a0b222a +0 -2
  159. package/dist/templates/demo-store/.cache/index-v5/68/63/f781b7764101dfe1c192f68e1083513974e2396c9db609adf220a983bd88 +0 -2
  160. package/dist/templates/demo-store/.cache/index-v5/68/f1/4a98caa6e2ab43e78781b99c7833cab4e722cd716bf9718e001a43efb27b +0 -2
  161. package/dist/templates/demo-store/.cache/index-v5/7d/de/0d76288297eecd2ad4b07dd881631b481b19a83f7c9d36cfa4f967332943 +0 -2
  162. package/dist/templates/demo-store/.cache/index-v5/7e/12/528dc5a6aebfe1fb1d5b4b7d56097f25291dd9454e0ab8faa0a26f296815 +0 -2
  163. package/dist/templates/demo-store/.cache/index-v5/7e/bf/17c5f07b52df7946e14e733afa8f3880a40c1032bd3fb307cae4319e0fa8 +0 -2
  164. package/dist/templates/demo-store/.cache/index-v5/81/59/14da935263d86e18f99d2391d6731d29cd2d5c0d8c81c65293816e6ad32a +0 -2
  165. package/dist/templates/demo-store/.cache/index-v5/85/85/0475166b36ce12e75c5a6352b12ea2fa872f696b8161dd08fdfab09a7273 +0 -2
  166. package/dist/templates/demo-store/.cache/index-v5/88/bd/84904435de02c12b5b01c5aadd782e65a48d44006d98b864e01961a109dc +0 -2
  167. package/dist/templates/demo-store/.cache/index-v5/88/f6/729e4bad26ebd2b792dee6d1f96f87546ff9c4fa95518f603627fdd1126f +0 -2
  168. package/dist/templates/demo-store/.cache/index-v5/8a/7c/f5287da63fd3884889fef7019b2679f9a53ce5a268097295682ddad5131b +0 -2
  169. package/dist/templates/demo-store/.cache/index-v5/95/40/bed10ab9e6081915bc6dc1ffb23a589f407c22ab7d254453f0b3ce53e5f5 +0 -2
  170. package/dist/templates/demo-store/.cache/index-v5/96/b8/090abc56d6e9489d08af9564fb75d34477730aa1ece14ad85ba516549f2b +0 -2
  171. package/dist/templates/demo-store/.cache/index-v5/9b/e4/8aa4e95d52644490afdb862c05cb2dccb9f5c1aa45157f3af5c37aad080a +0 -2
  172. package/dist/templates/demo-store/.cache/index-v5/a1/e7/85ee850c85c329791d2123dd8231464fa27317290756b459012830d0f57e +0 -2
  173. package/dist/templates/demo-store/.cache/index-v5/a2/27/f2e299e50a8a3b2b54a89bb3be85f3118081b3c6cfed704bb7d2802e2a49 +0 -2
  174. package/dist/templates/demo-store/.cache/index-v5/a2/88/971871174c14875c70ca7bc9cea8d6b01465c1716d99440b059fa493947c +0 -2
  175. package/dist/templates/demo-store/.cache/index-v5/aa/57/05b67f08f71909d263fe9c357786097f5683394dbd65b0e4da2f9aa25288 +0 -2
  176. package/dist/templates/demo-store/.cache/index-v5/ac/25/d778b282ab78dbafcc1b4fb19695aed368081c76fa680140b89af08b07b1 +0 -2
  177. package/dist/templates/demo-store/.cache/index-v5/af/79/e80586a8b4bd0086246d97823d95bd64c77ad44b1fae591fdcd3883f776e +0 -2
  178. package/dist/templates/demo-store/.cache/index-v5/b3/75/d3e7a4a5df68530007409daf1d2e66ab789c8b658d1819d7e5fd183f5f57 +0 -2
  179. package/dist/templates/demo-store/.cache/index-v5/b8/22/805af62bf21b63052b47f2f85322cb615ee786c214c0abc63b593a9f80ac +0 -2
  180. package/dist/templates/demo-store/.cache/index-v5/b8/67/17d551f86553b2a3a30c80b1d9797cbfcaa3d00f5239f39c1727c4d4fe8e +0 -2
  181. package/dist/templates/demo-store/.cache/index-v5/bc/52/538f70c9e2857f944f17c9121f6018d5c26ba916801b78d75484b130cd78 +0 -2
  182. package/dist/templates/demo-store/.cache/index-v5/c1/77/182e74b8e456fd321a98e8b23f5616eaf2968ccc0dd0eeff016624a89534 +0 -2
  183. package/dist/templates/demo-store/.cache/index-v5/c2/b6/58c9b05294374187ca9a342d46ed1b1f9e0afaf619acf88014f7f1a5dd8b +0 -2
  184. package/dist/templates/demo-store/.cache/index-v5/c6/72/887059f60c91b6fa41fbdab6bc1e1b6f4e3596cadd7a22457466fc1c2f67 +0 -2
  185. package/dist/templates/demo-store/.cache/index-v5/c8/52/09bfbca72b45aec745fc339c27986edefa85e40bd69113275a6ecd6495e9 +0 -2
  186. package/dist/templates/demo-store/.cache/index-v5/cb/f3/c8983d3f6b148ff6b70a42e0c3ccc4ca2f368df0aca086b8f0279d49f5be +0 -2
  187. package/dist/templates/demo-store/.cache/index-v5/d0/c4/d960260ece228d28f70e317741b3f3f3df05c53956d870235837ae2b73b4 +0 -2
  188. package/dist/templates/demo-store/.cache/index-v5/d2/7b/9476cfbc06c75a311a1951bcdea3b843d3f8763c916468901c3cd85ae7a4 +0 -2
  189. package/dist/templates/demo-store/.cache/index-v5/d7/2f/11fb6fd9a383d1edb40e2a774ca2de45a4f4b2c02e3f10d772427ef813d1 +0 -2
  190. package/dist/templates/demo-store/.cache/index-v5/d7/a8/e21243c97a68bff4874453358b21815d4dc4c804b63fce7cba9cc567c3d6 +0 -2
  191. package/dist/templates/demo-store/.cache/index-v5/db/34/e258d66ddeae0e8df2f3a92f0fc0a0472adc9b48c8d2f38087a828da4bc0 +0 -2
  192. package/dist/templates/demo-store/.cache/index-v5/de/8a/31224d2c63a17ccc13c25e35f4e5882c9a5f5553a3ffeb916c84aa73a15d +0 -2
  193. package/dist/templates/demo-store/.cache/index-v5/e0/9c/a50143959e2a05f23db12f6e7f9982a0889c4105004c9f58115f9fdb19e0 +0 -2
  194. package/dist/templates/demo-store/.cache/index-v5/f3/45/ed5a71628f7babbcd96f9d316ba1a9a7cdea5be1ef54d931ed5d6fcbfc21 +0 -2
  195. package/dist/templates/demo-store/.cache/index-v5/f4/20/fefac33b4499a27824ee7ef5a84779df38eca55b00ec3046fcb028efb593 +0 -2
  196. package/dist/templates/demo-store/.cache/index-v5/f6/1d/25c4d10714262d4559d2c43d3e64ebfc038d37b0edbbf02246bdd6dcdacb +0 -2
  197. package/dist/templates/demo-store/.cache/index-v5/f8/f2/017d33a8105299b5a1d72ea80b7cce0d4bafbcd8409437a212735325631a +0 -2
  198. package/dist/templates/demo-store/.cache/index-v5/fd/f2/f7f55dae9bf6b65ea883eb44dc2fd24a2d2a97c5b68cb559255c6574d239 +0 -2
  199. package/dist/templates/demo-store/.editorconfig +0 -8
  200. package/dist/templates/demo-store/.eslintignore +0 -4
  201. package/dist/templates/demo-store/.eslintrc.js +0 -16
  202. package/dist/templates/demo-store/.graphqlrc.yml +0 -1
  203. package/dist/templates/demo-store/.prettierignore +0 -2
  204. package/dist/templates/demo-store/_env +0 -6
  205. package/dist/templates/demo-store/_gitignore +0 -13
  206. package/dist/templates/demo-store/app/components/AccountAddressBook.tsx +0 -97
  207. package/dist/templates/demo-store/app/components/AccountDetails.tsx +0 -41
  208. package/dist/templates/demo-store/app/components/AddToCartButton.tsx +0 -42
  209. package/dist/templates/demo-store/app/components/Breadcrumbs.tsx +0 -36
  210. package/dist/templates/demo-store/app/components/Button.tsx +0 -56
  211. package/dist/templates/demo-store/app/components/Cart.tsx +0 -431
  212. package/dist/templates/demo-store/app/components/CartLoading.tsx +0 -50
  213. package/dist/templates/demo-store/app/components/CountrySelector.tsx +0 -180
  214. package/dist/templates/demo-store/app/components/Drawer.tsx +0 -115
  215. package/dist/templates/demo-store/app/components/FeaturedCollections.tsx +0 -54
  216. package/dist/templates/demo-store/app/components/FeaturedProducts.tsx +0 -116
  217. package/dist/templates/demo-store/app/components/FeaturedSection.tsx +0 -39
  218. package/dist/templates/demo-store/app/components/GenericError.tsx +0 -58
  219. package/dist/templates/demo-store/app/components/Grid.tsx +0 -44
  220. package/dist/templates/demo-store/app/components/Hero.tsx +0 -130
  221. package/dist/templates/demo-store/app/components/Icon.tsx +0 -253
  222. package/dist/templates/demo-store/app/components/Input.tsx +0 -24
  223. package/dist/templates/demo-store/app/components/Layout.tsx +0 -492
  224. package/dist/templates/demo-store/app/components/Link.tsx +0 -46
  225. package/dist/templates/demo-store/app/components/Modal.tsx +0 -46
  226. package/dist/templates/demo-store/app/components/NotFound.tsx +0 -22
  227. package/dist/templates/demo-store/app/components/OrderCard.tsx +0 -85
  228. package/dist/templates/demo-store/app/components/Pagination.tsx +0 -277
  229. package/dist/templates/demo-store/app/components/ProductCard.tsx +0 -145
  230. package/dist/templates/demo-store/app/components/ProductGallery.tsx +0 -114
  231. package/dist/templates/demo-store/app/components/ProductGrid.tsx +0 -93
  232. package/dist/templates/demo-store/app/components/ProductSwimlane.tsx +0 -30
  233. package/dist/templates/demo-store/app/components/Skeleton.tsx +0 -24
  234. package/dist/templates/demo-store/app/components/SortFilter.tsx +0 -411
  235. package/dist/templates/demo-store/app/components/Text.tsx +0 -192
  236. package/dist/templates/demo-store/app/components/index.ts +0 -28
  237. package/dist/templates/demo-store/app/data/countries.ts +0 -194
  238. package/dist/templates/demo-store/app/data/index.ts +0 -1027
  239. package/dist/templates/demo-store/app/entry.client.tsx +0 -4
  240. package/dist/templates/demo-store/app/entry.server.tsx +0 -26
  241. package/dist/templates/demo-store/app/hooks/useCartFetchers.tsx +0 -14
  242. package/dist/templates/demo-store/app/hooks/useIsHydrated.tsx +0 -12
  243. package/dist/templates/demo-store/app/lib/const.ts +0 -10
  244. package/dist/templates/demo-store/app/lib/placeholders.ts +0 -242
  245. package/dist/templates/demo-store/app/lib/seo/common.tsx +0 -367
  246. package/dist/templates/demo-store/app/lib/seo/debugger.tsx +0 -175
  247. package/dist/templates/demo-store/app/lib/seo/image.tsx +0 -32
  248. package/dist/templates/demo-store/app/lib/seo/index.ts +0 -4
  249. package/dist/templates/demo-store/app/lib/seo/seo.tsx +0 -24
  250. package/dist/templates/demo-store/app/lib/seo/types.ts +0 -84
  251. package/dist/templates/demo-store/app/lib/session.server.ts +0 -57
  252. package/dist/templates/demo-store/app/lib/type.ts +0 -21
  253. package/dist/templates/demo-store/app/lib/utils.ts +0 -310
  254. package/dist/templates/demo-store/app/root.tsx +0 -279
  255. package/dist/templates/demo-store/app/routes/$.tsx +0 -7
  256. package/dist/templates/demo-store/app/routes/$lang/$.tsx +0 -1
  257. package/dist/templates/demo-store/app/routes/$lang/[robots.txt].tsx +0 -1
  258. package/dist/templates/demo-store/app/routes/$lang/[sitemap.xml].tsx +0 -1
  259. package/dist/templates/demo-store/app/routes/$lang/account/__private/address/$id.tsx +0 -1
  260. package/dist/templates/demo-store/app/routes/$lang/account/__private/edit.tsx +0 -1
  261. package/dist/templates/demo-store/app/routes/$lang/account/__private/logout.ts +0 -1
  262. package/dist/templates/demo-store/app/routes/$lang/account/__private/orders.$id.tsx +0 -1
  263. package/dist/templates/demo-store/app/routes/$lang/account/__public/activate.$id.$activationToken.tsx +0 -6
  264. package/dist/templates/demo-store/app/routes/$lang/account/__public/login.tsx +0 -7
  265. package/dist/templates/demo-store/app/routes/$lang/account/__public/recover.tsx +0 -1
  266. package/dist/templates/demo-store/app/routes/$lang/account/__public/register.tsx +0 -6
  267. package/dist/templates/demo-store/app/routes/$lang/account/__public/reset.$id.$resetToken.tsx +0 -5
  268. package/dist/templates/demo-store/app/routes/$lang/account.tsx +0 -1
  269. package/dist/templates/demo-store/app/routes/$lang/api/countries.tsx +0 -1
  270. package/dist/templates/demo-store/app/routes/$lang/api/products.tsx +0 -1
  271. package/dist/templates/demo-store/app/routes/$lang/cart.tsx +0 -1
  272. package/dist/templates/demo-store/app/routes/$lang/collections/$collectionHandle.tsx +0 -1
  273. package/dist/templates/demo-store/app/routes/$lang/collections/all.tsx +0 -1
  274. package/dist/templates/demo-store/app/routes/$lang/collections/index.tsx +0 -1
  275. package/dist/templates/demo-store/app/routes/$lang/featured-products.tsx +0 -1
  276. package/dist/templates/demo-store/app/routes/$lang/index.tsx +0 -6
  277. package/dist/templates/demo-store/app/routes/$lang/journal/$journalHandle.tsx +0 -7
  278. package/dist/templates/demo-store/app/routes/$lang/journal/index.tsx +0 -1
  279. package/dist/templates/demo-store/app/routes/$lang/og-image.tsx +0 -1
  280. package/dist/templates/demo-store/app/routes/$lang/pages/$pageHandle.tsx +0 -1
  281. package/dist/templates/demo-store/app/routes/$lang/policies/$policyHandle.tsx +0 -1
  282. package/dist/templates/demo-store/app/routes/$lang/policies/index.tsx +0 -1
  283. package/dist/templates/demo-store/app/routes/$lang/products/$productHandle.tsx +0 -1
  284. package/dist/templates/demo-store/app/routes/$lang/products/index.tsx +0 -1
  285. package/dist/templates/demo-store/app/routes/$lang/search.tsx +0 -1
  286. package/dist/templates/demo-store/app/routes/account/__private/address/$id.tsx +0 -320
  287. package/dist/templates/demo-store/app/routes/account/__private/edit.tsx +0 -273
  288. package/dist/templates/demo-store/app/routes/account/__private/logout.ts +0 -25
  289. package/dist/templates/demo-store/app/routes/account/__private/orders.$id.tsx +0 -324
  290. package/dist/templates/demo-store/app/routes/account/__public/activate.$id.$activationToken.tsx +0 -218
  291. package/dist/templates/demo-store/app/routes/account/__public/login.tsx +0 -197
  292. package/dist/templates/demo-store/app/routes/account/__public/recover.tsx +0 -144
  293. package/dist/templates/demo-store/app/routes/account/__public/register.tsx +0 -184
  294. package/dist/templates/demo-store/app/routes/account/__public/reset.$id.$resetToken.tsx +0 -214
  295. package/dist/templates/demo-store/app/routes/account.tsx +0 -188
  296. package/dist/templates/demo-store/app/routes/api/countries.tsx +0 -22
  297. package/dist/templates/demo-store/app/routes/api/products.tsx +0 -116
  298. package/dist/templates/demo-store/app/routes/cart.tsx +0 -510
  299. package/dist/templates/demo-store/app/routes/collections/$collectionHandle.tsx +0 -301
  300. package/dist/templates/demo-store/app/routes/collections/all.tsx +0 -5
  301. package/dist/templates/demo-store/app/routes/collections/index.tsx +0 -188
  302. package/dist/templates/demo-store/app/routes/discounts.$code.tsx +0 -60
  303. package/dist/templates/demo-store/app/routes/featured-products.tsx +0 -58
  304. package/dist/templates/demo-store/app/routes/index.tsx +0 -241
  305. package/dist/templates/demo-store/app/routes/journal/$journalHandle.tsx +0 -141
  306. package/dist/templates/demo-store/app/routes/journal/index.tsx +0 -149
  307. package/dist/templates/demo-store/app/routes/og-image.tsx +0 -19
  308. package/dist/templates/demo-store/app/routes/pages/$pageHandle.tsx +0 -75
  309. package/dist/templates/demo-store/app/routes/policies/index.tsx +0 -97
  310. package/dist/templates/demo-store/app/routes/products/$productHandle.tsx +0 -551
  311. package/dist/templates/demo-store/app/routes/products/index.tsx +0 -148
  312. package/dist/templates/demo-store/app/routes/search.tsx +0 -198
  313. package/dist/templates/demo-store/app/styles/app.css +0 -4203
  314. package/dist/templates/demo-store/app/styles/custom-font.css +0 -13
  315. package/dist/templates/demo-store/dist/client/build/_assets/app-QCTC5PWY.css +0 -4203
  316. package/dist/templates/demo-store/dist/client/build/_assets/custom-font-COCMVHUB.css +0 -13
  317. package/dist/templates/demo-store/dist/client/build/_assets/favicon-5FIZBM2K.svg +0 -28
  318. package/dist/templates/demo-store/dist/client/build/_shared/chunk-3HDCZC7Z.js +0 -2
  319. package/dist/templates/demo-store/dist/client/build/_shared/chunk-3HDCZC7Z.js.map +0 -7
  320. package/dist/templates/demo-store/dist/client/build/_shared/chunk-6DT2GXU6.js +0 -2
  321. package/dist/templates/demo-store/dist/client/build/_shared/chunk-6DT2GXU6.js.map +0 -7
  322. package/dist/templates/demo-store/dist/client/build/_shared/chunk-6IZ7NY57.js +0 -2
  323. package/dist/templates/demo-store/dist/client/build/_shared/chunk-6IZ7NY57.js.map +0 -7
  324. package/dist/templates/demo-store/dist/client/build/_shared/chunk-6KICVRFE.js +0 -32
  325. package/dist/templates/demo-store/dist/client/build/_shared/chunk-6KICVRFE.js.map +0 -7
  326. package/dist/templates/demo-store/dist/client/build/_shared/chunk-6KPVFOMZ.js +0 -2
  327. package/dist/templates/demo-store/dist/client/build/_shared/chunk-6KPVFOMZ.js.map +0 -7
  328. package/dist/templates/demo-store/dist/client/build/_shared/chunk-6RKYTPO7.js +0 -27
  329. package/dist/templates/demo-store/dist/client/build/_shared/chunk-6RKYTPO7.js.map +0 -7
  330. package/dist/templates/demo-store/dist/client/build/_shared/chunk-6SSSJOFL.js +0 -68
  331. package/dist/templates/demo-store/dist/client/build/_shared/chunk-6SSSJOFL.js.map +0 -7
  332. package/dist/templates/demo-store/dist/client/build/_shared/chunk-AOOMA6GB.js +0 -2
  333. package/dist/templates/demo-store/dist/client/build/_shared/chunk-AOOMA6GB.js.map +0 -7
  334. package/dist/templates/demo-store/dist/client/build/_shared/chunk-AYENMH4R.js +0 -2
  335. package/dist/templates/demo-store/dist/client/build/_shared/chunk-AYENMH4R.js.map +0 -7
  336. package/dist/templates/demo-store/dist/client/build/_shared/chunk-AYHDHSL7.js +0 -2
  337. package/dist/templates/demo-store/dist/client/build/_shared/chunk-AYHDHSL7.js.map +0 -7
  338. package/dist/templates/demo-store/dist/client/build/_shared/chunk-DHA7C3MW.js +0 -2
  339. package/dist/templates/demo-store/dist/client/build/_shared/chunk-DHA7C3MW.js.map +0 -7
  340. package/dist/templates/demo-store/dist/client/build/_shared/chunk-DIIFYFWW.js +0 -2
  341. package/dist/templates/demo-store/dist/client/build/_shared/chunk-DIIFYFWW.js.map +0 -7
  342. package/dist/templates/demo-store/dist/client/build/_shared/chunk-DS7W4L22.js +0 -2
  343. package/dist/templates/demo-store/dist/client/build/_shared/chunk-DS7W4L22.js.map +0 -7
  344. package/dist/templates/demo-store/dist/client/build/_shared/chunk-GHUOM4KB.js +0 -7
  345. package/dist/templates/demo-store/dist/client/build/_shared/chunk-GHUOM4KB.js.map +0 -7
  346. package/dist/templates/demo-store/dist/client/build/_shared/chunk-ISW2I2ME.js +0 -2
  347. package/dist/templates/demo-store/dist/client/build/_shared/chunk-ISW2I2ME.js.map +0 -7
  348. package/dist/templates/demo-store/dist/client/build/_shared/chunk-J43VR2R2.js +0 -133
  349. package/dist/templates/demo-store/dist/client/build/_shared/chunk-J43VR2R2.js.map +0 -7
  350. package/dist/templates/demo-store/dist/client/build/_shared/chunk-KSKV5IK6.js +0 -20
  351. package/dist/templates/demo-store/dist/client/build/_shared/chunk-KSKV5IK6.js.map +0 -7
  352. package/dist/templates/demo-store/dist/client/build/_shared/chunk-MENU2OIC.js +0 -25
  353. package/dist/templates/demo-store/dist/client/build/_shared/chunk-MENU2OIC.js.map +0 -7
  354. package/dist/templates/demo-store/dist/client/build/_shared/chunk-MMBB6JJY.js +0 -2
  355. package/dist/templates/demo-store/dist/client/build/_shared/chunk-MMBB6JJY.js.map +0 -7
  356. package/dist/templates/demo-store/dist/client/build/_shared/chunk-RESK5RQB.js +0 -54
  357. package/dist/templates/demo-store/dist/client/build/_shared/chunk-RESK5RQB.js.map +0 -7
  358. package/dist/templates/demo-store/dist/client/build/_shared/chunk-TVK2D2ZT.js +0 -83
  359. package/dist/templates/demo-store/dist/client/build/_shared/chunk-TVK2D2ZT.js.map +0 -7
  360. package/dist/templates/demo-store/dist/client/build/_shared/chunk-TZEM5AYX.js +0 -2
  361. package/dist/templates/demo-store/dist/client/build/_shared/chunk-TZEM5AYX.js.map +0 -7
  362. package/dist/templates/demo-store/dist/client/build/_shared/chunk-US5NIJUM.js +0 -105
  363. package/dist/templates/demo-store/dist/client/build/_shared/chunk-US5NIJUM.js.map +0 -7
  364. package/dist/templates/demo-store/dist/client/build/_shared/chunk-V66AOKO6.js +0 -2
  365. package/dist/templates/demo-store/dist/client/build/_shared/chunk-V66AOKO6.js.map +0 -7
  366. package/dist/templates/demo-store/dist/client/build/_shared/chunk-WFLLVPNQ.js +0 -2
  367. package/dist/templates/demo-store/dist/client/build/_shared/chunk-WFLLVPNQ.js.map +0 -7
  368. package/dist/templates/demo-store/dist/client/build/_shared/chunk-WYHUKY3H.js +0 -2
  369. package/dist/templates/demo-store/dist/client/build/_shared/chunk-WYHUKY3H.js.map +0 -7
  370. package/dist/templates/demo-store/dist/client/build/_shared/chunk-WYLDLOSN.js +0 -2
  371. package/dist/templates/demo-store/dist/client/build/_shared/chunk-WYLDLOSN.js.map +0 -7
  372. package/dist/templates/demo-store/dist/client/build/_shared/chunk-X2L7EU2T.js +0 -2
  373. package/dist/templates/demo-store/dist/client/build/_shared/chunk-X2L7EU2T.js.map +0 -7
  374. package/dist/templates/demo-store/dist/client/build/_shared/chunk-X4LCECW4.js +0 -2
  375. package/dist/templates/demo-store/dist/client/build/_shared/chunk-X4LCECW4.js.map +0 -7
  376. package/dist/templates/demo-store/dist/client/build/_shared/chunk-XDBJQDOE.js +0 -2
  377. package/dist/templates/demo-store/dist/client/build/_shared/chunk-XDBJQDOE.js.map +0 -7
  378. package/dist/templates/demo-store/dist/client/build/_shared/chunk-YGLSE5Z5.js +0 -2
  379. package/dist/templates/demo-store/dist/client/build/_shared/chunk-YGLSE5Z5.js.map +0 -7
  380. package/dist/templates/demo-store/dist/client/build/_shared/chunk-YPGAXYYV.js +0 -24
  381. package/dist/templates/demo-store/dist/client/build/_shared/chunk-YPGAXYYV.js.map +0 -7
  382. package/dist/templates/demo-store/dist/client/build/_shared/chunk-ZNLABNO4.js +0 -66
  383. package/dist/templates/demo-store/dist/client/build/_shared/chunk-ZNLABNO4.js.map +0 -7
  384. package/dist/templates/demo-store/dist/client/build/entry.client-UGG4BFNY.js +0 -2
  385. package/dist/templates/demo-store/dist/client/build/entry.client-UGG4BFNY.js.map +0 -7
  386. package/dist/templates/demo-store/dist/client/build/manifest-483612AE.js +0 -1
  387. package/dist/templates/demo-store/dist/client/build/root-FWYSHVLP.js +0 -32
  388. package/dist/templates/demo-store/dist/client/build/root-FWYSHVLP.js.map +0 -7
  389. package/dist/templates/demo-store/dist/client/build/routes/$-T6CCBQXB.js +0 -2
  390. package/dist/templates/demo-store/dist/client/build/routes/$-T6CCBQXB.js.map +0 -7
  391. package/dist/templates/demo-store/dist/client/build/routes/$lang/$-RML44FPI.js +0 -2
  392. package/dist/templates/demo-store/dist/client/build/routes/$lang/$-RML44FPI.js.map +0 -7
  393. package/dist/templates/demo-store/dist/client/build/routes/$lang/[robots.txt]-Q6A4ELVO.js +0 -2
  394. package/dist/templates/demo-store/dist/client/build/routes/$lang/[robots.txt]-Q6A4ELVO.js.map +0 -7
  395. package/dist/templates/demo-store/dist/client/build/routes/$lang/[sitemap.xml]-XRXAWWFM.js +0 -2
  396. package/dist/templates/demo-store/dist/client/build/routes/$lang/[sitemap.xml]-XRXAWWFM.js.map +0 -7
  397. package/dist/templates/demo-store/dist/client/build/routes/$lang/account/__private/address/$id-NA5FIOXG.js +0 -2
  398. package/dist/templates/demo-store/dist/client/build/routes/$lang/account/__private/address/$id-NA5FIOXG.js.map +0 -7
  399. package/dist/templates/demo-store/dist/client/build/routes/$lang/account/__private/edit-IFFD5E3I.js +0 -2
  400. package/dist/templates/demo-store/dist/client/build/routes/$lang/account/__private/edit-IFFD5E3I.js.map +0 -7
  401. package/dist/templates/demo-store/dist/client/build/routes/$lang/account/__private/logout-W2VRZWGS.js +0 -2
  402. package/dist/templates/demo-store/dist/client/build/routes/$lang/account/__private/logout-W2VRZWGS.js.map +0 -7
  403. package/dist/templates/demo-store/dist/client/build/routes/$lang/account/__private/orders.$id-JLCBC7CQ.js +0 -2
  404. package/dist/templates/demo-store/dist/client/build/routes/$lang/account/__private/orders.$id-JLCBC7CQ.js.map +0 -7
  405. package/dist/templates/demo-store/dist/client/build/routes/$lang/account/__public/activate.$id.$activationToken-SKVJFAYX.js +0 -2
  406. package/dist/templates/demo-store/dist/client/build/routes/$lang/account/__public/activate.$id.$activationToken-SKVJFAYX.js.map +0 -7
  407. package/dist/templates/demo-store/dist/client/build/routes/$lang/account/__public/login-J6JGOFW4.js +0 -2
  408. package/dist/templates/demo-store/dist/client/build/routes/$lang/account/__public/login-J6JGOFW4.js.map +0 -7
  409. package/dist/templates/demo-store/dist/client/build/routes/$lang/account/__public/recover-ELRPFD3J.js +0 -2
  410. package/dist/templates/demo-store/dist/client/build/routes/$lang/account/__public/recover-ELRPFD3J.js.map +0 -7
  411. package/dist/templates/demo-store/dist/client/build/routes/$lang/account/__public/register-PBVQNHER.js +0 -2
  412. package/dist/templates/demo-store/dist/client/build/routes/$lang/account/__public/register-PBVQNHER.js.map +0 -7
  413. package/dist/templates/demo-store/dist/client/build/routes/$lang/account/__public/reset.$id.$resetToken-5AF75Z6H.js +0 -2
  414. package/dist/templates/demo-store/dist/client/build/routes/$lang/account/__public/reset.$id.$resetToken-5AF75Z6H.js.map +0 -7
  415. package/dist/templates/demo-store/dist/client/build/routes/$lang/account-XVIGQX2R.js +0 -2
  416. package/dist/templates/demo-store/dist/client/build/routes/$lang/account-XVIGQX2R.js.map +0 -7
  417. package/dist/templates/demo-store/dist/client/build/routes/$lang/api/countries-D74K7HOY.js +0 -2
  418. package/dist/templates/demo-store/dist/client/build/routes/$lang/api/countries-D74K7HOY.js.map +0 -7
  419. package/dist/templates/demo-store/dist/client/build/routes/$lang/api/products-WTFHLYFB.js +0 -2
  420. package/dist/templates/demo-store/dist/client/build/routes/$lang/api/products-WTFHLYFB.js.map +0 -7
  421. package/dist/templates/demo-store/dist/client/build/routes/$lang/cart-SGDEGK6Q.js +0 -2
  422. package/dist/templates/demo-store/dist/client/build/routes/$lang/cart-SGDEGK6Q.js.map +0 -7
  423. package/dist/templates/demo-store/dist/client/build/routes/$lang/collections/$collectionHandle-JIY2JRDZ.js +0 -2
  424. package/dist/templates/demo-store/dist/client/build/routes/$lang/collections/$collectionHandle-JIY2JRDZ.js.map +0 -7
  425. package/dist/templates/demo-store/dist/client/build/routes/$lang/collections/all-I3ZQ3MBD.js +0 -2
  426. package/dist/templates/demo-store/dist/client/build/routes/$lang/collections/all-I3ZQ3MBD.js.map +0 -7
  427. package/dist/templates/demo-store/dist/client/build/routes/$lang/collections/index-JM35U6E2.js +0 -2
  428. package/dist/templates/demo-store/dist/client/build/routes/$lang/collections/index-JM35U6E2.js.map +0 -7
  429. package/dist/templates/demo-store/dist/client/build/routes/$lang/featured-products-UU24CXMU.js +0 -2
  430. package/dist/templates/demo-store/dist/client/build/routes/$lang/featured-products-UU24CXMU.js.map +0 -7
  431. package/dist/templates/demo-store/dist/client/build/routes/$lang/index-Z4YYZ6FV.js +0 -2
  432. package/dist/templates/demo-store/dist/client/build/routes/$lang/index-Z4YYZ6FV.js.map +0 -7
  433. package/dist/templates/demo-store/dist/client/build/routes/$lang/journal/$journalHandle-VTU5XZ3X.js +0 -2
  434. package/dist/templates/demo-store/dist/client/build/routes/$lang/journal/$journalHandle-VTU5XZ3X.js.map +0 -7
  435. package/dist/templates/demo-store/dist/client/build/routes/$lang/journal/index-GJ635OK2.js +0 -2
  436. package/dist/templates/demo-store/dist/client/build/routes/$lang/journal/index-GJ635OK2.js.map +0 -7
  437. package/dist/templates/demo-store/dist/client/build/routes/$lang/og-image-JHBOIC2Z.js +0 -2
  438. package/dist/templates/demo-store/dist/client/build/routes/$lang/og-image-JHBOIC2Z.js.map +0 -7
  439. package/dist/templates/demo-store/dist/client/build/routes/$lang/pages/$pageHandle-56OQSRT6.js +0 -2
  440. package/dist/templates/demo-store/dist/client/build/routes/$lang/pages/$pageHandle-56OQSRT6.js.map +0 -7
  441. package/dist/templates/demo-store/dist/client/build/routes/$lang/policies/$policyHandle-FT77Q33E.js +0 -2
  442. package/dist/templates/demo-store/dist/client/build/routes/$lang/policies/$policyHandle-FT77Q33E.js.map +0 -7
  443. package/dist/templates/demo-store/dist/client/build/routes/$lang/policies/index-7VIBEBDP.js +0 -2
  444. package/dist/templates/demo-store/dist/client/build/routes/$lang/policies/index-7VIBEBDP.js.map +0 -7
  445. package/dist/templates/demo-store/dist/client/build/routes/$lang/products/$productHandle-TD3SUUAT.js +0 -2
  446. package/dist/templates/demo-store/dist/client/build/routes/$lang/products/$productHandle-TD3SUUAT.js.map +0 -7
  447. package/dist/templates/demo-store/dist/client/build/routes/$lang/products/index-VQNYHSDW.js +0 -2
  448. package/dist/templates/demo-store/dist/client/build/routes/$lang/products/index-VQNYHSDW.js.map +0 -7
  449. package/dist/templates/demo-store/dist/client/build/routes/$lang/search-TCZIEYJL.js +0 -2
  450. package/dist/templates/demo-store/dist/client/build/routes/$lang/search-TCZIEYJL.js.map +0 -7
  451. package/dist/templates/demo-store/dist/client/build/routes/[robots.txt]-JOBE7OD7.js +0 -2
  452. package/dist/templates/demo-store/dist/client/build/routes/[robots.txt]-JOBE7OD7.js.map +0 -7
  453. package/dist/templates/demo-store/dist/client/build/routes/[sitemap.xml]-UQB7RN5M.js +0 -2
  454. package/dist/templates/demo-store/dist/client/build/routes/[sitemap.xml]-UQB7RN5M.js.map +0 -7
  455. package/dist/templates/demo-store/dist/client/build/routes/account/__private/address/$id-JZNTMKYB.js +0 -2
  456. package/dist/templates/demo-store/dist/client/build/routes/account/__private/address/$id-JZNTMKYB.js.map +0 -7
  457. package/dist/templates/demo-store/dist/client/build/routes/account/__private/edit-VVTK3HGS.js +0 -2
  458. package/dist/templates/demo-store/dist/client/build/routes/account/__private/edit-VVTK3HGS.js.map +0 -7
  459. package/dist/templates/demo-store/dist/client/build/routes/account/__private/logout-MRH6DVPZ.js +0 -2
  460. package/dist/templates/demo-store/dist/client/build/routes/account/__private/logout-MRH6DVPZ.js.map +0 -7
  461. package/dist/templates/demo-store/dist/client/build/routes/account/__private/orders.$id-IUXEUMTN.js +0 -2
  462. package/dist/templates/demo-store/dist/client/build/routes/account/__private/orders.$id-IUXEUMTN.js.map +0 -7
  463. package/dist/templates/demo-store/dist/client/build/routes/account/__public/activate.$id.$activationToken-XRNXDJJR.js +0 -2
  464. package/dist/templates/demo-store/dist/client/build/routes/account/__public/activate.$id.$activationToken-XRNXDJJR.js.map +0 -7
  465. package/dist/templates/demo-store/dist/client/build/routes/account/__public/login-BC3LC2DV.js +0 -2
  466. package/dist/templates/demo-store/dist/client/build/routes/account/__public/login-BC3LC2DV.js.map +0 -7
  467. package/dist/templates/demo-store/dist/client/build/routes/account/__public/recover-YTA3AC27.js +0 -2
  468. package/dist/templates/demo-store/dist/client/build/routes/account/__public/recover-YTA3AC27.js.map +0 -7
  469. package/dist/templates/demo-store/dist/client/build/routes/account/__public/register-WKKKPNUZ.js +0 -2
  470. package/dist/templates/demo-store/dist/client/build/routes/account/__public/register-WKKKPNUZ.js.map +0 -7
  471. package/dist/templates/demo-store/dist/client/build/routes/account/__public/reset.$id.$resetToken-6JGBLMXT.js +0 -2
  472. package/dist/templates/demo-store/dist/client/build/routes/account/__public/reset.$id.$resetToken-6JGBLMXT.js.map +0 -7
  473. package/dist/templates/demo-store/dist/client/build/routes/account-TPCHO77K.js +0 -2
  474. package/dist/templates/demo-store/dist/client/build/routes/account-TPCHO77K.js.map +0 -7
  475. package/dist/templates/demo-store/dist/client/build/routes/api/countries-FOQSZPCF.js +0 -2
  476. package/dist/templates/demo-store/dist/client/build/routes/api/countries-FOQSZPCF.js.map +0 -7
  477. package/dist/templates/demo-store/dist/client/build/routes/api/products-DX4VJAR6.js +0 -2
  478. package/dist/templates/demo-store/dist/client/build/routes/api/products-DX4VJAR6.js.map +0 -7
  479. package/dist/templates/demo-store/dist/client/build/routes/cart-JKTAKPRZ.js +0 -2
  480. package/dist/templates/demo-store/dist/client/build/routes/cart-JKTAKPRZ.js.map +0 -7
  481. package/dist/templates/demo-store/dist/client/build/routes/collections/$collectionHandle-WHEXWZAQ.js +0 -2
  482. package/dist/templates/demo-store/dist/client/build/routes/collections/$collectionHandle-WHEXWZAQ.js.map +0 -7
  483. package/dist/templates/demo-store/dist/client/build/routes/collections/all-EXLOY5Y6.js +0 -2
  484. package/dist/templates/demo-store/dist/client/build/routes/collections/all-EXLOY5Y6.js.map +0 -7
  485. package/dist/templates/demo-store/dist/client/build/routes/collections/index-OA2FOHWI.js +0 -2
  486. package/dist/templates/demo-store/dist/client/build/routes/collections/index-OA2FOHWI.js.map +0 -7
  487. package/dist/templates/demo-store/dist/client/build/routes/discounts.$code-ORRT2Y6X.js +0 -2
  488. package/dist/templates/demo-store/dist/client/build/routes/discounts.$code-ORRT2Y6X.js.map +0 -7
  489. package/dist/templates/demo-store/dist/client/build/routes/featured-products-ECR7IJXB.js +0 -2
  490. package/dist/templates/demo-store/dist/client/build/routes/featured-products-ECR7IJXB.js.map +0 -7
  491. package/dist/templates/demo-store/dist/client/build/routes/graphiql-5V34JTF6.js +0 -2
  492. package/dist/templates/demo-store/dist/client/build/routes/graphiql-5V34JTF6.js.map +0 -7
  493. package/dist/templates/demo-store/dist/client/build/routes/index-7ZRVAEPC.js +0 -2
  494. package/dist/templates/demo-store/dist/client/build/routes/index-7ZRVAEPC.js.map +0 -7
  495. package/dist/templates/demo-store/dist/client/build/routes/journal/$journalHandle-HH345EW5.js +0 -2
  496. package/dist/templates/demo-store/dist/client/build/routes/journal/$journalHandle-HH345EW5.js.map +0 -7
  497. package/dist/templates/demo-store/dist/client/build/routes/journal/index-QRHMDGSX.js +0 -2
  498. package/dist/templates/demo-store/dist/client/build/routes/journal/index-QRHMDGSX.js.map +0 -7
  499. package/dist/templates/demo-store/dist/client/build/routes/og-image-DYICG2WR.js +0 -2
  500. package/dist/templates/demo-store/dist/client/build/routes/og-image-DYICG2WR.js.map +0 -7
  501. package/dist/templates/demo-store/dist/client/build/routes/pages/$pageHandle-SOTJN3BG.js +0 -2
  502. package/dist/templates/demo-store/dist/client/build/routes/pages/$pageHandle-SOTJN3BG.js.map +0 -7
  503. package/dist/templates/demo-store/dist/client/build/routes/policies/$policyHandle-2E6C2YSR.js +0 -2
  504. package/dist/templates/demo-store/dist/client/build/routes/policies/$policyHandle-2E6C2YSR.js.map +0 -7
  505. package/dist/templates/demo-store/dist/client/build/routes/policies/index-3U7GEIT5.js +0 -2
  506. package/dist/templates/demo-store/dist/client/build/routes/policies/index-3U7GEIT5.js.map +0 -7
  507. package/dist/templates/demo-store/dist/client/build/routes/products/$productHandle-N365DTJW.js +0 -2
  508. package/dist/templates/demo-store/dist/client/build/routes/products/$productHandle-N365DTJW.js.map +0 -7
  509. package/dist/templates/demo-store/dist/client/build/routes/products/index-ZYSA55SB.js +0 -2
  510. package/dist/templates/demo-store/dist/client/build/routes/products/index-ZYSA55SB.js.map +0 -7
  511. package/dist/templates/demo-store/dist/client/build/routes/search-4CEESFTV.js +0 -2
  512. package/dist/templates/demo-store/dist/client/build/routes/search-4CEESFTV.js.map +0 -7
  513. package/dist/templates/demo-store/dist/client/fonts/IBMPlexSerif-Text.woff2 +0 -0
  514. package/dist/templates/demo-store/dist/client/fonts/IBMPlexSerif-TextItalic.woff2 +0 -0
  515. package/dist/templates/demo-store/dist/worker/_assets/app-QCTC5PWY.css +0 -4203
  516. package/dist/templates/demo-store/dist/worker/_assets/custom-font-COCMVHUB.css +0 -13
  517. package/dist/templates/demo-store/dist/worker/_assets/favicon-5FIZBM2K.svg +0 -28
  518. package/dist/templates/demo-store/dist/worker/index.js +0 -1563
  519. package/dist/templates/demo-store/dist/worker/index.js.map +0 -7
  520. package/dist/templates/demo-store/package.json +0 -67
  521. package/dist/templates/demo-store/playwright.config.ts +0 -109
  522. package/dist/templates/demo-store/postcss.config.js +0 -10
  523. package/dist/templates/demo-store/public/favicon.svg +0 -28
  524. package/dist/templates/demo-store/public/fonts/IBMPlexSerif-Text.woff2 +0 -0
  525. package/dist/templates/demo-store/public/fonts/IBMPlexSerif-TextItalic.woff2 +0 -0
  526. package/dist/templates/demo-store/remix.env.d.ts +0 -40
  527. package/dist/templates/demo-store/remix.init/index.js +0 -25
  528. package/dist/templates/demo-store/remix.init/package.json +0 -7
  529. package/dist/templates/demo-store/server.ts +0 -73
  530. package/dist/templates/demo-store/styles/app.css +0 -182
  531. package/dist/templates/demo-store/tailwind.config.js +0 -70
  532. package/dist/templates/demo-store/tests/cart.test.ts +0 -70
  533. package/dist/templates/demo-store/tests/seo.test.ts +0 -36
  534. package/dist/templates/demo-store/tests/utils.ts +0 -100
  535. package/dist/templates/demo-store/tsconfig.json +0 -25
  536. package/dist/templates/hello-world/.cache/content-v2/sha512/13/f6/b7f804d45a961ca1e392429e75ad80f23ba46cbba0e960c6a70f8de81f3f3763af59651474176798d1a1a4bd2a5109b1d441f6d1c8ba070b678b38378adf +0 -1
  537. package/dist/templates/hello-world/.cache/content-v2/sha512/e5/8f/bcb6cb6a00ef5f377be15d4ce4a8fe978d42eafa3bab9c28a0fe5540568df35c0975de5060ad2a25f4a23bf58ee2e472068854ce7d6904d6e7fa4b784f33 +0 -1
  538. package/dist/templates/hello-world/.cache/content-v2/sha512/fa/dd/9bc10a1cb1f145eabd96bdba509178e20484197fefd8469ace9f53bf277e875751db3c4dddf229807c48cbe8db19494fe2a5aab7d2a4b7ae8bebbd67509c +0 -1
  539. package/dist/templates/hello-world/.cache/index-v5/09/f6/fe4b05c4157320b8b59b3f84116195be0437d87357d743d21acd638a4606 +0 -2
  540. package/dist/templates/hello-world/.cache/index-v5/b3/75/d3e7a4a5df68530007409daf1d2e66ab789c8b658d1819d7e5fd183f5f57 +0 -2
  541. package/dist/templates/hello-world/.cache/index-v5/d0/c4/d960260ece228d28f70e317741b3f3f3df05c53956d870235837ae2b73b4 +0 -2
  542. package/dist/templates/hello-world/.eslintignore +0 -4
  543. package/dist/templates/hello-world/.eslintrc.js +0 -6
  544. package/dist/templates/hello-world/.graphqlrc.yml +0 -1
  545. package/dist/templates/hello-world/README.md +0 -20
  546. package/dist/templates/hello-world/_env +0 -6
  547. package/dist/templates/hello-world/_gitignore +0 -8
  548. package/dist/templates/hello-world/app/components/Layout.tsx +0 -15
  549. package/dist/templates/hello-world/app/components/index.ts +0 -1
  550. package/dist/templates/hello-world/app/entry.client.tsx +0 -4
  551. package/dist/templates/hello-world/app/entry.server.tsx +0 -21
  552. package/dist/templates/hello-world/app/root.tsx +0 -212
  553. package/dist/templates/hello-world/app/routes/graphiql.tsx +0 -10
  554. package/dist/templates/hello-world/app/styles/app.css +0 -38
  555. package/dist/templates/hello-world/dist/client/build/_assets/app-2MJQXVFI.css +0 -38
  556. package/dist/templates/hello-world/dist/client/build/_assets/favicon-5FIZBM2K.svg +0 -28
  557. package/dist/templates/hello-world/dist/client/build/_shared/chunk-HGED52H5.js +0 -66
  558. package/dist/templates/hello-world/dist/client/build/_shared/chunk-HGED52H5.js.map +0 -7
  559. package/dist/templates/hello-world/dist/client/build/_shared/chunk-KSKV5IK6.js +0 -20
  560. package/dist/templates/hello-world/dist/client/build/_shared/chunk-KSKV5IK6.js.map +0 -7
  561. package/dist/templates/hello-world/dist/client/build/_shared/chunk-X4LCECW4.js +0 -2
  562. package/dist/templates/hello-world/dist/client/build/_shared/chunk-X4LCECW4.js.map +0 -7
  563. package/dist/templates/hello-world/dist/client/build/entry.client-JOU7NZGC.js +0 -27
  564. package/dist/templates/hello-world/dist/client/build/entry.client-JOU7NZGC.js.map +0 -7
  565. package/dist/templates/hello-world/dist/client/build/manifest-A04F2945.js +0 -1
  566. package/dist/templates/hello-world/dist/client/build/root-QUDT4I4G.js +0 -2
  567. package/dist/templates/hello-world/dist/client/build/root-QUDT4I4G.js.map +0 -7
  568. package/dist/templates/hello-world/dist/client/build/routes/graphiql-5V34JTF6.js +0 -2
  569. package/dist/templates/hello-world/dist/client/build/routes/graphiql-5V34JTF6.js.map +0 -7
  570. package/dist/templates/hello-world/dist/client/build/routes/index-4WJ36H3A.js +0 -2
  571. package/dist/templates/hello-world/dist/client/build/routes/index-4WJ36H3A.js.map +0 -7
  572. package/dist/templates/hello-world/dist/client/favicon.svg +0 -28
  573. package/dist/templates/hello-world/dist/worker/_assets/app-2MJQXVFI.css +0 -38
  574. package/dist/templates/hello-world/dist/worker/_assets/favicon-5FIZBM2K.svg +0 -28
  575. package/dist/templates/hello-world/dist/worker/index.js +0 -267
  576. package/dist/templates/hello-world/dist/worker/index.js.map +0 -7
  577. package/dist/templates/hello-world/package.json +0 -41
  578. package/dist/templates/hello-world/public/favicon.svg +0 -28
  579. package/dist/templates/hello-world/remix.env.d.ts +0 -35
  580. package/dist/templates/hello-world/remix.init/index.js +0 -25
  581. package/dist/templates/hello-world/remix.init/package.json +0 -7
  582. package/dist/templates/hello-world/server.ts +0 -129
  583. package/dist/templates/hello-world/tsconfig.json +0 -25
  584. package/dist/tmp-create-app.js +0 -33
@@ -1,13 +0,0 @@
1
- @font-face {
2
- font-family: 'IBMPlexSerif';
3
- font-display: swap;
4
- font-weight: 400;
5
- src: url('../../fonts/IBMPlexSerif-Text.woff2') format('woff2');
6
- }
7
- @font-face {
8
- font-family: 'IBMPlexSerif';
9
- font-display: swap;
10
- font-weight: 400;
11
- font-style: italic;
12
- src: url('../../fonts/IBMPlexSerif-TextItalic.woff2') format('woff2');
13
- }
@@ -1,28 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" fill="none">
2
- <style>
3
- .stroke {
4
- stroke: #000;
5
- }
6
- .fill {
7
- fill: #000;
8
- }
9
- @media (prefers-color-scheme: dark) {
10
- .stroke {
11
- stroke: #fff;
12
- }
13
- .fill {
14
- fill: #fff;
15
- }
16
- }
17
- </style>
18
- <path
19
- class="stroke"
20
- fill-rule="evenodd"
21
- d="M16.1 16.04 1 8.02 6.16 5.3l5.82 3.09 4.88-2.57-5.82-3.1L16.21 0l15.1 8.02-5.17 2.72-5.5-2.91-4.88 2.57 5.5 2.92-5.16 2.72Z"
22
- />
23
- <path
24
- class="fill"
25
- fill-rule="evenodd"
26
- d="M16.1 32 1 23.98l5.16-2.72 5.82 3.08 4.88-2.57-5.82-3.08 5.17-2.73 15.1 8.02-5.17 2.72-5.5-2.92-4.88 2.58 5.5 2.92L16.1 32Z"
27
- />
28
- </svg>
@@ -1,2 +0,0 @@
1
- import{F as m,G as p,H as f,K as y,R as a,Y as C,ba as h,ca as v}from"/build/_shared/chunk-GHUOM4KB.js";import{q as g}from"/build/_shared/chunk-ZNLABNO4.js";import{b as u}from"/build/_shared/chunk-KSKV5IK6.js";import{b as d}from"/build/_shared/chunk-X4LCECW4.js";var t=d(u());var E=()=>({title:"All Collections"});function w(){let{collections:e}=g();return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(f,{heading:"Collections"}),(0,t.jsx)(p,{children:(0,t.jsx)(v,{connection:e,children:({endCursor:n,hasNextPage:r,hasPreviousPage:l,nextPageUrl:$,nodes:o,prevPageUrl:I,startCursor:s,nextLinkRef:x,isLoading:i})=>(0,t.jsxs)(t.Fragment,{children:[l&&(0,t.jsx)("div",{className:"flex items-center justify-center mt-6",children:(0,t.jsx)(a,{to:I,variant:"secondary",width:"full",prefetch:"intent",disabled:!i,state:{pageInfo:{endCursor:n,hasNextPage:r,startCursor:s},nodes:o},children:i?"Loading...":"Previous products"})}),(0,t.jsx)(h,{items:o.length===3?3:2,"data-test":"collection-grid",children:o.map((c,L)=>(0,t.jsx)(N,{collection:c,loading:y(L,2)},c.id))}),r&&(0,t.jsx)("div",{className:"flex items-center justify-center mt-6",children:(0,t.jsx)(a,{ref:x,to:$,variant:"secondary",width:"full",prefetch:"intent",disabled:!i,state:{pageInfo:{endCursor:n,hasPreviousPage:l,startCursor:s},nodes:o},children:i?"Loading...":"Next products"})})]})})})]})}function N({collection:e,loading:n}){return(0,t.jsxs)(C,{to:`/collections/${e.handle}`,className:"grid gap-4",children:[(0,t.jsx)("div",{className:"card-image bg-primary/5 aspect-[3/2]",children:e?.image&&(0,t.jsx)("img",{alt:e.title,src:e.image.url,height:400,sizes:"(max-width: 32em) 100vw, 33vw",width:600,loading:n})}),(0,t.jsx)(m,{as:"h3",size:"copy",children:e.title})]})}export{E as a,w as b};
2
- //# sourceMappingURL=/build/_shared/chunk-3HDCZC7Z.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../app/routes/collections/index.tsx"],
4
- "sourcesContent": ["import {json, type MetaFunction, type LoaderArgs} from '@shopify/remix-oxygen';\nimport {useLoaderData} from '@remix-run/react';\nimport type {\n Collection,\n CollectionConnection,\n} from '@shopify/hydrogen-react/storefront-api-types';\nimport {\n Grid,\n Heading,\n PageHeader,\n Section,\n Link,\n Pagination,\n getPaginationVariables,\n Button,\n} from '~/components';\nimport {getImageLoadingPriority} from '~/lib/const';\n\nconst PAGINATION_SIZE = 8;\n\nexport const loader = async ({request, context: {storefront}}: LoaderArgs) => {\n const variables = getPaginationVariables(request, PAGINATION_SIZE);\n const {collections} = await storefront.query<{\n collections: CollectionConnection;\n }>(COLLECTIONS_QUERY, {\n variables: {\n ...variables,\n country: storefront.i18n.country,\n language: storefront.i18n.language,\n },\n });\n\n return json({collections});\n};\n\nexport const meta: MetaFunction = () => {\n return {\n title: 'All Collections',\n };\n};\n\nexport default function Collections() {\n const {collections} = useLoaderData<typeof loader>();\n\n return (\n <>\n <PageHeader heading=\"Collections\" />\n <Section>\n <Pagination connection={collections}>\n {({\n endCursor,\n hasNextPage,\n hasPreviousPage,\n nextPageUrl,\n nodes,\n prevPageUrl,\n startCursor,\n nextLinkRef,\n isLoading,\n }) => (\n <>\n {hasPreviousPage && (\n <div className=\"flex items-center justify-center mt-6\">\n <Button\n to={prevPageUrl}\n variant=\"secondary\"\n width=\"full\"\n prefetch=\"intent\"\n disabled={!isLoading}\n state={{\n pageInfo: {\n endCursor,\n hasNextPage,\n startCursor,\n },\n nodes,\n }}\n >\n {isLoading ? 'Loading...' : 'Previous products'}\n </Button>\n </div>\n )}\n <Grid\n items={nodes.length === 3 ? 3 : 2}\n data-test=\"collection-grid\"\n >\n {nodes.map((collection, i) => (\n <CollectionCard\n collection={collection as Collection}\n key={collection.id}\n loading={getImageLoadingPriority(i, 2)}\n />\n ))}\n </Grid>\n {hasNextPage && (\n <div className=\"flex items-center justify-center mt-6\">\n <Button\n ref={nextLinkRef}\n to={nextPageUrl}\n variant=\"secondary\"\n width=\"full\"\n prefetch=\"intent\"\n disabled={!isLoading}\n state={{\n pageInfo: {\n endCursor,\n hasPreviousPage,\n startCursor,\n },\n nodes,\n }}\n >\n {isLoading ? 'Loading...' : 'Next products'}\n </Button>\n </div>\n )}\n </>\n )}\n </Pagination>\n </Section>\n </>\n );\n}\n\nfunction CollectionCard({\n collection,\n loading,\n}: {\n collection: Collection;\n loading?: HTMLImageElement['loading'];\n}) {\n return (\n <Link to={`/collections/${collection.handle}`} className=\"grid gap-4\">\n <div className=\"card-image bg-primary/5 aspect-[3/2]\">\n {collection?.image && (\n <img\n alt={collection.title}\n src={collection.image.url}\n height={400}\n sizes=\"(max-width: 32em) 100vw, 33vw\"\n width={600}\n loading={loading}\n />\n )}\n </div>\n <Heading as=\"h3\" size=\"copy\">\n {collection.title}\n </Heading>\n </Link>\n );\n}\n\nconst COLLECTIONS_QUERY = `#graphql\n query Collections(\n $country: CountryCode\n $language: LanguageCode\n $first: Int\n $last: Int\n $startCursor: String\n $endCursor: String\n ) @inContext(country: $country, language: $language) {\n collections(first: $first, last: $last, before: $startCursor, after: $endCursor) {\n nodes {\n id\n title\n description\n handle\n seo {\n description\n title\n }\n image {\n id\n url\n width\n height\n altText\n }\n }\n pageInfo {\n hasPreviousPage\n hasNextPage\n startCursor\n endCursor\n }\n }\n }\n`;\n"],
5
- "mappings": "uQAAA,IAAAA,EAAA,OAmCO,IAAMC,EAAqB,KACzB,CACL,MAAO,iBACT,GAGa,SAARC,GAA+B,CACpC,GAAM,CAAC,YAAAC,CAAW,EAAIC,EAA6B,EAEnD,SACE,oBACE,oBAACC,EAAA,CAAW,QAAQ,cAAc,KAClC,OAACC,EAAA,CACC,mBAACC,EAAA,CAAW,WAAYJ,EACrB,UAAC,CACA,UAAAK,EACA,YAAAC,EACA,gBAAAC,EACA,YAAAC,EACA,MAAAC,EACA,YAAAC,EACA,YAAAC,EACA,YAAAC,EACA,UAAAC,CACF,OACE,oBACG,UAAAN,MACC,OAAC,OAAI,UAAU,wCACb,mBAACO,EAAA,CACC,GAAIJ,EACJ,QAAQ,YACR,MAAM,OACN,SAAS,SACT,SAAU,CAACG,EACX,MAAO,CACL,SAAU,CACR,UAAAR,EACA,YAAAC,EACA,YAAAK,CACF,EACA,MAAAF,CACF,EAEC,SAAAI,EAAY,aAAe,oBAC9B,EACF,KAEF,OAACE,EAAA,CACC,MAAON,EAAM,SAAW,EAAI,EAAI,EAChC,YAAU,kBAET,SAAAA,EAAM,IAAI,CAACO,EAAYC,OACtB,OAACC,EAAA,CACC,WAAYF,EAEZ,QAASG,EAAwBF,EAAG,CAAC,GADhCD,EAAW,EAElB,CACD,EACH,EACCV,MACC,OAAC,OAAI,UAAU,wCACb,mBAACQ,EAAA,CACC,IAAKF,EACL,GAAIJ,EACJ,QAAQ,YACR,MAAM,OACN,SAAS,SACT,SAAU,CAACK,EACX,MAAO,CACL,SAAU,CACR,UAAAR,EACA,gBAAAE,EACA,YAAAI,CACF,EACA,MAAAF,CACF,EAEC,SAAAI,EAAY,aAAe,gBAC9B,EACF,GAEJ,EAEJ,EACF,GACF,CAEJ,CAEA,SAASK,EAAe,CACtB,WAAAF,EACA,QAAAI,CACF,EAGG,CACD,SACE,QAACC,EAAA,CAAK,GAAI,gBAAgBL,EAAW,SAAU,UAAU,aACvD,oBAAC,OAAI,UAAU,uCACZ,SAAAA,GAAY,UACX,OAAC,OACC,IAAKA,EAAW,MAChB,IAAKA,EAAW,MAAM,IACtB,OAAQ,IACR,MAAM,gCACN,MAAO,IACP,QAASI,EACX,EAEJ,KACA,OAACE,EAAA,CAAQ,GAAG,KAAK,KAAK,OACnB,SAAAN,EAAW,MACd,GACF,CAEJ",
6
- "names": ["import_jsx_runtime", "meta", "Collections", "collections", "useLoaderData", "PageHeader", "Section", "Pagination", "endCursor", "hasNextPage", "hasPreviousPage", "nextPageUrl", "nodes", "prevPageUrl", "startCursor", "nextLinkRef", "isLoading", "Button", "Grid", "collection", "i", "CollectionCard", "getImageLoadingPriority", "loading", "Link", "Heading"]
7
- }
@@ -1,2 +0,0 @@
1
- import{G as i,H as s,K as g,Y as m,ba as c}from"/build/_shared/chunk-GHUOM4KB.js";import{b as d}from"/build/_shared/chunk-6IZ7NY57.js";import{q as r}from"/build/_shared/chunk-ZNLABNO4.js";import{b as l}from"/build/_shared/chunk-KSKV5IK6.js";import{b as n}from"/build/_shared/chunk-X4LCECW4.js";var e=n(l()),u="Journal",$={seo:{titleTemplate:"%s | Journal"}};var H=()=>({title:"All Journals"});function p(){let{articles:a}=r();return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(s,{heading:u}),(0,e.jsx)(i,{children:(0,e.jsx)(c,{as:"ol",layout:"blog",children:a.map((t,o)=>(0,e.jsx)(h,{blogHandle:u.toLowerCase(),article:t,loading:g(o,2)},t.id))})})]})}function h({blogHandle:a,article:t,loading:o}){return(0,e.jsx)("li",{children:(0,e.jsxs)(m,{to:`/${a}/${t.handle}`,children:[t.image&&(0,e.jsx)("div",{className:"card-image aspect-[3/2]",children:(0,e.jsx)(d,{alt:t.image.altText||t.title,className:"object-cover w-full",data:t.image,height:400,loading:o,sizes:"(min-width: 768px) 50vw, 100vw",width:600,loaderOptions:{scale:2,crop:"center"}})}),(0,e.jsx)("h2",{className:"mt-4 font-medium",children:t.title}),(0,e.jsx)("span",{className:"block mt-1",children:t.publishedAt})]})},t.id)}export{$ as a,H as b,p as c};
2
- //# sourceMappingURL=/build/_shared/chunk-6DT2GXU6.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../app/routes/journal/index.tsx"],
4
- "sourcesContent": ["import {json, type MetaFunction, type LoaderArgs} from '@shopify/remix-oxygen';\nimport {useLoaderData} from '@remix-run/react';\nimport {flattenConnection, Image} from '@shopify/hydrogen-react';\nimport type {Article, Blog} from '@shopify/hydrogen-react/storefront-api-types';\nimport {Grid, PageHeader, Section, Link} from '~/components';\nimport {getImageLoadingPriority, PAGINATION_SIZE} from '~/lib/const';\n\nconst BLOG_HANDLE = 'Journal';\n\nexport const handle = {\n seo: {\n titleTemplate: '%s | Journal',\n },\n};\n\nexport const loader = async ({context: {storefront}}: LoaderArgs) => {\n const {language, country} = storefront.i18n;\n const {blog} = await storefront.query<{\n blog: Blog;\n }>(BLOGS_QUERY, {\n variables: {\n blogHandle: BLOG_HANDLE,\n pageBy: PAGINATION_SIZE,\n language,\n },\n });\n\n if (!blog?.articles) {\n throw new Response('Not found', {status: 404});\n }\n\n const articles = flattenConnection(blog.articles).map((article) => {\n const {publishedAt} = article;\n return {\n ...article,\n publishedAt: new Intl.DateTimeFormat(`${language}-${country}`, {\n year: 'numeric',\n month: 'long',\n day: 'numeric',\n }).format(new Date(publishedAt!)),\n };\n });\n\n return json(\n {articles},\n {\n headers: {\n // TODO cacheLong()\n },\n },\n );\n};\n\nexport const meta: MetaFunction = () => {\n return {\n title: 'All Journals',\n };\n};\n\nexport default function Journals() {\n const {articles} = useLoaderData<typeof loader>();\n\n return (\n <>\n <PageHeader heading={BLOG_HANDLE} />\n <Section>\n <Grid as=\"ol\" layout=\"blog\">\n {articles.map((article, i) => (\n <ArticleCard\n blogHandle={BLOG_HANDLE.toLowerCase()}\n article={article as Article}\n key={article.id}\n loading={getImageLoadingPriority(i, 2)}\n />\n ))}\n </Grid>\n </Section>\n </>\n );\n}\n\nfunction ArticleCard({\n blogHandle,\n article,\n loading,\n}: {\n blogHandle: string;\n article: Article;\n loading?: HTMLImageElement['loading'];\n}) {\n return (\n <li key={article.id}>\n <Link to={`/${blogHandle}/${article.handle}`}>\n {article.image && (\n <div className=\"card-image aspect-[3/2]\">\n <Image\n alt={article.image.altText || article.title}\n className=\"object-cover w-full\"\n data={article.image}\n height={400}\n loading={loading}\n sizes=\"(min-width: 768px) 50vw, 100vw\"\n width={600}\n loaderOptions={{\n scale: 2,\n crop: 'center',\n }}\n />\n </div>\n )}\n <h2 className=\"mt-4 font-medium\">{article.title}</h2>\n <span className=\"block mt-1\">{article.publishedAt}</span>\n </Link>\n </li>\n );\n}\n\nconst BLOGS_QUERY = `#graphql\nquery Blog(\n $language: LanguageCode\n $blogHandle: String!\n $pageBy: Int!\n $cursor: String\n) @inContext(language: $language) {\n blog(handle: $blogHandle) {\n articles(first: $pageBy, after: $cursor) {\n edges {\n node {\n author: authorV2 {\n name\n }\n contentHtml\n handle\n id\n image {\n id\n altText\n url\n width\n height\n }\n publishedAt\n title\n }\n }\n }\n }\n}\n`;\n"],
5
- "mappings": "sSAAA,IAAAA,EAAA,OAOMC,EAAc,UAEPC,EAAS,CACpB,IAAK,CACH,cAAe,cACjB,CACF,EAwCO,IAAMC,EAAqB,KACzB,CACL,MAAO,cACT,GAGa,SAARC,GAA4B,CACjC,GAAM,CAAC,SAAAC,CAAQ,EAAIC,EAA6B,EAEhD,SACE,oBACE,oBAACC,EAAA,CAAW,QAASC,EAAa,KAClC,OAACC,EAAA,CACC,mBAACC,EAAA,CAAK,GAAG,KAAK,OAAO,OAClB,SAAAL,EAAS,IAAI,CAACM,EAASC,OACtB,OAACC,EAAA,CACC,WAAYL,EAAY,YAAY,EACpC,QAASG,EAET,QAASG,EAAwBF,EAAG,CAAC,GADhCD,EAAQ,EAEf,CACD,EACH,EACF,GACF,CAEJ,CAEA,SAASE,EAAY,CACnB,WAAAE,EACA,QAAAJ,EACA,QAAAK,CACF,EAIG,CACD,SACE,OAAC,MACC,oBAACC,EAAA,CAAK,GAAI,IAAIF,KAAcJ,EAAQ,SACjC,UAAAA,EAAQ,UACP,OAAC,OAAI,UAAU,0BACb,mBAACO,EAAA,CACC,IAAKP,EAAQ,MAAM,SAAWA,EAAQ,MACtC,UAAU,sBACV,KAAMA,EAAQ,MACd,OAAQ,IACR,QAASK,EACT,MAAM,iCACN,MAAO,IACP,cAAe,CACb,MAAO,EACP,KAAM,QACR,EACF,EACF,KAEF,OAAC,MAAG,UAAU,mBAAoB,SAAAL,EAAQ,MAAM,KAChD,OAAC,QAAK,UAAU,aAAc,SAAAA,EAAQ,YAAY,GACpD,GArBOA,EAAQ,EAsBjB,CAEJ",
6
- "names": ["import_jsx_runtime", "BLOG_HANDLE", "handle", "meta", "Journals", "articles", "useLoaderData", "PageHeader", "BLOG_HANDLE", "Section", "Grid", "article", "i", "ArticleCard", "getImageLoadingPriority", "blogHandle", "loading", "Link", "Image"]
7
- }
@@ -1,2 +0,0 @@
1
- import{a as P,b as y}from"/build/_shared/chunk-KSKV5IK6.js";import{b as h}from"/build/_shared/chunk-X4LCECW4.js";function Y(r){if(!r){let o=`flattenConnection(): needs a 'connection' to flatten, but received '${r}' instead`;return console.error(o),[]}return r.nodes?r.nodes:r.edges?r.edges.map(o=>{if(!o?.node)throw new Error("Connection edges must contain nodes");return o.node}):[]}var K=["cdn.shopify.com","cdn.shopifycdn.net","shopify-assets.shopifycdn.com","shopify-assets.shopifycdn.net"],X=["spin.dev"],ee=[...K,...X],b=[352,832,1200,1920,2560];function D({src:r,width:o,height:t,crop:i,scale:a}){let u=new URL(r),s=a??1;if(o){let c;typeof o=="string"?c=(b[0]*s).toString():c=(Number(o)*s).toString(),u.searchParams.append("width",c)}return t&&typeof t=="number"&&u.searchParams.append("height",(t*s).toString()),i&&u.searchParams.append("crop",i),u.toString()}function k(r){let o=new URL(r.src);return!ee.some(i=>o.hostname.endsWith(i))||!r.width&&!r.height&&!r.crop&&!r.scale?r.src:D(r)}function j({data:r,loaderOptions:o,elementProps:t}){var i,a,u,s,c,m;let l=null;return r?.width&&r?.height&&(l=r?.width/r?.height),o?.width||o?.height?{width:(i=o?.width)!=null?i:l&&typeof o.height=="number"?Math.round(l*o.height):null,height:(a=o?.height)!=null?a:l&&typeof o.width=="number"?Math.round(l*o.width):null}:t?.width||t?.height?{width:(u=t?.width)!=null?u:l&&typeof t.height=="number"?Math.round(l*t.height):null,height:(s=t?.height)!=null?s:l&&typeof t.width=="number"?Math.round(l*t.width):null}:r?.width||r?.height?{width:(c=r?.width)!=null?c:null,height:(m=r?.height)!=null?m:null}:{width:null,height:null}}var B=h(y(),1);function F({data:r,width:o,height:t,loading:i,loader:a=k,loaderOptions:u,widths:s,decoding:c="async",...m}){var l,f,d,n,p,g;if(!r.url){let T=`<Image/>: the 'data' prop requires the 'url' property. Image: ${(l=r.id)!=null?l:"no ID provided"}`;return console.error(T),null}let{width:v,height:S}=j({data:r,loaderOptions:u,elementProps:{width:o,height:t}}),w=r.url;if(a&&(w=a({...u,src:r.url,width:v,height:S}),typeof w!="string"||!w))throw new Error(`<Image/>: 'loader' did not return a valid string. Image: ${(f=r.id)!=null?f:r.url}`);let e=o&&v&&o<v?o:v,U=(d=m.srcSet)!=null?d:re({...u,widths:s,src:r.url,width:e,height:S,loader:a});return(0,B.jsx)("img",{id:(n=r.id)!=null?n:"",alt:(g=(p=r.altText)!=null?p:m.alt)!=null?g:"",loading:i??"lazy",...m,src:w,width:v??void 0,height:S??void 0,srcSet:U,decoding:c})}function re({src:r,width:o,crop:t,scale:i,widths:a,loader:u,height:s}){let c=a&&Array.isArray(a);if(c&&a.some(d=>isNaN(d)))throw new Error(`<Image/>: the 'widths' must be an array of numbers. Image: ${r}`);let m=1;o&&s&&(m=Number(s)/Number(o));let l=c?a:b;!c&&o&&o<b[b.length-1]&&(l=b.filter(d=>d<=o));let f=u||D;return l.map(d=>`${f({src:r,width:d,height:t?Number(d)*m:void 0,crop:t,scale:i})} ${d}w`).join(", ")}var L=h(P(),1);var C=h(P(),1);var $="2022-10";var oe=h(y(),1),te=(0,C.createContext)({storeDomain:"test.myshopify.com",storefrontToken:"abc123",storefrontApiVersion:$,country:{isoCode:"US"},language:{isoCode:"EN"},locale:"EN-US",getStorefrontApiUrl(){return""},getPublicTokenHeaders(){return{}}});function V(){let r=(0,C.useContext)(te);if(!r)throw new Error("'useShop()' must be a descendent of <ShopifyProvider/>");return r}function N(r){let{locale:o}=V();if(!o)throw new Error("useMoney(): Unable to get 'locale' from 'useShop()', which means that 'locale' was not passed to '<ShopifyProvider/>'. 'locale' is required for 'useMoney()' to work");let t=parseFloat(r.amount),i=(0,L.useMemo)(()=>({style:"currency",currency:r.currencyCode}),[r.currencyCode]),a=E(o,i),u=E(o,{...i,currencyDisplay:"name"}),s=E(o,{...i,currencyDisplay:"narrowSymbol"}),c=E(o,{...i,minimumFractionDigits:0,maximumFractionDigits:0}),m=E(o),l=E(o,{minimumFractionDigits:0,maximumFractionDigits:0}),f=n=>n.type==="currency",d=(0,L.useMemo)(()=>({original:()=>r,currencyCode:()=>r.currencyCode,localizedString:()=>a().format(t),parts:()=>a().formatToParts(t),withoutTrailingZeros:()=>t%1===0?c().format(t):a().format(t),withoutTrailingZerosAndCurrency:()=>t%1===0?l().format(t):m().format(t),currencyName:()=>{var n,p;return(p=(n=u().formatToParts(t).find(f))==null?void 0:n.value)!=null?p:r.currencyCode},currencySymbol:()=>{var n,p;return(p=(n=a().formatToParts(t).find(f))==null?void 0:n.value)!=null?p:r.currencyCode},currencyNarrowSymbol:()=>{var n,p;return(p=(n=s().formatToParts(t).find(f))==null?void 0:n.value)!=null?p:""},amount:()=>a().formatToParts(t).filter(n=>["decimal","fraction","group","integer","literal"].includes(n.type)).map(n=>n.value).join("")}),[r,t,u,a,s,m,c,l]);return(0,L.useMemo)(()=>new Proxy(d,{get:(n,p)=>{var g;return(g=Reflect.get(n,p))==null?void 0:g.call(null)}}),[d])}function E(r,o){return(0,L.useMemo)(()=>{let t;return()=>t??(t=new Intl.NumberFormat(r,o))},[r,o])}var x=h(y(),1);function ne({data:r,as:o,withoutCurrency:t,withoutTrailingZeros:i,measurement:a,measurementSeparator:u="/",...s}){if(!ie(r))throw new Error("<Money/> needs a valid 'data' prop that has 'amount' and 'currencyCode'");let c=N(r),m=o??"div",l=c.localizedString;return(t||i)&&(t&&!i?l=c.amount:!t&&i?l=c.withoutTrailingZeros:l=c.withoutTrailingZerosAndCurrency),(0,x.jsxs)(m,{...s,children:[l,a&&a.referenceUnit&&(0,x.jsxs)(x.Fragment,{children:[u,a.referenceUnit]})]})}function ie(r){return typeof r.amount=="string"&&!!r.amount&&typeof r.currencyCode=="string"&&!!r.currencyCode}var A=h(P(),1),q={};function ae(r,o){let t=q[r];if(t)return t;let i=new Promise((a,u)=>{let s=document.createElement("script");o?.module?s.type="module":s.type="text/javascript",s.src=r,s.onload=()=>{a(!0)},s.onerror=()=>{u(!1)},o?.in==="head"?document.head.appendChild(s):document.body.appendChild(s)});return q[r]=i,i}function I(r,o){let[t,i]=(0,A.useState)("loading"),a=JSON.stringify(o);return(0,A.useEffect)(()=>{async function u(){try{i("loading"),await ae(r,o),i("done")}catch{i("error")}}u()},[r,a,o]),t}var R=h(y(),1),le="https://cdn.shopify.com/shopifycloud/shop-js/v1.0/client.js";function se({variantIds:r,className:o,variantIdsAndQuantities:t,width:i}){let{storeDomain:a}=V(),u=I(le),s;if(r&&t)throw new Error(de);if(r)s=r.reduce((m,l)=>{let f=H(l);return f&&m.push(f),m},[]);else if(t)s=t.reduce((m,l)=>{var f;let d=H(l?.id);return d&&m.push(`${d}:${(f=l?.quantity)!=null?f:1}`),m},[]);else throw new Error(ue);return(0,R.jsx)("div",{className:o,style:i?{"--shop-pay-button-width":i}:void 0,children:u==="done"&&(0,R.jsx)("shop-pay-button",{"store-url":`https://${a}`,variants:s.join(",")})})}function H(r){if(!!r)return r.split("/").pop()}var ue='You must pass in either "variantIds" or "variantIdsAndQuantities" to ShopPayButton',de="You must provide either a variantIds or variantIdsAndQuantities prop, but not both in the ShopPayButton component";var z=h(y(),1);function G(r){var o,t;let{data:i,options:a,id:u=i.id,frameBorder:s="0",allow:c="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:m=!0,loading:l="lazy",...f}=r;if(!i.embedUrl)throw new Error("<ExternalVideo/> requires the 'embedUrl' property");let d=i.embedUrl;if(a){let n=new URL(i.embedUrl);for(let p of Object.keys(a))n.searchParams.set(p,a[p]);d=n.toString()}return(0,z.jsx)("iframe",{...f,id:u??i.embedUrl,title:(t=(o=i.alt)!=null?o:i.id)!=null?t:"external video",frameBorder:s,allow:c,allowFullScreen:m,src:d,loading:l})}var W=h(P(),1),Z=h(y(),1);function Q(r){var o,t;let{data:i,previewImageOptions:a,id:u=i.id,playsInline:s=!0,controls:c=!0,sourceProps:m={},...l}=r,f=k({src:(t=(o=i.previewImage)==null?void 0:o.url)!=null?t:"",...a});if(!i.sources)throw new Error("<Video/> requires a 'data.sources' array");return(0,Z.jsx)("video",{...l,id:u,playsInline:s,controls:c,poster:f,children:i.sources.map(d=>{if(!(d?.url&&d?.mimeType))throw new Error("<Video/> needs 'source.url' and 'source.mimeType'");return(0,W.createElement)("source",{...m,key:d.url,src:d.url,type:d.mimeType})})})}var _=h(P(),1);var O=h(y(),1);function J(r){var o,t,i,a,u,s,c,m,l,f,d;let[n,p]=(0,_.useState)(void 0),g=(0,_.useCallback)(T=>{p(T)},[]),{data:v,children:S,className:w,...e}=r,U=I("https://unpkg.com/@google/model-viewer@v1.12.1/dist/model-viewer.min.js",{module:!0});return(0,_.useEffect)(()=>{if(!!n)return e.onError&&n.addEventListener("error",e.onError),e.onLoad&&n.addEventListener("load",e.onLoad),e.onPreload&&n.addEventListener("preload",e.onPreload),e.onModelVisibility&&n.addEventListener("model-visibility",e.onModelVisibility),e.onProgress&&n.addEventListener("progress",e.onProgress),e.onArStatus&&n.addEventListener("ar-status",e.onArStatus),e.onArTracking&&n.addEventListener("ar-tracking",e.onArTracking),e.onQuickLookButtonTapped&&n.addEventListener("quick-look-button-tapped",e.onQuickLookButtonTapped),e.onCameraChange&&n.addEventListener("camera-change",e.onCameraChange),e.onEnvironmentChange&&n.addEventListener("environment-change",e.onEnvironmentChange),e.onPlay&&n.addEventListener("play",e.onPlay),e.onPause&&n.addEventListener("ar-status",e.onPause),e.onSceneGraphReady&&n.addEventListener("scene-graph-ready",e.onSceneGraphReady),()=>{n!=null&&(e.onError&&n.removeEventListener("error",e.onError),e.onLoad&&n.removeEventListener("load",e.onLoad),e.onPreload&&n.removeEventListener("preload",e.onPreload),e.onModelVisibility&&n.removeEventListener("model-visibility",e.onModelVisibility),e.onProgress&&n.removeEventListener("progress",e.onProgress),e.onArStatus&&n.removeEventListener("ar-status",e.onArStatus),e.onArTracking&&n.removeEventListener("ar-tracking",e.onArTracking),e.onQuickLookButtonTapped&&n.removeEventListener("quick-look-button-tapped",e.onQuickLookButtonTapped),e.onCameraChange&&n.removeEventListener("camera-change",e.onCameraChange),e.onEnvironmentChange&&n.removeEventListener("environment-change",e.onEnvironmentChange),e.onPlay&&n.removeEventListener("play",e.onPlay),e.onPause&&n.removeEventListener("ar-status",e.onPause),e.onSceneGraphReady&&n.removeEventListener("scene-graph-ready",e.onSceneGraphReady))}},[n,e.onArStatus,e.onArTracking,e.onCameraChange,e.onEnvironmentChange,e.onError,e.onLoad,e.onModelVisibility,e.onPause,e.onPlay,e.onPreload,e.onProgress,e.onQuickLookButtonTapped,e.onSceneGraphReady]),U!=="done"?null:(t=(o=v.sources)==null?void 0:o[0])!=null&&t.url?(0,O.jsx)("model-viewer",{ref:g,...e,className:w,id:(i=e.id)!=null?i:v.id,src:v.sources[0].url,alt:(a=v.alt)!=null?a:null,"camera-controls":(u=e.cameraControls)!=null?u:!0,poster:(c=e.poster||((s=v.previewImage)==null?void 0:s.url))!=null?c:null,autoplay:(m=e.autoplay)!=null?m:!0,loading:e.loading,reveal:e.reveal,ar:e.ar,"ar-modes":e.arModes,"ar-scale":e.arScale,"ar-placement":e.arPlacement,"ios-src":e.iosSrc,"touch-action":e.touchAction,"disable-zoom":e.disableZoom,"orbit-sensitivity":e.orbitSensitivity,"auto-rotate":e.autoRotate,"auto-rotate-delay":e.autoRotateDelay,"rotation-per-second":e.rotationPerSecond,"interaction-policy":e.interactionPolicy,"interaction-prompt":e.interactionPrompt,"interaction-prompt-style":e.interactionPromptStyle,"interaction-prompt-threshold":e.interactionPromptThreshold,"camera-orbit":e.cameraOrbit,"camera-target":e.cameraTarget,"field-of-view":e.fieldOfView,"max-camera-orbit":e.maxCameraOrbit,"min-camera-orbit":e.minCameraOrbit,"max-field-of-view":e.maxFieldOfView,"min-field-of-view":e.minFieldOfView,bounds:e.bounds,"interpolation-decay":(l=e.interpolationDecay)!=null?l:100,"skybox-image":e.skyboxImage,"environment-image":e.environmentImage,exposure:e.exposure,"shadow-intensity":(f=e.shadowIntensity)!=null?f:0,"shadow-softness":(d=e.shadowSoftness)!=null?d:0,"animation-name":e.animationName,"animation-crossfade-duration":e.animationCrossfadeDuration,"variant-name":e.variantName,orientation:e.orientation,scale:e.scale,children:S}):(console.error("<ModelViewer/> requires 'data.sources' prop to be an array, with an object that has a property 'url' on it. Rendering 'null'"),null)}var M=h(y(),1);function ce({data:r,mediaOptions:o,...t}){switch(r.__typename){case"MediaImage":return r.image?(0,M.jsx)(F,{...t,...o?.image,data:r.image}):(console.warn("<MediaFile/>: 'data.image' does not exist for __typename of 'MediaImage'; rendering 'null' by default."),null);case"Video":return(0,M.jsx)(Q,{...t,...o?.video,data:r});case"ExternalVideo":return(0,M.jsx)(G,{...t,...o?.externalVideo,data:r});case"Model3d":return(0,M.jsx)(J,{...t,...o?.modelViewer,data:r});default:return console.error("<MediaFile /> requires the '__typename' property to exist on the 'data' prop in order to correctly render the correct component for this media. Rendering 'null' by default"),null}}export{Y as a,F as b,ce as c,N as d,ne as e,se as f};
2
- //# sourceMappingURL=/build/_shared/chunk-6IZ7NY57.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../../../node_modules/@shopify/hydrogen-react/src/flatten-connection.ts", "../../../../../../node_modules/@shopify/hydrogen-react/src/image-size.ts", "../../../../../../node_modules/@shopify/hydrogen-react/src/Image.tsx", "../../../../../../node_modules/@shopify/hydrogen-react/src/storefront-api-constants.ts", "../../../../../../node_modules/@shopify/hydrogen-react/src/ShopifyProvider.tsx", "../../../../../../node_modules/@shopify/hydrogen-react/src/useMoney.tsx", "../../../../../../node_modules/@shopify/hydrogen-react/src/Money.tsx", "../../../../../../node_modules/@shopify/hydrogen-react/src/load-script.tsx", "../../../../../../node_modules/@shopify/hydrogen-react/src/ShopPayButton.tsx", "../../../../../../node_modules/@shopify/hydrogen-react/src/ExternalVideo.tsx", "../../../../../../node_modules/@shopify/hydrogen-react/src/Video.tsx", "../../../../../../node_modules/@shopify/hydrogen-react/src/ModelViewer.tsx", "../../../../../../node_modules/@shopify/hydrogen-react/src/MediaFile.tsx"],
4
- "sourcesContent": ["import type {PartialDeep} from 'type-fest';\n\n/**\n * The `flattenConnection` utility transforms a connection object from the Storefront API (for example, [Product-related connections](https://shopify.dev/api/storefront/reference/products/product)) into a flat array of nodes.\n * The utility works with either `nodes` or `edges.node`.\n *\n * If `connection` is null or undefined, will return an empty array instead in production. In development, an error will be thrown.\n */\nexport function flattenConnection<T>(\n connection?: PartialDeep<GraphQLConnection<T>, {recurseIntoArrays: true}>\n): PartialDeep<T, {recurseIntoArrays: true}>[] {\n if (!connection) {\n const noConnectionErr = `flattenConnection(): needs a 'connection' to flatten, but received '${connection}' instead`;\n if (__HYDROGEN_DEV__) {\n throw new Error(noConnectionErr);\n } else {\n console.error(noConnectionErr);\n return [];\n }\n }\n\n if (connection.nodes) {\n return connection.nodes as PartialDeep<T, {recurseIntoArrays: true}>[];\n }\n\n if (connection.edges) {\n return connection.edges.map((edge) => {\n if (!edge?.node) {\n throw new Error('Connection edges must contain nodes');\n }\n return edge.node;\n });\n }\n\n if (__HYDROGEN_DEV__) {\n console.warn(\n `The connection did not contain either \"nodes\" or \"edges.node\". A empty array will be returned in its place.`\n );\n }\n\n return [];\n}\n\ninterface GraphQLConnection<T> {\n edges?: {node: T}[];\n nodes?: T[];\n}\n", "import type {Image as ImageType} from './storefront-api-types.js';\nimport type {PartialDeep} from 'type-fest';\nimport type {ShopifyLoaderOptions, ShopifyLoaderParams} from './Image.js';\n\n// TODO: Are there other CDNs missing from here?\nconst PRODUCTION_CDN_HOSTNAMES = [\n 'cdn.shopify.com',\n 'cdn.shopifycdn.net',\n 'shopify-assets.shopifycdn.com',\n 'shopify-assets.shopifycdn.net',\n];\nconst LOCAL_CDN_HOSTNAMES = ['spin.dev'];\nconst ALL_CDN_HOSTNAMES = [...PRODUCTION_CDN_HOSTNAMES, ...LOCAL_CDN_HOSTNAMES];\n\n// based on the default width sizes used by the Shopify liquid HTML tag img_tag plus a 2560 width to account for 2k resolutions\n// reference: https://shopify.dev/api/liquid/filters/html-filters#image_tag\nexport const IMG_SRC_SET_SIZES = [352, 832, 1200, 1920, 2560];\n\n/**\n * Adds image size parameters to an image URL hosted by Shopify's CDN\n */\nexport function addImageSizeParametersToUrl({\n src,\n width,\n height,\n crop,\n scale,\n}: ShopifyLoaderParams) {\n const newUrl = new URL(src);\n\n const multipliedScale = scale ?? 1;\n\n if (width) {\n let finalWidth: string;\n\n if (typeof width === 'string') {\n finalWidth = (IMG_SRC_SET_SIZES[0] * multipliedScale).toString();\n } else {\n finalWidth = (Number(width) * multipliedScale).toString();\n }\n\n newUrl.searchParams.append('width', finalWidth);\n }\n\n if (height && typeof height === 'number') {\n newUrl.searchParams.append('height', (height * multipliedScale).toString());\n }\n\n crop && newUrl.searchParams.append('crop', crop);\n\n // for now we intentionally leave off the scale param, and instead multiple width & height by scale instead\n // scale && newUrl.searchParams.append('scale', scale.toString());\n\n return newUrl.toString();\n}\n\nexport function shopifyImageLoader(params: ShopifyLoaderParams) {\n const newSrc = new URL(params.src);\n const isShopifyServedImage = ALL_CDN_HOSTNAMES.some((allowedHostname) =>\n newSrc.hostname.endsWith(allowedHostname)\n );\n\n if (\n !isShopifyServedImage ||\n (!params.width && !params.height && !params.crop && !params.scale)\n ) {\n return params.src;\n }\n\n return addImageSizeParametersToUrl(params);\n}\n\ntype HtmlImageProps = React.ImgHTMLAttributes<HTMLImageElement>;\n\nexport type GetShopifyImageDimensionsProps = {\n data: Pick<\n PartialDeep<ImageType, {recurseIntoArrays: true}>,\n 'altText' | 'url' | 'id' | 'width' | 'height'\n >;\n loaderOptions?: ShopifyLoaderOptions;\n elementProps?: {\n width?: HtmlImageProps['width'];\n height?: HtmlImageProps['height'];\n };\n};\n\ntype GetShopifyImageDimensionsPropsReturn = {\n width: number | string | null;\n height: number | string | null;\n};\n\n/**\n * Width and height are determined using the followiing priority list:\n * 1. `loaderOptions`'s width/height\n * 2. `elementProps`'s width/height\n * 3. `data`'s width/height\n *\n * If only one of `width` or `height` are defined, then the other will attempt to be calculated based on the Image's aspect ratio,\n * provided that both `data.width` and `data.height` are available. If not, then the aspect ratio cannot be determined and the missing\n * value will reamin as `null`\n */\nexport function getShopifyImageDimensions({\n data: sfapiImage,\n loaderOptions,\n elementProps,\n}: GetShopifyImageDimensionsProps): GetShopifyImageDimensionsPropsReturn {\n let aspectRatio: number | null = null;\n\n if (sfapiImage?.width && sfapiImage?.height) {\n aspectRatio = sfapiImage?.width / sfapiImage?.height;\n }\n\n // * 1. `loaderOptions`'s width/height\n if (loaderOptions?.width || loaderOptions?.height) {\n return {\n width:\n loaderOptions?.width ??\n (aspectRatio && typeof loaderOptions.height === 'number'\n ? Math.round(aspectRatio * loaderOptions.height)\n : null),\n height:\n loaderOptions?.height ??\n (aspectRatio && typeof loaderOptions.width === 'number'\n ? Math.round(aspectRatio * loaderOptions.width)\n : null),\n };\n }\n\n // * 2. `elementProps`'s width/height\n if (elementProps?.width || elementProps?.height) {\n return {\n width:\n elementProps?.width ??\n (aspectRatio && typeof elementProps.height === 'number'\n ? Math.round(aspectRatio * elementProps.height)\n : null),\n height:\n elementProps?.height ??\n (aspectRatio && typeof elementProps.width === 'number'\n ? Math.round(aspectRatio * elementProps.width)\n : null),\n };\n }\n\n // * 3. `data`'s width/height\n if (sfapiImage?.width || sfapiImage?.height) {\n return {\n // can't calculate the aspect ratio here\n width: sfapiImage?.width ?? null,\n height: sfapiImage?.height ?? null,\n };\n }\n\n return {width: null, height: null};\n}\n", "import * as React from 'react';\nimport {\n getShopifyImageDimensions,\n shopifyImageLoader,\n addImageSizeParametersToUrl,\n IMG_SRC_SET_SIZES,\n} from './image-size.js';\nimport type {Image as ImageType} from './storefront-api-types.js';\nimport type {PartialDeep, Simplify} from 'type-fest';\n\ntype HtmlImageProps = React.ImgHTMLAttributes<HTMLImageElement>;\n\nexport type ShopifyLoaderOptions = {\n crop?: 'top' | 'bottom' | 'left' | 'right' | 'center';\n scale?: 2 | 3;\n width?: HtmlImageProps['width'] | ImageType['width'];\n height?: HtmlImageProps['height'] | ImageType['height'];\n};\nexport type ShopifyLoaderParams = Simplify<\n ShopifyLoaderOptions & {\n src: ImageType['url'];\n }\n>;\nexport type ShopifyImageProps = Omit<HtmlImageProps, 'src'> & {\n /** An object with fields that correspond to the Storefront API's\n * [Image object](https://shopify.dev/api/storefront/reference/common-objects/image).\n * The `data` prop is required.\n */\n data: PartialDeep<ImageType, {recurseIntoArrays: true}>;\n /** A custom function that generates the image URL. Parameters passed in\n * are `ShopifyLoaderParams`\n */\n loader?: (params: ShopifyLoaderParams) => string;\n /** An object of `loader` function options. For example, if the `loader` function\n * requires a `scale` option, then the value can be a property of the\n * `loaderOptions` object (for example, `{scale: 2}`). The object shape is `ShopifyLoaderOptions`.\n */\n loaderOptions?: ShopifyLoaderOptions;\n /**\n * `src` isn't used, and should instead be passed as part of the `data` object\n */\n src?: never;\n /**\n * An array of pixel widths to overwrite the default generated srcset. For example, `[300, 600, 800]`.\n */\n widths?: (HtmlImageProps['width'] | ImageType['width'])[];\n};\n\n/**\n * The `Image` component renders an image for the Storefront API's\n * [Image object](https://shopify.dev/api/storefront/reference/common-objects/image) by using the `data` prop. You can [customize this component](https://shopify.dev/api/hydrogen/components#customizing-hydrogen-components) using passthrough props.\n *\n * An image's width and height are determined using the following priority list:\n * 1. The width and height values for the `loaderOptions` prop\n * 2. The width and height values for bare props\n * 3. The width and height values for the `data` prop\n *\n * If only one of `width` or `height` are defined, then the other will attempt to be calculated based on the image's aspect ratio,\n * provided that both `data.width` and `data.height` are available. If `data.width` and `data.height` aren't available, then the aspect ratio cannot be determined and the missing\n * value will remain as `null`\n */\nexport function Image({\n data,\n width,\n height,\n loading,\n loader = shopifyImageLoader,\n loaderOptions,\n widths,\n decoding = 'async',\n ...rest\n}: ShopifyImageProps) {\n if (!data.url) {\n const missingUrlError = `<Image/>: the 'data' prop requires the 'url' property. Image: ${\n data.id ?? 'no ID provided'\n }`;\n\n if (__HYDROGEN_DEV__) {\n throw new Error(missingUrlError);\n } else {\n console.error(missingUrlError);\n }\n\n return null;\n }\n\n if (__HYDROGEN_DEV__ && !data.altText && !rest.alt) {\n console.warn(\n `<Image/>: the 'data' prop should have the 'altText' property, or the 'alt' prop, and one of them should not be empty. Image: ${\n data.id ?? data.url\n }`\n );\n }\n\n const {width: imgElementWidth, height: imgElementHeight} =\n getShopifyImageDimensions({\n data,\n loaderOptions,\n elementProps: {\n width,\n height,\n },\n });\n\n if (__HYDROGEN_DEV__ && (!imgElementWidth || !imgElementHeight)) {\n console.warn(\n `<Image/>: the 'data' prop requires either 'width' or 'data.width', and 'height' or 'data.height' properties. Image: ${\n data.id ?? data.url\n }`\n );\n }\n\n let finalSrc = data.url;\n\n if (loader) {\n finalSrc = loader({\n ...loaderOptions,\n src: data.url,\n width: imgElementWidth,\n height: imgElementHeight,\n });\n if (typeof finalSrc !== 'string' || !finalSrc) {\n throw new Error(\n `<Image/>: 'loader' did not return a valid string. Image: ${\n data.id ?? data.url\n }`\n );\n }\n }\n\n // determining what the intended width of the image is. For example, if the width is specified and lower than the image width, then that is the maximum image width\n // to prevent generating a srcset with widths bigger than needed or to generate images that would distort because of being larger than original\n const maxWidth =\n width && imgElementWidth && width < imgElementWidth\n ? width\n : imgElementWidth;\n const finalSrcset =\n rest.srcSet ??\n internalImageSrcSet({\n ...loaderOptions,\n widths,\n src: data.url,\n width: maxWidth,\n height: imgElementHeight,\n loader,\n });\n\n /* eslint-disable hydrogen/prefer-image-component */\n return (\n <img\n id={data.id ?? ''}\n alt={data.altText ?? rest.alt ?? ''}\n loading={loading ?? 'lazy'}\n {...rest}\n src={finalSrc}\n width={imgElementWidth ?? undefined}\n height={imgElementHeight ?? undefined}\n srcSet={finalSrcset}\n decoding={decoding}\n />\n );\n /* eslint-enable hydrogen/prefer-image-component */\n}\n\ntype InternalShopifySrcSetGeneratorsParams = Simplify<\n ShopifyLoaderOptions & {\n src: ImageType['url'];\n widths?: (HtmlImageProps['width'] | ImageType['width'])[];\n loader?: (params: ShopifyLoaderParams) => string;\n }\n>;\nfunction internalImageSrcSet({\n src,\n width,\n crop,\n scale,\n widths,\n loader,\n height,\n}: InternalShopifySrcSetGeneratorsParams) {\n const hasCustomWidths = widths && Array.isArray(widths);\n if (hasCustomWidths && widths.some((size) => isNaN(size as number))) {\n throw new Error(\n `<Image/>: the 'widths' must be an array of numbers. Image: ${src}`\n );\n }\n\n let aspectRatio = 1;\n if (width && height) {\n aspectRatio = Number(height) / Number(width);\n }\n\n let setSizes = hasCustomWidths ? widths : IMG_SRC_SET_SIZES;\n if (\n !hasCustomWidths &&\n width &&\n width < IMG_SRC_SET_SIZES[IMG_SRC_SET_SIZES.length - 1]\n ) {\n setSizes = IMG_SRC_SET_SIZES.filter((size) => size <= width);\n }\n const srcGenerator = loader ? loader : addImageSizeParametersToUrl;\n return setSizes\n .map(\n (size) =>\n `${srcGenerator({\n src,\n width: size,\n // height is not applied if there is no crop\n // if there is crop, then height is applied as a ratio of the original width + height aspect ratio * size\n height: crop ? Number(size) * aspectRatio : undefined,\n crop,\n scale,\n })} ${size}w`\n )\n .join(', ');\n}\n", "export const SFAPI_VERSION = '2022-10';\n", "import {createContext, useContext, useMemo, type ReactNode} from 'react';\nimport type {LanguageCode, CountryCode, Shop} from './storefront-api-types.js';\nimport {SFAPI_VERSION} from './storefront-api-constants.js';\nimport {getPublicTokenHeadersRaw} from './storefront-client.js';\n\nconst ShopifyContext = createContext<ShopifyContextValue>({\n storeDomain: 'test.myshopify.com',\n storefrontToken: 'abc123',\n storefrontApiVersion: SFAPI_VERSION,\n country: {\n isoCode: 'US',\n },\n language: {\n isoCode: 'EN',\n },\n locale: 'EN-US',\n getStorefrontApiUrl() {\n return '';\n },\n getPublicTokenHeaders() {\n return {};\n },\n});\n\n/**\n * The `<ShopifyProvider/>` component enables use of the `useShop()` hook. The component should wrap your app.\n */\nexport function ShopifyProvider({\n children,\n shopifyConfig,\n}: {\n children: ReactNode;\n shopifyConfig: ShopifyContextProps;\n}) {\n if (!shopifyConfig) {\n throw new Error(\n `The 'shopifyConfig' prop must be passed to '<ShopifyProvider/>'`\n );\n }\n\n if (shopifyConfig.storefrontApiVersion !== SFAPI_VERSION) {\n console.warn(\n `This version of Hydrogen-UI is built for Shopify's Storefront API version ${SFAPI_VERSION}, but it looks like you're using version ${shopifyConfig.storefrontApiVersion}. There may be issues or bugs if you use a mismatched version of Hydrogen-UI and the Storefront API.`\n );\n }\n\n const finalConfig = useMemo<ShopifyContextValue>(() => {\n const storeDomain = shopifyConfig.storeDomain.replace(/^https?:\\/\\//, '');\n return {\n ...shopifyConfig,\n storeDomain,\n getPublicTokenHeaders(overrideProps) {\n return getPublicTokenHeadersRaw(\n overrideProps.contentType,\n shopifyConfig.storefrontApiVersion,\n overrideProps.storefrontToken ?? shopifyConfig.storefrontToken\n );\n },\n getStorefrontApiUrl(overrideProps) {\n return `https://${overrideProps?.storeDomain ?? storeDomain}/api/${\n overrideProps?.storefrontApiVersion ??\n shopifyConfig.storefrontApiVersion\n }/graphql.json`;\n },\n };\n }, [shopifyConfig]);\n\n return (\n <ShopifyContext.Provider value={finalConfig}>\n {children}\n </ShopifyContext.Provider>\n );\n}\n\n/**\n * Provides access to the `shopifyConfig` prop of `<ShopifyProvider/>`. Must be a descendent of `<ShopifyProvider/>`.\n */\nexport function useShop() {\n const shopContext = useContext(ShopifyContext);\n if (!shopContext) {\n throw new Error(`'useShop()' must be a descendent of <ShopifyProvider/>`);\n }\n return shopContext;\n}\n\n/**\n * Shopify-specific values that are used in various Hydrogen-UI components and hooks.\n */\nexport type ShopifyContextProps = {\n /** The globally-unique identifier for the Shop */\n storefrontId?: string;\n /** The host name of the domain (eg: `{shop}.myshopify.com`). If a URL with a scheme (for example `https://`) is passed in, then the scheme is removed. */\n storeDomain: Shop['primaryDomain']['host'];\n /** The Storefront API public access token. Refer to the [authentication](https://shopify.dev/api/storefront#authentication) documentation for more details. */\n storefrontToken: string;\n /** The Storefront API version. This should almost always be the same as the version Hydrogen-UI was built for. Learn more about Shopify [API versioning](https://shopify.dev/api/usage/versioning) for more details. */\n storefrontApiVersion: string;\n country?: {\n /**\n * The code designating a country, which generally follows ISO 3166-1 alpha-2 guidelines. If a territory doesn't have a country code value in the `CountryCode` enum, it might be considered a subdivision of another country. For example, the territories associated with Spain are represented by the country code `ES`, and the territories associated with the United States of America are represented by the country code `US`.\n */\n isoCode: CountryCode;\n };\n language?: {\n /**\n * `ISO 369` language codes supported by Shopify.\n */\n isoCode: LanguageCode;\n };\n /**\n * The locale string based on `country` and `language`.\n */\n locale?: string;\n};\n\nexport type ShopifyContextValue = ShopifyContextProps & {\n /**\n * Creates the fully-qualified URL to your store's GraphQL endpoint.\n *\n * By default, it will use the config you passed in when creating `<ShopifyProvider/>`. However, you can override the following settings on each invocation of `getStorefrontApiUrl({...})`:\n *\n * - `storeDomain`\n * - `storefrontApiVersion`\n */\n getStorefrontApiUrl: (props?: {\n /** The host name of the domain (eg: `{shop}.myshopify.com`). */\n storeDomain?: string;\n /** The Storefront API version. This should almost always be the same as the version Hydrogen-UI was built for. Learn more about Shopify [API versioning](https://shopify.dev/api/usage/versioning) for more details. */\n storefrontApiVersion?: string;\n }) => string;\n /**\n * Returns an object that contains headers that are needed for each query to Storefront API GraphQL endpoint. This uses the public Storefront API token.\n *\n * By default, it will use the config you passed in when creating `<ShopifyProvider/>`. However, you can override the following settings on each invocation of `getPublicTokenHeaders({...})`:\n *\n * - `contentType`\n * - `storefrontToken`\n *\n */\n getPublicTokenHeaders: (props: {\n /**\n * Customizes which `\"content-type\"` header is added when using `getPrivateTokenHeaders()` and `getPublicTokenHeaders()`. When fetching with a `JSON.stringify()`-ed `body`, use `\"json\"`. When fetching with a `body` that is a plain string, use `\"graphql\"`. Defaults to `\"json\"`\n */\n contentType: 'json' | 'graphql';\n /** The Storefront API access token. Refer to the [authentication](https://shopify.dev/api/storefront#authentication) documentation for more details. */\n storefrontToken?: string;\n }) => Record<string, string>;\n};\n", "import {useMemo} from 'react';\nimport {useShop} from './ShopifyProvider.js';\nimport {CurrencyCode, MoneyV2} from './storefront-api-types.js';\n\nexport type UseMoneyValue = {\n /**\n * The currency code from the `MoneyV2` object.\n */\n currencyCode: CurrencyCode;\n /**\n * The name for the currency code, returned by `Intl.NumberFormat`.\n */\n currencyName?: string;\n /**\n * The currency symbol returned by `Intl.NumberFormat`.\n */\n currencySymbol?: string;\n /**\n * The currency narrow symbol returned by `Intl.NumberFormat`.\n */\n currencyNarrowSymbol?: string;\n /**\n * The localized amount, without any currency symbols or non-number types from the `Intl.NumberFormat.formatToParts` parts.\n */\n amount: string;\n /**\n * All parts returned by `Intl.NumberFormat.formatToParts`.\n */\n parts: Intl.NumberFormatPart[];\n /**\n * A string returned by `new Intl.NumberFormat` for the amount and currency code,\n * using the `locale` value in the [`LocalizationProvider` component](https://shopify.dev/api/hydrogen/components/localization/localizationprovider).\n */\n localizedString: string;\n /**\n * The `MoneyV2` object provided as an argument to the hook.\n */\n original: MoneyV2;\n /**\n * A string with trailing zeros removed from the fractional part, if any exist. If there are no trailing zeros, then the fractional part remains.\n * For example, `$640.00` turns into `$640`.\n * `$640.42` remains `$640.42`.\n */\n withoutTrailingZeros: string;\n /**\n * A string without currency and without trailing zeros removed from the fractional part, if any exist. If there are no trailing zeros, then the fractional part remains.\n * For example, `$640.00` turns into `640`.\n * `$640.42` turns into `640.42`.\n */\n withoutTrailingZerosAndCurrency: string;\n};\n\n/**\n * The `useMoney` hook takes a [MoneyV2 object](https://shopify.dev/api/storefront/reference/common-objects/moneyv2) and returns a\n * default-formatted string of the amount with the correct currency indicator, along with some of the parts provided by\n * [Intl.NumberFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat).\n * Uses `locale` from `ShopifyProvider`\n */\nexport function useMoney(money: MoneyV2): UseMoneyValue {\n const {locale} = useShop();\n\n if (!locale) {\n throw new Error(\n `useMoney(): Unable to get 'locale' from 'useShop()', which means that 'locale' was not passed to '<ShopifyProvider/>'. 'locale' is required for 'useMoney()' to work`\n );\n }\n\n const amount = parseFloat(money.amount);\n\n const options = useMemo(\n () => ({\n style: 'currency',\n currency: money.currencyCode,\n }),\n [money.currencyCode]\n );\n\n const defaultFormatter = useLazyFormatter(locale, options);\n\n const nameFormatter = useLazyFormatter(locale, {\n ...options,\n currencyDisplay: 'name',\n });\n\n const narrowSymbolFormatter = useLazyFormatter(locale, {\n ...options,\n currencyDisplay: 'narrowSymbol',\n });\n\n const withoutTrailingZerosFormatter = useLazyFormatter(locale, {\n ...options,\n minimumFractionDigits: 0,\n maximumFractionDigits: 0,\n });\n\n const withoutCurrencyFormatter = useLazyFormatter(locale);\n\n const withoutTrailingZerosOrCurrencyFormatter = useLazyFormatter(locale, {\n minimumFractionDigits: 0,\n maximumFractionDigits: 0,\n });\n\n const isPartCurrency = (part: Intl.NumberFormatPart) =>\n part.type === 'currency';\n\n // By wrapping these properties in functions, we only\n // create formatters if they are going to be used.\n const lazyFormatters = useMemo(\n () => ({\n original: () => money,\n currencyCode: () => money.currencyCode,\n\n localizedString: () => defaultFormatter().format(amount),\n\n parts: () => defaultFormatter().formatToParts(amount),\n\n withoutTrailingZeros: () =>\n amount % 1 === 0\n ? withoutTrailingZerosFormatter().format(amount)\n : defaultFormatter().format(amount),\n\n withoutTrailingZerosAndCurrency: () =>\n amount % 1 === 0\n ? withoutTrailingZerosOrCurrencyFormatter().format(amount)\n : withoutCurrencyFormatter().format(amount),\n\n currencyName: () =>\n nameFormatter().formatToParts(amount).find(isPartCurrency)?.value ??\n money.currencyCode, // e.g. \"US dollars\"\n\n currencySymbol: () =>\n defaultFormatter().formatToParts(amount).find(isPartCurrency)?.value ??\n money.currencyCode, // e.g. \"USD\"\n\n currencyNarrowSymbol: () =>\n narrowSymbolFormatter().formatToParts(amount).find(isPartCurrency)\n ?.value ?? '', // e.g. \"$\"\n\n amount: () =>\n defaultFormatter()\n .formatToParts(amount)\n .filter((part) =>\n ['decimal', 'fraction', 'group', 'integer', 'literal'].includes(\n part.type\n )\n )\n .map((part) => part.value)\n .join(''),\n }),\n [\n money,\n amount,\n nameFormatter,\n defaultFormatter,\n narrowSymbolFormatter,\n withoutCurrencyFormatter,\n withoutTrailingZerosFormatter,\n withoutTrailingZerosOrCurrencyFormatter,\n ]\n );\n\n // Call functions automatically when the properties are accessed\n // to keep these functions as an implementation detail.\n return useMemo(\n () =>\n new Proxy(lazyFormatters as unknown as UseMoneyValue, {\n get: (target, key) => Reflect.get(target, key)?.call(null),\n }),\n [lazyFormatters]\n );\n}\n\nfunction useLazyFormatter(locale: string, options?: Intl.NumberFormatOptions) {\n return useMemo(() => {\n let memoized: Intl.NumberFormat;\n return () => (memoized ??= new Intl.NumberFormat(locale, options));\n }, [locale, options]);\n}\n", "import {type ReactNode} from 'react';\nimport {useMoney} from './useMoney.js';\nimport type {MoneyV2, UnitPriceMeasurement} from './storefront-api-types.js';\nimport type {PartialDeep} from 'type-fest';\n\ninterface CustomProps<ComponentGeneric extends React.ElementType> {\n /** An HTML tag or React Component to be rendered as the base element wrapper. The default is `div`. */\n as?: ComponentGeneric;\n /** An object with fields that correspond to the Storefront API's [MoneyV2 object](https://shopify.dev/api/storefront/reference/common-objects/moneyv2). */\n data: PartialDeep<MoneyV2, {recurseIntoArrays: true}>;\n /** Whether to remove the currency symbol from the output. */\n withoutCurrency?: boolean;\n /** Whether to remove trailing zeros (fractional money) from the output. */\n withoutTrailingZeros?: boolean;\n /** A [UnitPriceMeasurement object](https://shopify.dev/api/storefront/latest/objects/unitpricemeasurement). */\n measurement?: PartialDeep<UnitPriceMeasurement, {recurseIntoArrays: true}>;\n /** Customizes the separator between the money output and the measurement output. Used with the `measurement` prop. Defaults to `'/'`. */\n measurementSeparator?: ReactNode;\n}\n\n// This article helps understand the typing here https://www.benmvp.com/blog/polymorphic-react-components-typescript/ Ben is the best :)\nexport type MoneyProps<ComponentGeneric extends React.ElementType> =\n CustomProps<ComponentGeneric> &\n Omit<\n React.ComponentPropsWithoutRef<ComponentGeneric>,\n keyof CustomProps<ComponentGeneric>\n >;\n\n/**\n * The `Money` component renders a string of the Storefront API's\n * [MoneyV2 object](https://shopify.dev/api/storefront/reference/common-objects/moneyv2) according to the\n * `locale` in the `ShopifyProvider` component.\n */\nexport function Money<ComponentGeneric extends React.ElementType>({\n data,\n as,\n withoutCurrency,\n withoutTrailingZeros,\n measurement,\n measurementSeparator = '/',\n ...passthroughProps\n}: MoneyProps<ComponentGeneric>) {\n if (!isMoney(data)) {\n throw new Error(\n `<Money/> needs a valid 'data' prop that has 'amount' and 'currencyCode'`\n );\n }\n const moneyObject = useMoney(data);\n const Wrapper = as ?? 'div';\n\n let output = moneyObject.localizedString;\n\n if (withoutCurrency || withoutTrailingZeros) {\n if (withoutCurrency && !withoutTrailingZeros) {\n output = moneyObject.amount;\n } else if (!withoutCurrency && withoutTrailingZeros) {\n output = moneyObject.withoutTrailingZeros;\n } else {\n // both\n output = moneyObject.withoutTrailingZerosAndCurrency;\n }\n }\n\n return (\n <Wrapper {...passthroughProps}>\n {output}\n {measurement && measurement.referenceUnit && (\n <>\n {measurementSeparator}\n {measurement.referenceUnit}\n </>\n )}\n </Wrapper>\n );\n}\n\n// required in order to narrow the money object down and make TS happy\nfunction isMoney(\n maybeMoney: PartialDeep<MoneyV2, {recurseIntoArrays: true}>\n): maybeMoney is MoneyV2 {\n return (\n typeof maybeMoney.amount === 'string' &&\n !!maybeMoney.amount &&\n typeof maybeMoney.currencyCode === 'string' &&\n !!maybeMoney.currencyCode\n );\n}\n", "import {useState, useEffect} from 'react';\n\nconst SCRIPTS_LOADED: Record<string, Promise<boolean>> = {};\n\nexport function loadScript(\n src: string,\n options?: {module?: boolean; in?: 'head' | 'body'}\n): Promise<boolean> {\n const isScriptLoaded: Promise<boolean> = SCRIPTS_LOADED[src];\n\n if (isScriptLoaded) {\n return isScriptLoaded;\n }\n\n const promise = new Promise<boolean>((resolve, reject) => {\n const script = document.createElement('script');\n if (options?.module) {\n script.type = 'module';\n } else {\n script.type = 'text/javascript';\n }\n script.src = src;\n script.onload = () => {\n resolve(true);\n };\n script.onerror = () => {\n reject(false);\n };\n if (options?.in === 'head') {\n document.head.appendChild(script);\n } else {\n document.body.appendChild(script);\n }\n });\n\n SCRIPTS_LOADED[src] = promise;\n\n return promise;\n}\n\ntype LoadScriptParams = Parameters<typeof loadScript>;\n\n/**\n * The `useLoadScript` hook loads an external script tag in the browser. It allows React components to lazy-load large third-party dependencies.\n */\nexport function useLoadScript(\n url: LoadScriptParams[0],\n options?: LoadScriptParams[1]\n): ScriptState {\n const [status, setStatus] = useState<ScriptState>('loading');\n const stringifiedOptions = JSON.stringify(options);\n\n useEffect(() => {\n async function loadScriptWrapper() {\n try {\n setStatus('loading');\n await loadScript(url, options);\n setStatus('done');\n } catch (error) {\n setStatus('error');\n }\n }\n\n loadScriptWrapper();\n }, [url, stringifiedOptions, options]);\n\n return status;\n}\n\ntype ScriptState = 'loading' | 'done' | 'error';\n", "import {useShop} from './ShopifyProvider.js';\nimport {useLoadScript} from './load-script.js';\n\n// By using 'never' in the \"or\" cases below, it makes these props \"exclusive\" and means that you cannot pass both of them; you must pass either one OR the other.\ntype ShopPayButtonProps = {\n /** A string of classes to apply to the `div` that wraps the Shop Pay button. */\n className?: string;\n /** A string that's applied to the [CSS custom property (variable)](https://developer.mozilla.org/en-US/docs/Web/CSS/--*) `--shop-pay-button-width` for the [Buy with Shop Pay component](https://shopify.dev/custom-storefronts/tools/web-components#buy-with-shop-pay-component). */\n width?: string;\n} & (\n | {\n /** An array of IDs of the variants to purchase with Shop Pay. This will only ever have a quantity of 1 for each variant. If you want to use other quantities, then use 'variantIdsAndQuantities'. */\n variantIds: string[];\n /** An array of variant IDs and quantities to purchase with Shop Pay. */\n variantIdsAndQuantities?: never;\n }\n | {\n /** An array of IDs of the variants to purchase with Shop Pay. This will only ever have a quantity of 1 for each variant. If you want to use other quantities, then use 'variantIdsAndQuantities'. */\n variantIds?: never;\n /** An array of variant IDs and quantities to purchase with Shop Pay. */\n variantIdsAndQuantities: Array<{\n id: string;\n quantity: number;\n }>;\n }\n);\n\ndeclare global {\n // eslint-disable-next-line @typescript-eslint/no-namespace\n namespace JSX {\n interface IntrinsicElements {\n 'shop-pay-button': {\n variants: string;\n 'store-url': string;\n };\n }\n }\n}\n\nconst SHOPJS_URL =\n 'https://cdn.shopify.com/shopifycloud/shop-js/v1.0/client.js';\n\n/**\n * The `ShopPayButton` component renders a button that redirects to the Shop Pay checkout.\n * It renders a [`<shop-pay-button>`](https://shopify.dev/custom-storefronts/tools/web-components) custom element, for which it will lazy-load the source code automatically.\n * It relies on the `<ShopProvider>` context provider.\n */\nexport function ShopPayButton({\n variantIds,\n className,\n variantIdsAndQuantities,\n width,\n}: ShopPayButtonProps) {\n const {storeDomain} = useShop();\n const shopPayLoadedStatus = useLoadScript(SHOPJS_URL);\n\n let ids: string[];\n\n if (variantIds && variantIdsAndQuantities) {\n throw new Error(DoublePropsErrorMessage);\n }\n\n if (variantIds) {\n ids = variantIds.reduce<string[]>((prev, curr) => {\n const bareId = getIdFromGid(curr);\n if (bareId) {\n prev.push(bareId);\n }\n return prev;\n }, []);\n } else if (variantIdsAndQuantities) {\n ids = variantIdsAndQuantities.reduce<string[]>((prev, curr) => {\n const bareId = getIdFromGid(curr?.id);\n if (bareId) {\n prev.push(`${bareId}:${curr?.quantity ?? 1}`);\n }\n return prev;\n }, []);\n } else {\n throw new Error(MissingPropsErrorMessage);\n }\n\n const style = width\n ? ({\n '--shop-pay-button-width': width,\n } as React.CSSProperties)\n : undefined;\n\n return (\n <div className={className} style={style}>\n {shopPayLoadedStatus === 'done' && (\n <shop-pay-button\n store-url={`https://${storeDomain}`}\n variants={ids.join(',')}\n />\n )}\n </div>\n );\n}\n\n/**\n * Takes a string in the format of \"gid://shopify/ProductVariant/41007289630776\" and returns a string of the ID part at the end: \"41007289630776\"\n */\nexport function getIdFromGid(id?: string) {\n if (!id) return;\n return id.split('/').pop();\n}\n\nexport const MissingPropsErrorMessage = `You must pass in either \"variantIds\" or \"variantIdsAndQuantities\" to ShopPayButton`;\nexport const DoublePropsErrorMessage = `You must provide either a variantIds or variantIdsAndQuantities prop, but not both in the ShopPayButton component`;\n", "import type {ExternalVideo as ExternalVideoType} from './storefront-api-types.js';\nimport type {PartialDeep} from 'type-fest';\n\ninterface BaseProps {\n /**\n * An object with fields that correspond to the Storefront API's [ExternalVideo object](https://shopify.dev/api/storefront/reference/products/externalvideo).\n */\n data: PartialDeep<ExternalVideoType, {recurseIntoArrays: true}>;\n /** An object containing the options available for either\n * [YouTube](https://developers.google.com/youtube/player_parameters#Parameters) or\n * [Vimeo](https://vimeo.zendesk.com/hc/en-us/articles/360001494447-Using-Player-Parameters).\n */\n options?: YouTube | Vimeo;\n}\n\ntype PropsWeControl = 'src';\n\nexport type ExternalVideoProps = Omit<\n JSX.IntrinsicElements['iframe'],\n PropsWeControl\n> &\n BaseProps;\n\n/**\n * The `ExternalVideo` component renders an embedded video for the Storefront\n * API's [ExternalVideo object](https://shopify.dev/api/storefront/reference/products/externalvideo).\n */\nexport function ExternalVideo(props: ExternalVideoProps) {\n const {\n data,\n options,\n id = data.id,\n frameBorder = '0',\n allow = 'accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture',\n allowFullScreen = true,\n loading = 'lazy',\n ...passthroughProps\n } = props;\n\n if (!data.embedUrl) {\n throw new Error(`<ExternalVideo/> requires the 'embedUrl' property`);\n }\n\n let finalUrl: string = data.embedUrl;\n\n if (options) {\n const urlObject = new URL(data.embedUrl);\n for (const key of Object.keys(options)) {\n // @ts-expect-error https://github.com/microsoft/TypeScript/issues/32951\n urlObject.searchParams.set(key, options[key]);\n }\n finalUrl = urlObject.toString();\n }\n\n return (\n <iframe\n {...passthroughProps}\n id={id ?? data.embedUrl}\n title={data.alt ?? data.id ?? 'external video'}\n frameBorder={frameBorder}\n allow={allow}\n allowFullScreen={allowFullScreen}\n src={finalUrl}\n loading={loading}\n ></iframe>\n );\n}\n\ninterface YouTube {\n autoplay?: 0 | 1;\n cc_lang_pref?: string;\n cc_load_policy?: 1;\n color?: 'red' | 'white';\n controls?: 0 | 1;\n disablekb?: 0 | 1;\n enablejsapi?: 0 | 1;\n end?: number;\n fs?: 0 | 1;\n hl?: string;\n iv_load_policy?: 1 | 3;\n list?: string;\n list_type?: 'playlist' | 'user_uploads';\n loop?: 0 | 1;\n modest_branding?: 1;\n origin?: string;\n playlist?: string;\n plays_inline?: 0 | 1;\n rel?: 0 | 1;\n start?: number;\n widget_referrer?: string;\n}\n\ntype VimeoBoolean = 0 | 1 | boolean;\n\ninterface Vimeo {\n autopause?: VimeoBoolean;\n autoplay?: VimeoBoolean;\n background?: VimeoBoolean;\n byline?: VimeoBoolean;\n color?: string;\n controls?: VimeoBoolean;\n dnt?: VimeoBoolean;\n loop?: VimeoBoolean;\n muted?: VimeoBoolean;\n pip?: VimeoBoolean;\n playsinline?: VimeoBoolean;\n portrait?: VimeoBoolean;\n quality?: '240p' | '360p' | '540p' | '720p' | '1080p' | '2k' | '4k';\n speed?: VimeoBoolean;\n '#t'?: string;\n texttrack?: string;\n title?: VimeoBoolean;\n transparent?: VimeoBoolean;\n}\n", "import {type HTMLAttributes} from 'react';\nimport {shopifyImageLoader} from './image-size.js';\nimport type {Video as VideoType} from './storefront-api-types.js';\nimport type {PartialDeep} from 'type-fest';\n\nexport interface VideoProps {\n /** An object with fields that correspond to the Storefront API's [Video object](https://shopify.dev/api/storefront/latest/objects/video). */\n data: PartialDeep<VideoType, {recurseIntoArrays: true}>;\n /** An object of image size options for the video's `previewImage`. Uses `shopifyImageLoader` to generate the `poster` URL. */\n previewImageOptions?: Parameters<typeof shopifyImageLoader>[0];\n /** Props that will be passed to the `video` element's `source` children elements. */\n sourceProps?: HTMLAttributes<HTMLSourceElement> & {\n 'data-testid'?: string;\n };\n}\n\n/**\n * The `Video` component renders a `video` for the Storefront API's [Video object](https://shopify.dev/api/storefront/reference/products/video).\n */\nexport function Video(props: JSX.IntrinsicElements['video'] & VideoProps) {\n const {\n data,\n previewImageOptions,\n id = data.id,\n playsInline = true,\n controls = true,\n sourceProps = {},\n ...passthroughProps\n } = props;\n\n const posterUrl = shopifyImageLoader({\n src: data.previewImage?.url ?? '',\n ...previewImageOptions,\n });\n\n if (!data.sources) {\n throw new Error(`<Video/> requires a 'data.sources' array`);\n }\n\n return (\n // eslint-disable-next-line jsx-a11y/media-has-caption\n <video\n {...passthroughProps}\n id={id}\n playsInline={playsInline}\n controls={controls}\n poster={posterUrl}\n >\n {data.sources.map((source) => {\n if (!(source?.url && source?.mimeType)) {\n throw new Error(`<Video/> needs 'source.url' and 'source.mimeType'`);\n }\n return (\n <source\n {...sourceProps}\n key={source.url}\n src={source.url}\n type={source.mimeType}\n />\n );\n })}\n </video>\n );\n}\n", "import {useState, useEffect, useCallback} from 'react';\nimport {useLoadScript} from './load-script.js';\nimport type {Model3d} from './storefront-api-types.js';\nimport type {PartialDeep} from 'type-fest';\nimport type {ModelViewerElement} from '@google/model-viewer/lib/model-viewer.js';\n\ntype PropsWeControl = 'src';\n\ndeclare global {\n // eslint-disable-next-line @typescript-eslint/no-namespace\n namespace JSX {\n interface IntrinsicElements {\n 'model-viewer': PartialDeep<\n ModelViewerElement,\n {recurseIntoArrays: true}\n >;\n }\n }\n}\n\ntype ModelViewerProps = Omit<\n PartialDeep<JSX.IntrinsicElements['model-viewer'], {recurseIntoArrays: true}>,\n PropsWeControl\n> & {\n /** An object with fields that correspond to the Storefront API's [Model3D object](https://shopify.dev/api/storefront/latest/objects/model3d). */\n data: PartialDeep<Model3d, {recurseIntoArrays: true}>;\n /** The callback to invoke when the 'error' event is triggered. Refer to [error in the <model-viewer> documentation](https://modelviewer.dev/docs/index.html#entrydocs-loading-events-error). */\n onError?: (event: Event) => void;\n /** The callback to invoke when the `load` event is triggered. Refer to [load in the <model-viewer> documentation](https://modelviewer.dev/docs/index.html#entrydocs-loading-events-load). */\n onLoad?: (event: Event) => void;\n /** The callback to invoke when the 'preload' event is triggered. Refer to [preload in the <model-viewer> documentation](https://modelviewer.dev/docs/index.html#entrydocs-loading-events-preload). */\n onPreload?: (event: Event) => void;\n /** The callback to invoke when the 'model-visibility' event is triggered. Refer to [model-visibility in the <model-viewer> documentation](https://modelviewer.dev/docs/index.html#entrydocs-loading-events-modelVisibility). */\n onModelVisibility?: (event: Event) => void;\n /** The callback to invoke when the 'progress' event is triggered. Refer to [progress in the <model-viewer> documentation](https://modelviewer.dev/docs/index.html#entrydocs-loading-events-progress). */\n onProgress?: (event: Event) => void;\n /** The callback to invoke when the 'ar-status' event is triggered. Refer to [ar-status in the <model-viewer> documentation](https://modelviewer.dev/docs/index.html#entrydocs-augmentedreality-events-arStatus). */\n onArStatus?: (event: Event) => void;\n /** The callback to invoke when the 'ar-tracking' event is triggered. Refer to [ar-tracking in the <model-viewer> documentation](https://modelviewer.dev/docs/index.html#entrydocs-augmentedreality-events-arTracking). */\n onArTracking?: (event: Event) => void;\n /** The callback to invoke when the 'quick-look-button-tapped' event is triggered. Refer to [quick-look-button-tapped in the <model-viewer> documentation](https://modelviewer.dev/docs/index.html#entrydocs-augmentedreality-events-quickLookButtonTapped). */\n onQuickLookButtonTapped?: (event: Event) => void;\n /** The callback to invoke when the 'camera-change' event is triggered. Refer to [camera-change in the <model-viewer> documentation](https://modelviewer.dev/docs/index.html#entrydocs-stagingandcameras-events-cameraChange). */\n onCameraChange?: (event: Event) => void;\n /** The callback to invoke when the 'environment-change' event is triggered. Refer to [environment-change in the <model-viewer> documentation](https://modelviewer.dev/docs/index.html#entrydocs-lightingandenv-events-environmentChange). */\n onEnvironmentChange?: (event: Event) => void;\n /** The callback to invoke when the 'play' event is triggered. Refer to [play in the <model-viewer> documentation](https://modelviewer.dev/docs/index.html#entrydocs-animation-events-play). */\n onPlay?: (event: Event) => void;\n /** The callback to invoke when the 'pause' event is triggered. Refer to [pause in the <model-viewer> documentation](https://modelviewer.dev/docs/index.html#entrydocs-animation-events-pause). */\n onPause?: (event: Event) => void;\n /** The callback to invoke when the 'scene-graph-ready' event is triggered. Refer to [scene-graph-ready in the <model-viewer> documentation](https://modelviewer.dev/docs/index.html#entrydocs-scenegraph-events-sceneGraphReady). */\n onSceneGraphReady?: (event: Event) => void;\n};\n\n/**\n * The `ModelViewer` component renders a 3D model (with the `model-viewer` custom element) for\n * the Storefront API's [Model3d object](https://shopify.dev/api/storefront/reference/products/model3d).\n *\n * The `model-viewer` custom element is lazily downloaded through a dynamically-injected `<script type=\"module\">` tag when the `<ModelViewer />` component is rendered\n *\n * ModelViewer is using version `1.21.1` of the `@google/model-viewer` library.\n */\nexport function ModelViewer(props: ModelViewerProps) {\n const [modelViewer, setModelViewer] = useState<undefined | HTMLElement>(\n undefined\n );\n const callbackRef = useCallback((node: HTMLElement) => {\n setModelViewer(node);\n }, []);\n const {data, children, className, ...passthroughProps} = props;\n\n const modelViewerLoadedStatus = useLoadScript(\n 'https://unpkg.com/@google/model-viewer@v1.12.1/dist/model-viewer.min.js',\n {\n module: true,\n }\n );\n\n useEffect(() => {\n if (!modelViewer) {\n return;\n }\n if (passthroughProps.onError)\n modelViewer.addEventListener('error', passthroughProps.onError);\n if (passthroughProps.onLoad)\n modelViewer.addEventListener('load', passthroughProps.onLoad);\n if (passthroughProps.onPreload)\n modelViewer.addEventListener('preload', passthroughProps.onPreload);\n if (passthroughProps.onModelVisibility)\n modelViewer.addEventListener(\n 'model-visibility',\n passthroughProps.onModelVisibility\n );\n if (passthroughProps.onProgress)\n modelViewer.addEventListener('progress', passthroughProps.onProgress);\n if (passthroughProps.onArStatus)\n modelViewer.addEventListener('ar-status', passthroughProps.onArStatus);\n if (passthroughProps.onArTracking)\n modelViewer.addEventListener(\n 'ar-tracking',\n passthroughProps.onArTracking\n );\n if (passthroughProps.onQuickLookButtonTapped)\n modelViewer.addEventListener(\n 'quick-look-button-tapped',\n passthroughProps.onQuickLookButtonTapped\n );\n if (passthroughProps.onCameraChange)\n modelViewer.addEventListener(\n 'camera-change',\n passthroughProps.onCameraChange\n );\n if (passthroughProps.onEnvironmentChange)\n modelViewer.addEventListener(\n 'environment-change',\n passthroughProps.onEnvironmentChange\n );\n if (passthroughProps.onPlay)\n modelViewer.addEventListener('play', passthroughProps.onPlay);\n if (passthroughProps.onPause)\n modelViewer.addEventListener('ar-status', passthroughProps.onPause);\n if (passthroughProps.onSceneGraphReady)\n modelViewer.addEventListener(\n 'scene-graph-ready',\n passthroughProps.onSceneGraphReady\n );\n\n return () => {\n if (modelViewer == null) {\n return;\n }\n if (passthroughProps.onError)\n modelViewer.removeEventListener('error', passthroughProps.onError);\n if (passthroughProps.onLoad)\n modelViewer.removeEventListener('load', passthroughProps.onLoad);\n if (passthroughProps.onPreload)\n modelViewer.removeEventListener('preload', passthroughProps.onPreload);\n if (passthroughProps.onModelVisibility)\n modelViewer.removeEventListener(\n 'model-visibility',\n passthroughProps.onModelVisibility\n );\n if (passthroughProps.onProgress)\n modelViewer.removeEventListener(\n 'progress',\n passthroughProps.onProgress\n );\n if (passthroughProps.onArStatus)\n modelViewer.removeEventListener(\n 'ar-status',\n passthroughProps.onArStatus\n );\n if (passthroughProps.onArTracking)\n modelViewer.removeEventListener(\n 'ar-tracking',\n passthroughProps.onArTracking\n );\n if (passthroughProps.onQuickLookButtonTapped)\n modelViewer.removeEventListener(\n 'quick-look-button-tapped',\n passthroughProps.onQuickLookButtonTapped\n );\n if (passthroughProps.onCameraChange)\n modelViewer.removeEventListener(\n 'camera-change',\n passthroughProps.onCameraChange\n );\n if (passthroughProps.onEnvironmentChange)\n modelViewer.removeEventListener(\n 'environment-change',\n passthroughProps.onEnvironmentChange\n );\n if (passthroughProps.onPlay)\n modelViewer.removeEventListener('play', passthroughProps.onPlay);\n if (passthroughProps.onPause)\n modelViewer.removeEventListener('ar-status', passthroughProps.onPause);\n if (passthroughProps.onSceneGraphReady)\n modelViewer.removeEventListener(\n 'scene-graph-ready',\n passthroughProps.onSceneGraphReady\n );\n };\n }, [\n modelViewer,\n passthroughProps.onArStatus,\n passthroughProps.onArTracking,\n passthroughProps.onCameraChange,\n passthroughProps.onEnvironmentChange,\n passthroughProps.onError,\n passthroughProps.onLoad,\n passthroughProps.onModelVisibility,\n passthroughProps.onPause,\n passthroughProps.onPlay,\n passthroughProps.onPreload,\n passthroughProps.onProgress,\n passthroughProps.onQuickLookButtonTapped,\n passthroughProps.onSceneGraphReady,\n ]);\n\n if (modelViewerLoadedStatus !== 'done') {\n // TODO: What do we want to display while the model-viewer library loads?\n return null;\n }\n\n if (!data.sources?.[0]?.url) {\n const sourcesUrlError = `<ModelViewer/> requires 'data.sources' prop to be an array, with an object that has a property 'url' on it. Rendering 'null'`;\n if (__HYDROGEN_DEV__) {\n throw new Error(sourcesUrlError);\n } else {\n console.error(sourcesUrlError);\n return null;\n }\n }\n\n if (__HYDROGEN_DEV__ && !data.alt) {\n console.warn(\n `<ModelViewer/> requires the 'data.alt' prop for accessibility`\n );\n }\n\n return (\n <model-viewer\n // @ts-expect-error ref should exist\n ref={callbackRef}\n {...passthroughProps}\n className={className}\n id={passthroughProps.id ?? data.id}\n src={data.sources[0].url}\n alt={data.alt ?? null}\n camera-controls={passthroughProps.cameraControls ?? true}\n poster={(passthroughProps.poster || data.previewImage?.url) ?? null}\n autoplay={passthroughProps.autoplay ?? true}\n loading={passthroughProps.loading}\n reveal={passthroughProps.reveal}\n ar={passthroughProps.ar}\n ar-modes={passthroughProps.arModes}\n ar-scale={passthroughProps.arScale}\n // @ts-expect-error arPlacement should exist as a type, not sure why it doesn't. https://modelviewer.dev/docs/index.html#entrydocs-augmentedreality-attributes-arPlacement\n ar-placement={passthroughProps.arPlacement}\n ios-src={passthroughProps.iosSrc}\n touch-action={passthroughProps.touchAction}\n disable-zoom={passthroughProps.disableZoom}\n orbit-sensitivity={passthroughProps.orbitSensitivity}\n auto-rotate={passthroughProps.autoRotate}\n auto-rotate-delay={passthroughProps.autoRotateDelay}\n // @ts-expect-error rotationPerSecond should exist as a type, not sure why it doesn't. https://modelviewer.dev/docs/index.html#entrydocs-stagingandcameras-attributes-rotationPerSecond\n rotation-per-second={passthroughProps.rotationPerSecond}\n interaction-policy={passthroughProps.interactionPolicy}\n interaction-prompt={passthroughProps.interactionPrompt}\n interaction-prompt-style={passthroughProps.interactionPromptStyle}\n interaction-prompt-threshold={passthroughProps.interactionPromptThreshold}\n camera-orbit={passthroughProps.cameraOrbit}\n camera-target={passthroughProps.cameraTarget}\n field-of-view={passthroughProps.fieldOfView}\n max-camera-orbit={passthroughProps.maxCameraOrbit}\n min-camera-orbit={passthroughProps.minCameraOrbit}\n max-field-of-view={passthroughProps.maxFieldOfView}\n min-field-of-view={passthroughProps.minFieldOfView}\n bounds={passthroughProps.bounds}\n interpolation-decay={passthroughProps.interpolationDecay ?? 100}\n skybox-image={passthroughProps.skyboxImage}\n environment-image={passthroughProps.environmentImage}\n exposure={passthroughProps.exposure}\n shadow-intensity={passthroughProps.shadowIntensity ?? 0}\n shadow-softness={passthroughProps.shadowSoftness ?? 0}\n animation-name={passthroughProps.animationName}\n animation-crossfade-duration={passthroughProps.animationCrossfadeDuration}\n variant-name={passthroughProps.variantName}\n orientation={passthroughProps.orientation}\n scale={passthroughProps.scale}\n >\n {children}\n </model-viewer>\n );\n}\n", "import {Image, type ShopifyImageProps} from './Image.js';\nimport {Video} from './Video.js';\nimport {ExternalVideo} from './ExternalVideo.js';\nimport {ModelViewer} from './ModelViewer.js';\nimport type {MediaEdge as MediaEdgeType} from './storefront-api-types.js';\nimport type {PartialDeep} from 'type-fest';\nimport type {ModelViewerElement} from '@google/model-viewer/lib/model-viewer.js';\n\ntype BaseProps = React.HTMLAttributes<\n HTMLImageElement | HTMLVideoElement | HTMLIFrameElement | ModelViewerElement\n>;\nexport interface MediaFileProps extends BaseProps {\n /** An object with fields that correspond to the Storefront API's [Media object](https://shopify.dev/api/storefront/reference/products/media). */\n data: PartialDeep<MediaEdgeType['node'], {recurseIntoArrays: true}>;\n /** The options for the `Image`, `Video`, or `ExternalVideo` components. */\n mediaOptions?: {\n /** Props that will only apply when an `<Image />` is rendered */\n image: Omit<ShopifyImageProps, 'data'>;\n /** Props that will only apply when a `<Video />` is rendered */\n video: Omit<React.ComponentProps<typeof Video>, 'data'>;\n /** Props that will only apply when an `<ExternalVideo />` is rendered */\n externalVideo: Omit<\n React.ComponentProps<typeof ExternalVideo>['options'],\n 'data'\n >;\n /** Props that will only apply when a `<ModelViewer />` is rendered */\n modelViewer: Omit<typeof ModelViewer, 'data'>;\n };\n}\n\n/**\n * The `MediaFile` component renders the media for the Storefront API's\n * [Media object](https://shopify.dev/api/storefront/reference/products/media). It renders an `Image`, a\n * `Video`, an `ExternalVideo`, or a `ModelViewer` depending on the `__typename` of the `data` prop.\n */\nexport function MediaFile({\n data,\n mediaOptions,\n ...passthroughProps\n}: MediaFileProps) {\n switch (data.__typename) {\n case 'MediaImage': {\n if (!data.image) {\n const noDataImage = `<MediaFile/>: 'data.image' does not exist for __typename of 'MediaImage'; rendering 'null' by default.`;\n if (__HYDROGEN_DEV__) {\n throw new Error(noDataImage);\n } else {\n console.warn(noDataImage);\n return null;\n }\n }\n\n return (\n <Image\n {...passthroughProps}\n {...mediaOptions?.image}\n data={data.image}\n />\n );\n }\n case 'Video': {\n return (\n <Video {...passthroughProps} {...mediaOptions?.video} data={data} />\n );\n }\n case 'ExternalVideo': {\n return (\n <ExternalVideo\n {...passthroughProps}\n {...mediaOptions?.externalVideo}\n data={data}\n />\n );\n }\n case 'Model3d': {\n return (\n // @ts-expect-error There are issues with the inferred HTML attribute types here for ModelViewer (and contentEditable), but I think that's a little bit beyond me at the moment\n <ModelViewer\n {...passthroughProps}\n {...mediaOptions?.modelViewer}\n data={data}\n />\n );\n }\n default: {\n const typenameMissingMessage = `<MediaFile /> requires the '__typename' property to exist on the 'data' prop in order to correctly render the correct component for this media. Rendering 'null' by default`;\n if (__HYDROGEN_DEV__) {\n throw new Error(typenameMissingMessage);\n } else {\n console.error(typenameMissingMessage);\n return null;\n }\n }\n }\n}\n"],
5
- "mappings": "iHAQO,SAASA,EACdC,EAC6C,CAC7C,GAAI,CAACA,EAAY,CACf,IAAMC,EAAkB,uEAAuED,aAI7F,eAAQ,MAAMC,CAAe,EACtB,CAAA,CAEX,CAEA,OAAID,EAAW,MACNA,EAAW,MAGhBA,EAAW,MACNA,EAAW,MAAM,IAAKE,GAAS,CAChC,GA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CD,GAAcQ,MAAO,KAAAT,CAAA,CADxD,MAIG,gBACH,SAAA,OACGU,EAAD,CAAA,GACMR,EADN,GAEMD,GAAcU,cAClB,KAAAX,CAAA,CAJJ,MAQG,UACH,SAAA,OAEGY,EAAA,IACKV,EADN,GAEMD,GAAcY,YAClB,KAAAb,CAAA,CAHF,UAYAM,eAAQQ,MAJsB,6KAI9B,EACO,KAId",
6
- "names": ["flattenConnection", "connection", "noConnectionErr", "edge", "PRODUCTION_CDN_HOSTNAMES", "LOCAL_CDN_HOSTNAMES", "ALL_CDN_HOSTNAMES", "IMG_SRC_SET_SIZES", "addImageSizeParametersToUrl", "src", "width", "height", "crop", "scale", "newUrl", "multipliedScale", "finalWidth", "shopifyImageLoader", "params", "newSrc", "allowedHostname", "getShopifyImageDimensions", "sfapiImage", "loaderOptions", "elementProps", "_a", "_b", "_c", "_d", "_e", "_f", "aspectRatio", "Image", "data", "width", "height", "loading", "loader", "shopifyImageLoader", "loaderOptions", "widths", "decoding", "rest", "url", "missingUrlError", "id", "console", "error", "imgElementWidth", "imgElementHeight", "getShopifyImageDimensions", "elementProps", "finalSrc", "src", "Error", "maxWidth", "finalSrcset", "srcSet", "internalImageSrcSet", "altText", "alt", "undefined", "crop", "scale", "hasCustomWidths", "Array", "isArray", "some", "size", "isNaN", "aspectRatio", "Number", "setSizes", "IMG_SRC_SET_SIZES", "length", "filter", "srcGenerator", "addImageSizeParametersToUrl", "map", "join", "SFAPI_VERSION", "ShopifyContext", "createContext", "storeDomain", "storefrontToken", "storefrontApiVersion", "SFAPI_VERSION", "country", "isoCode", "language", "locale", "getStorefrontApiUrl", "getPublicTokenHeaders", "useShop", "shopContext", "useContext", "ShopifyContext", "Error", "useMoney", "money", "locale", "useShop", "Error", "amount", "parseFloat", "options", "useMemo", "style", "currency", "currencyCode", "defaultFormatter", "useLazyFormatter", "nameFormatter", "currencyDisplay", "narrowSymbolFormatter", "withoutTrailingZerosFormatter", "minimumFractionDigits", "maximumFractionDigits", "withoutCurrencyFormatter", "withoutTrailingZerosOrCurrencyFormatter", "isPartCurrency", "part", "type", "lazyFormatters", "original", "localizedString", "format", "parts", "formatToParts", "withoutTrailingZeros", "withoutTrailingZerosAndCurrency", "currencyName", "find", "value", "currencySymbol", "currencyNarrowSymbol", "filter", "includes", "map", "join", "Proxy", "get", "target", "key", "Reflect", "call", "memoized", "Intl", "NumberFormat", "Money", "data", "as", "withoutCurrency", "withoutTrailingZeros", "measurement", "measurementSeparator", "passthroughProps", "isMoney", "Error", "moneyObject", "useMoney", "Wrapper", "output", "localizedString", "amount", "withoutTrailingZerosAndCurrency", "referenceUnit", "_Fragment", "maybeMoney", "currencyCode", "SCRIPTS_LOADED", "loadScript", "src", "options", "isScriptLoaded", "promise", "Promise", "resolve", "reject", "script", "document", "createElement", "module", "type", "onload", "onerror", "in", "head", "appendChild", "body", "useLoadScript", "url", "status", "setStatus", "useState", "stringifiedOptions", "JSON", "stringify", "useEffect", "loadScriptWrapper", "SHOPJS_URL", "ShopPayButton", "variantIds", "className", "variantIdsAndQuantities", "width", "storeDomain", "useShop", "shopPayLoadedStatus", "useLoadScript", "ids", "Error", "DoublePropsErrorMessage", "reduce", "prev", "curr", "bareId", "getIdFromGid", "push", "id", "quantity", "MissingPropsErrorMessage", "undefined", "_jsx", "join", "split", "pop", "ExternalVideo", "props", "data", "options", "id", "frameBorder", "allow", "allowFullScreen", "loading", "passthroughProps", "embedUrl", "Error", "finalUrl", "urlObject", "URL", "key", "Object", "keys", "searchParams", "set", "toString", "alt", "Video", "props", "data", "previewImageOptions", "id", "playsInline", "controls", "sourceProps", "passthroughProps", "posterUrl", "shopifyImageLoader", "src", "previewImage", "url", "sources", "Error", "map", "source", "mimeType", "ModelViewer", "props", "modelViewer", "setModelViewer", "useState", "undefined", "callbackRef", "useCallback", "node", "data", "children", "className", "passthroughProps", "modelViewerLoadedStatus", "useLoadScript", "module", "useEffect", "onError", "addEventListener", "onLoad", "onPreload", "onModelVisibility", "onProgress", "onArStatus", "onArTracking", "onQuickLookButtonTapped", "onCameraChange", "onEnvironmentChange", "onPlay", "onPause", "onSceneGraphReady", "removeEventListener", "sources", "url", "id", "alt", "cameraControls", "poster", "previewImage", "autoplay", "loading", "reveal", "ar", "arModes", "arScale", "arPlacement", "iosSrc", "touchAction", "disableZoom", "orbitSensitivity", "autoRotate", "autoRotateDelay", "rotationPerSecond", "interactionPolicy", "interactionPrompt", "interactionPromptStyle", "interactionPromptThreshold", "cameraOrbit", "cameraTarget", "fieldOfView", "maxCameraOrbit", "minCameraOrbit", "maxFieldOfView", "minFieldOfView", "bounds", "interpolationDecay", "skyboxImage", "environmentImage", "exposure", "shadowIntensity", "shadowSoftness", "animationName", "animationCrossfadeDuration", "variantName", "orientation", "scale", "console", "error", "MediaFile", "data", "mediaOptions", "passthroughProps", "__typename", "image", "Image", "console", "warn", "Video", "video", "ExternalVideo", "externalVideo", "ModelViewer", "modelViewer", "error"]
7
- }
@@ -1,32 +0,0 @@
1
- import{b as $,d as l}from"/build/_shared/chunk-J43VR2R2.js";import{M as f,O as p,Z as h,_ as t}from"/build/_shared/chunk-GHUOM4KB.js";import{i as r,q as C}from"/build/_shared/chunk-ZNLABNO4.js";import{a as m,b as y}from"/build/_shared/chunk-KSKV5IK6.js";import{b as a}from"/build/_shared/chunk-X4LCECW4.js";var n=a(m());var e=a(y());function E(){let{primaryHero:i,secondaryHero:u,tertiaryHero:s,featuredCollections:c,featuredProducts:d}=C(),g=f([{},{},{}]);return(0,e.jsxs)(e.Fragment,{children:[i&&(0,e.jsx)(t,{...i,height:"full",top:!0,loading:"eager"}),d&&(0,e.jsx)(n.Suspense,{children:(0,e.jsx)(r,{resolve:d,children:({products:o})=>o?.nodes?(0,e.jsx)(p,{products:o.nodes,title:"Featured Products",count:4}):null})}),u&&(0,e.jsx)(n.Suspense,{fallback:(0,e.jsx)(t,{...g[1]}),children:(0,e.jsx)(r,{resolve:u,children:({hero:o})=>o?(0,e.jsx)(t,{...o}):null})}),c&&(0,e.jsx)(n.Suspense,{children:(0,e.jsx)(r,{resolve:c,children:({collections:o})=>o?.nodes?(0,e.jsx)(h,{collections:o.nodes,title:"Collections"}):null})}),s&&(0,e.jsx)(n.Suspense,{fallback:(0,e.jsx)(t,{...g[2]}),children:(0,e.jsx)(r,{resolve:s,children:({hero:o})=>o?(0,e.jsx)(t,{...o}):null})})]})}var S=`#graphql
2
- ${l}
3
- query collectionContent($handle: String, $country: CountryCode, $language: LanguageCode)
4
- @inContext(country: $country, language: $language) {
5
- hero: collection(handle: $handle) {
6
- ...CollectionContent
7
- }
8
- shop {
9
- name
10
- description
11
- }
12
- }
13
- `,T=`#graphql
14
- ${l}
15
- query collectionContent($handle: String, $country: CountryCode, $language: LanguageCode)
16
- @inContext(country: $country, language: $language) {
17
- hero: collection(handle: $handle) {
18
- ...CollectionContent
19
- }
20
- }
21
- `,_=`#graphql
22
- ${$}
23
- query homepageFeaturedProducts($country: CountryCode, $language: LanguageCode)
24
- @inContext(country: $country, language: $language) {
25
- products(first: 8) {
26
- nodes {
27
- ...ProductCard
28
- }
29
- }
30
- }
31
- `;export{E as a};
32
- //# sourceMappingURL=/build/_shared/chunk-6KICVRFE.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../app/routes/index.tsx"],
4
- "sourcesContent": ["import {defer, type LoaderArgs} from '@shopify/remix-oxygen';\nimport {Suspense} from 'react';\nimport {Await, useLoaderData} from '@remix-run/react';\nimport {ProductSwimlane, FeaturedCollections, Hero} from '~/components';\nimport {COLLECTION_CONTENT_FRAGMENT, PRODUCT_CARD_FRAGMENT} from '~/data';\nimport {getHeroPlaceholder} from '~/lib/placeholders';\nimport type {\n CollectionConnection,\n Metafield,\n ProductConnection,\n} from '@shopify/hydrogen-react/storefront-api-types';\n\ninterface HomeSeoData {\n shop: {\n name: string;\n description: string;\n };\n}\n\nexport interface CollectionHero {\n byline: Metafield;\n cta: Metafield;\n handle: string;\n heading: Metafield;\n height?: 'full';\n loading?: 'eager' | 'lazy';\n spread: Metafield;\n spreadSecondary: Metafield;\n top?: boolean;\n}\n\nexport async function loader({params, context}: LoaderArgs) {\n const {language, country} = context.storefront.i18n;\n\n if (\n params.lang &&\n params.lang.toLowerCase() !== `${language}-${country}`.toLowerCase()\n ) {\n // If the lang URL param is defined, yet we still are on `EN-US`\n // the the lang param must be invalid, send to the 404 page\n throw new Response(null, {status: 404});\n }\n\n const {shop, hero} = await context.storefront.query<{\n hero: CollectionHero;\n shop: HomeSeoData;\n }>(HOMEPAGE_SEO_QUERY, {\n variables: {handle: 'freestyle'},\n });\n\n return defer({\n shop,\n primaryHero: hero,\n // These different queries are separated to illustrate how 3rd party content\n // fetching can be optimized for both above and below the fold.\n featuredProducts: context.storefront.query<{\n products: ProductConnection;\n }>(HOMEPAGE_FEATURED_PRODUCTS_QUERY, {\n variables: {\n /**\n * Country and language properties are automatically injected\n * into all queries. Passing them is unnecessary unless you\n * want to override them from the following default:\n */\n country,\n language,\n },\n }),\n secondaryHero: context.storefront.query<{hero: CollectionHero}>(\n COLLECTION_HERO_QUERY,\n {\n variables: {\n handle: 'backcountry',\n country,\n language,\n },\n },\n ),\n featuredCollections: context.storefront.query<{\n collections: CollectionConnection;\n }>(FEATURED_COLLECTIONS_QUERY, {\n variables: {\n country,\n language,\n },\n }),\n tertiaryHero: context.storefront.query<{hero: CollectionHero}>(\n COLLECTION_HERO_QUERY,\n {\n variables: {\n handle: 'winter-2022',\n country,\n language,\n },\n },\n ),\n });\n}\n\nexport default function Homepage() {\n const {\n primaryHero,\n secondaryHero,\n tertiaryHero,\n featuredCollections,\n featuredProducts,\n } = useLoaderData<typeof loader>();\n\n // TODO: skeletons vs placeholders\n const skeletons = getHeroPlaceholder([{}, {}, {}]);\n\n // TODO: analytics\n // useServerAnalytics({\n // shopify: {\n // pageType: ShopifyAnalyticsConstants.pageType.home,\n // },\n // });\n\n return (\n <>\n {primaryHero && (\n <Hero {...primaryHero} height=\"full\" top loading=\"eager\" />\n )}\n\n {featuredProducts && (\n <Suspense>\n <Await resolve={featuredProducts}>\n {({products}) => {\n if (!products?.nodes) return null;\n return (\n <ProductSwimlane\n products={products.nodes}\n title=\"Featured Products\"\n count={4}\n />\n );\n }}\n </Await>\n </Suspense>\n )}\n\n {secondaryHero && (\n <Suspense fallback={<Hero {...skeletons[1]} />}>\n <Await resolve={secondaryHero}>\n {({hero}) => {\n if (!hero) return null;\n return <Hero {...hero} />;\n }}\n </Await>\n </Suspense>\n )}\n\n {featuredCollections && (\n <Suspense>\n <Await resolve={featuredCollections}>\n {({collections}) => {\n if (!collections?.nodes) return null;\n return (\n <FeaturedCollections\n collections={collections.nodes}\n title=\"Collections\"\n />\n );\n }}\n </Await>\n </Suspense>\n )}\n\n {tertiaryHero && (\n <Suspense fallback={<Hero {...skeletons[2]} />}>\n <Await resolve={tertiaryHero}>\n {({hero}) => {\n if (!hero) return null;\n return <Hero {...hero} />;\n }}\n </Await>\n </Suspense>\n )}\n </>\n );\n}\n\nconst HOMEPAGE_SEO_QUERY = `#graphql\n ${COLLECTION_CONTENT_FRAGMENT}\n query collectionContent($handle: String, $country: CountryCode, $language: LanguageCode)\n @inContext(country: $country, language: $language) {\n hero: collection(handle: $handle) {\n ...CollectionContent\n }\n shop {\n name\n description\n }\n }\n`;\n\nconst COLLECTION_HERO_QUERY = `#graphql\n ${COLLECTION_CONTENT_FRAGMENT}\n query collectionContent($handle: String, $country: CountryCode, $language: LanguageCode)\n @inContext(country: $country, language: $language) {\n hero: collection(handle: $handle) {\n ...CollectionContent\n }\n }\n`;\n\n// @see: https://shopify.dev/api/storefront/latest/queries/products\nexport const HOMEPAGE_FEATURED_PRODUCTS_QUERY = `#graphql\n ${PRODUCT_CARD_FRAGMENT}\n query homepageFeaturedProducts($country: CountryCode, $language: LanguageCode)\n @inContext(country: $country, language: $language) {\n products(first: 8) {\n nodes {\n ...ProductCard\n }\n }\n }\n`;\n\n// @see: https://shopify.dev/api/storefront/latest/queries/collections\nexport const FEATURED_COLLECTIONS_QUERY = `#graphql\n query homepageFeaturedCollections($country: CountryCode, $language: LanguageCode)\n @inContext(country: $country, language: $language) {\n collections(\n first: 4,\n sortKey: UPDATED_AT\n ) {\n nodes {\n id\n title\n handle\n image {\n altText\n width\n height\n url\n }\n }\n }\n }\n`;\n"],
5
- "mappings": "mTACA,IAAAA,EAAuB,OADvB,IAAAC,EAAA,OAmGe,SAARC,GAA4B,CACjC,GAAM,CACJ,YAAAC,EACA,cAAAC,EACA,aAAAC,EACA,oBAAAC,EACA,iBAAAC,CACF,EAAIC,EAA6B,EAG3BC,EAAYC,EAAmB,CAAC,CAAC,EAAG,CAAC,EAAG,CAAC,CAAC,CAAC,EASjD,SACE,oBACG,UAAAP,MACC,OAACQ,EAAA,CAAM,GAAGR,EAAa,OAAO,OAAO,IAAG,GAAC,QAAQ,QAAQ,EAG1DI,MACC,OAAC,YACC,mBAACK,EAAA,CAAM,QAASL,EACb,UAAC,CAAC,SAAAM,CAAQ,IACJA,GAAU,SAEb,OAACC,EAAA,CACC,SAAUD,EAAS,MACnB,MAAM,oBACN,MAAO,EACT,EAN2B,KASjC,EACF,EAGDT,MACC,OAAC,YAAS,YAAU,OAACO,EAAA,CAAM,GAAGF,EAAU,GAAI,EAC1C,mBAACG,EAAA,CAAM,QAASR,EACb,UAAC,CAAC,KAAAW,CAAI,IACAA,KACE,OAACJ,EAAA,CAAM,GAAGI,EAAM,EADL,KAGtB,EACF,EAGDT,MACC,OAAC,YACC,mBAACM,EAAA,CAAM,QAASN,EACb,UAAC,CAAC,YAAAU,CAAW,IACPA,GAAa,SAEhB,OAACC,EAAA,CACC,YAAaD,EAAY,MACzB,MAAM,cACR,EAL8B,KAQpC,EACF,EAGDX,MACC,OAAC,YAAS,YAAU,OAACM,EAAA,CAAM,GAAGF,EAAU,GAAI,EAC1C,mBAACG,EAAA,CAAM,QAASP,EACb,UAAC,CAAC,KAAAU,CAAI,IACAA,KACE,OAACJ,EAAA,CAAM,GAAGI,EAAM,EADL,KAGtB,EACF,GAEJ,CAEJ,CAEA,IAAMG,EAAqB;AAAA,IACvBC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAaEC,EAAwB;AAAA,IAC1BD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUSE,EAAmC;AAAA,IAC5CC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;",
6
- "names": ["import_react", "import_jsx_runtime", "Homepage", "primaryHero", "secondaryHero", "tertiaryHero", "featuredCollections", "featuredProducts", "useLoaderData", "skeletons", "getHeroPlaceholder", "Hero", "Await", "products", "ProductSwimlane", "hero", "collections", "FeaturedCollections", "HOMEPAGE_SEO_QUERY", "COLLECTION_CONTENT_FRAGMENT", "COLLECTION_HERO_QUERY", "HOMEPAGE_FEATURED_PRODUCTS_QUERY", "PRODUCT_CARD_FRAGMENT"]
7
- }
@@ -1,2 +0,0 @@
1
- import{D as w,E as a,R as n}from"/build/_shared/chunk-GHUOM4KB.js";import{f as t}from"/build/_shared/chunk-WYHUKY3H.js";import{c as m,o as d,r as c,s as u}from"/build/_shared/chunk-ZNLABNO4.js";import{b as p}from"/build/_shared/chunk-KSKV5IK6.js";import{b as l}from"/build/_shared/chunk-X4LCECW4.js";var e=l(p());var v={renderInModal:!0};function f(){let r=c(),{customer:s}=m(),o=u();return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(a,{className:"mt-4 mb-6",as:"h3",size:"lead",children:"Update your profile"}),(0,e.jsxs)(d,{method:"post",children:[r?.formError&&(0,e.jsx)("div",{className:"flex items-center justify-center mb-6 bg-red-100 rounded",children:(0,e.jsx)("p",{className:"m-4 text-sm text-red-900",children:r.formError})}),(0,e.jsx)("div",{className:"mt-3",children:(0,e.jsx)("input",{className:t(),id:"firstName",name:"firstName",type:"text",autoComplete:"given-name",placeholder:"First name","aria-label":"First name",defaultValue:s.firstName??""})}),(0,e.jsx)("div",{className:"mt-3",children:(0,e.jsx)("input",{className:t(),id:"lastName",name:"lastName",type:"text",autoComplete:"family-name",placeholder:"Last name","aria-label":"Last name",defaultValue:s.lastName??""})}),(0,e.jsx)("div",{className:"mt-3",children:(0,e.jsx)("input",{className:t(),id:"phone",name:"phone",type:"tel",autoComplete:"tel",placeholder:"Mobile","aria-label":"Mobile",defaultValue:s.phone??""})}),(0,e.jsxs)("div",{className:"mt-3",children:[(0,e.jsx)("input",{className:t(r?.fieldErrors?.email),id:"email",name:"email",type:"email",autoComplete:"email",required:!0,placeholder:"Email address","aria-label":"Email address",defaultValue:s.email??""}),r?.fieldErrors?.email&&(0,e.jsxs)("p",{className:"text-red-500 text-xs",children:[r.fieldErrors.email," \xA0"]})]}),(0,e.jsx)(a,{className:"mb-6 mt-6",as:"h3",size:"lead",children:"Change your password"}),(0,e.jsx)(i,{name:"currentPassword",label:"Current password",passwordError:r?.fieldErrors?.currentPassword}),r?.fieldErrors?.currentPassword&&(0,e.jsxs)(a,{size:"fine",className:"mt-1 text-red-500",children:[r.fieldErrors.currentPassword," \xA0"]}),(0,e.jsx)(i,{name:"newPassword",label:"New password",passwordError:r?.fieldErrors?.newPassword}),(0,e.jsx)(i,{name:"newPassword2",label:"Re-enter new password",passwordError:r?.fieldErrors?.newPassword2}),(0,e.jsx)(a,{size:"fine",color:"subtle",className:w("mt-1",r?.fieldErrors?.newPassword&&"text-red-500"),children:"Passwords must be at least 8 characters."}),r?.fieldErrors?.newPassword2?(0,e.jsx)("br",{}):null,r?.fieldErrors?.newPassword2&&(0,e.jsxs)(a,{size:"fine",className:"mt-1 text-red-500",children:[r.fieldErrors.newPassword2," \xA0"]}),(0,e.jsx)("div",{className:"mt-6",children:(0,e.jsx)(n,{className:"text-sm mb-2",variant:"primary",width:"full",type:"submit",disabled:o.state!=="idle",children:o.state!=="idle"?"Saving":"Save"})}),(0,e.jsx)("div",{className:"mb-4",children:(0,e.jsx)(n,{to:"..",className:"text-sm",variant:"secondary",width:"full",children:"Cancel"})})]})]})}function i({name:r,passwordError:s,label:o}){return(0,e.jsx)("div",{className:"mt-3",children:(0,e.jsx)("input",{className:t(s),id:r,name:r,type:"password",autoComplete:r==="currentPassword"?"current-password":void 0,placeholder:o,"aria-label":o,minLength:8})})}export{v as a,f as b};
2
- //# sourceMappingURL=/build/_shared/chunk-6KPVFOMZ.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../app/routes/account/__private/edit.tsx"],
4
- "sourcesContent": ["import {json, redirect, type ActionFunction} from '@shopify/remix-oxygen';\nimport {\n useActionData,\n Form,\n useOutletContext,\n useTransition,\n} from '@remix-run/react';\nimport type {\n Customer,\n CustomerUpdateInput,\n} from '@shopify/hydrogen-react/storefront-api-types';\nimport clsx from 'clsx';\nimport invariant from 'tiny-invariant';\nimport {Button, Text} from '~/components';\nimport {getCustomer, updateCustomer} from '~/data';\nimport {getInputStyleClasses} from '~/lib/utils';\n\nexport interface AccountOutletContext {\n customer: Customer;\n}\n\nexport interface ActionData {\n success?: boolean;\n formError?: string;\n fieldErrors?: {\n firstName?: string;\n lastName?: string;\n email?: string;\n phone?: string;\n currentPassword?: string;\n newPassword?: string;\n newPassword2?: string;\n };\n}\n\nconst badRequest = (data: ActionData) => json(data, {status: 400});\n\nconst formDataHas = (formData: FormData, key: string) => {\n if (!formData.has(key)) return false;\n\n const value = formData.get(key);\n return typeof value === 'string' && value.length > 0;\n};\n\nexport const handle = {\n renderInModal: true,\n};\n\nexport const action: ActionFunction = async ({request, context, params}) => {\n const formData = await request.formData();\n\n const customerAccessToken = await context.session.get('customerAccessToken');\n\n invariant(\n customerAccessToken,\n 'You must be logged in to update your account details.',\n );\n\n // Double-check current user is logged in.\n // Will throw a logout redirect if not.\n await getCustomer(context, customerAccessToken);\n\n if (\n formDataHas(formData, 'newPassword') &&\n !formDataHas(formData, 'currentPassword')\n ) {\n return badRequest({\n fieldErrors: {\n currentPassword:\n 'Please enter your current password before entering a new password.',\n },\n });\n }\n\n if (\n formData.has('newPassword') &&\n formData.get('newPassword') !== formData.get('newPassword2')\n ) {\n return badRequest({\n fieldErrors: {\n newPassword2: 'New passwords must match.',\n },\n });\n }\n\n try {\n const customer: CustomerUpdateInput = {};\n\n formDataHas(formData, 'firstName') &&\n (customer.firstName = formData.get('firstName') as string);\n formDataHas(formData, 'lastName') &&\n (customer.lastName = formData.get('lastName') as string);\n formDataHas(formData, 'email') &&\n (customer.email = formData.get('email') as string);\n formDataHas(formData, 'phone') &&\n (customer.phone = formData.get('phone') as string);\n formDataHas(formData, 'newPassword') &&\n (customer.password = formData.get('newPassword') as string);\n\n await updateCustomer(context, {customerAccessToken, customer});\n\n return redirect(params?.lang ? `${params.lang}/account` : '/account');\n } catch (error: any) {\n return badRequest({formError: error.message});\n }\n};\n\n/**\n * Since this component is nested in `accounts/`, it is rendered in a modal via `<Outlet>` in `account.tsx`.\n *\n * This allows us to:\n * - preserve URL state (`/accounts/edit` when the modal is open)\n * - co-locate the edit action with the edit form (rather than grouped in account.tsx)\n * - use the `useOutletContext` hook to access the customer data from the parent route (no additional data loading)\n * - return a simple `redirect()` from this action to close the modal :mindblown: (no useState/useEffect)\n * - use the presence of outlet data (in `account.tsx`) to open/close the modal (no useState)\n */\nexport default function AccountDetailsEdit() {\n const actionData = useActionData<ActionData>();\n const {customer} = useOutletContext<AccountOutletContext>();\n const transition = useTransition();\n\n return (\n <>\n <Text className=\"mt-4 mb-6\" as=\"h3\" size=\"lead\">\n Update your profile\n </Text>\n <Form method=\"post\">\n {actionData?.formError && (\n <div className=\"flex items-center justify-center mb-6 bg-red-100 rounded\">\n <p className=\"m-4 text-sm text-red-900\">{actionData.formError}</p>\n </div>\n )}\n <div className=\"mt-3\">\n <input\n className={getInputStyleClasses()}\n id=\"firstName\"\n name=\"firstName\"\n type=\"text\"\n autoComplete=\"given-name\"\n placeholder=\"First name\"\n aria-label=\"First name\"\n defaultValue={customer.firstName ?? ''}\n />\n </div>\n <div className=\"mt-3\">\n <input\n className={getInputStyleClasses()}\n id=\"lastName\"\n name=\"lastName\"\n type=\"text\"\n autoComplete=\"family-name\"\n placeholder=\"Last name\"\n aria-label=\"Last name\"\n defaultValue={customer.lastName ?? ''}\n />\n </div>\n <div className=\"mt-3\">\n <input\n className={getInputStyleClasses()}\n id=\"phone\"\n name=\"phone\"\n type=\"tel\"\n autoComplete=\"tel\"\n placeholder=\"Mobile\"\n aria-label=\"Mobile\"\n defaultValue={customer.phone ?? ''}\n />\n </div>\n <div className=\"mt-3\">\n <input\n className={getInputStyleClasses(actionData?.fieldErrors?.email)}\n id=\"email\"\n name=\"email\"\n type=\"email\"\n autoComplete=\"email\"\n required\n placeholder=\"Email address\"\n aria-label=\"Email address\"\n defaultValue={customer.email ?? ''}\n />\n {actionData?.fieldErrors?.email && (\n <p className=\"text-red-500 text-xs\">\n {actionData.fieldErrors.email} &nbsp;\n </p>\n )}\n </div>\n <Text className=\"mb-6 mt-6\" as=\"h3\" size=\"lead\">\n Change your password\n </Text>\n <Password\n name=\"currentPassword\"\n label=\"Current password\"\n passwordError={actionData?.fieldErrors?.currentPassword}\n />\n {actionData?.fieldErrors?.currentPassword && (\n <Text size=\"fine\" className=\"mt-1 text-red-500\">\n {actionData.fieldErrors.currentPassword} &nbsp;\n </Text>\n )}\n <Password\n name=\"newPassword\"\n label=\"New password\"\n passwordError={actionData?.fieldErrors?.newPassword}\n />\n <Password\n name=\"newPassword2\"\n label=\"Re-enter new password\"\n passwordError={actionData?.fieldErrors?.newPassword2}\n />\n <Text\n size=\"fine\"\n color=\"subtle\"\n className={clsx(\n 'mt-1',\n actionData?.fieldErrors?.newPassword && 'text-red-500',\n )}\n >\n Passwords must be at least 8 characters.\n </Text>\n {actionData?.fieldErrors?.newPassword2 ? <br /> : null}\n {actionData?.fieldErrors?.newPassword2 && (\n <Text size=\"fine\" className=\"mt-1 text-red-500\">\n {actionData.fieldErrors.newPassword2} &nbsp;\n </Text>\n )}\n <div className=\"mt-6\">\n <Button\n className=\"text-sm mb-2\"\n variant=\"primary\"\n width=\"full\"\n type=\"submit\"\n disabled={transition.state !== 'idle'}\n >\n {transition.state !== 'idle' ? 'Saving' : 'Save'}\n </Button>\n </div>\n <div className=\"mb-4\">\n <Button to=\"..\" className=\"text-sm\" variant=\"secondary\" width=\"full\">\n Cancel\n </Button>\n </div>\n </Form>\n </>\n );\n}\n\nfunction Password({\n name,\n passwordError,\n label,\n}: {\n name: string;\n passwordError?: string;\n label: string;\n}) {\n return (\n <div className=\"mt-3\">\n <input\n className={getInputStyleClasses(passwordError)}\n id={name}\n name={name}\n type=\"password\"\n autoComplete={\n name === 'currentPassword' ? 'current-password' : undefined\n }\n placeholder={label}\n aria-label={label}\n minLength={8}\n />\n </div>\n );\n}\n"],
5
- "mappings": "4SAAA,IAAAA,EAAA,OA4CO,IAAMC,EAAS,CACpB,cAAe,EACjB,EAuEe,SAARC,GAAsC,CAC3C,IAAMC,EAAaC,EAA0B,EACvC,CAAC,SAAAC,CAAQ,EAAIC,EAAuC,EACpDC,EAAaC,EAAc,EAEjC,SACE,oBACE,oBAACC,EAAA,CAAK,UAAU,YAAY,GAAG,KAAK,KAAK,OAAO,+BAEhD,KACA,QAACC,EAAA,CAAK,OAAO,OACV,UAAAP,GAAY,cACX,OAAC,OAAI,UAAU,2DACb,mBAAC,KAAE,UAAU,2BAA4B,SAAAA,EAAW,UAAU,EAChE,KAEF,OAAC,OAAI,UAAU,OACb,mBAAC,SACC,UAAWQ,EAAqB,EAChC,GAAG,YACH,KAAK,YACL,KAAK,OACL,aAAa,aACb,YAAY,aACZ,aAAW,aACX,aAAcN,EAAS,WAAa,GACtC,EACF,KACA,OAAC,OAAI,UAAU,OACb,mBAAC,SACC,UAAWM,EAAqB,EAChC,GAAG,WACH,KAAK,WACL,KAAK,OACL,aAAa,cACb,YAAY,YACZ,aAAW,YACX,aAAcN,EAAS,UAAY,GACrC,EACF,KACA,OAAC,OAAI,UAAU,OACb,mBAAC,SACC,UAAWM,EAAqB,EAChC,GAAG,QACH,KAAK,QACL,KAAK,MACL,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F,GACF,GACF,CAEJ,CAEA,SAASF,EAAS,CAChB,KAAAG,EACA,cAAAC,EACA,MAAAC,CACF,EAIG,CACD,SACE,OAAC,OAAI,UAAU,OACb,mBAAC,SACC,UAAWN,EAAqBK,CAAa,EAC7C,GAAID,EACJ,KAAMA,EACN,KAAK,WACL,aACEA,IAAS,kBAAoB,mBAAqB,OAEpD,YAAaE,EACb,aAAYA,EACZ,UAAW,EACb,EACF,CAEJ",
6
- "names": ["import_jsx_runtime", "handle", "AccountDetailsEdit", "actionData", "useActionData", "customer", "useOutletContext", "transition", "useTransition", "Text", "Form", "getInputStyleClasses", "Password", "clsx_m_default", "Button", "name", "passwordError", "label"]
7
- }