@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.
- package/dist/commands/hydrogen/build.d.ts +20 -0
- package/dist/commands/hydrogen/build.js +42 -37
- package/dist/commands/hydrogen/check.d.ts +18 -0
- package/dist/commands/hydrogen/check.js +35 -0
- package/dist/commands/hydrogen/dev.d.ts +14 -0
- package/dist/commands/hydrogen/dev.js +57 -61
- package/dist/commands/hydrogen/generate/route.d.ts +34 -0
- package/dist/commands/hydrogen/generate/route.js +165 -0
- package/dist/commands/hydrogen/generate/route.test.d.ts +1 -0
- package/dist/commands/hydrogen/generate/route.test.js +126 -0
- package/dist/commands/hydrogen/generate/routes.d.ts +16 -0
- package/dist/commands/hydrogen/generate/routes.js +22 -0
- package/dist/commands/hydrogen/init.d.ts +22 -0
- package/dist/commands/hydrogen/init.js +169 -25
- package/dist/commands/hydrogen/preview.d.ts +17 -0
- package/dist/commands/hydrogen/preview.js +2 -2
- package/dist/create-app.d.ts +1 -0
- package/dist/create-app.js +4 -0
- package/dist/{templates/demo-store/app → generator-templates}/routes/[robots.txt].tsx +2 -1
- package/dist/{templates/demo-store/app → generator-templates}/routes/[sitemap.xml].tsx +6 -4
- package/dist/generator-templates/routes/account/login.tsx +74 -0
- package/dist/generator-templates/routes/account/register.tsx +74 -0
- package/dist/generator-templates/routes/cart.tsx +43 -0
- package/dist/generator-templates/routes/collections/$collectionHandle.tsx +65 -0
- package/dist/{templates/demo-store/app → generator-templates}/routes/graphiql.tsx +0 -0
- package/dist/{templates/hello-world/app → generator-templates}/routes/index.tsx +0 -0
- package/dist/generator-templates/routes/pages/$pageHandle.tsx +74 -0
- package/dist/{templates/demo-store/app → generator-templates}/routes/policies/$policyHandle.tsx +8 -37
- package/dist/generator-templates/routes/policies/index.tsx +65 -0
- package/dist/generator-templates/routes/products/$productHandle.tsx +57 -0
- package/dist/hooks/init.d.ts +5 -0
- package/dist/utils/check-lockfile.d.ts +3 -0
- package/dist/utils/check-lockfile.js +78 -0
- package/dist/utils/check-version.d.ts +3 -0
- package/dist/utils/check-version.js +50 -0
- package/dist/utils/config.d.ts +18 -0
- package/dist/utils/config.js +116 -43
- package/dist/utils/flags.d.ts +10 -0
- package/dist/utils/flags.js +15 -3
- package/dist/utils/flags.test.d.ts +1 -0
- package/dist/utils/flags.test.js +18 -0
- package/dist/utils/log.d.ts +5 -0
- package/dist/utils/mini-oxygen.d.ts +11 -0
- package/dist/utils/mini-oxygen.js +7 -4
- package/dist/utils/missing-routes.d.ts +6 -0
- package/dist/utils/missing-routes.js +71 -0
- package/dist/utils/template-downloader.d.ts +11 -0
- package/dist/utils/template-downloader.js +66 -0
- package/dist/utils/transpile-ts.d.ts +16 -0
- package/dist/utils/transpile-ts.js +161 -0
- package/dist/utils/virtual-routes.d.ts +7 -0
- package/dist/utils/virtual-routes.js +47 -0
- package/dist/utils/virtual-routes.test.d.ts +1 -0
- package/dist/utils/virtual-routes.test.js +46 -0
- package/dist/virtual-routes/assets/dummy.d.ts +1 -0
- package/dist/virtual-routes/assets/dummy.js +1 -0
- package/dist/virtual-routes/assets/dummy.ts +1 -0
- package/dist/{templates/demo-store/dist/client → virtual-routes/assets}/favicon.svg +0 -0
- package/dist/virtual-routes/assets/styles.css +207 -0
- package/dist/virtual-routes/components/HydrogenLogoBaseBW.jsx +7 -0
- package/dist/virtual-routes/components/HydrogenLogoBaseColor.jsx +13 -0
- package/dist/virtual-routes/components/IconBanner.jsx +47 -0
- package/dist/virtual-routes/components/IconDiscord.jsx +4 -0
- package/dist/virtual-routes/components/IconError.jsx +20 -0
- package/dist/virtual-routes/components/IconGithub.jsx +4 -0
- package/dist/virtual-routes/components/IconTwitter.jsx +4 -0
- package/dist/virtual-routes/components/Layout.jsx +6 -0
- package/dist/virtual-routes/routes/graphiql.jsx +5 -0
- package/dist/virtual-routes/routes/index.jsx +140 -0
- package/dist/virtual-routes/virtual-root.jsx +38 -0
- package/oclif.manifest.json +1 -131
- package/package.json +36 -7
- package/dist/templates/demo-store/.cache/content-v2/sha512/00/06/24c89d558123b63259495c8099c0f959320fa2e54d907b3544baca5e0e6116c6c817c33423097ae1ba93f9506f6870cc37df232b376f8c264573b7aa72b5 +0 -1
- package/dist/templates/demo-store/.cache/content-v2/sha512/02/76/13bbea15bb42b81a204b0dc5f14726e0bfa8d012a7b284f887cc2e3c92195d6b07a78f199f990b311ca5fafa9079563503cdd81808cd9b7e496d86c72732 +0 -1
- package/dist/templates/demo-store/.cache/content-v2/sha512/08/56/c9a478b8c5c2fbfb6eed219f0861db568eceecbb45155124491ca25125ca421aac7e1b10d29151e5294a776ae10e02e01dc2da3561da793d111c4f908502 +0 -1
- package/dist/templates/demo-store/.cache/content-v2/sha512/11/0c/195071c290a61e22dd825b300c9f93e5315b2effefc3e5545440ac704d629e177bc877333ce73232ac72703bcc69fb425632d84b3caefe7f5c0fd12537ee +0 -1
- package/dist/templates/demo-store/.cache/content-v2/sha512/13/f6/b7f804d45a961ca1e392429e75ad80f23ba46cbba0e960c6a70f8de81f3f3763af59651474176798d1a1a4bd2a5109b1d441f6d1c8ba070b678b38378adf +0 -1
- package/dist/templates/demo-store/.cache/content-v2/sha512/15/61/a4cf6ccc2120c217346ecee6299fddf06e5555f6c9371305f118fdb382ff88588b31ec36b034ed785d36e3b18a8e8751702bbed4e101a97396f92ea35612 +0 -1
- package/dist/templates/demo-store/.cache/content-v2/sha512/17/08/03dabbacd40d4a2b132018a520d1dbcf29ffb2c659bbe01cb91f700202d5016ab4104831b95a05b98535549be4a6520ddcd6504ba361692549a5cd0458ee +0 -1
- package/dist/templates/demo-store/.cache/content-v2/sha512/27/a0/d277ff364ced6a2d01639f1e2b8675ef95eff3a4aa4d2fda0990392526e0f18def66116a8623096d1bdafabe1dc8efc56ef0956054b3370dfa9ad6596a29 +0 -1
- package/dist/templates/demo-store/.cache/content-v2/sha512/28/53/96d2a5c3d4b08a7191e545d4d961f7690f814a331dc8efcc11e45854fbccd04f825ec8d3a1070b05aca51dd63e06c778316395446055cc3cfc90c8b30615 +0 -1
- package/dist/templates/demo-store/.cache/content-v2/sha512/28/7c/c71b0c6367bdf7307a8061fe1c4568c9f1e9603d835b6fc917fe8042535a867c37154e35376a01ad6bdb3c2d6f29b88b41902fd6f20b1227e02081682d01 +0 -1
- package/dist/templates/demo-store/.cache/content-v2/sha512/29/2e/db501d168869cc6b7d5e51bfbf399e920773ed905b9e2b782ebfb29c5260f05b67d0b7d4599e8c5666253789d545ecfdfdb9e020da8ac262d99d0e69e5b0 +0 -1
- package/dist/templates/demo-store/.cache/content-v2/sha512/2b/05/f4684d5f729778c589ac1c471d21826137034b5f1163d67118f6cd0e1672e92cc3e2408a50da44d156bd3e574f7512a2245558ecdce896af8924cf966c73 +0 -1
- package/dist/templates/demo-store/.cache/content-v2/sha512/32/c2/8f62057f7082cddef5cd3d912d1a4c2c8eb9be28edefeb3d398181606f5bed84eac45a2edd8bb390d05278ca3ff6964e7594d8be9a0200cc8193f3dbb025 +0 -1
- package/dist/templates/demo-store/.cache/content-v2/sha512/35/3c/f46f8adbcf210210bac8ab00267ab16c16393ab4a95920f69c4452b298a83c9785d3d2c2bb4a63937cb4eed028197a18f0d2929024ebae18b0751f07ebf5 +0 -1
- package/dist/templates/demo-store/.cache/content-v2/sha512/36/3e/ece5cc6633a23301aa4f05fc1efddd8876aec2d8bf7afe504526e2866ed67263e99bffbb1e0d99a65622a7246f9d662217032aca47f70b6f0f13b75e7df1 +0 -1
- package/dist/templates/demo-store/.cache/content-v2/sha512/37/19/de54f68ea7b2a79f86d12ec1107e99d04217817fb6de9a5ba2dc5cdd16d16e1dda4cc9f7cf2b6ece5a6330f47ca20fa27a08aeffc17eb23fd11399e601fd +0 -1
- package/dist/templates/demo-store/.cache/content-v2/sha512/39/3e/7839c7699ead2ece5a07c6f0116dcbdd4cd5fce00cb6fafb349d3ab4ff6fdb626f056c05f1dd25ad453996209e5a1870f7b937714791c3fe2c43887d8dfa +0 -1
- package/dist/templates/demo-store/.cache/content-v2/sha512/46/04/af285aee74d96b28b24f75d7911de65e6c7bb26475ab5219fe5308028fda55060cf45650dfa09c0731ec73ece453c1e24e0c38715e8d4c5c80fd6365a1f4 +0 -1
- package/dist/templates/demo-store/.cache/content-v2/sha512/46/1c/c69c5b9150a9f76dff13c0d6a768540636e6569f4f3f56795d1b4c494045d5908674f292815212ac52e6d8a597b4ad35783506113f195a09f1057f09f00c +0 -1
- package/dist/templates/demo-store/.cache/content-v2/sha512/46/70/1f052bc78bf18274412ed7e7305d42fb50cbe5a6a0fbf62e0f9a775e667a541bc17352850fa8759a26f51b3459cfc6834fbf4a8b15527dc432be6ca76852 +0 -1
- package/dist/templates/demo-store/.cache/content-v2/sha512/4b/48/ca635670e7d1b1a5550d32f51389a5754234da55c6d7c900f348c8bf1ccc84bdcefc620e08979b7aa1d04a49a1138b46346f126d20c0126eb0c3261deb5b +0 -1
- package/dist/templates/demo-store/.cache/content-v2/sha512/51/ab/e165384df6374c7b2d0ebebc8642ecb0e0c14f7c5b57970ec5d2e17f7d1643e0b01eda69e5ffbefde85ecba6d613bcc5175c5564e36bfb73d966c8ea4153 +0 -1
- package/dist/templates/demo-store/.cache/content-v2/sha512/54/86/917224aeb3e04e19a51534244f5ed28f3529d85276452f52af9af3657798246c97a0948bcf62c707394ab80f0062a87e7079bd71c05e0d16f927091617d2 +0 -1
- package/dist/templates/demo-store/.cache/content-v2/sha512/56/bf/57423492125064302f4b06c3e3ebb8c0263ad049865c299eedb7026b56de4cc3d0790bc370d0fe1bc448cb8df31f38a8fe3f6644b91d9f88e85764205ef2 +0 -1
- package/dist/templates/demo-store/.cache/content-v2/sha512/65/a8/8322f339f24b58dc82746c373ccaff8847aa0f315db64e6efa4ae357e8a24d36d2664cf60d387582a6d60155940e6c72c6edd5a68ca3066d6173d4e04f13 +0 -1
- package/dist/templates/demo-store/.cache/content-v2/sha512/69/8b/226dd183d716cf3d632e447afc7dfab45d90664f1d0cbb51c9d69a65e9811484c7ba5940e045306824d1dffeb4abb8f2e51b4a3289d4afeee445cfc4e6af +0 -1
- package/dist/templates/demo-store/.cache/content-v2/sha512/69/e4/b067c1beb51c176168380eef47aee15632f7e50c24c8a66d9675fdecd8ac5bd6a294a634228e926894cc8b96789432103a7e6e01f3d58daf793178fc85ff +0 -1
- package/dist/templates/demo-store/.cache/content-v2/sha512/6b/6d/71211d4cebfd1e1c86788ede5784a53cf366a85f4e2646a300c820958a5219bfa5492b169d1cca1b431e946b41d15a526ee7f77db65a6e730dead281f777 +0 -1
- package/dist/templates/demo-store/.cache/content-v2/sha512/6e/ae/615197316ce9be03e9d63a85984c0752583325087b827210d5e681f52dd532738371a0dab76a42d3eb68c2f21808974d13847b5514a92450af40d578e973 +0 -1
- package/dist/templates/demo-store/.cache/content-v2/sha512/70/ec/37e2f634bc66cf777929488d19db018d338d1a1d2ccd338b1cb99d2d67a23dcaad2e46f77f63ce1280b7125038523a5d3ea42873780e8fb04cf408c08a4c +0 -1
- package/dist/templates/demo-store/.cache/content-v2/sha512/73/40/c822831f11f08a9ceea944d0145b072ba6164a3e2e75f98fda5437cda6dfddf9ca9450445c1f3236228d6259ac95e4cde9bb6e5996490ed00b7b13b06121 +0 -1
- package/dist/templates/demo-store/.cache/content-v2/sha512/75/02/c799e50ebd6988abb7b1090074668ce459a711a347069f905971e11126c3779d0f6c14b89f8350b7bf4f0712e8fbf48290205b1b5c2d427f21a80c32190c +0 -1
- package/dist/templates/demo-store/.cache/content-v2/sha512/77/fd/28951020ad9dc57df6e80976e714302d5b639eb69e28a184d9e4a4ee1322f39980bf3906f4176d62ab97d899bbced462187ea2a71a750694ac743c99cd9e +0 -1
- package/dist/templates/demo-store/.cache/content-v2/sha512/7a/4d/47fb716aef6fb90bd6883dccba9e1359e409cf1291762a0a2c6b7ad56097e67267b617ab8ebf3cb57ef256c00d22f778a8d6688df388ed181b866fcda132 +0 -1
- package/dist/templates/demo-store/.cache/content-v2/sha512/7b/15/d1749be8fa73f2f123e5e9a0807f343cdfa14fd263f9073fe7cd73352b7318b976a43687096a06acbbed2a2f0f86119d45cdd1e9ad6d09208c06b6232db2 +0 -1
- package/dist/templates/demo-store/.cache/content-v2/sha512/87/97/27cde85115daefca4a74cd9a2e87c66cf71e68ad7ca1a53c3d8a95f0b78dc50e89cc2d73aa293747b1b10650c9c703a97e17ecad24b46a50eac73aa0602f +0 -1
- package/dist/templates/demo-store/.cache/content-v2/sha512/88/76/d18fdfbb05293909609d42368642fc6da4bd138c5864ec2f721212b52e595b84ae46f48021ed3e6240edf443f78bdea557d56d700e3da848459ea3077a80 +0 -1
- package/dist/templates/demo-store/.cache/content-v2/sha512/8a/d1/ca384452cdc8a2fb92fa1c70a4db303dd5f9887475e0e4ddf4bc711b5ebceb684ba5fd8bf596c3d491ab8598bd52ffe20f98564f8110da0730f46f39e790 +0 -1
- package/dist/templates/demo-store/.cache/content-v2/sha512/8c/51/88e1fc4d8365cb6ad1a755e8bca81fbb64abb1c8ef08a8314471952910e0e29eadfa283d482233d500893a57b57470171ab98ebacb4b93780b37e7a87c93 +0 -1
- package/dist/templates/demo-store/.cache/content-v2/sha512/8f/81/8e238bb1d4654dcc554d661194c9415fe36dc6f20624dd26e47c0043f06ee69d1abd49947b11954508bfd01823fdf97a3ca9196521f05cb471473095c5c5 +0 -1
- package/dist/templates/demo-store/.cache/content-v2/sha512/91/39/2d6842760bb34dde16e9aad46162f546e8cab25d2440a69cb01bf4b2ed8fb3122490666d3eb9b70225259f7ed47e182bc6b83fe455647dde30d61cefa07d +0 -1
- package/dist/templates/demo-store/.cache/content-v2/sha512/93/6b/e60098157f6bff8ba570cab2ffd97a14983109006f7fa87e4432728366f96dfb19e957d28754daa45f1b6cb2421d26ab59bbd5ce5a448d6102e8e662403d +0 -1
- package/dist/templates/demo-store/.cache/content-v2/sha512/94/4a/a539de5a6348e4ecc4e05ea18301c0077a30ed452550660f8b13440a40f7e3858a03ef0aad25b559c49dbbe51455cc5d8e2a7b6c2b0c57e31875b5f8e6be +0 -1
- package/dist/templates/demo-store/.cache/content-v2/sha512/9e/2e/945fdc4a4fb8c2186645c71b48ef341e6f0da2a6b3ddd38761210fcf713c2249160f87387ac66547fa30732269fbf9ad6b24b6c6a50ae914284b96be8571 +0 -1
- package/dist/templates/demo-store/.cache/content-v2/sha512/9e/42/2999364d90a1a410573f5de0dea3765defcb24ccf54937c92995a3fcaf1fffe8fca06c15ab433d60b595617e89707ba1a292b66cbb9aae8d8e617bc59879 +0 -1
- package/dist/templates/demo-store/.cache/content-v2/sha512/9f/76/504ec4500726300092be4c0d162b3694e388778e8a59ace118572149b8f31da4661b3bee2f950ea6608154f0cc105422f39f92f8fddda49053712b5cc81d +0 -1
- package/dist/templates/demo-store/.cache/content-v2/sha512/9f/e5/f8840af1702b9e2e9005708f2513779d889a88d8d7379d5d93cf28390fd6c0300ba5cac0fe429d67a22ddeb884f85917c73f4ae286328a5cf437f568b73f +0 -1
- package/dist/templates/demo-store/.cache/content-v2/sha512/9f/f7/d8f3eb03a1a2eefae7d7e52b2a15391b7012eab4507c37385ccfcfcad13c095c93a99dcfc2a6a44b73ab2fa50be0e3b64ab1153f56bd833536b7a3f06852 +0 -1
- package/dist/templates/demo-store/.cache/content-v2/sha512/a0/92/dc5bc315864cebde3ccd84e2a2e4228d8f467aa14efdcc3ef13b8815abbf495afeccb531cc4e049fe4d81d0b3e5afc0139b4450fb2cfca2b2c82cdd450ac +0 -1
- package/dist/templates/demo-store/.cache/content-v2/sha512/ad/44/f00b1b89c5d7778be4cd40cff421c77e97a937e945491777256fafa6ac80cc334b7118b4248fd13c3cb7fb37d86e1b54afaf688b295542694f276d359082 +0 -1
- package/dist/templates/demo-store/.cache/content-v2/sha512/b0/02/9ef55507e114e4391048df8e43101c006d5b3852e33450030d3ba974d438dd3ac489b084b15445ff5e1747e642eda2d969a13c8ba5a778669f9ab019789a +0 -1
- package/dist/templates/demo-store/.cache/content-v2/sha512/ba/08/9238d2f1bec0536eed757ab6583e384da966814a1c83896409f032bb673a056d62bb6f3b8a5bef36d61daf0e15617154b106b3bbc721354690bc930bb649 +0 -1
- package/dist/templates/demo-store/.cache/content-v2/sha512/bb/58/6a8a15508eab54d23bb1ae0dc4e28925c945258fffbf51d126a8ad3413d5396b3b2211493be551641d5b55dbf0c84d34cc06de906c3127e84b04eb46080d +0 -1
- package/dist/templates/demo-store/.cache/content-v2/sha512/bc/33/6e26ece5ac53d9eac9ac8a192ef39faf2a587a5808253c659fb1d371c477fc8074d428c8d1929b0d85dd1fec66fc79ea6b9fcb01507e2efec75fb7fbc2cc +0 -1
- package/dist/templates/demo-store/.cache/content-v2/sha512/c2/66/bc5f0b229dcdcab36104e3a3b531e3adc88a84622db081d73664f13cd7f6f4639d94e0d85ec075309735d51aa30bb26ea05ccff534f7e1ced5bf8115077a +0 -1
- package/dist/templates/demo-store/.cache/content-v2/sha512/c3/02/833766a7cfde6705e73ecd14cfa40f18bb470af44b39b856473411d00b9bda679d93ff62e49267263318aba287a74a1395b7e1559e786d955a19d8ba5ad7 +0 -1
- package/dist/templates/demo-store/.cache/content-v2/sha512/c9/bf/f82a49d275c8c16097122d6c71e3e64e45902413b6973b56974ed0f03bf8e0974328cfb006067036348f9473ef241927a68562848a1bdb2a8a9ce7d3cd9d +0 -1
- package/dist/templates/demo-store/.cache/content-v2/sha512/d1/fd/7a54f9c08d3a6e60f396a8033b49ce9c1129e877eef39bfa18467b04cd39c6c94423ef7e099fde8a8cca3a2b405d4725d7b2d51abf2be59853454afebfc5 +0 -1
- package/dist/templates/demo-store/.cache/content-v2/sha512/da/84/b6d27e02f9b109d7cff3095b08e2e2ed1802c8b6829c98f6e297d1c404059f8bacfdc278afd07e2f81cbc487318396a3775037b678ab6aff9a5231c94c0d +0 -1
- package/dist/templates/demo-store/.cache/content-v2/sha512/e8/ae/9b467e1d23913d4584d9417875b3cdc25f6dfed8b228f3a0c818129010b778aae1af1eb200b015ab428e79afe0ef1061262392fbdb96ed7da95efbe7f758 +0 -1
- package/dist/templates/demo-store/.cache/content-v2/sha512/ec/30/c2d6a93b0ab69c9d176e1db911bc276c6b81ef13d4ac2241bf2b6824979a157817f26c8a508ca87697f89b98afd86e8d7203878bb02e60e8442ab4620d8c +0 -1
- package/dist/templates/demo-store/.cache/content-v2/sha512/ed/15/aabcbf6d4b36151e7bb25d8751396c6c22a4a38b0505f9b244a060634e97399617ba8936870dc4ad25a3a1ad1fb1e4428d9989b2d52ff61070bfbca5ef1a +0 -1
- package/dist/templates/demo-store/.cache/content-v2/sha512/fd/f3/986b7ee5ea5ad1d89af5c08de69d43c025b54381092e0a19fd7e7a1e0352552aa85c056315ce5e11a46ec75a252b1a44e2083abb73cd6df8407dfdb0ac48 +0 -1
- package/dist/templates/demo-store/.cache/index-v5/06/7e/7376a38676aa7f0543ab03fc451602dab8ad66e6ddebc44d94ee6f5c1df2 +0 -2
- package/dist/templates/demo-store/.cache/index-v5/06/84/719070270981ac7d003eefa98569d499d2d93dd2f1828da9825b87d03160 +0 -2
- package/dist/templates/demo-store/.cache/index-v5/08/b4/0d9cf6db265587df0990c07ef4bc1e61fa9fe85d6cfe4d6cbbf839c2313c +0 -2
- package/dist/templates/demo-store/.cache/index-v5/09/f6/fe4b05c4157320b8b59b3f84116195be0437d87357d743d21acd638a4606 +0 -2
- package/dist/templates/demo-store/.cache/index-v5/0a/75/d3baf53012b62018cb60557f47601d810ec57c564bdc0b24c4990c73a833 +0 -2
- package/dist/templates/demo-store/.cache/index-v5/0c/43/721b2c2b054af973286c2ea3c51c612d347365682b5aae5b9e98554f91e1 +0 -2
- package/dist/templates/demo-store/.cache/index-v5/12/83/1a44e36774d9014fe186e18a3691e1ec3f37f2c30c22d38787a3cd157d7f +0 -2
- package/dist/templates/demo-store/.cache/index-v5/13/bd/14a326bd4cb6fb280eb85ecca60d6519738bf7e80df5285ec626d129baf3 +0 -2
- package/dist/templates/demo-store/.cache/index-v5/19/b1/b0877b4141a2ee6f7c173e2407c0b26958c0919238934a89a03049397aec +0 -2
- package/dist/templates/demo-store/.cache/index-v5/1b/6a/418ff1309326b48db3963d5ad40eacb0728d138b7f24896390e484b34c50 +0 -2
- package/dist/templates/demo-store/.cache/index-v5/24/d9/e0e8006f3c8deb17314475a674698161e207f116d9056bf0e1aabfa6c430 +0 -2
- package/dist/templates/demo-store/.cache/index-v5/28/f4/466108ec4c6619222c94f178cc3962ed49f5f9a1e3783ad55335de0cdad3 +0 -2
- package/dist/templates/demo-store/.cache/index-v5/2e/ae/45167cd92f49c852d660e05a29b7484c886b3c0579fb9c148162b1a88fb6 +0 -2
- package/dist/templates/demo-store/.cache/index-v5/35/95/be51ab071b6bd2259e4acb91185c5e0affeee223c15a822ba226607d5616 +0 -2
- package/dist/templates/demo-store/.cache/index-v5/36/74/12368a4a642be74c83dfdb5eaca244dc624ca78c3528edc49262807f9f96 +0 -2
- package/dist/templates/demo-store/.cache/index-v5/37/56/4cbfef349acf26ffb05aa7f17742913d7bd956c920a5bb1941ca0dda3a22 +0 -2
- package/dist/templates/demo-store/.cache/index-v5/3b/e5/5841b3445af43a34c7b560d6cf329ade1bfb64584b85fbb10ac4a7313ef4 +0 -2
- package/dist/templates/demo-store/.cache/index-v5/40/67/0807c50d176836338cf5fe4864622d377a143dc97f0a86a702bf11dd7d72 +0 -2
- package/dist/templates/demo-store/.cache/index-v5/45/4b/1a3af253b3e2ef123d3872ad54d71865cc788ff5373a00414d2ae0243421 +0 -2
- package/dist/templates/demo-store/.cache/index-v5/4f/8a/4672c73b9b76b90b7b378fbf9bc1a09426d0b5dbe97404e1f1f5a354013c +0 -2
- package/dist/templates/demo-store/.cache/index-v5/51/da/70f3331e7c62bab563cf9f86297b1bda6f6215420807d7710aaee0b8ca5d +0 -2
- package/dist/templates/demo-store/.cache/index-v5/55/0e/4666f091383137a5168d8052b246b3a7a28e05215dc7d8ff7f6b921f0142 +0 -2
- package/dist/templates/demo-store/.cache/index-v5/58/93/287077465c80a2bfba306f218e51893019895137562df4a116326a0b222a +0 -2
- package/dist/templates/demo-store/.cache/index-v5/68/63/f781b7764101dfe1c192f68e1083513974e2396c9db609adf220a983bd88 +0 -2
- package/dist/templates/demo-store/.cache/index-v5/68/f1/4a98caa6e2ab43e78781b99c7833cab4e722cd716bf9718e001a43efb27b +0 -2
- package/dist/templates/demo-store/.cache/index-v5/7d/de/0d76288297eecd2ad4b07dd881631b481b19a83f7c9d36cfa4f967332943 +0 -2
- package/dist/templates/demo-store/.cache/index-v5/7e/12/528dc5a6aebfe1fb1d5b4b7d56097f25291dd9454e0ab8faa0a26f296815 +0 -2
- package/dist/templates/demo-store/.cache/index-v5/7e/bf/17c5f07b52df7946e14e733afa8f3880a40c1032bd3fb307cae4319e0fa8 +0 -2
- package/dist/templates/demo-store/.cache/index-v5/81/59/14da935263d86e18f99d2391d6731d29cd2d5c0d8c81c65293816e6ad32a +0 -2
- package/dist/templates/demo-store/.cache/index-v5/85/85/0475166b36ce12e75c5a6352b12ea2fa872f696b8161dd08fdfab09a7273 +0 -2
- package/dist/templates/demo-store/.cache/index-v5/88/bd/84904435de02c12b5b01c5aadd782e65a48d44006d98b864e01961a109dc +0 -2
- package/dist/templates/demo-store/.cache/index-v5/88/f6/729e4bad26ebd2b792dee6d1f96f87546ff9c4fa95518f603627fdd1126f +0 -2
- package/dist/templates/demo-store/.cache/index-v5/8a/7c/f5287da63fd3884889fef7019b2679f9a53ce5a268097295682ddad5131b +0 -2
- package/dist/templates/demo-store/.cache/index-v5/95/40/bed10ab9e6081915bc6dc1ffb23a589f407c22ab7d254453f0b3ce53e5f5 +0 -2
- package/dist/templates/demo-store/.cache/index-v5/96/b8/090abc56d6e9489d08af9564fb75d34477730aa1ece14ad85ba516549f2b +0 -2
- package/dist/templates/demo-store/.cache/index-v5/9b/e4/8aa4e95d52644490afdb862c05cb2dccb9f5c1aa45157f3af5c37aad080a +0 -2
- package/dist/templates/demo-store/.cache/index-v5/a1/e7/85ee850c85c329791d2123dd8231464fa27317290756b459012830d0f57e +0 -2
- package/dist/templates/demo-store/.cache/index-v5/a2/27/f2e299e50a8a3b2b54a89bb3be85f3118081b3c6cfed704bb7d2802e2a49 +0 -2
- package/dist/templates/demo-store/.cache/index-v5/a2/88/971871174c14875c70ca7bc9cea8d6b01465c1716d99440b059fa493947c +0 -2
- package/dist/templates/demo-store/.cache/index-v5/aa/57/05b67f08f71909d263fe9c357786097f5683394dbd65b0e4da2f9aa25288 +0 -2
- package/dist/templates/demo-store/.cache/index-v5/ac/25/d778b282ab78dbafcc1b4fb19695aed368081c76fa680140b89af08b07b1 +0 -2
- package/dist/templates/demo-store/.cache/index-v5/af/79/e80586a8b4bd0086246d97823d95bd64c77ad44b1fae591fdcd3883f776e +0 -2
- package/dist/templates/demo-store/.cache/index-v5/b3/75/d3e7a4a5df68530007409daf1d2e66ab789c8b658d1819d7e5fd183f5f57 +0 -2
- package/dist/templates/demo-store/.cache/index-v5/b8/22/805af62bf21b63052b47f2f85322cb615ee786c214c0abc63b593a9f80ac +0 -2
- package/dist/templates/demo-store/.cache/index-v5/b8/67/17d551f86553b2a3a30c80b1d9797cbfcaa3d00f5239f39c1727c4d4fe8e +0 -2
- package/dist/templates/demo-store/.cache/index-v5/bc/52/538f70c9e2857f944f17c9121f6018d5c26ba916801b78d75484b130cd78 +0 -2
- package/dist/templates/demo-store/.cache/index-v5/c1/77/182e74b8e456fd321a98e8b23f5616eaf2968ccc0dd0eeff016624a89534 +0 -2
- package/dist/templates/demo-store/.cache/index-v5/c2/b6/58c9b05294374187ca9a342d46ed1b1f9e0afaf619acf88014f7f1a5dd8b +0 -2
- package/dist/templates/demo-store/.cache/index-v5/c6/72/887059f60c91b6fa41fbdab6bc1e1b6f4e3596cadd7a22457466fc1c2f67 +0 -2
- package/dist/templates/demo-store/.cache/index-v5/c8/52/09bfbca72b45aec745fc339c27986edefa85e40bd69113275a6ecd6495e9 +0 -2
- package/dist/templates/demo-store/.cache/index-v5/cb/f3/c8983d3f6b148ff6b70a42e0c3ccc4ca2f368df0aca086b8f0279d49f5be +0 -2
- package/dist/templates/demo-store/.cache/index-v5/d0/c4/d960260ece228d28f70e317741b3f3f3df05c53956d870235837ae2b73b4 +0 -2
- package/dist/templates/demo-store/.cache/index-v5/d2/7b/9476cfbc06c75a311a1951bcdea3b843d3f8763c916468901c3cd85ae7a4 +0 -2
- package/dist/templates/demo-store/.cache/index-v5/d7/2f/11fb6fd9a383d1edb40e2a774ca2de45a4f4b2c02e3f10d772427ef813d1 +0 -2
- package/dist/templates/demo-store/.cache/index-v5/d7/a8/e21243c97a68bff4874453358b21815d4dc4c804b63fce7cba9cc567c3d6 +0 -2
- package/dist/templates/demo-store/.cache/index-v5/db/34/e258d66ddeae0e8df2f3a92f0fc0a0472adc9b48c8d2f38087a828da4bc0 +0 -2
- package/dist/templates/demo-store/.cache/index-v5/de/8a/31224d2c63a17ccc13c25e35f4e5882c9a5f5553a3ffeb916c84aa73a15d +0 -2
- package/dist/templates/demo-store/.cache/index-v5/e0/9c/a50143959e2a05f23db12f6e7f9982a0889c4105004c9f58115f9fdb19e0 +0 -2
- package/dist/templates/demo-store/.cache/index-v5/f3/45/ed5a71628f7babbcd96f9d316ba1a9a7cdea5be1ef54d931ed5d6fcbfc21 +0 -2
- package/dist/templates/demo-store/.cache/index-v5/f4/20/fefac33b4499a27824ee7ef5a84779df38eca55b00ec3046fcb028efb593 +0 -2
- package/dist/templates/demo-store/.cache/index-v5/f6/1d/25c4d10714262d4559d2c43d3e64ebfc038d37b0edbbf02246bdd6dcdacb +0 -2
- package/dist/templates/demo-store/.cache/index-v5/f8/f2/017d33a8105299b5a1d72ea80b7cce0d4bafbcd8409437a212735325631a +0 -2
- package/dist/templates/demo-store/.cache/index-v5/fd/f2/f7f55dae9bf6b65ea883eb44dc2fd24a2d2a97c5b68cb559255c6574d239 +0 -2
- package/dist/templates/demo-store/.editorconfig +0 -8
- package/dist/templates/demo-store/.eslintignore +0 -4
- package/dist/templates/demo-store/.eslintrc.js +0 -16
- package/dist/templates/demo-store/.graphqlrc.yml +0 -1
- package/dist/templates/demo-store/.prettierignore +0 -2
- package/dist/templates/demo-store/_env +0 -6
- package/dist/templates/demo-store/_gitignore +0 -13
- package/dist/templates/demo-store/app/components/AccountAddressBook.tsx +0 -97
- package/dist/templates/demo-store/app/components/AccountDetails.tsx +0 -41
- package/dist/templates/demo-store/app/components/AddToCartButton.tsx +0 -42
- package/dist/templates/demo-store/app/components/Breadcrumbs.tsx +0 -36
- package/dist/templates/demo-store/app/components/Button.tsx +0 -56
- package/dist/templates/demo-store/app/components/Cart.tsx +0 -431
- package/dist/templates/demo-store/app/components/CartLoading.tsx +0 -50
- package/dist/templates/demo-store/app/components/CountrySelector.tsx +0 -180
- package/dist/templates/demo-store/app/components/Drawer.tsx +0 -115
- package/dist/templates/demo-store/app/components/FeaturedCollections.tsx +0 -54
- package/dist/templates/demo-store/app/components/FeaturedProducts.tsx +0 -116
- package/dist/templates/demo-store/app/components/FeaturedSection.tsx +0 -39
- package/dist/templates/demo-store/app/components/GenericError.tsx +0 -58
- package/dist/templates/demo-store/app/components/Grid.tsx +0 -44
- package/dist/templates/demo-store/app/components/Hero.tsx +0 -130
- package/dist/templates/demo-store/app/components/Icon.tsx +0 -253
- package/dist/templates/demo-store/app/components/Input.tsx +0 -24
- package/dist/templates/demo-store/app/components/Layout.tsx +0 -492
- package/dist/templates/demo-store/app/components/Link.tsx +0 -46
- package/dist/templates/demo-store/app/components/Modal.tsx +0 -46
- package/dist/templates/demo-store/app/components/NotFound.tsx +0 -22
- package/dist/templates/demo-store/app/components/OrderCard.tsx +0 -85
- package/dist/templates/demo-store/app/components/Pagination.tsx +0 -277
- package/dist/templates/demo-store/app/components/ProductCard.tsx +0 -145
- package/dist/templates/demo-store/app/components/ProductGallery.tsx +0 -114
- package/dist/templates/demo-store/app/components/ProductGrid.tsx +0 -93
- package/dist/templates/demo-store/app/components/ProductSwimlane.tsx +0 -30
- package/dist/templates/demo-store/app/components/Skeleton.tsx +0 -24
- package/dist/templates/demo-store/app/components/SortFilter.tsx +0 -411
- package/dist/templates/demo-store/app/components/Text.tsx +0 -192
- package/dist/templates/demo-store/app/components/index.ts +0 -28
- package/dist/templates/demo-store/app/data/countries.ts +0 -194
- package/dist/templates/demo-store/app/data/index.ts +0 -1027
- package/dist/templates/demo-store/app/entry.client.tsx +0 -4
- package/dist/templates/demo-store/app/entry.server.tsx +0 -26
- package/dist/templates/demo-store/app/hooks/useCartFetchers.tsx +0 -14
- package/dist/templates/demo-store/app/hooks/useIsHydrated.tsx +0 -12
- package/dist/templates/demo-store/app/lib/const.ts +0 -10
- package/dist/templates/demo-store/app/lib/placeholders.ts +0 -242
- package/dist/templates/demo-store/app/lib/seo/common.tsx +0 -367
- package/dist/templates/demo-store/app/lib/seo/debugger.tsx +0 -175
- package/dist/templates/demo-store/app/lib/seo/image.tsx +0 -32
- package/dist/templates/demo-store/app/lib/seo/index.ts +0 -4
- package/dist/templates/demo-store/app/lib/seo/seo.tsx +0 -24
- package/dist/templates/demo-store/app/lib/seo/types.ts +0 -84
- package/dist/templates/demo-store/app/lib/session.server.ts +0 -57
- package/dist/templates/demo-store/app/lib/type.ts +0 -21
- package/dist/templates/demo-store/app/lib/utils.ts +0 -310
- package/dist/templates/demo-store/app/root.tsx +0 -279
- package/dist/templates/demo-store/app/routes/$.tsx +0 -7
- package/dist/templates/demo-store/app/routes/$lang/$.tsx +0 -1
- package/dist/templates/demo-store/app/routes/$lang/[robots.txt].tsx +0 -1
- package/dist/templates/demo-store/app/routes/$lang/[sitemap.xml].tsx +0 -1
- package/dist/templates/demo-store/app/routes/$lang/account/__private/address/$id.tsx +0 -1
- package/dist/templates/demo-store/app/routes/$lang/account/__private/edit.tsx +0 -1
- package/dist/templates/demo-store/app/routes/$lang/account/__private/logout.ts +0 -1
- package/dist/templates/demo-store/app/routes/$lang/account/__private/orders.$id.tsx +0 -1
- package/dist/templates/demo-store/app/routes/$lang/account/__public/activate.$id.$activationToken.tsx +0 -6
- package/dist/templates/demo-store/app/routes/$lang/account/__public/login.tsx +0 -7
- package/dist/templates/demo-store/app/routes/$lang/account/__public/recover.tsx +0 -1
- package/dist/templates/demo-store/app/routes/$lang/account/__public/register.tsx +0 -6
- package/dist/templates/demo-store/app/routes/$lang/account/__public/reset.$id.$resetToken.tsx +0 -5
- package/dist/templates/demo-store/app/routes/$lang/account.tsx +0 -1
- package/dist/templates/demo-store/app/routes/$lang/api/countries.tsx +0 -1
- package/dist/templates/demo-store/app/routes/$lang/api/products.tsx +0 -1
- package/dist/templates/demo-store/app/routes/$lang/cart.tsx +0 -1
- package/dist/templates/demo-store/app/routes/$lang/collections/$collectionHandle.tsx +0 -1
- package/dist/templates/demo-store/app/routes/$lang/collections/all.tsx +0 -1
- package/dist/templates/demo-store/app/routes/$lang/collections/index.tsx +0 -1
- package/dist/templates/demo-store/app/routes/$lang/featured-products.tsx +0 -1
- package/dist/templates/demo-store/app/routes/$lang/index.tsx +0 -6
- package/dist/templates/demo-store/app/routes/$lang/journal/$journalHandle.tsx +0 -7
- package/dist/templates/demo-store/app/routes/$lang/journal/index.tsx +0 -1
- package/dist/templates/demo-store/app/routes/$lang/og-image.tsx +0 -1
- package/dist/templates/demo-store/app/routes/$lang/pages/$pageHandle.tsx +0 -1
- package/dist/templates/demo-store/app/routes/$lang/policies/$policyHandle.tsx +0 -1
- package/dist/templates/demo-store/app/routes/$lang/policies/index.tsx +0 -1
- package/dist/templates/demo-store/app/routes/$lang/products/$productHandle.tsx +0 -1
- package/dist/templates/demo-store/app/routes/$lang/products/index.tsx +0 -1
- package/dist/templates/demo-store/app/routes/$lang/search.tsx +0 -1
- package/dist/templates/demo-store/app/routes/account/__private/address/$id.tsx +0 -320
- package/dist/templates/demo-store/app/routes/account/__private/edit.tsx +0 -273
- package/dist/templates/demo-store/app/routes/account/__private/logout.ts +0 -25
- package/dist/templates/demo-store/app/routes/account/__private/orders.$id.tsx +0 -324
- package/dist/templates/demo-store/app/routes/account/__public/activate.$id.$activationToken.tsx +0 -218
- package/dist/templates/demo-store/app/routes/account/__public/login.tsx +0 -197
- package/dist/templates/demo-store/app/routes/account/__public/recover.tsx +0 -144
- package/dist/templates/demo-store/app/routes/account/__public/register.tsx +0 -184
- package/dist/templates/demo-store/app/routes/account/__public/reset.$id.$resetToken.tsx +0 -214
- package/dist/templates/demo-store/app/routes/account.tsx +0 -188
- package/dist/templates/demo-store/app/routes/api/countries.tsx +0 -22
- package/dist/templates/demo-store/app/routes/api/products.tsx +0 -116
- package/dist/templates/demo-store/app/routes/cart.tsx +0 -510
- package/dist/templates/demo-store/app/routes/collections/$collectionHandle.tsx +0 -301
- package/dist/templates/demo-store/app/routes/collections/all.tsx +0 -5
- package/dist/templates/demo-store/app/routes/collections/index.tsx +0 -188
- package/dist/templates/demo-store/app/routes/discounts.$code.tsx +0 -60
- package/dist/templates/demo-store/app/routes/featured-products.tsx +0 -58
- package/dist/templates/demo-store/app/routes/index.tsx +0 -241
- package/dist/templates/demo-store/app/routes/journal/$journalHandle.tsx +0 -141
- package/dist/templates/demo-store/app/routes/journal/index.tsx +0 -149
- package/dist/templates/demo-store/app/routes/og-image.tsx +0 -19
- package/dist/templates/demo-store/app/routes/pages/$pageHandle.tsx +0 -75
- package/dist/templates/demo-store/app/routes/policies/index.tsx +0 -97
- package/dist/templates/demo-store/app/routes/products/$productHandle.tsx +0 -551
- package/dist/templates/demo-store/app/routes/products/index.tsx +0 -148
- package/dist/templates/demo-store/app/routes/search.tsx +0 -198
- package/dist/templates/demo-store/app/styles/app.css +0 -4203
- package/dist/templates/demo-store/app/styles/custom-font.css +0 -13
- package/dist/templates/demo-store/dist/client/build/_assets/app-QCTC5PWY.css +0 -4203
- package/dist/templates/demo-store/dist/client/build/_assets/custom-font-COCMVHUB.css +0 -13
- package/dist/templates/demo-store/dist/client/build/_assets/favicon-5FIZBM2K.svg +0 -28
- package/dist/templates/demo-store/dist/client/build/_shared/chunk-3HDCZC7Z.js +0 -2
- package/dist/templates/demo-store/dist/client/build/_shared/chunk-3HDCZC7Z.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/_shared/chunk-6DT2GXU6.js +0 -2
- package/dist/templates/demo-store/dist/client/build/_shared/chunk-6DT2GXU6.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/_shared/chunk-6IZ7NY57.js +0 -2
- package/dist/templates/demo-store/dist/client/build/_shared/chunk-6IZ7NY57.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/_shared/chunk-6KICVRFE.js +0 -32
- package/dist/templates/demo-store/dist/client/build/_shared/chunk-6KICVRFE.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/_shared/chunk-6KPVFOMZ.js +0 -2
- package/dist/templates/demo-store/dist/client/build/_shared/chunk-6KPVFOMZ.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/_shared/chunk-6RKYTPO7.js +0 -27
- package/dist/templates/demo-store/dist/client/build/_shared/chunk-6RKYTPO7.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/_shared/chunk-6SSSJOFL.js +0 -68
- package/dist/templates/demo-store/dist/client/build/_shared/chunk-6SSSJOFL.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/_shared/chunk-AOOMA6GB.js +0 -2
- package/dist/templates/demo-store/dist/client/build/_shared/chunk-AOOMA6GB.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/_shared/chunk-AYENMH4R.js +0 -2
- package/dist/templates/demo-store/dist/client/build/_shared/chunk-AYENMH4R.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/_shared/chunk-AYHDHSL7.js +0 -2
- package/dist/templates/demo-store/dist/client/build/_shared/chunk-AYHDHSL7.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/_shared/chunk-DHA7C3MW.js +0 -2
- package/dist/templates/demo-store/dist/client/build/_shared/chunk-DHA7C3MW.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/_shared/chunk-DIIFYFWW.js +0 -2
- package/dist/templates/demo-store/dist/client/build/_shared/chunk-DIIFYFWW.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/_shared/chunk-DS7W4L22.js +0 -2
- package/dist/templates/demo-store/dist/client/build/_shared/chunk-DS7W4L22.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/_shared/chunk-GHUOM4KB.js +0 -7
- package/dist/templates/demo-store/dist/client/build/_shared/chunk-GHUOM4KB.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/_shared/chunk-ISW2I2ME.js +0 -2
- package/dist/templates/demo-store/dist/client/build/_shared/chunk-ISW2I2ME.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/_shared/chunk-J43VR2R2.js +0 -133
- package/dist/templates/demo-store/dist/client/build/_shared/chunk-J43VR2R2.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/_shared/chunk-KSKV5IK6.js +0 -20
- package/dist/templates/demo-store/dist/client/build/_shared/chunk-KSKV5IK6.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/_shared/chunk-MENU2OIC.js +0 -25
- package/dist/templates/demo-store/dist/client/build/_shared/chunk-MENU2OIC.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/_shared/chunk-MMBB6JJY.js +0 -2
- package/dist/templates/demo-store/dist/client/build/_shared/chunk-MMBB6JJY.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/_shared/chunk-RESK5RQB.js +0 -54
- package/dist/templates/demo-store/dist/client/build/_shared/chunk-RESK5RQB.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/_shared/chunk-TVK2D2ZT.js +0 -83
- package/dist/templates/demo-store/dist/client/build/_shared/chunk-TVK2D2ZT.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/_shared/chunk-TZEM5AYX.js +0 -2
- package/dist/templates/demo-store/dist/client/build/_shared/chunk-TZEM5AYX.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/_shared/chunk-US5NIJUM.js +0 -105
- package/dist/templates/demo-store/dist/client/build/_shared/chunk-US5NIJUM.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/_shared/chunk-V66AOKO6.js +0 -2
- package/dist/templates/demo-store/dist/client/build/_shared/chunk-V66AOKO6.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/_shared/chunk-WFLLVPNQ.js +0 -2
- package/dist/templates/demo-store/dist/client/build/_shared/chunk-WFLLVPNQ.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/_shared/chunk-WYHUKY3H.js +0 -2
- package/dist/templates/demo-store/dist/client/build/_shared/chunk-WYHUKY3H.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/_shared/chunk-WYLDLOSN.js +0 -2
- package/dist/templates/demo-store/dist/client/build/_shared/chunk-WYLDLOSN.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/_shared/chunk-X2L7EU2T.js +0 -2
- package/dist/templates/demo-store/dist/client/build/_shared/chunk-X2L7EU2T.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/_shared/chunk-X4LCECW4.js +0 -2
- package/dist/templates/demo-store/dist/client/build/_shared/chunk-X4LCECW4.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/_shared/chunk-XDBJQDOE.js +0 -2
- package/dist/templates/demo-store/dist/client/build/_shared/chunk-XDBJQDOE.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/_shared/chunk-YGLSE5Z5.js +0 -2
- package/dist/templates/demo-store/dist/client/build/_shared/chunk-YGLSE5Z5.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/_shared/chunk-YPGAXYYV.js +0 -24
- package/dist/templates/demo-store/dist/client/build/_shared/chunk-YPGAXYYV.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/_shared/chunk-ZNLABNO4.js +0 -66
- package/dist/templates/demo-store/dist/client/build/_shared/chunk-ZNLABNO4.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/entry.client-UGG4BFNY.js +0 -2
- package/dist/templates/demo-store/dist/client/build/entry.client-UGG4BFNY.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/manifest-483612AE.js +0 -1
- package/dist/templates/demo-store/dist/client/build/root-FWYSHVLP.js +0 -32
- package/dist/templates/demo-store/dist/client/build/root-FWYSHVLP.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/routes/$-T6CCBQXB.js +0 -2
- package/dist/templates/demo-store/dist/client/build/routes/$-T6CCBQXB.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/routes/$lang/$-RML44FPI.js +0 -2
- package/dist/templates/demo-store/dist/client/build/routes/$lang/$-RML44FPI.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/routes/$lang/[robots.txt]-Q6A4ELVO.js +0 -2
- package/dist/templates/demo-store/dist/client/build/routes/$lang/[robots.txt]-Q6A4ELVO.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/routes/$lang/[sitemap.xml]-XRXAWWFM.js +0 -2
- package/dist/templates/demo-store/dist/client/build/routes/$lang/[sitemap.xml]-XRXAWWFM.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/routes/$lang/account/__private/address/$id-NA5FIOXG.js +0 -2
- package/dist/templates/demo-store/dist/client/build/routes/$lang/account/__private/address/$id-NA5FIOXG.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/routes/$lang/account/__private/edit-IFFD5E3I.js +0 -2
- package/dist/templates/demo-store/dist/client/build/routes/$lang/account/__private/edit-IFFD5E3I.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/routes/$lang/account/__private/logout-W2VRZWGS.js +0 -2
- package/dist/templates/demo-store/dist/client/build/routes/$lang/account/__private/logout-W2VRZWGS.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/routes/$lang/account/__private/orders.$id-JLCBC7CQ.js +0 -2
- package/dist/templates/demo-store/dist/client/build/routes/$lang/account/__private/orders.$id-JLCBC7CQ.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/routes/$lang/account/__public/activate.$id.$activationToken-SKVJFAYX.js +0 -2
- package/dist/templates/demo-store/dist/client/build/routes/$lang/account/__public/activate.$id.$activationToken-SKVJFAYX.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/routes/$lang/account/__public/login-J6JGOFW4.js +0 -2
- package/dist/templates/demo-store/dist/client/build/routes/$lang/account/__public/login-J6JGOFW4.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/routes/$lang/account/__public/recover-ELRPFD3J.js +0 -2
- package/dist/templates/demo-store/dist/client/build/routes/$lang/account/__public/recover-ELRPFD3J.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/routes/$lang/account/__public/register-PBVQNHER.js +0 -2
- package/dist/templates/demo-store/dist/client/build/routes/$lang/account/__public/register-PBVQNHER.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/routes/$lang/account/__public/reset.$id.$resetToken-5AF75Z6H.js +0 -2
- package/dist/templates/demo-store/dist/client/build/routes/$lang/account/__public/reset.$id.$resetToken-5AF75Z6H.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/routes/$lang/account-XVIGQX2R.js +0 -2
- package/dist/templates/demo-store/dist/client/build/routes/$lang/account-XVIGQX2R.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/routes/$lang/api/countries-D74K7HOY.js +0 -2
- package/dist/templates/demo-store/dist/client/build/routes/$lang/api/countries-D74K7HOY.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/routes/$lang/api/products-WTFHLYFB.js +0 -2
- package/dist/templates/demo-store/dist/client/build/routes/$lang/api/products-WTFHLYFB.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/routes/$lang/cart-SGDEGK6Q.js +0 -2
- package/dist/templates/demo-store/dist/client/build/routes/$lang/cart-SGDEGK6Q.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/routes/$lang/collections/$collectionHandle-JIY2JRDZ.js +0 -2
- package/dist/templates/demo-store/dist/client/build/routes/$lang/collections/$collectionHandle-JIY2JRDZ.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/routes/$lang/collections/all-I3ZQ3MBD.js +0 -2
- package/dist/templates/demo-store/dist/client/build/routes/$lang/collections/all-I3ZQ3MBD.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/routes/$lang/collections/index-JM35U6E2.js +0 -2
- package/dist/templates/demo-store/dist/client/build/routes/$lang/collections/index-JM35U6E2.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/routes/$lang/featured-products-UU24CXMU.js +0 -2
- package/dist/templates/demo-store/dist/client/build/routes/$lang/featured-products-UU24CXMU.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/routes/$lang/index-Z4YYZ6FV.js +0 -2
- package/dist/templates/demo-store/dist/client/build/routes/$lang/index-Z4YYZ6FV.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/routes/$lang/journal/$journalHandle-VTU5XZ3X.js +0 -2
- package/dist/templates/demo-store/dist/client/build/routes/$lang/journal/$journalHandle-VTU5XZ3X.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/routes/$lang/journal/index-GJ635OK2.js +0 -2
- package/dist/templates/demo-store/dist/client/build/routes/$lang/journal/index-GJ635OK2.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/routes/$lang/og-image-JHBOIC2Z.js +0 -2
- package/dist/templates/demo-store/dist/client/build/routes/$lang/og-image-JHBOIC2Z.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/routes/$lang/pages/$pageHandle-56OQSRT6.js +0 -2
- package/dist/templates/demo-store/dist/client/build/routes/$lang/pages/$pageHandle-56OQSRT6.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/routes/$lang/policies/$policyHandle-FT77Q33E.js +0 -2
- package/dist/templates/demo-store/dist/client/build/routes/$lang/policies/$policyHandle-FT77Q33E.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/routes/$lang/policies/index-7VIBEBDP.js +0 -2
- package/dist/templates/demo-store/dist/client/build/routes/$lang/policies/index-7VIBEBDP.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/routes/$lang/products/$productHandle-TD3SUUAT.js +0 -2
- package/dist/templates/demo-store/dist/client/build/routes/$lang/products/$productHandle-TD3SUUAT.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/routes/$lang/products/index-VQNYHSDW.js +0 -2
- package/dist/templates/demo-store/dist/client/build/routes/$lang/products/index-VQNYHSDW.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/routes/$lang/search-TCZIEYJL.js +0 -2
- package/dist/templates/demo-store/dist/client/build/routes/$lang/search-TCZIEYJL.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/routes/[robots.txt]-JOBE7OD7.js +0 -2
- package/dist/templates/demo-store/dist/client/build/routes/[robots.txt]-JOBE7OD7.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/routes/[sitemap.xml]-UQB7RN5M.js +0 -2
- package/dist/templates/demo-store/dist/client/build/routes/[sitemap.xml]-UQB7RN5M.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/routes/account/__private/address/$id-JZNTMKYB.js +0 -2
- package/dist/templates/demo-store/dist/client/build/routes/account/__private/address/$id-JZNTMKYB.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/routes/account/__private/edit-VVTK3HGS.js +0 -2
- package/dist/templates/demo-store/dist/client/build/routes/account/__private/edit-VVTK3HGS.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/routes/account/__private/logout-MRH6DVPZ.js +0 -2
- package/dist/templates/demo-store/dist/client/build/routes/account/__private/logout-MRH6DVPZ.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/routes/account/__private/orders.$id-IUXEUMTN.js +0 -2
- package/dist/templates/demo-store/dist/client/build/routes/account/__private/orders.$id-IUXEUMTN.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/routes/account/__public/activate.$id.$activationToken-XRNXDJJR.js +0 -2
- package/dist/templates/demo-store/dist/client/build/routes/account/__public/activate.$id.$activationToken-XRNXDJJR.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/routes/account/__public/login-BC3LC2DV.js +0 -2
- package/dist/templates/demo-store/dist/client/build/routes/account/__public/login-BC3LC2DV.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/routes/account/__public/recover-YTA3AC27.js +0 -2
- package/dist/templates/demo-store/dist/client/build/routes/account/__public/recover-YTA3AC27.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/routes/account/__public/register-WKKKPNUZ.js +0 -2
- package/dist/templates/demo-store/dist/client/build/routes/account/__public/register-WKKKPNUZ.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/routes/account/__public/reset.$id.$resetToken-6JGBLMXT.js +0 -2
- package/dist/templates/demo-store/dist/client/build/routes/account/__public/reset.$id.$resetToken-6JGBLMXT.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/routes/account-TPCHO77K.js +0 -2
- package/dist/templates/demo-store/dist/client/build/routes/account-TPCHO77K.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/routes/api/countries-FOQSZPCF.js +0 -2
- package/dist/templates/demo-store/dist/client/build/routes/api/countries-FOQSZPCF.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/routes/api/products-DX4VJAR6.js +0 -2
- package/dist/templates/demo-store/dist/client/build/routes/api/products-DX4VJAR6.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/routes/cart-JKTAKPRZ.js +0 -2
- package/dist/templates/demo-store/dist/client/build/routes/cart-JKTAKPRZ.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/routes/collections/$collectionHandle-WHEXWZAQ.js +0 -2
- package/dist/templates/demo-store/dist/client/build/routes/collections/$collectionHandle-WHEXWZAQ.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/routes/collections/all-EXLOY5Y6.js +0 -2
- package/dist/templates/demo-store/dist/client/build/routes/collections/all-EXLOY5Y6.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/routes/collections/index-OA2FOHWI.js +0 -2
- package/dist/templates/demo-store/dist/client/build/routes/collections/index-OA2FOHWI.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/routes/discounts.$code-ORRT2Y6X.js +0 -2
- package/dist/templates/demo-store/dist/client/build/routes/discounts.$code-ORRT2Y6X.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/routes/featured-products-ECR7IJXB.js +0 -2
- package/dist/templates/demo-store/dist/client/build/routes/featured-products-ECR7IJXB.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/routes/graphiql-5V34JTF6.js +0 -2
- package/dist/templates/demo-store/dist/client/build/routes/graphiql-5V34JTF6.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/routes/index-7ZRVAEPC.js +0 -2
- package/dist/templates/demo-store/dist/client/build/routes/index-7ZRVAEPC.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/routes/journal/$journalHandle-HH345EW5.js +0 -2
- package/dist/templates/demo-store/dist/client/build/routes/journal/$journalHandle-HH345EW5.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/routes/journal/index-QRHMDGSX.js +0 -2
- package/dist/templates/demo-store/dist/client/build/routes/journal/index-QRHMDGSX.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/routes/og-image-DYICG2WR.js +0 -2
- package/dist/templates/demo-store/dist/client/build/routes/og-image-DYICG2WR.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/routes/pages/$pageHandle-SOTJN3BG.js +0 -2
- package/dist/templates/demo-store/dist/client/build/routes/pages/$pageHandle-SOTJN3BG.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/routes/policies/$policyHandle-2E6C2YSR.js +0 -2
- package/dist/templates/demo-store/dist/client/build/routes/policies/$policyHandle-2E6C2YSR.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/routes/policies/index-3U7GEIT5.js +0 -2
- package/dist/templates/demo-store/dist/client/build/routes/policies/index-3U7GEIT5.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/routes/products/$productHandle-N365DTJW.js +0 -2
- package/dist/templates/demo-store/dist/client/build/routes/products/$productHandle-N365DTJW.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/routes/products/index-ZYSA55SB.js +0 -2
- package/dist/templates/demo-store/dist/client/build/routes/products/index-ZYSA55SB.js.map +0 -7
- package/dist/templates/demo-store/dist/client/build/routes/search-4CEESFTV.js +0 -2
- package/dist/templates/demo-store/dist/client/build/routes/search-4CEESFTV.js.map +0 -7
- package/dist/templates/demo-store/dist/client/fonts/IBMPlexSerif-Text.woff2 +0 -0
- package/dist/templates/demo-store/dist/client/fonts/IBMPlexSerif-TextItalic.woff2 +0 -0
- package/dist/templates/demo-store/dist/worker/_assets/app-QCTC5PWY.css +0 -4203
- package/dist/templates/demo-store/dist/worker/_assets/custom-font-COCMVHUB.css +0 -13
- package/dist/templates/demo-store/dist/worker/_assets/favicon-5FIZBM2K.svg +0 -28
- package/dist/templates/demo-store/dist/worker/index.js +0 -1563
- package/dist/templates/demo-store/dist/worker/index.js.map +0 -7
- package/dist/templates/demo-store/package.json +0 -67
- package/dist/templates/demo-store/playwright.config.ts +0 -109
- package/dist/templates/demo-store/postcss.config.js +0 -10
- package/dist/templates/demo-store/public/favicon.svg +0 -28
- package/dist/templates/demo-store/public/fonts/IBMPlexSerif-Text.woff2 +0 -0
- package/dist/templates/demo-store/public/fonts/IBMPlexSerif-TextItalic.woff2 +0 -0
- package/dist/templates/demo-store/remix.env.d.ts +0 -40
- package/dist/templates/demo-store/remix.init/index.js +0 -25
- package/dist/templates/demo-store/remix.init/package.json +0 -7
- package/dist/templates/demo-store/server.ts +0 -73
- package/dist/templates/demo-store/styles/app.css +0 -182
- package/dist/templates/demo-store/tailwind.config.js +0 -70
- package/dist/templates/demo-store/tests/cart.test.ts +0 -70
- package/dist/templates/demo-store/tests/seo.test.ts +0 -36
- package/dist/templates/demo-store/tests/utils.ts +0 -100
- package/dist/templates/demo-store/tsconfig.json +0 -25
- package/dist/templates/hello-world/.cache/content-v2/sha512/13/f6/b7f804d45a961ca1e392429e75ad80f23ba46cbba0e960c6a70f8de81f3f3763af59651474176798d1a1a4bd2a5109b1d441f6d1c8ba070b678b38378adf +0 -1
- package/dist/templates/hello-world/.cache/content-v2/sha512/e5/8f/bcb6cb6a00ef5f377be15d4ce4a8fe978d42eafa3bab9c28a0fe5540568df35c0975de5060ad2a25f4a23bf58ee2e472068854ce7d6904d6e7fa4b784f33 +0 -1
- package/dist/templates/hello-world/.cache/content-v2/sha512/fa/dd/9bc10a1cb1f145eabd96bdba509178e20484197fefd8469ace9f53bf277e875751db3c4dddf229807c48cbe8db19494fe2a5aab7d2a4b7ae8bebbd67509c +0 -1
- package/dist/templates/hello-world/.cache/index-v5/09/f6/fe4b05c4157320b8b59b3f84116195be0437d87357d743d21acd638a4606 +0 -2
- package/dist/templates/hello-world/.cache/index-v5/b3/75/d3e7a4a5df68530007409daf1d2e66ab789c8b658d1819d7e5fd183f5f57 +0 -2
- package/dist/templates/hello-world/.cache/index-v5/d0/c4/d960260ece228d28f70e317741b3f3f3df05c53956d870235837ae2b73b4 +0 -2
- package/dist/templates/hello-world/.eslintignore +0 -4
- package/dist/templates/hello-world/.eslintrc.js +0 -6
- package/dist/templates/hello-world/.graphqlrc.yml +0 -1
- package/dist/templates/hello-world/README.md +0 -20
- package/dist/templates/hello-world/_env +0 -6
- package/dist/templates/hello-world/_gitignore +0 -8
- package/dist/templates/hello-world/app/components/Layout.tsx +0 -15
- package/dist/templates/hello-world/app/components/index.ts +0 -1
- package/dist/templates/hello-world/app/entry.client.tsx +0 -4
- package/dist/templates/hello-world/app/entry.server.tsx +0 -21
- package/dist/templates/hello-world/app/root.tsx +0 -212
- package/dist/templates/hello-world/app/routes/graphiql.tsx +0 -10
- package/dist/templates/hello-world/app/styles/app.css +0 -38
- package/dist/templates/hello-world/dist/client/build/_assets/app-2MJQXVFI.css +0 -38
- package/dist/templates/hello-world/dist/client/build/_assets/favicon-5FIZBM2K.svg +0 -28
- package/dist/templates/hello-world/dist/client/build/_shared/chunk-HGED52H5.js +0 -66
- package/dist/templates/hello-world/dist/client/build/_shared/chunk-HGED52H5.js.map +0 -7
- package/dist/templates/hello-world/dist/client/build/_shared/chunk-KSKV5IK6.js +0 -20
- package/dist/templates/hello-world/dist/client/build/_shared/chunk-KSKV5IK6.js.map +0 -7
- package/dist/templates/hello-world/dist/client/build/_shared/chunk-X4LCECW4.js +0 -2
- package/dist/templates/hello-world/dist/client/build/_shared/chunk-X4LCECW4.js.map +0 -7
- package/dist/templates/hello-world/dist/client/build/entry.client-JOU7NZGC.js +0 -27
- package/dist/templates/hello-world/dist/client/build/entry.client-JOU7NZGC.js.map +0 -7
- package/dist/templates/hello-world/dist/client/build/manifest-A04F2945.js +0 -1
- package/dist/templates/hello-world/dist/client/build/root-QUDT4I4G.js +0 -2
- package/dist/templates/hello-world/dist/client/build/root-QUDT4I4G.js.map +0 -7
- package/dist/templates/hello-world/dist/client/build/routes/graphiql-5V34JTF6.js +0 -2
- package/dist/templates/hello-world/dist/client/build/routes/graphiql-5V34JTF6.js.map +0 -7
- package/dist/templates/hello-world/dist/client/build/routes/index-4WJ36H3A.js +0 -2
- package/dist/templates/hello-world/dist/client/build/routes/index-4WJ36H3A.js.map +0 -7
- package/dist/templates/hello-world/dist/client/favicon.svg +0 -28
- package/dist/templates/hello-world/dist/worker/_assets/app-2MJQXVFI.css +0 -38
- package/dist/templates/hello-world/dist/worker/_assets/favicon-5FIZBM2K.svg +0 -28
- package/dist/templates/hello-world/dist/worker/index.js +0 -267
- package/dist/templates/hello-world/dist/worker/index.js.map +0 -7
- package/dist/templates/hello-world/package.json +0 -41
- package/dist/templates/hello-world/public/favicon.svg +0 -28
- package/dist/templates/hello-world/remix.env.d.ts +0 -35
- package/dist/templates/hello-world/remix.init/index.js +0 -25
- package/dist/templates/hello-world/remix.init/package.json +0 -7
- package/dist/templates/hello-world/server.ts +0 -129
- package/dist/templates/hello-world/tsconfig.json +0 -25
- package/dist/tmp-create-app.js +0 -33
|
@@ -1,175 +0,0 @@
|
|
|
1
|
-
import {Link, useLocation, type RouteMatch} from '@remix-run/react';
|
|
2
|
-
import {useSeoConfig, useHeadTags, recursivelyInvokeOrReturn} from './common';
|
|
3
|
-
import {renderToString} from 'react-dom/server';
|
|
4
|
-
|
|
5
|
-
const LABEL_MAP = {
|
|
6
|
-
twitterTags: 'Twitter',
|
|
7
|
-
ogTags: 'Open graph',
|
|
8
|
-
links: 'Links',
|
|
9
|
-
tags: 'Meta',
|
|
10
|
-
LdJson: 'Structured data',
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
function Badge() {
|
|
14
|
-
return (
|
|
15
|
-
<div className="fixed bottom-5 right-5 divide-y rounded-md bg-white">
|
|
16
|
-
<div className="flex gap-2 px-3 py-3 items-center px-5 py-3">
|
|
17
|
-
<Link
|
|
18
|
-
to="?debug=true"
|
|
19
|
-
reloadDocument
|
|
20
|
-
className="flex-1 text-sm font-bold text-gray-600"
|
|
21
|
-
>
|
|
22
|
-
SEO
|
|
23
|
-
</Link>
|
|
24
|
-
<span className="absolute bottom-0 right-0 h-3 w-3 rounded-full bg-green-500 ring ring-white"></span>
|
|
25
|
-
</div>
|
|
26
|
-
</div>
|
|
27
|
-
);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export function Debugger() {
|
|
31
|
-
const {seo, matches} = useSeoConfig();
|
|
32
|
-
|
|
33
|
-
const tags = useHeadTags(seo);
|
|
34
|
-
const location = useLocation();
|
|
35
|
-
const debug = new URLSearchParams(location.search).get('debug');
|
|
36
|
-
const debuggerOpen = Boolean(
|
|
37
|
-
debug === 'false' ? false : debug === '' || debug,
|
|
38
|
-
);
|
|
39
|
-
|
|
40
|
-
return debuggerOpen ? (
|
|
41
|
-
<Panel>
|
|
42
|
-
<>
|
|
43
|
-
<span className="font-bold block text-sm py-4 px-4">Config</span>
|
|
44
|
-
{Object.entries(seo).flatMap(([property, value]) => {
|
|
45
|
-
if (typeof value !== 'string') {
|
|
46
|
-
return null;
|
|
47
|
-
}
|
|
48
|
-
return (
|
|
49
|
-
<Item
|
|
50
|
-
key={`${property}${value}`}
|
|
51
|
-
property={property}
|
|
52
|
-
value={value}
|
|
53
|
-
/>
|
|
54
|
-
);
|
|
55
|
-
})}
|
|
56
|
-
|
|
57
|
-
<div className="py-4 px-4 space-y-4">
|
|
58
|
-
{matches.map(({id, handle, data}: RouteMatch, index: number) => (
|
|
59
|
-
<div key={id}>
|
|
60
|
-
<div className="font-bold text-xs pb-2 ">{id}</div>
|
|
61
|
-
<pre className="overflow-x-scroll whitespace-pre font-mono rounded-sm bg-gray-100 text-[10px] px-4 py-2">
|
|
62
|
-
{JSON.stringify(
|
|
63
|
-
recursivelyInvokeOrReturn(handle?.seo, data),
|
|
64
|
-
null,
|
|
65
|
-
2,
|
|
66
|
-
)}
|
|
67
|
-
</pre>
|
|
68
|
-
</div>
|
|
69
|
-
))}
|
|
70
|
-
</div>
|
|
71
|
-
|
|
72
|
-
<span className="font-bold block text-sm py-4 px-4">Tags</span>
|
|
73
|
-
|
|
74
|
-
{Object.entries(tags).map(([label, entries]) => {
|
|
75
|
-
if (entries.length < 1) {
|
|
76
|
-
return null;
|
|
77
|
-
}
|
|
78
|
-
return (
|
|
79
|
-
<div key={label} className="font-bold text-sm py-4 px-4">
|
|
80
|
-
<div className="font-bold text-xs pb-2">
|
|
81
|
-
{LABEL_MAP[label as keyof typeof LABEL_MAP]}
|
|
82
|
-
</div>
|
|
83
|
-
<pre className="overflow-x-scroll whitespace-pre font-mono rounded-sm bg-gray-100 text-[10px] px-4 py-2">
|
|
84
|
-
{label === 'LdJson'
|
|
85
|
-
? JSON.stringify(entries, null, 2)
|
|
86
|
-
: entries.map(
|
|
87
|
-
(entry: React.ReactElement, index: number) =>
|
|
88
|
-
renderToString(entry) + '\n',
|
|
89
|
-
)}
|
|
90
|
-
</pre>
|
|
91
|
-
</div>
|
|
92
|
-
);
|
|
93
|
-
})}
|
|
94
|
-
</>
|
|
95
|
-
</Panel>
|
|
96
|
-
) : (
|
|
97
|
-
<Badge />
|
|
98
|
-
);
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
function Panel({children}: {children?: React.ReactNode}) {
|
|
102
|
-
return (
|
|
103
|
-
<div className="overflow-y-scroll height max-h-full z-40 fixed w-96 bottom-5 top-5 right-5 divide-y rounded-md bg-white text-gray-600">
|
|
104
|
-
<div className="flex items-center px-4 py-3 ">
|
|
105
|
-
<span className="flex-1 text-sm font-bold text-gray-600">SEO</span>
|
|
106
|
-
<Link to="?" reloadDocument className="text-sm font-bold text-gray-600">
|
|
107
|
-
<svg
|
|
108
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
109
|
-
viewBox="0 0 20 20"
|
|
110
|
-
fill="currentColor"
|
|
111
|
-
className="h-5 w-5"
|
|
112
|
-
>
|
|
113
|
-
<path
|
|
114
|
-
fillRule="evenodd"
|
|
115
|
-
d="M10 18a8 8 0 100-16 8 8 0 000 16zM8.28 7.22a.75.75 0 00-1.06 1.06L8.94 10l-1.72 1.72a.75.75 0 101.06 1.06L10 11.06l1.72 1.72a.75.75 0 101.06-1.06L11.06 10l1.72-1.72a.75.75 0 00-1.06-1.06L10 8.94 8.28 7.22z"
|
|
116
|
-
clipRule="evenodd"
|
|
117
|
-
/>
|
|
118
|
-
</svg>
|
|
119
|
-
</Link>
|
|
120
|
-
</div>
|
|
121
|
-
{children}
|
|
122
|
-
</div>
|
|
123
|
-
);
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
function Item({
|
|
127
|
-
pass,
|
|
128
|
-
value,
|
|
129
|
-
property,
|
|
130
|
-
}: {
|
|
131
|
-
pass?: boolean;
|
|
132
|
-
value: string;
|
|
133
|
-
property: string;
|
|
134
|
-
}) {
|
|
135
|
-
const icon =
|
|
136
|
-
pass !== false ? (
|
|
137
|
-
<svg
|
|
138
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
139
|
-
className="w-5 h-5 top-0.5 relative text-blue-500"
|
|
140
|
-
viewBox="0 0 20 20"
|
|
141
|
-
fill="currentColor"
|
|
142
|
-
>
|
|
143
|
-
<path
|
|
144
|
-
fillRule="evenodd"
|
|
145
|
-
d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z"
|
|
146
|
-
clipRule="evenodd"
|
|
147
|
-
/>
|
|
148
|
-
</svg>
|
|
149
|
-
) : (
|
|
150
|
-
<svg
|
|
151
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
152
|
-
className="w-5 h-5 top-0.5 relative text-red-500"
|
|
153
|
-
viewBox="0 0 20 20"
|
|
154
|
-
fill="currentColor"
|
|
155
|
-
>
|
|
156
|
-
<path
|
|
157
|
-
fillRule="evenodd"
|
|
158
|
-
d="M13.477 14.89A6 6 0 015.11 6.524l8.367 8.368zm1.414-1.414L6.524 5.11a6 6 0 018.367 8.367zM18 10a8 8 0 11-16 0 8 8 0 0116 0z"
|
|
159
|
-
clipRule="evenodd"
|
|
160
|
-
/>
|
|
161
|
-
</svg>
|
|
162
|
-
);
|
|
163
|
-
|
|
164
|
-
return (
|
|
165
|
-
<div className="flex items-end px-4 py-3 ">
|
|
166
|
-
{icon}
|
|
167
|
-
<span className="font-mono flex-1 mx-1 text-gray-900 text-[10px]">
|
|
168
|
-
<span className="px-2 py-1 rounded-sm bg-gray-100">{property}</span>
|
|
169
|
-
</span>
|
|
170
|
-
<span className="pl-8 text-right text-xs text-gray-900 text-ellipsis overflow-hidden whitespace-nowrap max-w-full">
|
|
171
|
-
{value}
|
|
172
|
-
</span>
|
|
173
|
-
</div>
|
|
174
|
-
);
|
|
175
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import {renderToString} from 'react-dom/server';
|
|
2
|
-
|
|
3
|
-
export async function getShareableImage(
|
|
4
|
-
component: React.ReactElement<any, 'svg'>,
|
|
5
|
-
) {
|
|
6
|
-
try {
|
|
7
|
-
const svg = renderToString(component);
|
|
8
|
-
return new Response(svg, {
|
|
9
|
-
headers: {
|
|
10
|
-
'Content-Type': 'image/svg+xml',
|
|
11
|
-
'Cache-Control': 'public, s-maxage=60',
|
|
12
|
-
},
|
|
13
|
-
});
|
|
14
|
-
} catch (error) {
|
|
15
|
-
// eslint-disable-next-line no-console
|
|
16
|
-
console.error('Failed to render Share Image:', component, error);
|
|
17
|
-
|
|
18
|
-
return new Response(
|
|
19
|
-
renderToString(
|
|
20
|
-
<svg>
|
|
21
|
-
<text>Default share image</text>
|
|
22
|
-
</svg>,
|
|
23
|
-
),
|
|
24
|
-
{
|
|
25
|
-
headers: {
|
|
26
|
-
'Content-Type': 'image/svg+xml',
|
|
27
|
-
'Cache-Control': 'public, s-maxage=60',
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import {useSeoConfig, useHeadTags} from './common';
|
|
2
|
-
|
|
3
|
-
export function Seo() {
|
|
4
|
-
const {seo} = useSeoConfig();
|
|
5
|
-
const {tags, ogTags, twitterTags, links, LdJson} = useHeadTags(seo);
|
|
6
|
-
const structuredContent = (
|
|
7
|
-
<script
|
|
8
|
-
type="application/ld+json"
|
|
9
|
-
dangerouslySetInnerHTML={{
|
|
10
|
-
__html: JSON.stringify(LdJson),
|
|
11
|
-
}}
|
|
12
|
-
/>
|
|
13
|
-
);
|
|
14
|
-
|
|
15
|
-
return (
|
|
16
|
-
<>
|
|
17
|
-
{tags}
|
|
18
|
-
{ogTags}
|
|
19
|
-
{twitterTags}
|
|
20
|
-
{links}
|
|
21
|
-
{structuredContent}
|
|
22
|
-
</>
|
|
23
|
-
);
|
|
24
|
-
}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
export type SeoDescriptor = {
|
|
2
|
-
type:
|
|
3
|
-
| 'account'
|
|
4
|
-
| 'article'
|
|
5
|
-
| 'blog'
|
|
6
|
-
| 'cart'
|
|
7
|
-
| 'collection'
|
|
8
|
-
| 'collections'
|
|
9
|
-
| 'home'
|
|
10
|
-
| 'page'
|
|
11
|
-
| 'policies'
|
|
12
|
-
| 'policy'
|
|
13
|
-
| 'product'
|
|
14
|
-
| 'root'
|
|
15
|
-
| 'search'
|
|
16
|
-
| null;
|
|
17
|
-
site: string;
|
|
18
|
-
title: string;
|
|
19
|
-
titleTemplate?: string;
|
|
20
|
-
bypassTitleTemplate?: boolean;
|
|
21
|
-
defaultTitle: string;
|
|
22
|
-
description: string;
|
|
23
|
-
noindex: boolean;
|
|
24
|
-
nofollow: boolean;
|
|
25
|
-
url: string;
|
|
26
|
-
twitter: Partial<TwitterOptions>;
|
|
27
|
-
openGraph: Partial<OpenGraphOptions>;
|
|
28
|
-
images: Partial<ImageOptions>[];
|
|
29
|
-
alternates: Partial<AlternateOptions>[];
|
|
30
|
-
tags: string[];
|
|
31
|
-
robots: Partial<RobotsOptions>;
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
export interface TwitterOptions {
|
|
35
|
-
card: string;
|
|
36
|
-
site: string;
|
|
37
|
-
description: string;
|
|
38
|
-
handle: string;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export interface OpenGraphOptions {
|
|
42
|
-
url: string;
|
|
43
|
-
type: string;
|
|
44
|
-
title: string;
|
|
45
|
-
description: string;
|
|
46
|
-
site: string;
|
|
47
|
-
locale: string;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export interface OpenGraphProfileOptions {
|
|
51
|
-
firstName: string;
|
|
52
|
-
lastName: string;
|
|
53
|
-
username: string;
|
|
54
|
-
gender: string;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export interface OpenGraphArticleOptions {
|
|
58
|
-
publishedTime: Date;
|
|
59
|
-
modifiedTime: Date;
|
|
60
|
-
expirationTime: Date;
|
|
61
|
-
authors: string[];
|
|
62
|
-
section: string;
|
|
63
|
-
tags: string;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
export interface RobotsOptions {
|
|
67
|
-
noArchive: boolean;
|
|
68
|
-
noSnippet: boolean;
|
|
69
|
-
maxSnippet: number;
|
|
70
|
-
unAvailableAfter: string;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
export interface AlternateOptions {
|
|
74
|
-
url: string;
|
|
75
|
-
media: string;
|
|
76
|
-
lang: string;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
export interface ImageOptions {
|
|
80
|
-
url: string;
|
|
81
|
-
width: number;
|
|
82
|
-
height: number;
|
|
83
|
-
alt: string;
|
|
84
|
-
}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
createCookieSessionStorage,
|
|
3
|
-
type SessionStorage,
|
|
4
|
-
type Session,
|
|
5
|
-
} from '@shopify/remix-oxygen';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* This is a custom session implementation for your Hydrogen shop.
|
|
9
|
-
* Feel free to customize it to your needs, add helper methods, or
|
|
10
|
-
* swap out the cookie-based implementation with something else!
|
|
11
|
-
*/
|
|
12
|
-
export class HydrogenSession {
|
|
13
|
-
constructor(
|
|
14
|
-
private sessionStorage: SessionStorage,
|
|
15
|
-
private session: Session,
|
|
16
|
-
) {}
|
|
17
|
-
|
|
18
|
-
static async init(request: Request, secrets: string[]) {
|
|
19
|
-
const storage = createCookieSessionStorage({
|
|
20
|
-
cookie: {
|
|
21
|
-
name: 'session',
|
|
22
|
-
httpOnly: true,
|
|
23
|
-
path: '/',
|
|
24
|
-
sameSite: 'lax',
|
|
25
|
-
secrets,
|
|
26
|
-
},
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
const session = await storage.getSession(request.headers.get('Cookie'));
|
|
30
|
-
|
|
31
|
-
return new this(storage, session);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
get(key: string) {
|
|
35
|
-
return this.session.get(key);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
destroy() {
|
|
39
|
-
return this.sessionStorage.destroySession(this.session);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
flash(key: string, value: any) {
|
|
43
|
-
this.session.flash(key, value);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
unset(key: string) {
|
|
47
|
-
this.session.unset(key);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
set(key: string, value: any) {
|
|
51
|
-
this.session.set(key, value);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
commit() {
|
|
55
|
-
return this.sessionStorage.commitSession(this.session);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
CountryCode,
|
|
3
|
-
LanguageCode,
|
|
4
|
-
} from '@shopify/hydrogen-react/storefront-api-types';
|
|
5
|
-
|
|
6
|
-
export type Locale = {
|
|
7
|
-
label?: string;
|
|
8
|
-
language: LanguageCode;
|
|
9
|
-
country: CountryCode;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export type Localizations = Record<string, Locale>;
|
|
13
|
-
|
|
14
|
-
export enum CartAction {
|
|
15
|
-
ADD_TO_CART = 'ADD_TO_CART',
|
|
16
|
-
REMOVE_FROM_CART = 'REMOVE_FROM_CART',
|
|
17
|
-
UPDATE_CART = 'UPDATE_CART',
|
|
18
|
-
UPDATE_DISCOUNT = 'UPDATE_DISCOUNT',
|
|
19
|
-
UPDATE_BUYER_IDENTITY = 'UPDATE_BUYER_IDENTITY',
|
|
20
|
-
}
|
|
21
|
-
export type CartActions = keyof typeof CartAction;
|
|
@@ -1,310 +0,0 @@
|
|
|
1
|
-
import {useLocation, useMatches} from '@remix-run/react';
|
|
2
|
-
import type {
|
|
3
|
-
MenuItem,
|
|
4
|
-
Menu,
|
|
5
|
-
MoneyV2,
|
|
6
|
-
} from '@shopify/hydrogen-react/storefront-api-types';
|
|
7
|
-
|
|
8
|
-
// @ts-expect-error types not available
|
|
9
|
-
import typographicBase from 'typographic-base';
|
|
10
|
-
import {countries} from '~/data/countries';
|
|
11
|
-
import {Locale} from './type';
|
|
12
|
-
|
|
13
|
-
export interface EnhancedMenuItem extends MenuItem {
|
|
14
|
-
to: string;
|
|
15
|
-
target: string;
|
|
16
|
-
isExternal?: boolean;
|
|
17
|
-
items: EnhancedMenuItem[];
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export interface EnhancedMenu extends Menu {
|
|
21
|
-
items: EnhancedMenuItem[];
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export function missingClass(string?: string, prefix?: string) {
|
|
25
|
-
if (!string) {
|
|
26
|
-
return true;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
const regex = new RegExp(` ?${prefix}`, 'g');
|
|
30
|
-
return string.match(regex) === null;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export function formatText(input?: string | React.ReactNode) {
|
|
34
|
-
if (!input) {
|
|
35
|
-
return;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
if (typeof input !== 'string') {
|
|
39
|
-
return input;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
return typographicBase(input, {locale: 'en-us'}).replace(
|
|
43
|
-
/\s([^\s<]+)\s*$/g,
|
|
44
|
-
'\u00A0$1',
|
|
45
|
-
);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export function getExcerpt(text: string) {
|
|
49
|
-
const regex = /<p.*>(.*?)<\/p>/;
|
|
50
|
-
const match = regex.exec(text);
|
|
51
|
-
return match?.length ? match[0] : text;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export function isNewArrival(date: string, daysOld = 30) {
|
|
55
|
-
return (
|
|
56
|
-
new Date(date).valueOf() >
|
|
57
|
-
new Date().setDate(new Date().getDate() - daysOld).valueOf()
|
|
58
|
-
);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export function isDiscounted(price: MoneyV2, compareAtPrice: MoneyV2) {
|
|
62
|
-
if (compareAtPrice?.amount > price?.amount) {
|
|
63
|
-
return true;
|
|
64
|
-
}
|
|
65
|
-
return false;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
function resolveToFromType(
|
|
69
|
-
{
|
|
70
|
-
customPrefixes,
|
|
71
|
-
pathname,
|
|
72
|
-
type,
|
|
73
|
-
}: {
|
|
74
|
-
customPrefixes: Record<string, string>;
|
|
75
|
-
pathname?: string;
|
|
76
|
-
type?: string;
|
|
77
|
-
} = {
|
|
78
|
-
customPrefixes: {},
|
|
79
|
-
},
|
|
80
|
-
) {
|
|
81
|
-
if (!pathname || !type) return '';
|
|
82
|
-
|
|
83
|
-
/*
|
|
84
|
-
MenuItemType enum
|
|
85
|
-
@see: https://shopify.dev/api/storefront/unstable/enums/MenuItemType
|
|
86
|
-
*/
|
|
87
|
-
const defaultPrefixes = {
|
|
88
|
-
BLOG: 'blogs',
|
|
89
|
-
COLLECTION: 'collections',
|
|
90
|
-
COLLECTIONS: 'collections', // Collections All (not documented)
|
|
91
|
-
FRONTPAGE: 'frontpage',
|
|
92
|
-
HTTP: '',
|
|
93
|
-
PAGE: 'pages',
|
|
94
|
-
CATALOG: 'collections/all', // Products All
|
|
95
|
-
PRODUCT: 'products',
|
|
96
|
-
SEARCH: 'search',
|
|
97
|
-
SHOP_POLICY: 'policies',
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
const pathParts = pathname.split('/');
|
|
101
|
-
const handle = pathParts.pop() || '';
|
|
102
|
-
const routePrefix: Record<string, string> = {
|
|
103
|
-
...defaultPrefixes,
|
|
104
|
-
...customPrefixes,
|
|
105
|
-
};
|
|
106
|
-
|
|
107
|
-
switch (true) {
|
|
108
|
-
// special cases
|
|
109
|
-
case type === 'FRONTPAGE':
|
|
110
|
-
return '/';
|
|
111
|
-
|
|
112
|
-
case type === 'ARTICLE': {
|
|
113
|
-
const blogHandle = pathParts.pop();
|
|
114
|
-
return routePrefix.BLOG
|
|
115
|
-
? `/${routePrefix.BLOG}/${blogHandle}/${handle}/`
|
|
116
|
-
: `/${blogHandle}/${handle}/`;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
case type === 'COLLECTIONS':
|
|
120
|
-
return `/${routePrefix.COLLECTIONS}`;
|
|
121
|
-
|
|
122
|
-
case type === 'SEARCH':
|
|
123
|
-
return `/${routePrefix.SEARCH}`;
|
|
124
|
-
|
|
125
|
-
case type === 'CATALOG':
|
|
126
|
-
return `/${routePrefix.CATALOG}`;
|
|
127
|
-
|
|
128
|
-
// common cases: BLOG, PAGE, COLLECTION, PRODUCT, SHOP_POLICY, HTTP
|
|
129
|
-
default:
|
|
130
|
-
return routePrefix[type]
|
|
131
|
-
? `/${routePrefix[type]}/${handle}`
|
|
132
|
-
: `/${handle}`;
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
/*
|
|
137
|
-
Parse each menu link and adding, isExternal, to and target
|
|
138
|
-
*/
|
|
139
|
-
function parseItem(customPrefixes = {}) {
|
|
140
|
-
return function (item: MenuItem): EnhancedMenuItem {
|
|
141
|
-
if (!item?.url || !item?.type) {
|
|
142
|
-
// eslint-disable-next-line no-console
|
|
143
|
-
console.warn('Invalid menu item. Must include a url and type.');
|
|
144
|
-
// @ts-ignore
|
|
145
|
-
return;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
// extract path from url because we don't need the origin on internal to attributes
|
|
149
|
-
const {pathname} = new URL(item.url);
|
|
150
|
-
|
|
151
|
-
/*
|
|
152
|
-
Currently the MenuAPI only returns online store urls e.g — xyz.myshopify.com/..
|
|
153
|
-
Note: update logic when API is updated to include the active qualified domain
|
|
154
|
-
*/
|
|
155
|
-
const isInternalLink = /\.myshopify\.com/g.test(item.url);
|
|
156
|
-
|
|
157
|
-
const parsedItem = isInternalLink
|
|
158
|
-
? // internal links
|
|
159
|
-
{
|
|
160
|
-
...item,
|
|
161
|
-
isExternal: false,
|
|
162
|
-
target: '_self',
|
|
163
|
-
to: resolveToFromType({type: item.type, customPrefixes, pathname}),
|
|
164
|
-
}
|
|
165
|
-
: // external links
|
|
166
|
-
{
|
|
167
|
-
...item,
|
|
168
|
-
isExternal: true,
|
|
169
|
-
target: '_blank',
|
|
170
|
-
to: item.url,
|
|
171
|
-
};
|
|
172
|
-
|
|
173
|
-
return {
|
|
174
|
-
...parsedItem,
|
|
175
|
-
items: item.items?.map(parseItem(customPrefixes)),
|
|
176
|
-
};
|
|
177
|
-
};
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
/*
|
|
181
|
-
Recursively adds `to` and `target` attributes to links based on their url
|
|
182
|
-
and resource type.
|
|
183
|
-
It optionally overwrites url paths based on item.type
|
|
184
|
-
*/
|
|
185
|
-
export function parseMenu(menu: Menu, customPrefixes = {}): EnhancedMenu {
|
|
186
|
-
if (!menu?.items) {
|
|
187
|
-
// eslint-disable-next-line no-console
|
|
188
|
-
console.warn('Invalid menu passed to parseMenu');
|
|
189
|
-
// @ts-ignore
|
|
190
|
-
return menu;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
return {
|
|
194
|
-
...menu,
|
|
195
|
-
items: menu.items.map(parseItem(customPrefixes)),
|
|
196
|
-
};
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
export const INPUT_STYLE_CLASSES =
|
|
200
|
-
'appearance-none rounded dark:bg-transparent border focus:border-primary/50 focus:ring-0 w-full py-2 px-3 text-primary/90 placeholder:text-primary/50 leading-tight focus:shadow-outline';
|
|
201
|
-
|
|
202
|
-
export const getInputStyleClasses = (isError?: string | null) => {
|
|
203
|
-
return `${INPUT_STYLE_CLASSES} ${
|
|
204
|
-
isError ? 'border-red-500' : 'border-primary/20'
|
|
205
|
-
}`;
|
|
206
|
-
};
|
|
207
|
-
|
|
208
|
-
export function statusMessage(status: string) {
|
|
209
|
-
const translations: Record<string, string> = {
|
|
210
|
-
ATTEMPTED_DELIVERY: 'Attempted delivery',
|
|
211
|
-
CANCELED: 'Canceled',
|
|
212
|
-
CONFIRMED: 'Confirmed',
|
|
213
|
-
DELIVERED: 'Delivered',
|
|
214
|
-
FAILURE: 'Failure',
|
|
215
|
-
FULFILLED: 'Fulfilled',
|
|
216
|
-
IN_PROGRESS: 'In Progress',
|
|
217
|
-
IN_TRANSIT: 'In transit',
|
|
218
|
-
LABEL_PRINTED: 'Label printed',
|
|
219
|
-
LABEL_PURCHASED: 'Label purchased',
|
|
220
|
-
LABEL_VOIDED: 'Label voided',
|
|
221
|
-
MARKED_AS_FULFILLED: 'Marked as fulfilled',
|
|
222
|
-
NOT_DELIVERED: 'Not delivered',
|
|
223
|
-
ON_HOLD: 'On Hold',
|
|
224
|
-
OPEN: 'Open',
|
|
225
|
-
OUT_FOR_DELIVERY: 'Out for delivery',
|
|
226
|
-
PARTIALLY_FULFILLED: 'Partially Fulfilled',
|
|
227
|
-
PENDING_FULFILLMENT: 'Pending',
|
|
228
|
-
PICKED_UP: 'Displayed as Picked up',
|
|
229
|
-
READY_FOR_PICKUP: 'Ready for pickup',
|
|
230
|
-
RESTOCKED: 'Restocked',
|
|
231
|
-
SCHEDULED: 'Scheduled',
|
|
232
|
-
SUBMITTED: 'Submitted',
|
|
233
|
-
UNFULFILLED: 'Unfulfilled',
|
|
234
|
-
};
|
|
235
|
-
try {
|
|
236
|
-
return translations?.[status];
|
|
237
|
-
} catch (error) {
|
|
238
|
-
return status;
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
/**
|
|
243
|
-
* Errors can exist in an errors object, or nested in a data field.
|
|
244
|
-
*/
|
|
245
|
-
export function assertApiErrors(data: Record<string, any> | null | undefined) {
|
|
246
|
-
const errorMessage = data?.customerUserErrors?.[0]?.message;
|
|
247
|
-
if (errorMessage) {
|
|
248
|
-
throw new Error(errorMessage);
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
export const DEFAULT_LOCALE: Locale & {pathPrefix: string} = Object.freeze({
|
|
253
|
-
...countries.default,
|
|
254
|
-
pathPrefix: '',
|
|
255
|
-
});
|
|
256
|
-
|
|
257
|
-
export function getLocaleFromRequest(request: Request): Locale & {
|
|
258
|
-
pathPrefix: string;
|
|
259
|
-
} {
|
|
260
|
-
const url = new URL(request.url);
|
|
261
|
-
const firstPathPart =
|
|
262
|
-
'/' + url.pathname.substring(1).split('/')[0].toLowerCase();
|
|
263
|
-
|
|
264
|
-
return countries[firstPathPart]
|
|
265
|
-
? {
|
|
266
|
-
...countries[firstPathPart],
|
|
267
|
-
pathPrefix: firstPathPart,
|
|
268
|
-
}
|
|
269
|
-
: {
|
|
270
|
-
...countries['default'],
|
|
271
|
-
pathPrefix: '',
|
|
272
|
-
};
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
export function usePrefixPathWithLocale(path: string) {
|
|
276
|
-
const [root] = useMatches();
|
|
277
|
-
const selectedLocale = root.data?.selectedLocale ?? DEFAULT_LOCALE;
|
|
278
|
-
|
|
279
|
-
return `${selectedLocale.pathPrefix}${
|
|
280
|
-
path.startsWith('/') ? path : '/' + path
|
|
281
|
-
}`;
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
export function useIsHomePath() {
|
|
285
|
-
const {pathname} = useLocation();
|
|
286
|
-
const [root] = useMatches();
|
|
287
|
-
const selectedLocale = root.data?.selectedLocale ?? DEFAULT_LOCALE;
|
|
288
|
-
const strippedPathname = pathname.replace(selectedLocale.pathPrefix, '');
|
|
289
|
-
return strippedPathname === '/';
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
/**
|
|
293
|
-
* Validates that a url is local
|
|
294
|
-
* @param url
|
|
295
|
-
* @returns `true` if local `false`if external domain
|
|
296
|
-
*/
|
|
297
|
-
export function isLocalPath(url: string) {
|
|
298
|
-
try {
|
|
299
|
-
// We don't want to redirect cross domain,
|
|
300
|
-
// doing so could create fishing vulnerability
|
|
301
|
-
// If `new URL()` succeeds, it's a fully qualified
|
|
302
|
-
// url which is cross domain. If it fails, it's just
|
|
303
|
-
// a path, which will be the current domain.
|
|
304
|
-
new URL(url);
|
|
305
|
-
} catch (e) {
|
|
306
|
-
return true;
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
return false;
|
|
310
|
-
}
|