@graphcommerce/image 2.104.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +97 -0
- package/README.md +60 -0
- package/components/Image.tsx +517 -0
- package/config/config.ts +89 -0
- package/example/.next/build-manifest.json +34 -0
- package/example/.next/cache/images/-HVj9kxSkhJbEZEzJL5NAtVW-u8TJ523pV0gOjw1--U=/1656761718343.g+b6VAyYfz-VIgqhPopw+-RX62-WCBq5CTxdVPJ75Vk=.webp +0 -0
- package/example/.next/cache/images/0AxIIzYSO-2GyMgpS4xIF3BFoscLS34mhauz5mXVqJI=/1656759656442.NBBV5492hL3QVNkmiFNlwRcY6wuplArFk0uPSkVzZ58=.webp +0 -0
- package/example/.next/cache/images/1uj6MCqnWAg9G4AXu+RJEh7K5QHy8VI4Y8ObOpU5IWQ=/1656757031249.VBybHurr5aiEFOzpuVXHhwBOCF1G+Hnp8-GFzxjCNKg=.webp +0 -0
- package/example/.next/cache/images/2CMowrXl2P7YIz49CHi5gPtsp-gXV9ZDKqoWiS5hkgg=/1625470305766.rUaLjCqfuLKwkvaizd3g3TjzYGo3W8ANpZIUgzZh00Y=.webp +0 -0
- package/example/.next/cache/images/2prvJygajL4oBYGVG5HGNf-JaL-XmFDIpbahHqRCWEg=/1625298564969.7tWao0CKoVY673JEnP1IP-G6bNjQvDP5sxvUAq1X3KM=.webp +0 -0
- package/example/.next/cache/images/3NxY-MLy0nY73yQFX-qsDAkXMgiMq8iWud4VVdU8I0o=/1625299547154.rpuCm5pugpQ6IK28LsWKUGLk+P2ZtehuBgJTOX-6zlA=.webp +0 -0
- package/example/.next/cache/images/3UPUXn6t--gJO9HNBHFJulrS3paVQoKP5-Wu41KkrR8=/1656758598282.BZMn4WYPgB+gq-BR3w1-5MwG1AdBRAVpYWGWxNVW-KE=.webp +0 -0
- package/example/.next/cache/images/3ucItT2KUqDcjKA+4Dl8YhPsb3qbPW8shQeD5JogEp0=/1656749533975.i+PvewsVBTnrxKjImamNkgl0fCG8DPKrY-1y1ZQKR3c=.webp +0 -0
- package/example/.next/cache/images/4aSxJpLrV7SgzFGFQe1JbHJTiVGRNl4YdKl2iZqTz6c=/1625299570724.mruw0gK2J1y6VIaCvayFrs7ltIasseRnQjCS1Rx7zNI=.webp +0 -0
- package/example/.next/cache/images/4u0SwKJhO4a+ZARfOmnUAY+bQvzdjsw8AOIk6sRiVTM=/1625469705760.rueREa67ebDmXGY+W3G-eopQp5EK-SQHOa4KHFuqVNo=.webp +0 -0
- package/example/.next/cache/images/5H41dGaHwg71zktiD3Ks9K8yaZ1e9lsBag4NHyoIUdo=/1625219570987.zIxZGRHl91NEtnV4nbyU0rB3EtEyR9Lxnri-+voKAvs=.webp +0 -0
- package/example/.next/cache/images/64IULfOR-D0oVW4sHrfc5WtPLdjLPbkoNKHdCwWGSuQ=/1625219570994.i+PvewsVBTnrxKjImamNkgl0fCG8DPKrY-1y1ZQKR3c=.webp +0 -0
- package/example/.next/cache/images/6Dgu5A6GajPsgDQ66k-pbq0Iyr0Byrn7+mivxE4fvVU=/1656758443091.KL97JxovJgisoPc5EXEfrrnnqyRymWEBTSqLA8Uy5lE=.webp +0 -0
- package/example/.next/cache/images/6Zcso+WcU0OlZ-atPSh40Gljk74hWpvqMF88bf-3Qys=/1656749578452.zIxZGRHl91NEtnV4nbyU0rB3EtEyR9Lxnri-+voKAvs=.webp +0 -0
- package/example/.next/cache/images/7Xkon9LFmZ6wE0IgEIsfUN0bOr0oCSOXaDnnrVjSoXo=/1625300548289.8yJB9XC45AIM6XoUsu8htXCK2wYvqnWCKbnxO3MmpsU=.webp +0 -0
- package/example/.next/cache/images/7vvZbnWp2pvmwNgUNIKXmCk9XhfIOYqyBy1xwOMmxZE=/1625470260322.onl4+lYWryHL62flX4FJdXEMQ1UVnyT5sBYF1DggMaQ=.webp +0 -0
- package/example/.next/cache/images/83VK7ld0YcmgdOG+R2h+ckiGWOVKzIn42CnTelSeAD0=/1657107410585.OC5j-AyaLksS78WoFh2ZPpURObFKvSCnpt9rqzn7tNY=.webp +0 -0
- package/example/.next/cache/images/8qtv2hTcdwZiVYN5j5XNVw4eDlHblWR91R1ilGPHF4g=/1625300457906.pVKudFsHslINh1TOUoOPSHb8op8iqiQ3IVE78QQH0qU=.webp +0 -0
- package/example/.next/cache/images/B8i6U4dvhS5QlonuTChvnVeIfVNcMFP5Ze9dGHpLu0A=/1625213911796.zMx5v1d6EgYxzhH5u9vceuQAZdrlkrwNiW-EzuaYMnw=.webp +0 -0
- package/example/.next/cache/images/BW0ysRJMh9oulzEYbELupyRAI1rZZ5be0xuxnDLc-bw=/1656761231260.zspGYR3AWdcc816W2F6Ne1-JNgSDBH1h6KEFeVLnWok=.webp +0 -0
- package/example/.next/cache/images/BY6YpwPh82mp5JiBEti5gmwC-9O4ohRUPluASqROc10=/1625498155146.EJMSOifv8id0Peguf7ikEne7xMi9Ac9iDe9kTIAAXvY=.webp +0 -0
- package/example/.next/cache/images/CUGp4g70zl+vsFGT41IZkj-Y2votkqh3Eezzs9H3H5w=/1625299521288.EnYAcm4cT6T5yKVAQDTY6cZti0zsxnVbImrF7LfgF1Y=.webp +0 -0
- package/example/.next/cache/images/DJ3B5hLxX-+UMbqed+x58+rl9juscSn+Ra7YA8CNkkY=/1625484120800.SAng7YQ8PDlPQNubgLkMMsiFwaPCuTeDBsfUyvmttG4=.webp +0 -0
- package/example/.next/cache/images/DW4yKnn+mYRfs8-2Ko5oE3DrZbJMhFNEmGp90CyT7O0=/1625300236026.VFNPRZf-z9qFOV2S5AbunCkRGCcPXzlwiTKrNjmNGi8=.webp +0 -0
- package/example/.next/cache/images/Dh5jFfTTZHXju+2VMueg1Lo7sM3GkEWBlgWZ37h29ME=/1625474260306.gkzHU98m9zIqApL3d93FWcZqGULcRirOdpOxzJgPTK8=.webp +0 -0
- package/example/.next/cache/images/Du4jaIoZ-PXvqN2avgQOOGlaQg-Vt4QUVcukv77Hm7w=/1656756770777.kZnEJ9pDGRP7pgjpXGDPuV-HLcq5hWt9eWAFm6G84OI=.webp +0 -0
- package/example/.next/cache/images/EqW5whXX7fgu5+SPdxyBZ4fE0fOWCLMo9b5W7hd28iY=/1625571324722.txUxO6DkO8veTJ1oLkXvvNgVuTbvHdj4MVBwHIu-eus=.webp +0 -0
- package/example/.next/cache/images/GKXPXPApDNp1ZIjYBtQk7dd3rnbKh7NElD+WIyHa8js=/1656756098400.lgHCIyknPFqSgPVSBuQffgINRpboZCYlBKftrwpBLkA=.webp +0 -0
- package/example/.next/cache/images/GTOHdx8sLxs79IJinD+Nk80LrOg0DaC9h3d8TAby3bs=/1657107680617.OC5j-AyaLksS78WoFh2ZPpURObFKvSCnpt9rqzn7tNY=.webp +0 -0
- package/example/.next/cache/images/GnqqaGL66JFx1j+fCokxnnujneezplnVU7gYhckh9+A=/1625299583173.dgcaCltbHvvFCi1sPMucuHCL9UCtWiFSyOAYH-v2LtU=.webp +0 -0
- package/example/.next/cache/images/HTqsLdQpcguBI7BE1SfU-i2MwHyN3krlryhF1BEPj3M=/1657107680404.c8k-vRV2T9vq1REo-K4LzVwKVUP5lQuho4ubYzHj544=.webp +0 -0
- package/example/.next/cache/images/HroIIPKGVQ42ycMx-gSdWVFfchcgf8J-XU3FJOZhpmk=/1625570328298.IUpe91jGi-RlVgrjYmX7wkMcXIIYvodu5j4BqaKZcss=.webp +0 -0
- package/example/.next/cache/images/HsTN95OGw5aJGpWWSep-H7pXMN32ZSfW86FEPFe02K8=/1625299498281.1gBokMmVVuor1gnCAbJvXKp1sytwxY0A-VcmYIwXm7g=.webp +0 -0
- package/example/.next/cache/images/JRIhYbicTTQFjjKlC-aW9QRo+2KiSk80+wi0T+FeWQ4=/1656756648992.kZnEJ9pDGRP7pgjpXGDPuV-HLcq5hWt9eWAFm6G84OI=.webp +0 -0
- package/example/.next/cache/images/KtPkhGYwacFij4NA7Z4VNrRLb21KQUty7jAgxxv7tAE=/1625565460203.83IxQdLmWiSE2uISXx1KtUWFzH+wlQzRq3azOBbUtnQ=.webp +0 -0
- package/example/.next/cache/images/MPZjiVEFZqHRi2TtFwyHot9phvfEIcDLWmmyrYFIHAQ=/1625299521601.0uwV84UCn-oB-gRLRxi8DD2sl7zK5emgxfblkV3Dvhc=.webp +0 -0
- package/example/.next/cache/images/MT6MCs8Nc+PJ2byqQCa1HW8Xp4OTRNnb6kLgLwDGLZo=/1656762484828.heenQ4-yt4r55ULQ0ofqHJ1j8eTKD8ksx640PPhaqP8=.webp +0 -0
- package/example/.next/cache/images/MiOwljI0QJwKEuOg3n2Gp3J0qyXXNOXE8ttWHB7CHa0=/1625567166356.KCzRRP4Cub2rpOYKetN+L9dCJTAsFVW-GkP0NRsQbcM=.webp +0 -0
- package/example/.next/cache/images/OcFEP0e8eNeBt9ck16eoMwSpfJleEwCMpm1ZbdqT4uo=/1656749533901.i+PvewsVBTnrxKjImamNkgl0fCG8DPKrY-1y1ZQKR3c=.webp +0 -0
- package/example/.next/cache/images/PPUtJ0W6DfemefElrKITkTNq7MVnHyMS38XuEtsy89U=/1656761403704.zlagepWT8AKDwOh4aJODpXTOFN+FobGMo1L6WuOVNwY=.webp +0 -0
- package/example/.next/cache/images/PaxNiuRifROBs1R1uM75REC6kUAfiYOLrtQAiK1P2nU=/1625213904646.i+PvewsVBTnrxKjImamNkgl0fCG8DPKrY-1y1ZQKR3c=.webp +0 -0
- package/example/.next/cache/images/PqLR89B4R1+qzyEVqVw9OQhSmFy5JuXLa64i3LYpJxE=/1625299444323.ThlpSva2rHbbbp958zCj1tdrgMqjFcGYnaDRo2wQQLU=.webp +0 -0
- package/example/.next/cache/images/Q8f9uZJBks2H-YkwdWd2QMgMX5mL5FBMo0VsHO-ctdo=/1656760649959.qh3caBPe-Th-zaMPDt-ZdhSBl91dRP8N9s3EJ6UMQCs=.webp +0 -0
- package/example/.next/cache/images/RP6k9Bj4-jsHEycAYxFHZhLqKTmbLMjucvDSvlyLLZs=/1657107680610.Yg+3ChC1edO6kEAwbaim2hCjb8Wyh4toEpEOzcilUL0=.webp +0 -0
- package/example/.next/cache/images/SHd0AXJTfPXkImZMKmp27MvqUvYI111zyzIOkLgtCb0=/1625299593567.TvdLtgnmAXbrBjg8nRUCWyBuQNstKWJTmF-wV4728B8=.webp +0 -0
- package/example/.next/cache/images/SHhlhVL9L57O78uM0iSaBgxVR9J7EKRa67Ito-z2rr4=/1625300308618.po7Imjgw32SuMQKt1-Oty+v5w-l64kmnJHzwul9giqo=.webp +0 -0
- package/example/.next/cache/images/SKUjqmwgFQbQ2Q6MjsEPStCv9Q-+CeDEv66+YXRb2wY=/1625299577727.ZqADH5sK9bpHXGGKzDBkLCjPfDO+oTBSZlFZyEAOo9w=.webp +0 -0
- package/example/.next/cache/images/ShHgXRk5XG5XLtxR20jbimMMzYyCjZYWCyrSOBcRyoU=/1625299553057.Tg2j6WSVMgii8RrZgrt4twY3IKhtmUMHplwYzi-hh70=.webp +0 -0
- package/example/.next/cache/images/TZiyZjIDqFs6d60EaSVU3oX2L1bCkImChBpIWqOREeg=/1625299514280.rC+4Pdzi1RPfIvqsEFdtuGJL9sPG4+sel+0v3cfnJpk=.webp +0 -0
- package/example/.next/cache/images/YKC4gyKqaL5abLjWnWAv+OgECV0oK00TZ1P5130s4ig=/1625300636674.q2+QpCTCb2zgc0H3rXxU17I4lALn3BLpChG0i7WZMew=.webp +0 -0
- package/example/.next/cache/images/Z0Y8VikQqHdIyl12mjEQKArSNnKgqb5MgUYp+RJ5EO4=/1656761463364.kZnEJ9pDGRP7pgjpXGDPuV-HLcq5hWt9eWAFm6G84OI=.webp +0 -0
- package/example/.next/cache/images/aoSFeHouZT4mEYTInYHZHTBtgeKvEELQADTBcRV6hkw=/1625298476457.T0UaZPCESw+8pja9oQlbUDVINYgmacs0lCsbFS5R7vc=.webp +0 -0
- package/example/.next/cache/images/c9dcuiQ8O5e6pwHRxJtUCx3tFTD5fk0GH07hStsE6Q0=/1657107680401.jwYrFWs2M9PlA3K2ZZaR7tQk1BCwIU3EyAw9b-RBJGc=.webp +0 -0
- package/example/.next/cache/images/cTF2A44FXn8nLM91wKUoIEqhphWsnHQeM19UXTYuCjU=/1625566943586.FsHRv9b2D1Qu0XuUCIC0AB2goFSO+maM7H+SE4GSn1U=.webp +0 -0
- package/example/.next/cache/images/cVH7moJ73vvxuB1En1mtSjyjCAn7ZedMLuWgvI8YD9U=/1656759920737.rpQVMyg-AaUmlLQcsNkRBcHwqIhhb5bVfXmej8NL3Ls=.webp +0 -0
- package/example/.next/cache/images/dSxPG4mvFB-hsFa2WNNKGVH+EM8F73q59MOz+d84wt0=/1625470290291.9SaCLJMI8CiS-JzFL7TaZTfWXnpzp2E6eTe+RFZYv-c=.webp +0 -0
- package/example/.next/cache/images/dw-FglYBg89Atjb1B0R85+AwxeHSPUjuO8Kh1CV0-m4=/1625497900295.xFYayjV9nBGOKUTVq5XxlGEIWR5B5NOtP2X6N9gcAUo=.webp +0 -0
- package/example/.next/cache/images/f0TzeTFnAY-0ltYUi9v76DWDq3xCt2-9uBbQx4xeK3E=/1625299582181.v4L5Aguf03P1aXwUUG2yzWa4jsIkRvG35rv7Xk2e3Yg=.webp +0 -0
- package/example/.next/cache/images/fy3he+3cRQ9wtXvPOgCMpbECVEZpx-cdDDs+J0bnCl0=/1625219592716.zIxZGRHl91NEtnV4nbyU0rB3EtEyR9Lxnri-+voKAvs=.webp +0 -0
- package/example/.next/cache/images/g9PwkkYlS8p6OZa5PbvEmIxLFhwMULmPZ4JXWpN+m9E=/1625299465140.loc887GnjFgThYkCZOwQOxrUnC1XK+hbFpOxLOZV2YE=.webp +0 -0
- package/example/.next/cache/images/gEWhGfMHCTTgqNTJGXoavWIjsPe5-XHrTCOZoM0K3A0=/1625299501484.jzxT8QO8RG7s8Kz3g63dSfVxZEFiu6uGPLFz3e2W7cU=.webp +0 -0
- package/example/.next/cache/images/iHANQk+34mFntRtrtUkKrthnmdjp6ruWLqwvBnj0shA=/1625219571001.+yVlIMc84gsVdgGr6dfpa+NKaYqXQLJb4rxP95iokjo=.webp +0 -0
- package/example/.next/cache/images/iTGjNMCKRRKWT6Se1ypy6B8G7VG3aE81NoYZWWuFkRM=/1625299505650.WGHxeAxX5Th696JjcRa8sgeI+xCA-D31-rJYa1TfqYc=.webp +0 -0
- package/example/.next/cache/images/iUy4uGqOpV5cYkmJQ6H1OenGKhlJKn8YXFjNrlAcoJM=/1625474121167.YG1FPtrJnhaldgLFyM0PYUrKRS4YzNPynIHRBAsZJpI=.webp +0 -0
- package/example/.next/cache/images/jiDD0qNI10KXQQAUzeRuRNNktq5a6AhagAaeeFC-TAQ=/1656761403766.MdJnQq7SbBrJRtJEjPRng-ovqekSsQAPxEoERZwU0AY=.webp +0 -0
- package/example/.next/cache/images/k6CGZJxOx65S31BJg2vWXcUUTInuc28HlY+vruC5p08=/1625300551403.vqRL7Mz7oVbXyhRHwxk5vtqXEHKbcR-xYitHMim2KoM=.webp +0 -0
- package/example/.next/cache/images/lUg+tPaN1bFXtqfifZGZF3zOXqUiJsVHbrj7P0CI9eE=/1656749479842.i+PvewsVBTnrxKjImamNkgl0fCG8DPKrY-1y1ZQKR3c=.webp +0 -0
- package/example/.next/cache/images/m2NzDIE4Ft53TdiwYp3ymfmxd-MB8H+NCDL9HP2heoQ=/1625570988005.GgcoTYV3RHmRWw83xvhRld3iVysMAhdfGrX91Zl0skk=.webp +0 -0
- package/example/.next/cache/images/n6WUQmM45C8h6AyLZQVtPJihzo+YXCGPZPoSLlieaeg=/1656749479842.+yVlIMc84gsVdgGr6dfpa+NKaYqXQLJb4rxP95iokjo=.webp +0 -0
- package/example/.next/cache/images/nRr2Uwi8fvy6WIpGEwEQdqIUrjmlZc6rJPhxxJa82Es=/1625213880032.i+PvewsVBTnrxKjImamNkgl0fCG8DPKrY-1y1ZQKR3c=.webp +0 -0
- package/example/.next/cache/images/o0N432kChXWOqK5UVRtqLsLDWb5+dYe2JvYO6d24vc0=/1625482549426.CaPu+NWbHtURILwAbvjOMW3vT0776ONf0tXGWzsaDnA=.webp +0 -0
- package/example/.next/cache/images/oCrD0LhpE+c2Igt0JD1Yw0kC7aOo62HQ-5wedgqBbzc=/1656761398353.f9SVRkSQOaIIA6GikQ8gIzTuFdteePWKPeSdEPKiVZ4=.webp +0 -0
- package/example/.next/cache/images/oQ6ibo6F3ySy2ESJgLZIdmbcWTiOP3Q0KhY2fpikQ5k=/1625299093245.wohGDcrAnckq4RxHw2+ScWJWe1Dk5fIwjyVoVBt5cEE=.webp +0 -0
- package/example/.next/cache/images/p7XzvB8oyN5nfu11eCA42SeEp7sL+LPQQoRU64YT1cc=/1625299322699.eYKIZha0lC4+LSV+ZINxWGGOfgqw30+9w2erMlPbFTA=.webp +0 -0
- package/example/.next/cache/images/pnG318NZ2UvU2k21miucoxLsd8wGC5T6lVtcIzbPgd0=/1625299443084.RDAllNEC0jZGUcFFZqqZrEKfEVth-wpANCdkO+jAVvE=.webp +0 -0
- package/example/.next/cache/images/sDmCscY0vQ6Ce3yhoIzfNRxh-aSDxq+RTOoq0cUN4cI=/1656756694154.vDQunPJtcqmDa5Dw3GNOsYnbPoyIC9zEHXjUgRX+5VI=.webp +0 -0
- package/example/.next/cache/images/tv5navWlSovKHHXAA+lKFltBgdnGNbCL3KnX761Ycus=/1625566936879.641rNXHFuO1fzs0BSgp5C+Sw+zWBQp6CJs4+utqZU1c=.webp +0 -0
- package/example/.next/cache/images/utC1kNaPpZdZepwnTfNu9cW-3ICXwUkEoLi+pTgGKO8=/1656749851790.zMx5v1d6EgYxzhH5u9vceuQAZdrlkrwNiW-EzuaYMnw=.webp +0 -0
- package/example/.next/cache/images/v156Um7QIAhI-jW4GZuohhI1SVZ3A-C5W7stSH6+Ex8=/1625571324722.GGkUlkTqDjM2yzNmjFvUx-dBg-dCLrVvQNFj1xYp+L4=.webp +0 -0
- package/example/.next/cache/images/ve17AGz6UzylkfjhegWUnZ4SUXdLbpBWd-M+DAbqhVo=/1625213911797.zMx5v1d6EgYxzhH5u9vceuQAZdrlkrwNiW-EzuaYMnw=.webp +0 -0
- package/example/.next/cache/images/w+++27-2ebMrzNGxoKhSr9vf0VqhIlpV3xO8-nmznSM=/1625219570994.+yVlIMc84gsVdgGr6dfpa+NKaYqXQLJb4rxP95iokjo=.webp +0 -0
- package/example/.next/cache/images/wEVHpFSN5nWkDzJM1zD9IzkT-5+9aLCjtzZlx7FnChA=/1625300569493.rBN4UJXzzvwnwMc6lkdFNiOodKZnuw9BElwqky7XTJ0=.webp +0 -0
- package/example/.next/cache/images/wOSsRjxgCIRti4Y51UNQVHeNw92Sg-OV6tSME5c2+RU=/1657107410586.c+9x+gNEkQckj5C8j9I5aZJiJf35+8bi-q7MlbQBOlk=.webp +0 -0
- package/example/.next/cache/images/wciNuT5QUpxVMjbdEd5KWYQAkxr4pu0mSsO8CrnNuRo=/1625300606596.WAxNBjGkgmTuieJ8l+3FtINuMozp8NMBQx9OfMbxvLY=.webp +0 -0
- package/example/.next/cache/images/xQ--vjMXdpyez6gYJhx5c22xjy6UfzN8shB+AT-WnQw=/1625213880032.i+PvewsVBTnrxKjImamNkgl0fCG8DPKrY-1y1ZQKR3c=.webp +0 -0
- package/example/.next/cache/images/xfzsIzvsjdsLHqIoLrdTT1AjZi9+RIje5JHlDlzw+LQ=/1625299556299.c43pjJ8oT5uj6rWCkZRR+sYJ2unczuZsJsvTPoYMCNg=.webp +0 -0
- package/example/.next/cache/images/xvjW0MVJv7OygHiGuo5gvdejePhehBB84DWWy0RobDg=/1625571376478.kZnEJ9pDGRP7pgjpXGDPuV-HLcq5hWt9eWAFm6G84OI=.webp +0 -0
- package/example/.next/cache/images/yEcVQvBB4mvzdzhAgu6yUci93hNSew5goqdazysmcaw=/1625299488426.1uAYRUalqmHfx5q0dqBXjl-shnwNiMuPt3-D6D6kgHw=.webp +0 -0
- package/example/.next/cache/images/yX0fhb7SMjwEomDwIq68YQHaZlZCZl7B8XxgNuNT2Ds=/1625219571007.i+PvewsVBTnrxKjImamNkgl0fCG8DPKrY-1y1ZQKR3c=.webp +0 -0
- package/example/.next/cache/images/zh5j6vOXiawy6rDIG3BLBs4itvIs0VVtnkvSFIKa5g4=/1625213904647.i+PvewsVBTnrxKjImamNkgl0fCG8DPKrY-1y1ZQKR3c=.webp +0 -0
- package/example/.next/cache/images/zmAZ9S2RPA8WIuVoev9YQINu8aQgcsNtDGNiLjNAYlU=/1656756588278.ifTqMK-gjLzo3qsY-0kwQOYgfnZzrDlPk0kqF90U9p8=.webp +0 -0
- package/example/.next/cache/webpack/client-development/0.pack +0 -0
- package/example/.next/cache/webpack/client-development/1.pack +0 -0
- package/example/.next/cache/webpack/client-development/2.pack +0 -0
- package/example/.next/cache/webpack/client-development/3.pack +0 -0
- package/example/.next/cache/webpack/client-development/4.pack +0 -0
- package/example/.next/cache/webpack/client-development/5.pack +0 -0
- package/example/.next/cache/webpack/client-development/6.pack +0 -0
- package/example/.next/cache/webpack/client-development/7.pack +0 -0
- package/example/.next/cache/webpack/client-development/8.pack +0 -0
- package/example/.next/cache/webpack/client-development/9.pack +0 -0
- package/example/.next/cache/webpack/client-development/index.pack +0 -0
- package/example/.next/cache/webpack/client-development/index.pack.old +0 -0
- package/example/.next/cache/webpack/server-development/0.pack +0 -0
- package/example/.next/cache/webpack/server-development/1.pack +0 -0
- package/example/.next/cache/webpack/server-development/2.pack +0 -0
- package/example/.next/cache/webpack/server-development/3.pack +0 -0
- package/example/.next/cache/webpack/server-development/4.pack +0 -0
- package/example/.next/cache/webpack/server-development/5.pack +0 -0
- package/example/.next/cache/webpack/server-development/6.pack +0 -0
- package/example/.next/cache/webpack/server-development/7.pack +0 -0
- package/example/.next/cache/webpack/server-development/8.pack +0 -0
- package/example/.next/cache/webpack/server-development/index.pack +0 -0
- package/example/.next/cache/webpack/server-development/index.pack.old +0 -0
- package/example/.next/cache/withYarn1Workspaces.3d60d45801.json +1 -0
- package/example/.next/cache/withYarn1Workspaces.d8e240ca09.json +1 -0
- package/example/.next/react-loadable-manifest.json +8 -0
- package/example/.next/server/pages/_app.js +47 -0
- package/example/.next/server/pages/_document.js +209 -0
- package/example/.next/server/pages/_error.js +68 -0
- package/example/.next/server/pages/index.js +135 -0
- package/example/.next/server/pages/next/dist/pages/_error.js +68 -0
- package/example/.next/server/pages-manifest.json +6 -0
- package/example/.next/server/static/image/components/image.66235d2f01fd4fba70eb3938db05810e.jpg +0 -0
- package/example/.next/server/webpack-runtime.js +168 -0
- package/example/.next/static/chunks/amp.js +84 -0
- package/example/.next/static/chunks/main.js +1140 -0
- package/example/.next/static/chunks/node_modules_next_dist_client_dev_noop_js.js +22 -0
- package/example/.next/static/chunks/pages/_app.js +74 -0
- package/example/.next/static/chunks/pages/_error.js +95 -0
- package/example/.next/static/chunks/pages/index.js +280 -0
- package/example/.next/static/chunks/pages/next/dist/pages/_error.js +148 -0
- package/example/.next/static/chunks/polyfills.js +40 -0
- package/example/.next/static/chunks/react-refresh.js +63 -0
- package/example/.next/static/chunks/webpack.js +1277 -0
- package/example/.next/static/development/_buildManifest.js +1 -0
- package/example/.next/static/development/_ssgManifest.js +1 -0
- package/example/.next/static/image/components/image.66235d2f01fd4fba70eb3938db05810e.jpg +0 -0
- package/example/.next/static/webpack/0588aaab49febd8cfe1c.webpack.hot-update.json +1 -0
- package/example/.next/static/webpack/072a7d130e228881d052.webpack.hot-update.json +1 -0
- package/example/.next/static/webpack/0762084187c63da9472d.webpack.hot-update.json +1 -0
- package/example/.next/static/webpack/0cea8b02db9004a9010b.webpack.hot-update.json +1 -0
- package/example/.next/static/webpack/0e5144f94622b3a25db6.webpack.hot-update.json +1 -0
- package/example/.next/static/webpack/1252cfc380272b4fe2e6.webpack.hot-update.json +1 -0
- package/example/.next/static/webpack/1402ac884dae19bf86c6.webpack.hot-update.json +1 -0
- package/example/.next/static/webpack/147aac9d3d7030a41f7f.webpack.hot-update.json +1 -0
- package/example/.next/static/webpack/1bda8bbbca0e0f13f045.webpack.hot-update.json +1 -0
- package/example/.next/static/webpack/234d4ce3b70ffd983ba8.webpack.hot-update.json +1 -0
- package/example/.next/static/webpack/26b79f15961d39636a40.webpack.hot-update.json +1 -0
- package/example/.next/static/webpack/2826318bc6ba4bd9d644.webpack.hot-update.json +1 -0
- package/example/.next/static/webpack/2a955e2b9072adb73190.webpack.hot-update.json +1 -0
- package/example/.next/static/webpack/2c2aaee83efae1379187.webpack.hot-update.json +1 -0
- package/example/.next/static/webpack/3555adce6517c2f7e42e.webpack.hot-update.json +1 -0
- package/example/.next/static/webpack/3588af142e46a835343c.webpack.hot-update.json +1 -0
- package/example/.next/static/webpack/37f12cbe9b48a34c52c2.webpack.hot-update.json +1 -0
- package/example/.next/static/webpack/3ac52037129af449eb72.webpack.hot-update.json +1 -0
- package/example/.next/static/webpack/3b42c94e63de900303b9.webpack.hot-update.json +1 -0
- package/example/.next/static/webpack/3c79280973f09aaa87fe.webpack.hot-update.json +1 -0
- package/example/.next/static/webpack/3c87c0ea5ce694e8d1c5.webpack.hot-update.json +1 -0
- package/example/.next/static/webpack/3de319507c766ee73bea.webpack.hot-update.json +1 -0
- package/example/.next/static/webpack/43b43eb8c73ce45f78f3.webpack.hot-update.json +1 -0
- package/example/.next/static/webpack/43c79a23f821cd622aee.webpack.hot-update.json +1 -0
- package/example/.next/static/webpack/4e0a0f884a956cbb5abe.webpack.hot-update.json +1 -0
- package/example/.next/static/webpack/50a19b6d8c63681a6f59.webpack.hot-update.json +1 -0
- package/example/.next/static/webpack/51822142283bf3a4fb5a.webpack.hot-update.json +1 -0
- package/example/.next/static/webpack/55ee69f8d85488769153.webpack.hot-update.json +1 -0
- package/example/.next/static/webpack/57d0775bfd690a4598a7.webpack.hot-update.json +1 -0
- package/example/.next/static/webpack/585753f40a2ba758aaeb.webpack.hot-update.json +1 -0
- package/example/.next/static/webpack/58da75bd3cf67c71206b.webpack.hot-update.json +1 -0
- package/example/.next/static/webpack/5d0aa62f686882951598.webpack.hot-update.json +1 -0
- package/example/.next/static/webpack/5de110501cdd600f11d7.webpack.hot-update.json +1 -0
- package/example/.next/static/webpack/63775ccd9a7849e5764c.webpack.hot-update.json +1 -0
- package/example/.next/static/webpack/6b4663280b1db8f5e905.webpack.hot-update.json +1 -0
- package/example/.next/static/webpack/6d11705f01219ee2fa3d.webpack.hot-update.json +1 -0
- package/example/.next/static/webpack/6d4eca6985c3546f0f71.webpack.hot-update.json +1 -0
- package/example/.next/static/webpack/6e6063845501820278cd.webpack.hot-update.json +1 -0
- package/example/.next/static/webpack/74a36e7ef8e1ce4fdf4a.webpack.hot-update.json +1 -0
- package/example/.next/static/webpack/796fe50a2b9d66aec2d7.webpack.hot-update.json +1 -0
- package/example/.next/static/webpack/878b2eb56dd102f8d1de.webpack.hot-update.json +1 -0
- package/example/.next/static/webpack/8d58abc5879781fbdb2f.webpack.hot-update.json +1 -0
- package/example/.next/static/webpack/8f405c984e4934b20605.webpack.hot-update.json +1 -0
- package/example/.next/static/webpack/90295054405377c77f5b.webpack.hot-update.json +1 -0
- package/example/.next/static/webpack/9310bbbf11c1977e9d98.webpack.hot-update.json +1 -0
- package/example/.next/static/webpack/9a0237d669946cc844e6.webpack.hot-update.json +1 -0
- package/example/.next/static/webpack/9aeee506244bc34b7b4b.webpack.hot-update.json +1 -0
- package/example/.next/static/webpack/9f473ce1942e5fdb3632.webpack.hot-update.json +1 -0
- package/example/.next/static/webpack/a1185fb9adfe5b70bc2f.webpack.hot-update.json +1 -0
- package/example/.next/static/webpack/a11eb25c0fca8e105e00.webpack.hot-update.json +1 -0
- package/example/.next/static/webpack/a48bbb1152e41e6a3cf2.webpack.hot-update.json +1 -0
- package/example/.next/static/webpack/aa3b500d2bc6950dbadd.webpack.hot-update.json +1 -0
- package/example/.next/static/webpack/ab0b9af23ef3fd93299c.webpack.hot-update.json +1 -0
- package/example/.next/static/webpack/aea6a75d56441fbbdaff.webpack.hot-update.json +1 -0
- package/example/.next/static/webpack/af81bfc5f0a8c32c3b51.webpack.hot-update.json +1 -0
- package/example/.next/static/webpack/b370b882a7b8cbf89abd.webpack.hot-update.json +1 -0
- package/example/.next/static/webpack/b3e2c4a7565fcfca527f.webpack.hot-update.json +1 -0
- package/example/.next/static/webpack/c6068e16d94c09cfd6b6.webpack.hot-update.json +1 -0
- package/example/.next/static/webpack/c73596b5b037cb23ec6b.webpack.hot-update.json +1 -0
- package/example/.next/static/webpack/c7dab37225cb7bc65af3.webpack.hot-update.json +1 -0
- package/example/.next/static/webpack/d2f930e23e921b06ed5c.webpack.hot-update.json +1 -0
- package/example/.next/static/webpack/d371d7c066578693521e.webpack.hot-update.json +1 -0
- package/example/.next/static/webpack/d965a3cf3815af872d29.webpack.hot-update.json +1 -0
- package/example/.next/static/webpack/da33d321cff0dda32eb0.webpack.hot-update.json +1 -0
- package/example/.next/static/webpack/dba31d980c30d691d16b.webpack.hot-update.json +1 -0
- package/example/.next/static/webpack/dd8aa6ef77cd74d84ec3.webpack.hot-update.json +1 -0
- package/example/.next/static/webpack/e15c892c8dbe9bc25020.webpack.hot-update.json +1 -0
- package/example/.next/static/webpack/e8bf5676cc19a6345ad3.webpack.hot-update.json +1 -0
- package/example/.next/static/webpack/eddd97db36cfbd0a1e7c.webpack.hot-update.json +1 -0
- package/example/.next/static/webpack/f031b79058783bc1558e.webpack.hot-update.json +1 -0
- package/example/.next/static/webpack/f3fa39ef803627283382.webpack.hot-update.json +1 -0
- package/example/.next/static/webpack/f48796a76815229d67ab.webpack.hot-update.json +1 -0
- package/example/.next/static/webpack/feb45f4041e620b79d86.webpack.hot-update.json +1 -0
- package/example/.next/static/webpack/ff24e5856387293df7e5.webpack.hot-update.json +1 -0
- package/example/.next/static/webpack/pages/index.072a7d130e228881d052.hot-update.js +22 -0
- package/example/.next/static/webpack/pages/index.0762084187c63da9472d.hot-update.js +22 -0
- package/example/.next/static/webpack/pages/index.0cea8b02db9004a9010b.hot-update.js +22 -0
- package/example/.next/static/webpack/pages/index.0e5144f94622b3a25db6.hot-update.js +22 -0
- package/example/.next/static/webpack/pages/index.1402ac884dae19bf86c6.hot-update.js +22 -0
- package/example/.next/static/webpack/pages/index.147aac9d3d7030a41f7f.hot-update.js +22 -0
- package/example/.next/static/webpack/pages/index.26b79f15961d39636a40.hot-update.js +22 -0
- package/example/.next/static/webpack/pages/index.2a955e2b9072adb73190.hot-update.js +22 -0
- package/example/.next/static/webpack/pages/index.3555adce6517c2f7e42e.hot-update.js +22 -0
- package/example/.next/static/webpack/pages/index.37f12cbe9b48a34c52c2.hot-update.js +22 -0
- package/example/.next/static/webpack/pages/index.3ac52037129af449eb72.hot-update.js +22 -0
- package/example/.next/static/webpack/pages/index.3c79280973f09aaa87fe.hot-update.js +22 -0
- package/example/.next/static/webpack/pages/index.43b43eb8c73ce45f78f3.hot-update.js +22 -0
- package/example/.next/static/webpack/pages/index.43c79a23f821cd622aee.hot-update.js +22 -0
- package/example/.next/static/webpack/pages/index.4e0a0f884a956cbb5abe.hot-update.js +22 -0
- package/example/.next/static/webpack/pages/index.50a19b6d8c63681a6f59.hot-update.js +22 -0
- package/example/.next/static/webpack/pages/index.51822142283bf3a4fb5a.hot-update.js +22 -0
- package/example/.next/static/webpack/pages/index.58da75bd3cf67c71206b.hot-update.js +22 -0
- package/example/.next/static/webpack/pages/index.5d0aa62f686882951598.hot-update.js +22 -0
- package/example/.next/static/webpack/pages/index.5de110501cdd600f11d7.hot-update.js +22 -0
- package/example/.next/static/webpack/pages/index.63775ccd9a7849e5764c.hot-update.js +22 -0
- package/example/.next/static/webpack/pages/index.6d11705f01219ee2fa3d.hot-update.js +22 -0
- package/example/.next/static/webpack/pages/index.6d4eca6985c3546f0f71.hot-update.js +22 -0
- package/example/.next/static/webpack/pages/index.6e6063845501820278cd.hot-update.js +22 -0
- package/example/.next/static/webpack/pages/index.74a36e7ef8e1ce4fdf4a.hot-update.js +22 -0
- package/example/.next/static/webpack/pages/index.796fe50a2b9d66aec2d7.hot-update.js +22 -0
- package/example/.next/static/webpack/pages/index.8d58abc5879781fbdb2f.hot-update.js +22 -0
- package/example/.next/static/webpack/pages/index.90295054405377c77f5b.hot-update.js +22 -0
- package/example/.next/static/webpack/pages/index.9310bbbf11c1977e9d98.hot-update.js +22 -0
- package/example/.next/static/webpack/pages/index.9a0237d669946cc844e6.hot-update.js +22 -0
- package/example/.next/static/webpack/pages/index.9aeee506244bc34b7b4b.hot-update.js +22 -0
- package/example/.next/static/webpack/pages/index.9f473ce1942e5fdb3632.hot-update.js +22 -0
- package/example/.next/static/webpack/pages/index.a48bbb1152e41e6a3cf2.hot-update.js +22 -0
- package/example/.next/static/webpack/pages/index.aa3b500d2bc6950dbadd.hot-update.js +22 -0
- package/example/.next/static/webpack/pages/index.aea6a75d56441fbbdaff.hot-update.js +22 -0
- package/example/.next/static/webpack/pages/index.b3e2c4a7565fcfca527f.hot-update.js +22 -0
- package/example/.next/static/webpack/pages/index.c6068e16d94c09cfd6b6.hot-update.js +22 -0
- package/example/.next/static/webpack/pages/index.c7dab37225cb7bc65af3.hot-update.js +22 -0
- package/example/.next/static/webpack/pages/index.d2f930e23e921b06ed5c.hot-update.js +22 -0
- package/example/.next/static/webpack/pages/index.d371d7c066578693521e.hot-update.js +22 -0
- package/example/.next/static/webpack/pages/index.d965a3cf3815af872d29.hot-update.js +22 -0
- package/example/.next/static/webpack/pages/index.dba31d980c30d691d16b.hot-update.js +22 -0
- package/example/.next/static/webpack/pages/index.dd8aa6ef77cd74d84ec3.hot-update.js +22 -0
- package/example/.next/static/webpack/pages/index.e15c892c8dbe9bc25020.hot-update.js +22 -0
- package/example/.next/static/webpack/pages/index.e8bf5676cc19a6345ad3.hot-update.js +22 -0
- package/example/.next/static/webpack/pages/index.eddd97db36cfbd0a1e7c.hot-update.js +22 -0
- package/example/.next/static/webpack/pages/index.f3fa39ef803627283382.hot-update.js +22 -0
- package/example/.next/static/webpack/pages/index.f48796a76815229d67ab.hot-update.js +22 -0
- package/example/.next/static/webpack/pages/index.feb45f4041e620b79d86.hot-update.js +22 -0
- package/example/.next/static/webpack/webpack.0588aaab49febd8cfe1c.hot-update.js +19 -0
- package/example/.next/static/webpack/webpack.072a7d130e228881d052.hot-update.js +19 -0
- package/example/.next/static/webpack/webpack.0762084187c63da9472d.hot-update.js +19 -0
- package/example/.next/static/webpack/webpack.0cea8b02db9004a9010b.hot-update.js +19 -0
- package/example/.next/static/webpack/webpack.0e5144f94622b3a25db6.hot-update.js +19 -0
- package/example/.next/static/webpack/webpack.1252cfc380272b4fe2e6.hot-update.js +19 -0
- package/example/.next/static/webpack/webpack.1402ac884dae19bf86c6.hot-update.js +19 -0
- package/example/.next/static/webpack/webpack.147aac9d3d7030a41f7f.hot-update.js +19 -0
- package/example/.next/static/webpack/webpack.1bda8bbbca0e0f13f045.hot-update.js +19 -0
- package/example/.next/static/webpack/webpack.234d4ce3b70ffd983ba8.hot-update.js +19 -0
- package/example/.next/static/webpack/webpack.26b79f15961d39636a40.hot-update.js +19 -0
- package/example/.next/static/webpack/webpack.2826318bc6ba4bd9d644.hot-update.js +19 -0
- package/example/.next/static/webpack/webpack.2a955e2b9072adb73190.hot-update.js +19 -0
- package/example/.next/static/webpack/webpack.2c2aaee83efae1379187.hot-update.js +19 -0
- package/example/.next/static/webpack/webpack.3555adce6517c2f7e42e.hot-update.js +19 -0
- package/example/.next/static/webpack/webpack.3588af142e46a835343c.hot-update.js +19 -0
- package/example/.next/static/webpack/webpack.37f12cbe9b48a34c52c2.hot-update.js +19 -0
- package/example/.next/static/webpack/webpack.3ac52037129af449eb72.hot-update.js +19 -0
- package/example/.next/static/webpack/webpack.3b42c94e63de900303b9.hot-update.js +19 -0
- package/example/.next/static/webpack/webpack.3c79280973f09aaa87fe.hot-update.js +19 -0
- package/example/.next/static/webpack/webpack.3c87c0ea5ce694e8d1c5.hot-update.js +19 -0
- package/example/.next/static/webpack/webpack.3de319507c766ee73bea.hot-update.js +19 -0
- package/example/.next/static/webpack/webpack.43b43eb8c73ce45f78f3.hot-update.js +19 -0
- package/example/.next/static/webpack/webpack.43c79a23f821cd622aee.hot-update.js +19 -0
- package/example/.next/static/webpack/webpack.4e0a0f884a956cbb5abe.hot-update.js +19 -0
- package/example/.next/static/webpack/webpack.50a19b6d8c63681a6f59.hot-update.js +19 -0
- package/example/.next/static/webpack/webpack.51822142283bf3a4fb5a.hot-update.js +19 -0
- package/example/.next/static/webpack/webpack.55ee69f8d85488769153.hot-update.js +19 -0
- package/example/.next/static/webpack/webpack.57d0775bfd690a4598a7.hot-update.js +19 -0
- package/example/.next/static/webpack/webpack.585753f40a2ba758aaeb.hot-update.js +19 -0
- package/example/.next/static/webpack/webpack.58da75bd3cf67c71206b.hot-update.js +19 -0
- package/example/.next/static/webpack/webpack.5d0aa62f686882951598.hot-update.js +19 -0
- package/example/.next/static/webpack/webpack.5de110501cdd600f11d7.hot-update.js +19 -0
- package/example/.next/static/webpack/webpack.63775ccd9a7849e5764c.hot-update.js +19 -0
- package/example/.next/static/webpack/webpack.6b4663280b1db8f5e905.hot-update.js +19 -0
- package/example/.next/static/webpack/webpack.6d11705f01219ee2fa3d.hot-update.js +19 -0
- package/example/.next/static/webpack/webpack.6d4eca6985c3546f0f71.hot-update.js +19 -0
- package/example/.next/static/webpack/webpack.6e6063845501820278cd.hot-update.js +19 -0
- package/example/.next/static/webpack/webpack.74a36e7ef8e1ce4fdf4a.hot-update.js +19 -0
- package/example/.next/static/webpack/webpack.796fe50a2b9d66aec2d7.hot-update.js +19 -0
- package/example/.next/static/webpack/webpack.878b2eb56dd102f8d1de.hot-update.js +19 -0
- package/example/.next/static/webpack/webpack.8d58abc5879781fbdb2f.hot-update.js +19 -0
- package/example/.next/static/webpack/webpack.8f405c984e4934b20605.hot-update.js +30 -0
- package/example/.next/static/webpack/webpack.90295054405377c77f5b.hot-update.js +19 -0
- package/example/.next/static/webpack/webpack.9310bbbf11c1977e9d98.hot-update.js +19 -0
- package/example/.next/static/webpack/webpack.9a0237d669946cc844e6.hot-update.js +19 -0
- package/example/.next/static/webpack/webpack.9aeee506244bc34b7b4b.hot-update.js +19 -0
- package/example/.next/static/webpack/webpack.9f473ce1942e5fdb3632.hot-update.js +19 -0
- package/example/.next/static/webpack/webpack.a1185fb9adfe5b70bc2f.hot-update.js +19 -0
- package/example/.next/static/webpack/webpack.a11eb25c0fca8e105e00.hot-update.js +19 -0
- package/example/.next/static/webpack/webpack.a48bbb1152e41e6a3cf2.hot-update.js +19 -0
- package/example/.next/static/webpack/webpack.aa3b500d2bc6950dbadd.hot-update.js +19 -0
- package/example/.next/static/webpack/webpack.ab0b9af23ef3fd93299c.hot-update.js +19 -0
- package/example/.next/static/webpack/webpack.aea6a75d56441fbbdaff.hot-update.js +19 -0
- package/example/.next/static/webpack/webpack.af81bfc5f0a8c32c3b51.hot-update.js +19 -0
- package/example/.next/static/webpack/webpack.b370b882a7b8cbf89abd.hot-update.js +19 -0
- package/example/.next/static/webpack/webpack.b3e2c4a7565fcfca527f.hot-update.js +19 -0
- package/example/.next/static/webpack/webpack.c6068e16d94c09cfd6b6.hot-update.js +19 -0
- package/example/.next/static/webpack/webpack.c73596b5b037cb23ec6b.hot-update.js +19 -0
- package/example/.next/static/webpack/webpack.c7dab37225cb7bc65af3.hot-update.js +19 -0
- package/example/.next/static/webpack/webpack.d2f930e23e921b06ed5c.hot-update.js +19 -0
- package/example/.next/static/webpack/webpack.d371d7c066578693521e.hot-update.js +19 -0
- package/example/.next/static/webpack/webpack.d965a3cf3815af872d29.hot-update.js +19 -0
- package/example/.next/static/webpack/webpack.da33d321cff0dda32eb0.hot-update.js +19 -0
- package/example/.next/static/webpack/webpack.dba31d980c30d691d16b.hot-update.js +19 -0
- package/example/.next/static/webpack/webpack.dd8aa6ef77cd74d84ec3.hot-update.js +19 -0
- package/example/.next/static/webpack/webpack.e15c892c8dbe9bc25020.hot-update.js +19 -0
- package/example/.next/static/webpack/webpack.e8bf5676cc19a6345ad3.hot-update.js +19 -0
- package/example/.next/static/webpack/webpack.eddd97db36cfbd0a1e7c.hot-update.js +19 -0
- package/example/.next/static/webpack/webpack.f031b79058783bc1558e.hot-update.js +19 -0
- package/example/.next/static/webpack/webpack.f3fa39ef803627283382.hot-update.js +19 -0
- package/example/.next/static/webpack/webpack.f48796a76815229d67ab.hot-update.js +19 -0
- package/example/.next/static/webpack/webpack.feb45f4041e620b79d86.hot-update.js +19 -0
- package/example/.next/static/webpack/webpack.ff24e5856387293df7e5.hot-update.js +19 -0
- package/example/CHANGELOG.md +18 -0
- package/example/README.md +23 -0
- package/example/components/image.jpg +0 -0
- package/example/next-env.d.ts +3 -0
- package/example/next.config.js +14 -0
- package/example/package.json +25 -0
- package/example/pages/_app.tsx +28 -0
- package/example/pages/index.tsx +138 -0
- package/example/public/image.jpg +0 -0
- package/example/tsconfig.json +19 -0
- package/index.ts +1 -0
- package/next-env.d.ts +4 -0
- package/package.json +35 -0
- package/tsconfig.json +5 -0
- package/types.d.ts +5 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# Change Log
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
|
+
|
|
6
|
+
## [2.104.1](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/image@2.104.0...@graphcommerce/image@2.104.1) (2021-09-27)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @graphcommerce/image
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# 2.104.0 (2021-09-27)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* cart item image sizes ([e7c860c](https://github.com/ho-nl/m2-pwa/commit/e7c860c785e172b9275e1a00c8b51509d6b297a8))
|
|
20
|
+
* ignore md files from triggering version updates ([4f98392](https://github.com/ho-nl/m2-pwa/commit/4f9839250b3a32d3070da5290e5efcc5e2243fba))
|
|
21
|
+
* **image:** add loading attribute to unoptimized image ([13f7709](https://github.com/ho-nl/m2-pwa/commit/13f77096a5b1ed3f60cfa7b61ac7373d1a2b44d4))
|
|
22
|
+
* **image:** change sizing of images on grid/productpage ([0e573b6](https://github.com/ho-nl/m2-pwa/commit/0e573b69a2d405126433e7c4747c01b533858b78))
|
|
23
|
+
* **image:** component would rerender unnessarily ([bfc041d](https://github.com/ho-nl/m2-pwa/commit/bfc041d39e34faf60581dbdba7a15a32928368b3))
|
|
24
|
+
* **image:** do not report when image isn't rendered yet ([5aa08ef](https://github.com/ho-nl/m2-pwa/commit/5aa08efc1eade69f53e1645c37fcb0632d83bc5e))
|
|
25
|
+
* **image:** fix build ([b730cb6](https://github.com/ho-nl/m2-pwa/commit/b730cb6ae4e50dcf2f60e2046d6acf3047caacb3))
|
|
26
|
+
* **image:** image decoding async added ([8c5f59f](https://github.com/ho-nl/m2-pwa/commit/8c5f59f54b9e28b60e197b7ddefdd78b71f6665e))
|
|
27
|
+
* **image:** image src is visible while loading the image ([735d79e](https://github.com/ho-nl/m2-pwa/commit/735d79e8ccab296dcc5750458fc1760f17fe47c7))
|
|
28
|
+
* **image:** make sure unoptimized images are preloaded correctly and remove preloads from lots of images ([fb2b4fc](https://github.com/ho-nl/m2-pwa/commit/fb2b4fcb5336ff880a9b32775847d7b6738ba1ea))
|
|
29
|
+
* introduced SvgImageSimple and solve issue with review chips ([931d7fd](https://github.com/ho-nl/m2-pwa/commit/931d7fdcf0faa9d2264899b72e564138215b6bd8))
|
|
30
|
+
* make packages private so they dont get published accidently ([f7b693f](https://github.com/ho-nl/m2-pwa/commit/f7b693ff6a4d232d0871f6a68922d14678853a96))
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
### Features
|
|
34
|
+
|
|
35
|
+
* **image:** allow passing props to the picture component ([3425664](https://github.com/ho-nl/m2-pwa/commit/3425664f197974d2e9db048fc94d447b2d34c280))
|
|
36
|
+
* **image:** introduced completely rewritten Image component ([e3413b3](https://github.com/ho-nl/m2-pwa/commit/e3413b3a57392d6571ea64cb8d9c8dca05ea31df))
|
|
37
|
+
* **playwright:** added new playwright package to enable browser testing ([6f49ec7](https://github.com/ho-nl/m2-pwa/commit/6f49ec7595563775b96ebf21c27e39da1282e8d9))
|
|
38
|
+
* renamed all packages to use [@graphcommerce](https://github.com/graphcommerce) instead of [@reachdigital](https://github.com/reachdigital) ([491e4ce](https://github.com/ho-nl/m2-pwa/commit/491e4cec9a2686472dac36b79f999257c0811ffe))
|
|
39
|
+
* upgraded to nextjs 11 ([0053beb](https://github.com/ho-nl/m2-pwa/commit/0053beb7ef597c190add7264256a0eaec35868da))
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
# Change Log
|
|
46
|
+
|
|
47
|
+
All notable changes to this project will be documented in this file. See
|
|
48
|
+
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
49
|
+
|
|
50
|
+
# [2.103.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/image@2.102.1...@graphcommerce/image@2.103.0) (2021-09-01)
|
|
51
|
+
|
|
52
|
+
### Features
|
|
53
|
+
|
|
54
|
+
- **image:** allow passing props to the picture component
|
|
55
|
+
([3425664](https://github.com/ho-nl/m2-pwa/commit/3425664f197974d2e9db048fc94d447b2d34c280))
|
|
56
|
+
|
|
57
|
+
# [2.102.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/image@2.101.5...@graphcommerce/image@2.102.0) (2021-08-12)
|
|
58
|
+
|
|
59
|
+
### Features
|
|
60
|
+
|
|
61
|
+
- upgraded to nextjs 11
|
|
62
|
+
([0053beb](https://github.com/ho-nl/m2-pwa/commit/0053beb7ef597c190add7264256a0eaec35868da))
|
|
63
|
+
|
|
64
|
+
## [2.101.4](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/image@2.101.3...@graphcommerce/image@2.101.4) (2021-08-09)
|
|
65
|
+
|
|
66
|
+
### Bug Fixes
|
|
67
|
+
|
|
68
|
+
- **image:** do not report when image isn't rendered yet
|
|
69
|
+
([5aa08ef](https://github.com/ho-nl/m2-pwa/commit/5aa08efc1eade69f53e1645c37fcb0632d83bc5e))
|
|
70
|
+
|
|
71
|
+
## [2.101.3](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/image@2.101.2...@graphcommerce/image@2.101.3) (2021-08-06)
|
|
72
|
+
|
|
73
|
+
### Bug Fixes
|
|
74
|
+
|
|
75
|
+
- introduced SvgImageSimple and solve issue with review chips
|
|
76
|
+
([931d7fd](https://github.com/ho-nl/m2-pwa/commit/931d7fdcf0faa9d2264899b72e564138215b6bd8))
|
|
77
|
+
|
|
78
|
+
## [2.101.2](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/image@2.101.1...@graphcommerce/image@2.101.2) (2021-08-04)
|
|
79
|
+
|
|
80
|
+
### Bug Fixes
|
|
81
|
+
|
|
82
|
+
- cart item image sizes
|
|
83
|
+
([e7c860c](https://github.com/ho-nl/m2-pwa/commit/e7c860c785e172b9275e1a00c8b51509d6b297a8))
|
|
84
|
+
|
|
85
|
+
# [2.101.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/image@2.100.12...@graphcommerce/image@2.101.0) (2021-07-26)
|
|
86
|
+
|
|
87
|
+
### Features
|
|
88
|
+
|
|
89
|
+
- **playwright:** added new playwright package to enable browser testing
|
|
90
|
+
([6f49ec7](https://github.com/ho-nl/m2-pwa/commit/6f49ec7595563775b96ebf21c27e39da1282e8d9))
|
|
91
|
+
|
|
92
|
+
## [2.100.11](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/image@2.100.10...@graphcommerce/image@2.100.11) (2021-07-20)
|
|
93
|
+
|
|
94
|
+
### Bug Fixes
|
|
95
|
+
|
|
96
|
+
- ignore md files from triggering version updates
|
|
97
|
+
([4f98392](https://github.com/ho-nl/m2-pwa/commit/4f9839250b3a32d3070da5290e5efcc5e2243fba))
|
package/README.md
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# @graphcommerce/image
|
|
2
|
+
|
|
3
|
+
Since we're using a ton of images on the website we wanted to optimize the
|
|
4
|
+
images further than what `next/image` has to offer.
|
|
5
|
+
|
|
6
|
+
## Goals
|
|
7
|
+
|
|
8
|
+
- Only provide an image, no wrapping divs which changes how images work.
|
|
9
|
+
|
|
10
|
+
- Support the next/image layout properties.
|
|
11
|
+
|
|
12
|
+
- Optimize images further than what next/image does.
|
|
13
|
+
|
|
14
|
+
## Optimizing the images on high dpi sreens (1.5x-2.5x)
|
|
15
|
+
|
|
16
|
+
It seems that it doesn't really matter if we lower the quality of images for 2x
|
|
17
|
+
screens. So we lowered the quality to 44 as recommended.
|
|
18
|
+
|
|
19
|
+
To view the difference between quality=100 and quality=44, open this on a high
|
|
20
|
+
dpi screen: https://u5uol.sse.codesandbox.io/ and see the difference between the
|
|
21
|
+
'High resolution' variants.
|
|
22
|
+
|
|
23
|
+
## Serving the right images for low dpi screens (1x)
|
|
24
|
+
|
|
25
|
+
Jake Archibald's blog
|
|
26
|
+
https://jakearchibald.com/2021/serving-sharp-images-to-high-density-screens/
|
|
27
|
+
recommends serving high quality, but low resolution images on low dpi screens:
|
|
28
|
+
[high resolution screens and low resolution screens](https://jakearchibald.com/2021/serving-sharp-images-to-high-density-screens/#compressing-images-for-high-density-screens)
|
|
29
|
+
|
|
30
|
+
- high dpi screens need `high res` images but it is very acceptable to have
|
|
31
|
+
`quality=44` images
|
|
32
|
+
- `quality=80`: low dpi screens need `low res` images but also need to have high
|
|
33
|
+
quality images.
|
|
34
|
+
|
|
35
|
+
In our [testing](https://u5uol.sse.codesandbox.io/)
|
|
36
|
+
([code](https://codesandbox.io/s/strange-fermi-u5uol?file=/pages/index.tsx)),
|
|
37
|
+
for low dpi screens it doesn't really seem to matter if we serve
|
|
38
|
+
`high res, quality=44`.
|
|
39
|
+
|
|
40
|
+
Advantage: We need significantly less resizes, which is good for the backend.
|
|
41
|
+
Disadvantage: The image size for the `low res, quality=44` images is about 30%
|
|
42
|
+
larger than `high res, quality=80`
|
|
43
|
+
|
|
44
|
+
We deemed this to be acceptable for desktop as internet connections are fairly
|
|
45
|
+
acceptable and we're winning a great deal by lowering the quality already.
|
|
46
|
+
|
|
47
|
+
## Capping image fidelity on ultra-high resolution devices (2.5x-+)
|
|
48
|
+
|
|
49
|
+
https://blog.twitter.com/engineering/en_us/topics/infrastructure/2019/capping-image-fidelity-on-ultra-high-resolution-devices.html
|
|
50
|
+
|
|
51
|
+
## Defaulting to 50vw the sizes attribute `<img sizes=".."/>`
|
|
52
|
+
|
|
53
|
+
The `sizes` attribute allows browsers to download images even before the CSS has
|
|
54
|
+
finished loading. This means that the browser is able to download images as
|
|
55
|
+
early as an img with only an src attribute.
|
|
56
|
+
|
|
57
|
+
> When the browser starts to load a page, it starts to download (preload) any
|
|
58
|
+
> images before the main parser has started to load and interpret the page's CSS
|
|
59
|
+
> and JavaScript.
|
|
60
|
+
> [Why can't we just do this using CSS or JavaScript?](https://developer.mozilla.org/en-US/docs/Learn/HTML/Multimedia_and_embedding/Responsive_images#why_cant_we_just_do_this_using_css_or_javascript)
|
|
@@ -0,0 +1,517 @@
|
|
|
1
|
+
/* eslint-disable prefer-const */
|
|
2
|
+
/* eslint-disable no-param-reassign */
|
|
3
|
+
/* eslint-disable @next/next/no-img-element */
|
|
4
|
+
/* eslint-disable jsx-a11y/alt-text */
|
|
5
|
+
import { useForkRef } from '@material-ui/core'
|
|
6
|
+
import { LoaderValue, VALID_LOADERS } from 'next/dist/server/image-config'
|
|
7
|
+
import Head from 'next/head'
|
|
8
|
+
import type { ImageLoaderProps, ImageLoader } from 'next/image'
|
|
9
|
+
import React, { useEffect, useRef } from 'react'
|
|
10
|
+
import {
|
|
11
|
+
akamaiLoader,
|
|
12
|
+
cloudinaryLoader,
|
|
13
|
+
configDeviceSizes,
|
|
14
|
+
configImageSizes,
|
|
15
|
+
configLoader,
|
|
16
|
+
configPath,
|
|
17
|
+
DefaultImageLoaderProps,
|
|
18
|
+
defaultLoader,
|
|
19
|
+
imgixLoader,
|
|
20
|
+
} from '../config/config'
|
|
21
|
+
|
|
22
|
+
if (typeof window === 'undefined') {
|
|
23
|
+
// eslint-disable-next-line no-underscore-dangle
|
|
24
|
+
;(global as any).__NEXT_IMAGE_IMPORTED = true
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export type { ImageLoaderProps, ImageLoader }
|
|
28
|
+
|
|
29
|
+
const DEFAULT_SIZES: SizesRecord = { 0: '100vw', 1200: '50vw' }
|
|
30
|
+
|
|
31
|
+
const VALID_LOADING_VALUES = ['lazy', 'eager', undefined] as const
|
|
32
|
+
type LoadingValue = typeof VALID_LOADING_VALUES[number]
|
|
33
|
+
|
|
34
|
+
const loaders = new Map<LoaderValue, (props: DefaultImageLoaderProps) => string>([
|
|
35
|
+
['imgix', imgixLoader],
|
|
36
|
+
['cloudinary', cloudinaryLoader],
|
|
37
|
+
['akamai', akamaiLoader],
|
|
38
|
+
['default', defaultLoader],
|
|
39
|
+
])
|
|
40
|
+
|
|
41
|
+
const VALID_LAYOUT_VALUES = ['fill', 'responsive', 'intrinsic', 'fixed'] as const
|
|
42
|
+
type LayoutValue = 'fill' | 'fixed' | 'intrinsic' | 'responsive' | undefined
|
|
43
|
+
|
|
44
|
+
type PlaceholderValue = 'blur' | 'empty'
|
|
45
|
+
|
|
46
|
+
type ImgElementStyle = NonNullable<JSX.IntrinsicElements['img']['style']>
|
|
47
|
+
|
|
48
|
+
interface StaticImageData {
|
|
49
|
+
src: string
|
|
50
|
+
height: number
|
|
51
|
+
width: number
|
|
52
|
+
blurDataURL?: string
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
interface StaticRequire {
|
|
56
|
+
default: StaticImageData
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
type StaticImport = StaticRequire | StaticImageData
|
|
60
|
+
|
|
61
|
+
export function isStaticRequire(src: StaticRequire | StaticImageData): src is StaticRequire {
|
|
62
|
+
return (src as StaticRequire).default !== undefined
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function isStaticImageData(src: StaticRequire | StaticImageData): src is StaticImageData {
|
|
66
|
+
return (src as StaticImageData).src !== undefined
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function isStaticImport(src: string | StaticImport): src is StaticImport {
|
|
70
|
+
return typeof src === 'object' && (isStaticRequire(src) || isStaticImageData(src))
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// sort smallest to largest
|
|
74
|
+
const allSizes = [...configDeviceSizes, ...configImageSizes]
|
|
75
|
+
configDeviceSizes.sort((a, b) => a - b)
|
|
76
|
+
allSizes.sort((a, b) => a - b)
|
|
77
|
+
|
|
78
|
+
function getWidths(
|
|
79
|
+
width: number | undefined,
|
|
80
|
+
layout: LayoutValue,
|
|
81
|
+
sizes = '',
|
|
82
|
+
): { widths: number[]; kind: 'w' | 'x' } {
|
|
83
|
+
if ((sizes && layout === 'fill') || layout === 'responsive') {
|
|
84
|
+
// Find all the "vw" percent sizes used in the sizes prop
|
|
85
|
+
const viewportWidthRe = /(^|\s)(1?\d?\d)vw/g
|
|
86
|
+
const percentSizes: number[] = []
|
|
87
|
+
// eslint-disable-next-line no-cond-assign
|
|
88
|
+
for (let match: string[] | null; (match = viewportWidthRe.exec(sizes)); match) {
|
|
89
|
+
percentSizes.push(parseInt(match?.[2], 10))
|
|
90
|
+
}
|
|
91
|
+
if (percentSizes.length) {
|
|
92
|
+
const smallestRatio = Math.min(...percentSizes) * 0.01
|
|
93
|
+
|
|
94
|
+
return {
|
|
95
|
+
widths: allSizes.filter((s) => s >= configDeviceSizes[0] * smallestRatio),
|
|
96
|
+
kind: 'w',
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
return { widths: allSizes, kind: 'w' }
|
|
101
|
+
}
|
|
102
|
+
if (typeof width !== 'number' || layout === 'fill') {
|
|
103
|
+
return { widths: configDeviceSizes, kind: 'w' }
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
const widths = [
|
|
107
|
+
...new Set(
|
|
108
|
+
// > This means that most OLED screens that say they are 3x resolution,
|
|
109
|
+
// > are actually 3x in the green color, but only 1.5x in the red and
|
|
110
|
+
// > blue colors. Showing a 3x resolution image in the app vs a 2x
|
|
111
|
+
// > resolution image will be visually the same, though the 3x image
|
|
112
|
+
// > takes significantly more data. Even true 3x resolution screens are
|
|
113
|
+
// > wasteful as the human eye cannot see that level of detail without
|
|
114
|
+
// > something like a magnifying glass.
|
|
115
|
+
// https://blog.twitter.com/engineering/en_us/topics/infrastructure/2019/capping-image-fidelity-on-ultra-high-resolution-devices.html
|
|
116
|
+
[width, width * 2 /* , width * 3*/].map(
|
|
117
|
+
(w) => allSizes.find((p) => p >= w) || allSizes[allSizes.length - 1],
|
|
118
|
+
),
|
|
119
|
+
),
|
|
120
|
+
]
|
|
121
|
+
return { widths, kind: 'x' }
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
type GenImgAttrsData = {
|
|
125
|
+
src: string
|
|
126
|
+
layout: LayoutValue
|
|
127
|
+
loader: ImageLoader
|
|
128
|
+
width?: number
|
|
129
|
+
quality?: number
|
|
130
|
+
sizes: string
|
|
131
|
+
scale: number
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
function generateSrcSet({
|
|
135
|
+
src,
|
|
136
|
+
layout,
|
|
137
|
+
width,
|
|
138
|
+
quality = 52,
|
|
139
|
+
sizes,
|
|
140
|
+
loader,
|
|
141
|
+
scale,
|
|
142
|
+
}: GenImgAttrsData): string {
|
|
143
|
+
const { widths, kind } = getWidths(width, layout, sizes)
|
|
144
|
+
|
|
145
|
+
return widths
|
|
146
|
+
.map(
|
|
147
|
+
(w, i) =>
|
|
148
|
+
`${loader({ src, quality, width: w })} ${
|
|
149
|
+
kind === 'w' ? Math.round(w * scale) : i + 1
|
|
150
|
+
}${kind}`,
|
|
151
|
+
)
|
|
152
|
+
.join(', ')
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
function defaultImageLoader(loaderProps: ImageLoaderProps) {
|
|
156
|
+
const load = loaders.get(configLoader)
|
|
157
|
+
if (load) {
|
|
158
|
+
return load({ root: configPath, ...loaderProps })
|
|
159
|
+
}
|
|
160
|
+
throw new Error(
|
|
161
|
+
`[@graphcommerce/image]: Unknown "loader" found in "next.config.js". Expected: ${VALID_LOADERS.join(
|
|
162
|
+
', ',
|
|
163
|
+
)}. Received: ${configLoader}`,
|
|
164
|
+
)
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
type SizesString =
|
|
168
|
+
| `${number}vw`
|
|
169
|
+
| `${number}px`
|
|
170
|
+
// https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Functions#math_functions
|
|
171
|
+
| `calc(${string})`
|
|
172
|
+
| `min(${string})`
|
|
173
|
+
| `max(${string})`
|
|
174
|
+
| `clamp(${string})`
|
|
175
|
+
type SizesRecord = Record<number, SizesString>
|
|
176
|
+
type Sizes = SizesString | SizesRecord | undefined
|
|
177
|
+
|
|
178
|
+
function isSizesRecord(sizes?: Sizes): sizes is SizesRecord {
|
|
179
|
+
return typeof sizes === 'object'
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
function sizesEntries(sizes: Sizes): (readonly [number, SizesString | undefined])[] {
|
|
183
|
+
if (isSizesRecord(sizes)) {
|
|
184
|
+
return Object.entries(sizes)
|
|
185
|
+
.map(([breakpoint, size]) => [Number(breakpoint), size] as const)
|
|
186
|
+
.sort(([sizeA], [sizeB]) => sizeB - sizeA)
|
|
187
|
+
}
|
|
188
|
+
return [[0, sizes] as const]
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
function generateSizesString(sizes?: Sizes) {
|
|
192
|
+
return sizesEntries(sizes)
|
|
193
|
+
.map(([breakpoint, size]) => {
|
|
194
|
+
if (breakpoint === 0) return size
|
|
195
|
+
return `(min-width: ${breakpoint}px) ${size}`
|
|
196
|
+
})
|
|
197
|
+
.join(', ')
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/** Since we're handling stuff ourselves we omit some stuff */
|
|
201
|
+
type IntrisincImage = Omit<
|
|
202
|
+
JSX.IntrinsicElements['img'],
|
|
203
|
+
'src' | 'srcSet' | 'ref' | 'width' | 'height' | 'loading' | 'sizes' | 'width' | 'height'
|
|
204
|
+
> & { loading?: LoadingValue }
|
|
205
|
+
|
|
206
|
+
export type ImageProps = IntrisincImage & {
|
|
207
|
+
src: StaticImport | string
|
|
208
|
+
blurDataURL?: string
|
|
209
|
+
loader?: ImageLoader
|
|
210
|
+
quality?: number
|
|
211
|
+
unoptimized?: boolean
|
|
212
|
+
dontReportWronglySizedImages?: boolean
|
|
213
|
+
width?: number
|
|
214
|
+
height?: number
|
|
215
|
+
pictureProps?: JSX.IntrinsicElements['picture']
|
|
216
|
+
/**
|
|
217
|
+
* Possible values:
|
|
218
|
+
*
|
|
219
|
+
* - `fixed`: the image dimensions will not change as the viewport changes (no responsiveness)
|
|
220
|
+
* similar to the native img element.
|
|
221
|
+
* - `intrinsic`: the image will scale the dimensions down for smaller viewports but maintain the
|
|
222
|
+
* original dimensions (the width and height given) for larger viewports.
|
|
223
|
+
* - `responsive`: the image will scale the dimensions down for smaller viewports and scale up for
|
|
224
|
+
* larger viewports.
|
|
225
|
+
*/
|
|
226
|
+
layout?: LayoutValue
|
|
227
|
+
|
|
228
|
+
placeholder?: PlaceholderValue
|
|
229
|
+
/** Size the image is rendered on mobile */
|
|
230
|
+
sizes?: SizesString | SizesRecord
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
const Image = React.forwardRef<HTMLImageElement, ImageProps>(
|
|
234
|
+
(
|
|
235
|
+
{
|
|
236
|
+
src,
|
|
237
|
+
sizes: sizesIncomming,
|
|
238
|
+
unoptimized = false,
|
|
239
|
+
loading,
|
|
240
|
+
layout = 'responsive',
|
|
241
|
+
quality,
|
|
242
|
+
width,
|
|
243
|
+
height,
|
|
244
|
+
style,
|
|
245
|
+
loader = defaultImageLoader,
|
|
246
|
+
placeholder = 'empty',
|
|
247
|
+
blurDataURL,
|
|
248
|
+
dontReportWronglySizedImages,
|
|
249
|
+
pictureProps,
|
|
250
|
+
...imgProps
|
|
251
|
+
},
|
|
252
|
+
forwardedRef,
|
|
253
|
+
) => {
|
|
254
|
+
const ref = useRef<HTMLImageElement>(null)
|
|
255
|
+
const combinedRef = useForkRef(ref, forwardedRef)
|
|
256
|
+
|
|
257
|
+
const sizesOrig =
|
|
258
|
+
layout === 'fixed' && width && !sizesIncomming
|
|
259
|
+
? (`${width}px` as SizesString)
|
|
260
|
+
: sizesIncomming
|
|
261
|
+
|
|
262
|
+
const sizes = generateSizesString(sizesOrig) || generateSizesString(DEFAULT_SIZES)
|
|
263
|
+
|
|
264
|
+
useEffect(() => {
|
|
265
|
+
if (process.env.NODE_ENV === 'production') return () => {}
|
|
266
|
+
if (!ref.current || unoptimized || dontReportWronglySizedImages) return () => {}
|
|
267
|
+
|
|
268
|
+
function getContainedSize(img: HTMLImageElement) {
|
|
269
|
+
let ratio = img.naturalWidth / img.naturalHeight
|
|
270
|
+
let w = img.height * ratio
|
|
271
|
+
let h = img.height
|
|
272
|
+
if (w > img.width) {
|
|
273
|
+
w = img.width
|
|
274
|
+
h = img.width / ratio
|
|
275
|
+
}
|
|
276
|
+
return [w, h]
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
function reportSizes(img: HTMLImageElement) {
|
|
280
|
+
let ratio: number
|
|
281
|
+
|
|
282
|
+
const reportedSize = img.clientWidth
|
|
283
|
+
|
|
284
|
+
if (reportedSize === 0) return
|
|
285
|
+
|
|
286
|
+
let msg = ''
|
|
287
|
+
const sizesEntr = sizesOrig ? sizesEntries(sizesOrig) : sizesEntries(DEFAULT_SIZES)
|
|
288
|
+
const matched = sizesEntr.find(([s]) =>
|
|
289
|
+
s === 0 ? true : window.matchMedia(`(min-width: ${s}px)`).matches,
|
|
290
|
+
)
|
|
291
|
+
|
|
292
|
+
const breakpoint = matched?.[0] ?? 0
|
|
293
|
+
const size = matched?.[1]
|
|
294
|
+
|
|
295
|
+
const el = document.createElement('div')
|
|
296
|
+
el.setAttribute('style', `width: ${size}`)
|
|
297
|
+
document.body.appendChild(el)
|
|
298
|
+
const measuredWidth = el.getBoundingClientRect().width
|
|
299
|
+
el.remove()
|
|
300
|
+
ratio = measuredWidth ** 2 / reportedSize ** 2
|
|
301
|
+
msg += `Image's "sizes" value '${
|
|
302
|
+
breakpoint > 0 ? `min-width(${breakpoint}px) ` : ''
|
|
303
|
+
}${size}' is incorrect.`
|
|
304
|
+
|
|
305
|
+
const isSmall = measuredWidth < 50 && reportedSize < 50
|
|
306
|
+
|
|
307
|
+
const round = (nr: number) => Math.round(nr * 100) / 100
|
|
308
|
+
if (!isSmall && ratio > 2) {
|
|
309
|
+
console.warn(
|
|
310
|
+
`[@graphcommerce/image]: ${msg} Currently downloading an image that has ${round(
|
|
311
|
+
ratio,
|
|
312
|
+
)}x too many pixels`,
|
|
313
|
+
img,
|
|
314
|
+
)
|
|
315
|
+
} else if (!isSmall && 1 / ratio > 2) {
|
|
316
|
+
console.warn(
|
|
317
|
+
`[@graphcommerce/image]: ${msg} Currently downloading an image that has ${round(
|
|
318
|
+
1 / ratio,
|
|
319
|
+
)}x too few pixels`,
|
|
320
|
+
img,
|
|
321
|
+
)
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
// Warn the user when he isn't providing sizes and how to proceed
|
|
326
|
+
const ro = new ResizeObserver(([entry]) => {
|
|
327
|
+
const img = entry.target as HTMLImageElement
|
|
328
|
+
if (img.naturalWidth) reportSizes(img)
|
|
329
|
+
img.onload = () => reportSizes(img)
|
|
330
|
+
})
|
|
331
|
+
ro.observe(ref.current)
|
|
332
|
+
|
|
333
|
+
return () => ro.disconnect()
|
|
334
|
+
}, [layout, ref, unoptimized, sizesOrig, src, width, dontReportWronglySizedImages])
|
|
335
|
+
|
|
336
|
+
let staticSrc = ''
|
|
337
|
+
if (isStaticImport(src)) {
|
|
338
|
+
const staticImageData = isStaticRequire(src) ? src.default : src
|
|
339
|
+
if (!staticImageData.src) {
|
|
340
|
+
throw new Error(
|
|
341
|
+
`[@graphcommerce/image]: An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received ${JSON.stringify(
|
|
342
|
+
staticImageData,
|
|
343
|
+
)}`,
|
|
344
|
+
)
|
|
345
|
+
}
|
|
346
|
+
blurDataURL = blurDataURL || staticImageData.blurDataURL
|
|
347
|
+
staticSrc = staticImageData.src
|
|
348
|
+
if (!layout || layout !== 'fill') {
|
|
349
|
+
height = height || staticImageData.height
|
|
350
|
+
width = width || staticImageData.width
|
|
351
|
+
if (!staticImageData.height || !staticImageData.width) {
|
|
352
|
+
throw new Error(
|
|
353
|
+
`[@graphcommerce/image]: An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received ${JSON.stringify(
|
|
354
|
+
staticImageData,
|
|
355
|
+
)}`,
|
|
356
|
+
)
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
src = typeof src === 'string' ? src : staticSrc
|
|
361
|
+
|
|
362
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
363
|
+
if (!src) {
|
|
364
|
+
throw new Error(
|
|
365
|
+
`[@graphcommerce/image]: Image is missing required "src" property. Make sure you pass "src" in props to the \`@graphcommerce/image\` component. Received: ${JSON.stringify(
|
|
366
|
+
{ width, height, quality },
|
|
367
|
+
)}`,
|
|
368
|
+
)
|
|
369
|
+
}
|
|
370
|
+
if (!VALID_LAYOUT_VALUES.includes(layout)) {
|
|
371
|
+
throw new Error(
|
|
372
|
+
`[@graphcommerce/image]: Image with src "${src}" has invalid "layout" property. Provided "${layout}" should be one of ${VALID_LAYOUT_VALUES.map(
|
|
373
|
+
String,
|
|
374
|
+
).join(',')}.`,
|
|
375
|
+
)
|
|
376
|
+
}
|
|
377
|
+
if (
|
|
378
|
+
(typeof width !== 'undefined' && Number.isNaN(width)) ||
|
|
379
|
+
(typeof height !== 'undefined' && Number.isNaN(height))
|
|
380
|
+
) {
|
|
381
|
+
throw new Error(
|
|
382
|
+
`[@graphcommerce/image]: Image with src "${src}" has invalid "width" or "height" property. These should be numeric values.`,
|
|
383
|
+
)
|
|
384
|
+
}
|
|
385
|
+
if (!VALID_LOADING_VALUES.includes(loading)) {
|
|
386
|
+
throw new Error(
|
|
387
|
+
`[@graphcommerce/image]: Image with src "${src}" has invalid "loading" property. Provided "${loading}" should be one of ${VALID_LOADING_VALUES.map(
|
|
388
|
+
String,
|
|
389
|
+
).join(',')}.`,
|
|
390
|
+
)
|
|
391
|
+
}
|
|
392
|
+
if (placeholder === 'blur') {
|
|
393
|
+
if (layout !== 'fill' && (width || 0) * (height || 0) < 1600) {
|
|
394
|
+
console.warn(
|
|
395
|
+
`[@graphcommerce/image]: Image with src "${src}" is smaller than 40x40. Consider removing the "placeholder='blur'" property to improve performance.`,
|
|
396
|
+
)
|
|
397
|
+
}
|
|
398
|
+
if (!blurDataURL) {
|
|
399
|
+
const VALID_BLUR_EXT = ['jpeg', 'png', 'webp'] // should match next-image-loader
|
|
400
|
+
|
|
401
|
+
throw new Error(
|
|
402
|
+
`[@graphcommerce/image]: Image with src "${src}" has "placeholder='blur'" property but is missing the "blurDataURL" property.
|
|
403
|
+
Possible solutions:
|
|
404
|
+
- Add a "blurDataURL" property, the contents should be a small Data URL to represent the image
|
|
405
|
+
- Change the "src" property to a static import with one of the supported file types: ${VALID_BLUR_EXT.join(
|
|
406
|
+
',',
|
|
407
|
+
)}
|
|
408
|
+
- Remove the "placeholder" property, effectively no blur effect
|
|
409
|
+
Read more: https://nextjs.org/docs/messages/placeholder-blur-data-url`,
|
|
410
|
+
)
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
if (typeof width === 'undefined' && typeof height === 'undefined') {
|
|
416
|
+
if (layout === 'fill') {
|
|
417
|
+
// handle fill
|
|
418
|
+
} else if (process.env.NODE_ENV !== 'production') {
|
|
419
|
+
// <Image src="i.png" />
|
|
420
|
+
throw new Error(
|
|
421
|
+
`[@graphcommerce/image]: Image with src "${src}" must use "width" and "height" properties or "layout='fill'" property.`,
|
|
422
|
+
)
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs
|
|
427
|
+
if (src?.startsWith('data:') || src?.startsWith('blob:')) unoptimized = true
|
|
428
|
+
|
|
429
|
+
const srcSet3x = generateSrcSet({ src, layout, loader, quality, sizes, width, scale: 1.5 })
|
|
430
|
+
const srcSet2x = generateSrcSet({ src, layout, loader, quality, sizes, width, scale: 1 })
|
|
431
|
+
const srcSet1x = generateSrcSet({ src, layout, loader, quality, sizes, width, scale: 0.5 })
|
|
432
|
+
|
|
433
|
+
if (layout !== 'fixed' && !style) style = {}
|
|
434
|
+
if (layout === 'responsive') style = { ...style, width: '100%', height: 'auto' }
|
|
435
|
+
if (layout === 'intrinsic') style = { ...style, width: '100%', height: 'auto', maxWidth: width }
|
|
436
|
+
if (layout === 'fill') style = { ...style, width: '100%', height: '100%' }
|
|
437
|
+
|
|
438
|
+
return (
|
|
439
|
+
<>
|
|
440
|
+
{unoptimized ? (
|
|
441
|
+
<img
|
|
442
|
+
ref={combinedRef}
|
|
443
|
+
{...imgProps}
|
|
444
|
+
loading={loading ?? 'lazy'}
|
|
445
|
+
src={src}
|
|
446
|
+
width={width}
|
|
447
|
+
height={height}
|
|
448
|
+
data-nimg
|
|
449
|
+
style={style}
|
|
450
|
+
/>
|
|
451
|
+
) : (
|
|
452
|
+
<picture {...pictureProps}>
|
|
453
|
+
<source media='(-webkit-min-device-pixel-ratio: 2.5)' srcSet={srcSet3x} sizes={sizes} />
|
|
454
|
+
<source media='(-webkit-min-device-pixel-ratio: 1.5)' srcSet={srcSet2x} sizes={sizes} />
|
|
455
|
+
<source
|
|
456
|
+
media='(-webkit-max-device-pixel-ratio: 1.49)'
|
|
457
|
+
srcSet={srcSet1x}
|
|
458
|
+
sizes={sizes}
|
|
459
|
+
/>
|
|
460
|
+
<img
|
|
461
|
+
ref={combinedRef}
|
|
462
|
+
{...imgProps}
|
|
463
|
+
src={src}
|
|
464
|
+
loading={loading ?? 'lazy'}
|
|
465
|
+
width={width}
|
|
466
|
+
height={height}
|
|
467
|
+
style={style}
|
|
468
|
+
sizes={sizes}
|
|
469
|
+
data-nimg
|
|
470
|
+
decoding='async'
|
|
471
|
+
/>
|
|
472
|
+
</picture>
|
|
473
|
+
)}
|
|
474
|
+
{loading === 'eager' && (
|
|
475
|
+
<Head>
|
|
476
|
+
{unoptimized ? (
|
|
477
|
+
<link key={`__nimg-unoptimized-${src}`} rel='preload' as='image' href={src} />
|
|
478
|
+
) : (
|
|
479
|
+
<>
|
|
480
|
+
<link
|
|
481
|
+
key={`img-${srcSet3x}${sizes}`}
|
|
482
|
+
rel='preload'
|
|
483
|
+
as='image'
|
|
484
|
+
media='(-webkit-min-device-pixel-ratio: 2.5)'
|
|
485
|
+
// @ts-expect-error imagesrcset/imagesizes is not yet in the link element type.
|
|
486
|
+
imagesrcset={srcSet3x}
|
|
487
|
+
imagesizes={sizes}
|
|
488
|
+
/>
|
|
489
|
+
<link
|
|
490
|
+
key={`img-${srcSet2x}${sizes}`}
|
|
491
|
+
rel='preload'
|
|
492
|
+
as='image'
|
|
493
|
+
media='(-webkit-min-device-pixel-ratio: 1.5) and (-webkit-max-device-pixel-ratio: 2.49)'
|
|
494
|
+
// @ts-expect-error imagesrcset/imagesizes is not yet in the link element type.
|
|
495
|
+
imagesrcset={srcSet2x}
|
|
496
|
+
imagesizes={sizes}
|
|
497
|
+
/>
|
|
498
|
+
<link
|
|
499
|
+
key={`img-${srcSet1x}${sizes}`}
|
|
500
|
+
rel='preload'
|
|
501
|
+
as='image'
|
|
502
|
+
media='(-webkit-max-device-pixel-ratio: 1.49)'
|
|
503
|
+
// @ts-expect-error imagesrcset/imagesizes is not yet in the link element type.
|
|
504
|
+
imagesrcset={srcSet1x}
|
|
505
|
+
imagesizes={sizes}
|
|
506
|
+
/>
|
|
507
|
+
</>
|
|
508
|
+
)}
|
|
509
|
+
</Head>
|
|
510
|
+
)}
|
|
511
|
+
</>
|
|
512
|
+
)
|
|
513
|
+
},
|
|
514
|
+
)
|
|
515
|
+
Image.displayName = 'Image'
|
|
516
|
+
|
|
517
|
+
export { Image }
|