@shopify/shop-minis-react 0.1.4 → 0.1.6
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/_virtual/index7.js +2 -3
- package/dist/_virtual/index7.js.map +1 -1
- package/dist/_virtual/index8.js +3 -2
- package/dist/_virtual/index8.js.map +1 -1
- package/dist/components/atoms/list.js +110 -48
- package/dist/components/atoms/list.js.map +1 -1
- package/dist/components/commerce/add-to-cart.js +82 -0
- package/dist/components/commerce/add-to-cart.js.map +1 -0
- package/dist/components/{atoms → commerce}/favorite-button.js +1 -1
- package/dist/components/commerce/favorite-button.js.map +1 -0
- package/dist/components/commerce/product-card.js +10 -10
- package/dist/components/commerce/product-card.js.map +1 -1
- package/dist/components/commerce/product-link.js +6 -6
- package/dist/components/commerce/product-link.js.map +1 -1
- package/dist/components/commerce/search.js +73 -77
- package/dist/components/commerce/search.js.map +1 -1
- package/dist/components/ui/accordion.js +1 -1
- package/dist/components/ui/alert-dialog.js +1 -1
- package/dist/components/ui/avatar.js +1 -1
- package/dist/components/ui/checkbox.js +1 -1
- package/dist/components/ui/dialog.js +1 -1
- package/dist/components/ui/label.js +1 -1
- package/dist/components/ui/progress.js +1 -1
- package/dist/components/ui/radio-group.js +1 -1
- package/dist/components/ui/scroll-area.js +1 -1
- package/dist/components/ui/select.js +1 -1
- package/dist/components/ui/separator.js +1 -1
- package/dist/components/ui/sheet.js +1 -1
- package/dist/index.js +276 -274
- package/dist/index.js.map +1 -1
- package/dist/internal/components/refresh-indicator.js +83 -0
- package/dist/internal/components/refresh-indicator.js.map +1 -0
- package/dist/internal/usePullToRefresh.js +149 -0
- package/dist/internal/usePullToRefresh.js.map +1 -0
- package/dist/internal/utils/virtuoso-dom.js +20 -0
- package/dist/internal/utils/virtuoso-dom.js.map +1 -0
- package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-accordion@1.2.11_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@19_krqvbhitcyb3vl2jzw3fp35uhu → @radix-ui_react-accordion@1.2.11_@types_react-dom@19.1.6_@types_react@19.1.6__@types_re_c181f188656cfa5f16c2710ccd54e5dd}/node_modules/@radix-ui/react-accordion/dist/index.js +3 -3
- package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-accordion@1.2.11_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@19_krqvbhitcyb3vl2jzw3fp35uhu → @radix-ui_react-accordion@1.2.11_@types_react-dom@19.1.6_@types_react@19.1.6__@types_re_c181f188656cfa5f16c2710ccd54e5dd}/node_modules/@radix-ui/react-accordion/dist/index.js.map +1 -1
- package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-alert-dialog@1.1.14_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react_5smkpul3xqqoqjowwwfk226yey → @radix-ui_react-alert-dialog@1.1.14_@types_react-dom@19.1.6_@types_react@19.1.6__@types_285ea9ce18742a8c4e84cbcde06e0b25}/node_modules/@radix-ui/react-alert-dialog/dist/index.js +1 -1
- package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-alert-dialog@1.1.14_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react_5smkpul3xqqoqjowwwfk226yey → @radix-ui_react-alert-dialog@1.1.14_@types_react-dom@19.1.6_@types_react@19.1.6__@types_285ea9ce18742a8c4e84cbcde06e0b25}/node_modules/@radix-ui/react-alert-dialog/dist/index.js.map +1 -1
- package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-arrow@1.1.7_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@19.1.6__tqbcahbocnte57ax4r75bgnpei → @radix-ui_react-arrow@1.1.7_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@1_37a4d12c56f285a88c8895f81bd600a0}/node_modules/@radix-ui/react-arrow/dist/index.js +1 -1
- package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-arrow@1.1.7_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@19.1.6__tqbcahbocnte57ax4r75bgnpei → @radix-ui_react-arrow@1.1.7_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@1_37a4d12c56f285a88c8895f81bd600a0}/node_modules/@radix-ui/react-arrow/dist/index.js.map +1 -1
- package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-avatar@1.1.10_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@19.1._hkz57sehyui4ndfh3rsqwxftli → @radix-ui_react-avatar@1.1.10_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react_06170eb4026a170071caea5f0c82612e}/node_modules/@radix-ui/react-avatar/dist/index.js +1 -1
- package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-avatar@1.1.10_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@19.1._hkz57sehyui4ndfh3rsqwxftli → @radix-ui_react-avatar@1.1.10_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react_06170eb4026a170071caea5f0c82612e}/node_modules/@radix-ui/react-avatar/dist/index.js.map +1 -1
- package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-checkbox@1.3.2_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@19.1_wopssf2yyhcdxk6apqq3fxlekq → @radix-ui_react-checkbox@1.3.2_@types_react-dom@19.1.6_@types_react@19.1.6__@types_reac_76c2d9960806d267f7566af463150dec}/node_modules/@radix-ui/react-checkbox/dist/index.js +2 -2
- package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-checkbox@1.3.2_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@19.1_wopssf2yyhcdxk6apqq3fxlekq → @radix-ui_react-checkbox@1.3.2_@types_react-dom@19.1.6_@types_react@19.1.6__@types_reac_76c2d9960806d267f7566af463150dec}/node_modules/@radix-ui/react-checkbox/dist/index.js.map +1 -1
- package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-collapsible@1.1.11_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@_4e7bghgww3y6lafncm5x7ie54a → @radix-ui_react-collapsible@1.1.11_@types_react-dom@19.1.6_@types_react@19.1.6__@types__4a84ef457ec365b76d5b35ae363501b4}/node_modules/@radix-ui/react-collapsible/dist/index.js +2 -2
- package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-collapsible@1.1.11_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@_4e7bghgww3y6lafncm5x7ie54a → @radix-ui_react-collapsible@1.1.11_@types_react-dom@19.1.6_@types_react@19.1.6__@types__4a84ef457ec365b76d5b35ae363501b4}/node_modules/@radix-ui/react-collapsible/dist/index.js.map +1 -1
- package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-collection@1.1.7_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@19_5kif5qsljjcymh5vn5h26ovoye → @radix-ui_react-collection@1.1.7_@types_react-dom@19.1.6_@types_react@19.1.6__@types_re_773c2f41d00caf3f92b3d7605949da61}/node_modules/@radix-ui/react-collection/dist/index.js.map +1 -1
- package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-dialog@1.1.14_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@19.1._sjczexpvrqz6fttoobpwnns2oa → @radix-ui_react-dialog@1.1.14_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react_00050fb27f6e4250402df169ba62a563}/node_modules/@radix-ui/react-dialog/dist/index.js +5 -5
- package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-dialog@1.1.14_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@19.1._sjczexpvrqz6fttoobpwnns2oa → @radix-ui_react-dialog@1.1.14_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react_00050fb27f6e4250402df169ba62a563}/node_modules/@radix-ui/react-dialog/dist/index.js.map +1 -1
- package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-dismissable-layer@1.1.10_@types_react-dom@19.1.6_@types_react@19.1.6__@types__ipor64qsap4jnr6m7nflv4q5v4 → @radix-ui_react-dismissable-layer@1.1.10_@types_react-dom@19.1.6_@types_react@19.1.6__@_4b09e0704ece360f13e36cbb3765ea47}/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +1 -1
- package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-dismissable-layer@1.1.10_@types_react-dom@19.1.6_@types_react@19.1.6__@types__ipor64qsap4jnr6m7nflv4q5v4 → @radix-ui_react-dismissable-layer@1.1.10_@types_react-dom@19.1.6_@types_react@19.1.6__@_4b09e0704ece360f13e36cbb3765ea47}/node_modules/@radix-ui/react-dismissable-layer/dist/index.js.map +1 -1
- package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-focus-scope@1.1.7_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@1_zpdtvgogfsfavk62phevpdv4fu → @radix-ui_react-focus-scope@1.1.7_@types_react-dom@19.1.6_@types_react@19.1.6__@types_r_b37fcafba5387ffb2fedae9e4476c837}/node_modules/@radix-ui/react-focus-scope/dist/index.js +1 -1
- package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-focus-scope@1.1.7_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@1_zpdtvgogfsfavk62phevpdv4fu → @radix-ui_react-focus-scope@1.1.7_@types_react-dom@19.1.6_@types_react@19.1.6__@types_r_b37fcafba5387ffb2fedae9e4476c837}/node_modules/@radix-ui/react-focus-scope/dist/index.js.map +1 -1
- package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-label@2.1.7_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@19.1.6__a5hm3akpfjy2hepxrptadu7t6e → @radix-ui_react-label@2.1.7_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@1_85b8c95b65bf0dd4cc21629f4084a5b6}/node_modules/@radix-ui/react-label/dist/index.js +1 -1
- package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-label@2.1.7_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@19.1.6__a5hm3akpfjy2hepxrptadu7t6e → @radix-ui_react-label@2.1.7_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@1_85b8c95b65bf0dd4cc21629f4084a5b6}/node_modules/@radix-ui/react-label/dist/index.js.map +1 -1
- package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-popper@1.2.7_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@19.1.6_2sktqq4blwmd3t7e5jqffehtuu → @radix-ui_react-popper@1.2.7_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@_7f041a511b7212d213e8dcc35ea98be2}/node_modules/@radix-ui/react-popper/dist/index.js +2 -2
- package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-popper@1.2.7_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@19.1.6_2sktqq4blwmd3t7e5jqffehtuu → @radix-ui_react-popper@1.2.7_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@_7f041a511b7212d213e8dcc35ea98be2}/node_modules/@radix-ui/react-popper/dist/index.js.map +1 -1
- package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-portal@1.1.9_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@19.1.6_sr45arufxpp6hzdn2l7kcrtvqe → @radix-ui_react-portal@1.1.9_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@_dbd1c487dbf0f36d89874abfade43936}/node_modules/@radix-ui/react-portal/dist/index.js +1 -1
- package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-portal@1.1.9_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@19.1.6_sr45arufxpp6hzdn2l7kcrtvqe → @radix-ui_react-portal@1.1.9_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@_dbd1c487dbf0f36d89874abfade43936}/node_modules/@radix-ui/react-portal/dist/index.js.map +1 -1
- package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-presence@1.1.4_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@19.1_5ga5lr7i6zouk7rhd63vbsmjyu → @radix-ui_react-presence@1.1.4_@types_react-dom@19.1.6_@types_react@19.1.6__@types_reac_14564cac32122309a7cc56096494b6e8}/node_modules/@radix-ui/react-presence/dist/index.js.map +1 -1
- package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-primitive@2.1.3_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@19._5iu4xtybujtep4zwi6jviky6tu → @radix-ui_react-primitive@2.1.3_@types_react-dom@19.1.6_@types_react@19.1.6__@types_rea_ec571b14c8dc7e1c1fa1383d9a1e10bd}/node_modules/@radix-ui/react-primitive/dist/index.js.map +1 -1
- package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-progress@1.1.7_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@19.1_psrnvm437duefd2y5sh3bqj3sm → @radix-ui_react-progress@1.1.7_@types_react-dom@19.1.6_@types_react@19.1.6__@types_reac_fa1ba230d1dfc5fe2a0cedd9ff78309e}/node_modules/@radix-ui/react-progress/dist/index.js +1 -1
- package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-progress@1.1.7_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@19.1_psrnvm437duefd2y5sh3bqj3sm → @radix-ui_react-progress@1.1.7_@types_react-dom@19.1.6_@types_react@19.1.6__@types_reac_fa1ba230d1dfc5fe2a0cedd9ff78309e}/node_modules/@radix-ui/react-progress/dist/index.js.map +1 -1
- package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-radio-group@1.3.7_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@1_b6vd3n6tkje342bk7jtbsrqyfe → @radix-ui_react-radio-group@1.3.7_@types_react-dom@19.1.6_@types_react@19.1.6__@types_r_4bdbb04c93e325d7f20e33cc8e004c83}/node_modules/@radix-ui/react-radio-group/dist/index.js +3 -3
- package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-radio-group@1.3.7_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@1_b6vd3n6tkje342bk7jtbsrqyfe → @radix-ui_react-radio-group@1.3.7_@types_react-dom@19.1.6_@types_react@19.1.6__@types_r_4bdbb04c93e325d7f20e33cc8e004c83}/node_modules/@radix-ui/react-radio-group/dist/index.js.map +1 -1
- package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-roving-focus@1.1.10_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react_g7ajeb2xgflky4nc3ccraxd5vi → @radix-ui_react-roving-focus@1.1.10_@types_react-dom@19.1.6_@types_react@19.1.6__@types_2d3f19e691372edf0bc25a87278ce401}/node_modules/@radix-ui/react-roving-focus/dist/index.js +2 -2
- package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-roving-focus@1.1.10_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react_g7ajeb2xgflky4nc3ccraxd5vi → @radix-ui_react-roving-focus@1.1.10_@types_react-dom@19.1.6_@types_react@19.1.6__@types_2d3f19e691372edf0bc25a87278ce401}/node_modules/@radix-ui/react-roving-focus/dist/index.js.map +1 -1
- package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-scroll-area@1.2.9_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@1_na6tcikkwmgt5sgxl6ezf7zaf4 → @radix-ui_react-scroll-area@1.2.9_@types_react-dom@19.1.6_@types_react@19.1.6__@types_r_b5d13464c21f88022505288dd3198025}/node_modules/@radix-ui/react-scroll-area/dist/index.js +2 -2
- package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-scroll-area@1.2.9_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@1_na6tcikkwmgt5sgxl6ezf7zaf4 → @radix-ui_react-scroll-area@1.2.9_@types_react-dom@19.1.6_@types_react@19.1.6__@types_r_b5d13464c21f88022505288dd3198025}/node_modules/@radix-ui/react-scroll-area/dist/index.js.map +1 -1
- package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-select@2.2.5_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@19.1.6_pvbs4vbfxc35gflcf62ix5b3oy → @radix-ui_react-select@2.2.5_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@_8c539485311b2ef067a182d5db805374}/node_modules/@radix-ui/react-select/dist/index.js +7 -7
- package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-select@2.2.5_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@19.1.6_pvbs4vbfxc35gflcf62ix5b3oy → @radix-ui_react-select@2.2.5_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@_8c539485311b2ef067a182d5db805374}/node_modules/@radix-ui/react-select/dist/index.js.map +1 -1
- package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-separator@1.1.7_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@19._v5c7fe2eicmnfbsit6liht3cja → @radix-ui_react-separator@1.1.7_@types_react-dom@19.1.6_@types_react@19.1.6__@types_rea_c3003570fa0d6f9943d03ab6b06417ce}/node_modules/@radix-ui/react-separator/dist/index.js +1 -1
- package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-separator@1.1.7_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@19._v5c7fe2eicmnfbsit6liht3cja → @radix-ui_react-separator@1.1.7_@types_react-dom@19.1.6_@types_react@19.1.6__@types_rea_c3003570fa0d6f9943d03ab6b06417ce}/node_modules/@radix-ui/react-separator/dist/index.js.map +1 -1
- package/dist/shop-minis-react/node_modules/.pnpm/@radix-ui_react-use-is-hydrated@0.1.0_@types_react@19.1.6_react@19.1.0/node_modules/@radix-ui/react-use-is-hydrated/dist/index.js +1 -1
- package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-visually-hidden@1.2.3_@types_react-dom@19.1.6_@types_react@19.1.6__@types_rea_3rnyx4jgemf4vn7spx7uohk4ne → @radix-ui_react-visually-hidden@1.2.3_@types_react-dom@19.1.6_@types_react@19.1.6__@typ_4a5a40fef19214ea28d77d9af27dab61}/node_modules/@radix-ui/react-visually-hidden/dist/index.js +1 -1
- package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-visually-hidden@1.2.3_@types_react-dom@19.1.6_@types_react@19.1.6__@types_rea_3rnyx4jgemf4vn7spx7uohk4ne → @radix-ui_react-visually-hidden@1.2.3_@types_react-dom@19.1.6_@types_react@19.1.6__@typ_4a5a40fef19214ea28d77d9af27dab61}/node_modules/@radix-ui/react-visually-hidden/dist/index.js.map +1 -1
- package/dist/shop-minis-react/node_modules/.pnpm/color-string@1.9.1/node_modules/color-string/index.js +1 -1
- package/dist/shop-minis-react/node_modules/.pnpm/motion@12.17.3_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/motion/dist/es/framer-motion/dist/es/components/AnimatePresence/PopChild.js +55 -0
- package/dist/shop-minis-react/node_modules/.pnpm/motion@12.17.3_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/motion/dist/es/framer-motion/dist/es/components/AnimatePresence/PopChild.js.map +1 -0
- package/dist/shop-minis-react/node_modules/.pnpm/motion@12.17.3_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/motion/dist/es/framer-motion/dist/es/components/AnimatePresence/PresenceChild.js +35 -0
- package/dist/shop-minis-react/node_modules/.pnpm/motion@12.17.3_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/motion/dist/es/framer-motion/dist/es/components/AnimatePresence/PresenceChild.js.map +1 -0
- package/dist/shop-minis-react/node_modules/.pnpm/motion@12.17.3_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/motion/dist/es/framer-motion/dist/es/components/AnimatePresence/index.js +46 -0
- package/dist/shop-minis-react/node_modules/.pnpm/motion@12.17.3_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/motion/dist/es/framer-motion/dist/es/components/AnimatePresence/index.js.map +1 -0
- package/dist/shop-minis-react/node_modules/.pnpm/motion@12.17.3_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/motion/dist/es/framer-motion/dist/es/components/AnimatePresence/utils.js +13 -0
- package/dist/shop-minis-react/node_modules/.pnpm/motion@12.17.3_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/motion/dist/es/framer-motion/dist/es/components/AnimatePresence/utils.js.map +1 -0
- package/dist/shop-minis-react/node_modules/.pnpm/react-virtuoso@4.14.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/react-virtuoso/dist/index.js +3132 -0
- package/dist/shop-minis-react/node_modules/.pnpm/react-virtuoso@4.14.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/react-virtuoso/dist/index.js.map +1 -0
- package/dist/shop-minis-react/node_modules/.pnpm/simple-swizzle@0.2.2/node_modules/simple-swizzle/index.js +1 -1
- package/dist/shop-minis-react/node_modules/.pnpm/use-sync-external-store@1.5.0_react@19.1.0/node_modules/use-sync-external-store/shim/index.js +1 -1
- package/dist/shop-minis-react/node_modules/.pnpm/vaul@1.1.2_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@19.1.6_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/vaul/dist/index.js +1 -1
- package/package.json +2 -2
- package/src/components/atoms/list.tsx +115 -66
- package/src/components/commerce/add-to-cart.test.tsx +73 -0
- package/src/components/commerce/add-to-cart.tsx +132 -0
- package/src/components/{atoms → commerce}/favorite-button.tsx +1 -1
- package/src/components/commerce/product-card.tsx +2 -1
- package/src/components/commerce/product-link.tsx +2 -1
- package/src/components/commerce/search.tsx +0 -6
- package/src/components/index.ts +2 -1
- package/src/internal/components/refresh-indicator.tsx +103 -0
- package/src/internal/usePullToRefresh.ts +286 -0
- package/src/internal/utils/virtuoso-dom.ts +26 -0
- package/src/stories/AddToCart.stories.tsx +186 -0
- package/src/stories/FavoriteButton.stories.tsx +2 -2
- package/src/stories/List.stories.tsx +0 -4
- package/src/stories/PullToRefreshList.stories.tsx +122 -0
- package/src/styles/animations.css +54 -0
- package/src/test-setup.ts +68 -0
- package/dist/components/atoms/favorite-button.js.map +0 -1
- package/dist/shop-minis-react/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js +0 -8
- package/dist/shop-minis-react/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js.map +0 -1
- package/dist/shop-minis-react/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js +0 -8
- package/dist/shop-minis-react/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js.map +0 -1
- package/dist/shop-minis-react/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js +0 -9
- package/dist/shop-minis-react/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js.map +0 -1
- package/dist/shop-minis-react/node_modules/.pnpm/memoize-one@5.2.1/node_modules/memoize-one/dist/memoize-one.esm.js +0 -28
- package/dist/shop-minis-react/node_modules/.pnpm/memoize-one@5.2.1/node_modules/memoize-one/dist/memoize-one.esm.js.map +0 -1
- package/dist/shop-minis-react/node_modules/.pnpm/react-window@1.8.11_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/react-window/dist/index.esm.js +0 -375
- package/dist/shop-minis-react/node_modules/.pnpm/react-window@1.8.11_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/react-window/dist/index.esm.js.map +0 -1
- /package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-collection@1.1.7_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@19_5kif5qsljjcymh5vn5h26ovoye → @radix-ui_react-collection@1.1.7_@types_react-dom@19.1.6_@types_react@19.1.6__@types_re_773c2f41d00caf3f92b3d7605949da61}/node_modules/@radix-ui/react-collection/dist/index.js +0 -0
- /package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-presence@1.1.4_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@19.1_5ga5lr7i6zouk7rhd63vbsmjyu → @radix-ui_react-presence@1.1.4_@types_react-dom@19.1.6_@types_react@19.1.6__@types_reac_14564cac32122309a7cc56096494b6e8}/node_modules/@radix-ui/react-presence/dist/index.js +0 -0
- /package/dist/shop-minis-react/node_modules/.pnpm/{@radix-ui_react-primitive@2.1.3_@types_react-dom@19.1.6_@types_react@19.1.6__@types_react@19._5iu4xtybujtep4zwi6jviky6tu → @radix-ui_react-primitive@2.1.3_@types_react-dom@19.1.6_@types_react@19.1.6__@types_rea_ec571b14c8dc7e1c1fa1383d9a1e10bd}/node_modules/@radix-ui/react-primitive/dist/index.js +0 -0
- /package/src/components/{atoms → commerce}/favorite-button.test.tsx +0 -0
package/src/test-setup.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import '@testing-library/jest-dom'
|
|
2
|
+
|
|
3
|
+
import React from 'react'
|
|
4
|
+
|
|
2
5
|
import {cleanup} from '@testing-library/react'
|
|
3
6
|
import {afterEach, vi} from 'vitest'
|
|
4
7
|
|
|
@@ -32,3 +35,68 @@ global.IntersectionObserver = vi.fn().mockImplementation(() => ({
|
|
|
32
35
|
thresholds: [],
|
|
33
36
|
takeRecords: vi.fn(),
|
|
34
37
|
}))
|
|
38
|
+
|
|
39
|
+
// Mock ResizeObserver (used by react-virtuoso)
|
|
40
|
+
global.ResizeObserver = vi.fn().mockImplementation(() => ({
|
|
41
|
+
observe: vi.fn(),
|
|
42
|
+
unobserve: vi.fn(),
|
|
43
|
+
disconnect: vi.fn(),
|
|
44
|
+
}))
|
|
45
|
+
|
|
46
|
+
// Set default window size for virtuoso calculations
|
|
47
|
+
Object.defineProperty(window, 'innerHeight', {
|
|
48
|
+
writable: true,
|
|
49
|
+
configurable: true,
|
|
50
|
+
value: 768,
|
|
51
|
+
})
|
|
52
|
+
|
|
53
|
+
Object.defineProperty(window, 'innerWidth', {
|
|
54
|
+
writable: true,
|
|
55
|
+
configurable: true,
|
|
56
|
+
value: 1024,
|
|
57
|
+
})
|
|
58
|
+
|
|
59
|
+
vi.mock('react-virtuoso', () => ({
|
|
60
|
+
Virtuoso: vi.fn().mockImplementation(props => {
|
|
61
|
+
const {data, itemContent, style, className, components, endReached} = props
|
|
62
|
+
const items = data || []
|
|
63
|
+
|
|
64
|
+
// Simulating virtualization
|
|
65
|
+
const maxVisibleItems = 20
|
|
66
|
+
const visibleItems = items.slice(0, maxVisibleItems)
|
|
67
|
+
|
|
68
|
+
React.useEffect(() => {
|
|
69
|
+
if (endReached && items.length >= maxVisibleItems) {
|
|
70
|
+
// Simulating reaching the end after a short delay
|
|
71
|
+
const timer = setTimeout(() => endReached(), 100)
|
|
72
|
+
return () => clearTimeout(timer)
|
|
73
|
+
}
|
|
74
|
+
return undefined
|
|
75
|
+
}, [endReached, items.length])
|
|
76
|
+
|
|
77
|
+
return React.createElement(
|
|
78
|
+
'div',
|
|
79
|
+
{
|
|
80
|
+
className,
|
|
81
|
+
style,
|
|
82
|
+
'data-testid': 'virtuoso-scroller',
|
|
83
|
+
'data-virtuoso-scroller': 'true',
|
|
84
|
+
'data-item-count': items.length,
|
|
85
|
+
'data-visible-items': visibleItems.length,
|
|
86
|
+
},
|
|
87
|
+
components?.Header && components.Header(),
|
|
88
|
+
React.createElement(
|
|
89
|
+
'div',
|
|
90
|
+
{'data-testid': 'virtuoso-item-list'},
|
|
91
|
+
visibleItems.map((item: any, index: number) =>
|
|
92
|
+
React.createElement(
|
|
93
|
+
'div',
|
|
94
|
+
{key: `virtuoso-item-${String(item?.id || index)}`},
|
|
95
|
+
itemContent?.(index, item)
|
|
96
|
+
)
|
|
97
|
+
)
|
|
98
|
+
),
|
|
99
|
+
components?.Footer && components.Footer()
|
|
100
|
+
)
|
|
101
|
+
}),
|
|
102
|
+
}))
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"favorite-button.js","sources":["../../../src/components/atoms/favorite-button.tsx"],"sourcesContent":["import {Heart} from 'lucide-react'\n\nimport {IconButton} from './icon-button'\n\nexport function FavoriteButton({\n onClick,\n filled = false,\n}: {\n onClick?: () => void\n filled?: boolean\n}) {\n return (\n <IconButton\n Icon={Heart}\n filled={filled}\n onClick={onClick}\n buttonStyles={\n filled ? 'bg-primary' : 'bg-button-overlay/30 backdrop-blur-sm'\n }\n />\n )\n}\n"],"names":["FavoriteButton","onClick","filled","jsx","IconButton","Heart"],"mappings":";;;AAIO,SAASA,EAAe;AAAA,EAC7B,SAAAC;AAAA,EACA,QAAAC,IAAS;AACX,GAGG;AAEC,SAAA,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,MAAMC;AAAA,MACN,QAAAH;AAAA,MACA,SAAAD;AAAA,MACA,cACEC,IAAS,eAAe;AAAA,IAAA;AAAA,EAE5B;AAEJ;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"assertThisInitialized.js","sources":["../../../../../../../../../../node_modules/.pnpm/@babel+runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js"],"sourcesContent":["function _assertThisInitialized(e) {\n if (void 0 === e) throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n return e;\n}\nexport { _assertThisInitialized as default };"],"names":["_assertThisInitialized"],"mappings":"AAAA,SAASA,EAAuB,GAAG;AACjC,MAAe,MAAX,OAAc,OAAM,IAAI,eAAe,2DAA2D;AACtG,SAAO;AACT;","x_google_ignoreList":[0]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"inheritsLoose.js","sources":["../../../../../../../../../../node_modules/.pnpm/@babel+runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js"],"sourcesContent":["import setPrototypeOf from \"./setPrototypeOf.js\";\nfunction _inheritsLoose(t, o) {\n t.prototype = Object.create(o.prototype), t.prototype.constructor = t, setPrototypeOf(t, o);\n}\nexport { _inheritsLoose as default };"],"names":["_inheritsLoose","t","o","setPrototypeOf"],"mappings":";AACA,SAASA,EAAeC,GAAGC,GAAG;AAC5B,EAAAD,EAAE,YAAY,OAAO,OAAOC,EAAE,SAAS,GAAGD,EAAE,UAAU,cAAcA,GAAGE,EAAeF,GAAGC,CAAC;AAC5F;","x_google_ignoreList":[0]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"setPrototypeOf.js","sources":["../../../../../../../../../../node_modules/.pnpm/@babel+runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js"],"sourcesContent":["function _setPrototypeOf(t, e) {\n return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {\n return t.__proto__ = e, t;\n }, _setPrototypeOf(t, e);\n}\nexport { _setPrototypeOf as default };"],"names":["_setPrototypeOf","t","e"],"mappings":"AAAA,SAASA,EAAgBC,GAAGC,GAAG;AAC7B,SAAOF,IAAkB,OAAO,iBAAiB,OAAO,eAAe,KAAM,IAAG,SAAU,GAAGE,GAAG;AAC9F,WAAO,EAAE,YAAYA,GAAG;AAAA,EAC5B,GAAKF,EAAgBC,GAAGC,CAAC;AACzB;","x_google_ignoreList":[0]}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
var s = Number.isNaN || function(r) {
|
|
2
|
-
return typeof r == "number" && r !== r;
|
|
3
|
-
};
|
|
4
|
-
function o(e, r) {
|
|
5
|
-
return !!(e === r || s(e) && s(r));
|
|
6
|
-
}
|
|
7
|
-
function g(e, r) {
|
|
8
|
-
if (e.length !== r.length)
|
|
9
|
-
return !1;
|
|
10
|
-
for (var t = 0; t < e.length; t++)
|
|
11
|
-
if (!o(e[t], r[t]))
|
|
12
|
-
return !1;
|
|
13
|
-
return !0;
|
|
14
|
-
}
|
|
15
|
-
function h(e, r) {
|
|
16
|
-
r === void 0 && (r = g);
|
|
17
|
-
var t, f = [], u, l = !1;
|
|
18
|
-
function i() {
|
|
19
|
-
for (var n = [], a = 0; a < arguments.length; a++)
|
|
20
|
-
n[a] = arguments[a];
|
|
21
|
-
return l && t === this && r(n, f) || (u = e.apply(this, n), l = !0, t = this, f = n), u;
|
|
22
|
-
}
|
|
23
|
-
return i;
|
|
24
|
-
}
|
|
25
|
-
export {
|
|
26
|
-
h as default
|
|
27
|
-
};
|
|
28
|
-
//# sourceMappingURL=memoize-one.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"memoize-one.esm.js","sources":["../../../../../../../../node_modules/.pnpm/memoize-one@5.2.1/node_modules/memoize-one/dist/memoize-one.esm.js"],"sourcesContent":["var safeIsNaN = Number.isNaN ||\n function ponyfill(value) {\n return typeof value === 'number' && value !== value;\n };\nfunction isEqual(first, second) {\n if (first === second) {\n return true;\n }\n if (safeIsNaN(first) && safeIsNaN(second)) {\n return true;\n }\n return false;\n}\nfunction areInputsEqual(newInputs, lastInputs) {\n if (newInputs.length !== lastInputs.length) {\n return false;\n }\n for (var i = 0; i < newInputs.length; i++) {\n if (!isEqual(newInputs[i], lastInputs[i])) {\n return false;\n }\n }\n return true;\n}\n\nfunction memoizeOne(resultFn, isEqual) {\n if (isEqual === void 0) { isEqual = areInputsEqual; }\n var lastThis;\n var lastArgs = [];\n var lastResult;\n var calledOnce = false;\n function memoized() {\n var newArgs = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n newArgs[_i] = arguments[_i];\n }\n if (calledOnce && lastThis === this && isEqual(newArgs, lastArgs)) {\n return lastResult;\n }\n lastResult = resultFn.apply(this, newArgs);\n calledOnce = true;\n lastThis = this;\n lastArgs = newArgs;\n return lastResult;\n }\n return memoized;\n}\n\nexport default memoizeOne;\n"],"names":["safeIsNaN","value","isEqual","first","second","areInputsEqual","newInputs","lastInputs","i","memoizeOne","resultFn","lastThis","lastArgs","lastResult","calledOnce","memoized","newArgs","_i"],"mappings":"AAAA,IAAIA,IAAY,OAAO,SACnB,SAAkBC,GAAO;AACrB,SAAO,OAAOA,KAAU,YAAYA,MAAUA;AACjD;AACL,SAASC,EAAQC,GAAOC,GAAQ;AAI5B,SAHI,GAAAD,MAAUC,KAGVJ,EAAUG,CAAK,KAAKH,EAAUI,CAAM;AAI5C;AACA,SAASC,EAAeC,GAAWC,GAAY;AAC3C,MAAID,EAAU,WAAWC,EAAW;AAChC,WAAO;AAEX,WAASC,IAAI,GAAGA,IAAIF,EAAU,QAAQE;AAClC,QAAI,CAACN,EAAQI,EAAUE,CAAC,GAAGD,EAAWC,CAAC,CAAC;AACpC,aAAO;AAGf,SAAO;AACX;AAEA,SAASC,EAAWC,GAAUR,GAAS;AACnC,EAAIA,MAAY,WAAUA,IAAUG;AACpC,MAAIM,GACAC,IAAW,CAAE,GACbC,GACAC,IAAa;AACjB,WAASC,IAAW;AAEhB,aADIC,IAAU,CAAE,GACPC,IAAK,GAAGA,IAAK,UAAU,QAAQA;AACpC,MAAAD,EAAQC,CAAE,IAAI,UAAUA,CAAE;AAE9B,WAAIH,KAAcH,MAAa,QAAQT,EAAQc,GAASJ,CAAQ,MAGhEC,IAAaH,EAAS,MAAM,MAAMM,CAAO,GACzCF,IAAa,IACbH,IAAW,MACXC,IAAWI,IACJH;AAAA,EACf;AACI,SAAOE;AACX;","x_google_ignoreList":[0]}
|
|
@@ -1,375 +0,0 @@
|
|
|
1
|
-
import re from "../../../../@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/extends.js";
|
|
2
|
-
import U from "../../../../@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js";
|
|
3
|
-
import ie from "../../../../@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js";
|
|
4
|
-
import D from "../../../../memoize-one@5.2.1/node_modules/memoize-one/dist/memoize-one.esm.js";
|
|
5
|
-
import { createElement as k, PureComponent as ae } from "react";
|
|
6
|
-
var ne = typeof performance == "object" && typeof performance.now == "function", V = ne ? function() {
|
|
7
|
-
return performance.now();
|
|
8
|
-
} : function() {
|
|
9
|
-
return Date.now();
|
|
10
|
-
};
|
|
11
|
-
function q(l) {
|
|
12
|
-
cancelAnimationFrame(l.id);
|
|
13
|
-
}
|
|
14
|
-
function oe(l, t) {
|
|
15
|
-
var r = V();
|
|
16
|
-
function a() {
|
|
17
|
-
V() - r >= t ? l.call(null) : n.id = requestAnimationFrame(a);
|
|
18
|
-
}
|
|
19
|
-
var n = {
|
|
20
|
-
id: requestAnimationFrame(a)
|
|
21
|
-
};
|
|
22
|
-
return n;
|
|
23
|
-
}
|
|
24
|
-
var A = -1;
|
|
25
|
-
function H(l) {
|
|
26
|
-
if (l === void 0 && (l = !1), A === -1 || l) {
|
|
27
|
-
var t = document.createElement("div"), r = t.style;
|
|
28
|
-
r.width = "50px", r.height = "50px", r.overflow = "scroll", document.body.appendChild(t), A = t.offsetWidth - t.clientWidth, document.body.removeChild(t);
|
|
29
|
-
}
|
|
30
|
-
return A;
|
|
31
|
-
}
|
|
32
|
-
var b = null;
|
|
33
|
-
function K(l) {
|
|
34
|
-
if (l === void 0 && (l = !1), b === null || l) {
|
|
35
|
-
var t = document.createElement("div"), r = t.style;
|
|
36
|
-
r.width = "50px", r.height = "50px", r.overflow = "scroll", r.direction = "rtl";
|
|
37
|
-
var a = document.createElement("div"), n = a.style;
|
|
38
|
-
return n.width = "100px", n.height = "100px", t.appendChild(a), document.body.appendChild(t), t.scrollLeft > 0 ? b = "positive-descending" : (t.scrollLeft = 1, t.scrollLeft === 0 ? b = "negative" : b = "positive-ascending"), document.body.removeChild(t), b;
|
|
39
|
-
}
|
|
40
|
-
return b;
|
|
41
|
-
}
|
|
42
|
-
process.env.NODE_ENV;
|
|
43
|
-
var le = 150, se = function(t, r) {
|
|
44
|
-
return t;
|
|
45
|
-
}, N = null, R = null;
|
|
46
|
-
process.env.NODE_ENV !== "production" && typeof window < "u" && typeof window.WeakSet < "u" && (N = /* @__PURE__ */ new WeakSet(), R = /* @__PURE__ */ new WeakSet());
|
|
47
|
-
function ce(l) {
|
|
48
|
-
var t, r = l.getItemOffset, a = l.getEstimatedTotalSize, n = l.getItemSize, c = l.getOffsetForIndexAndAlignment, s = l.getStartIndexForOffset, h = l.getStopIndexForStartIndex, y = l.initInstanceProps, I = l.shouldResetStyleCacheOnItemSizeChange, g = l.validateProps;
|
|
49
|
-
return t = /* @__PURE__ */ function(w) {
|
|
50
|
-
ie(z, w);
|
|
51
|
-
function z(S) {
|
|
52
|
-
var e;
|
|
53
|
-
return e = w.call(this, S) || this, e._instanceProps = y(e.props, U(e)), e._outerRef = void 0, e._resetIsScrollingTimeoutId = null, e.state = {
|
|
54
|
-
instance: U(e),
|
|
55
|
-
isScrolling: !1,
|
|
56
|
-
scrollDirection: "forward",
|
|
57
|
-
scrollOffset: typeof e.props.initialScrollOffset == "number" ? e.props.initialScrollOffset : 0,
|
|
58
|
-
scrollUpdateWasRequested: !1
|
|
59
|
-
}, e._callOnItemsRendered = void 0, e._callOnItemsRendered = D(function(i, o, f, u) {
|
|
60
|
-
return e.props.onItemsRendered({
|
|
61
|
-
overscanStartIndex: i,
|
|
62
|
-
overscanStopIndex: o,
|
|
63
|
-
visibleStartIndex: f,
|
|
64
|
-
visibleStopIndex: u
|
|
65
|
-
});
|
|
66
|
-
}), e._callOnScroll = void 0, e._callOnScroll = D(function(i, o, f) {
|
|
67
|
-
return e.props.onScroll({
|
|
68
|
-
scrollDirection: i,
|
|
69
|
-
scrollOffset: o,
|
|
70
|
-
scrollUpdateWasRequested: f
|
|
71
|
-
});
|
|
72
|
-
}), e._getItemStyle = void 0, e._getItemStyle = function(i) {
|
|
73
|
-
var o = e.props, f = o.direction, u = o.itemSize, p = o.layout, d = e._getItemStyleCache(I && u, I && p, I && f), m;
|
|
74
|
-
if (d.hasOwnProperty(i))
|
|
75
|
-
m = d[i];
|
|
76
|
-
else {
|
|
77
|
-
var v = r(e.props, i, e._instanceProps), T = n(e.props, i, e._instanceProps), M = f === "horizontal" || p === "horizontal", C = f === "rtl", E = M ? v : 0;
|
|
78
|
-
d[i] = m = {
|
|
79
|
-
position: "absolute",
|
|
80
|
-
left: C ? void 0 : E,
|
|
81
|
-
right: C ? E : void 0,
|
|
82
|
-
top: M ? 0 : v,
|
|
83
|
-
height: M ? "100%" : T,
|
|
84
|
-
width: M ? T : "100%"
|
|
85
|
-
};
|
|
86
|
-
}
|
|
87
|
-
return m;
|
|
88
|
-
}, e._getItemStyleCache = void 0, e._getItemStyleCache = D(function(i, o, f) {
|
|
89
|
-
return {};
|
|
90
|
-
}), e._onScrollHorizontal = function(i) {
|
|
91
|
-
var o = i.currentTarget, f = o.clientWidth, u = o.scrollLeft, p = o.scrollWidth;
|
|
92
|
-
e.setState(function(d) {
|
|
93
|
-
if (d.scrollOffset === u)
|
|
94
|
-
return null;
|
|
95
|
-
var m = e.props.direction, v = u;
|
|
96
|
-
if (m === "rtl")
|
|
97
|
-
switch (K()) {
|
|
98
|
-
case "negative":
|
|
99
|
-
v = -u;
|
|
100
|
-
break;
|
|
101
|
-
case "positive-descending":
|
|
102
|
-
v = p - f - u;
|
|
103
|
-
break;
|
|
104
|
-
}
|
|
105
|
-
return v = Math.max(0, Math.min(v, p - f)), {
|
|
106
|
-
isScrolling: !0,
|
|
107
|
-
scrollDirection: d.scrollOffset < v ? "forward" : "backward",
|
|
108
|
-
scrollOffset: v,
|
|
109
|
-
scrollUpdateWasRequested: !1
|
|
110
|
-
};
|
|
111
|
-
}, e._resetIsScrollingDebounced);
|
|
112
|
-
}, e._onScrollVertical = function(i) {
|
|
113
|
-
var o = i.currentTarget, f = o.clientHeight, u = o.scrollHeight, p = o.scrollTop;
|
|
114
|
-
e.setState(function(d) {
|
|
115
|
-
if (d.scrollOffset === p)
|
|
116
|
-
return null;
|
|
117
|
-
var m = Math.max(0, Math.min(p, u - f));
|
|
118
|
-
return {
|
|
119
|
-
isScrolling: !0,
|
|
120
|
-
scrollDirection: d.scrollOffset < m ? "forward" : "backward",
|
|
121
|
-
scrollOffset: m,
|
|
122
|
-
scrollUpdateWasRequested: !1
|
|
123
|
-
};
|
|
124
|
-
}, e._resetIsScrollingDebounced);
|
|
125
|
-
}, e._outerRefSetter = function(i) {
|
|
126
|
-
var o = e.props.outerRef;
|
|
127
|
-
e._outerRef = i, typeof o == "function" ? o(i) : o != null && typeof o == "object" && o.hasOwnProperty("current") && (o.current = i);
|
|
128
|
-
}, e._resetIsScrollingDebounced = function() {
|
|
129
|
-
e._resetIsScrollingTimeoutId !== null && q(e._resetIsScrollingTimeoutId), e._resetIsScrollingTimeoutId = oe(e._resetIsScrolling, le);
|
|
130
|
-
}, e._resetIsScrolling = function() {
|
|
131
|
-
e._resetIsScrollingTimeoutId = null, e.setState({
|
|
132
|
-
isScrolling: !1
|
|
133
|
-
}, function() {
|
|
134
|
-
e._getItemStyleCache(-1, null);
|
|
135
|
-
});
|
|
136
|
-
}, e;
|
|
137
|
-
}
|
|
138
|
-
z.getDerivedStateFromProps = function(e, i) {
|
|
139
|
-
return de(e, i), g(e), null;
|
|
140
|
-
};
|
|
141
|
-
var _ = z.prototype;
|
|
142
|
-
return _.scrollTo = function(e) {
|
|
143
|
-
e = Math.max(0, e), this.setState(function(i) {
|
|
144
|
-
return i.scrollOffset === e ? null : {
|
|
145
|
-
scrollDirection: i.scrollOffset < e ? "forward" : "backward",
|
|
146
|
-
scrollOffset: e,
|
|
147
|
-
scrollUpdateWasRequested: !0
|
|
148
|
-
};
|
|
149
|
-
}, this._resetIsScrollingDebounced);
|
|
150
|
-
}, _.scrollToItem = function(e, i) {
|
|
151
|
-
i === void 0 && (i = "auto");
|
|
152
|
-
var o = this.props, f = o.itemCount, u = o.layout, p = this.state.scrollOffset;
|
|
153
|
-
e = Math.max(0, Math.min(e, f - 1));
|
|
154
|
-
var d = 0;
|
|
155
|
-
if (this._outerRef) {
|
|
156
|
-
var m = this._outerRef;
|
|
157
|
-
u === "vertical" ? d = m.scrollWidth > m.clientWidth ? H() : 0 : d = m.scrollHeight > m.clientHeight ? H() : 0;
|
|
158
|
-
}
|
|
159
|
-
this.scrollTo(c(this.props, e, i, p, this._instanceProps, d));
|
|
160
|
-
}, _.componentDidMount = function() {
|
|
161
|
-
var e = this.props, i = e.direction, o = e.initialScrollOffset, f = e.layout;
|
|
162
|
-
if (typeof o == "number" && this._outerRef != null) {
|
|
163
|
-
var u = this._outerRef;
|
|
164
|
-
i === "horizontal" || f === "horizontal" ? u.scrollLeft = o : u.scrollTop = o;
|
|
165
|
-
}
|
|
166
|
-
this._callPropsCallbacks();
|
|
167
|
-
}, _.componentDidUpdate = function() {
|
|
168
|
-
var e = this.props, i = e.direction, o = e.layout, f = this.state, u = f.scrollOffset, p = f.scrollUpdateWasRequested;
|
|
169
|
-
if (p && this._outerRef != null) {
|
|
170
|
-
var d = this._outerRef;
|
|
171
|
-
if (i === "horizontal" || o === "horizontal")
|
|
172
|
-
if (i === "rtl")
|
|
173
|
-
switch (K()) {
|
|
174
|
-
case "negative":
|
|
175
|
-
d.scrollLeft = -u;
|
|
176
|
-
break;
|
|
177
|
-
case "positive-ascending":
|
|
178
|
-
d.scrollLeft = u;
|
|
179
|
-
break;
|
|
180
|
-
default:
|
|
181
|
-
var m = d.clientWidth, v = d.scrollWidth;
|
|
182
|
-
d.scrollLeft = v - m - u;
|
|
183
|
-
break;
|
|
184
|
-
}
|
|
185
|
-
else
|
|
186
|
-
d.scrollLeft = u;
|
|
187
|
-
else
|
|
188
|
-
d.scrollTop = u;
|
|
189
|
-
}
|
|
190
|
-
this._callPropsCallbacks();
|
|
191
|
-
}, _.componentWillUnmount = function() {
|
|
192
|
-
this._resetIsScrollingTimeoutId !== null && q(this._resetIsScrollingTimeoutId);
|
|
193
|
-
}, _.render = function() {
|
|
194
|
-
var e = this.props, i = e.children, o = e.className, f = e.direction, u = e.height, p = e.innerRef, d = e.innerElementType, m = e.innerTagName, v = e.itemCount, T = e.itemData, M = e.itemKey, C = M === void 0 ? se : M, E = e.layout, G = e.outerElementType, Z = e.outerTagName, J = e.style, Q = e.useIsScrolling, X = e.width, P = this.state.isScrolling, W = f === "horizontal" || E === "horizontal", Y = W ? this._onScrollHorizontal : this._onScrollVertical, L = this._getRangeToRender(), ee = L[0], te = L[1], F = [];
|
|
195
|
-
if (v > 0)
|
|
196
|
-
for (var x = ee; x <= te; x++)
|
|
197
|
-
F.push(k(i, {
|
|
198
|
-
data: T,
|
|
199
|
-
key: C(x, T),
|
|
200
|
-
index: x,
|
|
201
|
-
isScrolling: Q ? P : void 0,
|
|
202
|
-
style: this._getItemStyle(x)
|
|
203
|
-
}));
|
|
204
|
-
var $ = a(this.props, this._instanceProps);
|
|
205
|
-
return k(G || Z || "div", {
|
|
206
|
-
className: o,
|
|
207
|
-
onScroll: Y,
|
|
208
|
-
ref: this._outerRefSetter,
|
|
209
|
-
style: re({
|
|
210
|
-
position: "relative",
|
|
211
|
-
height: u,
|
|
212
|
-
width: X,
|
|
213
|
-
overflow: "auto",
|
|
214
|
-
WebkitOverflowScrolling: "touch",
|
|
215
|
-
willChange: "transform",
|
|
216
|
-
direction: f
|
|
217
|
-
}, J)
|
|
218
|
-
}, k(d || m || "div", {
|
|
219
|
-
children: F,
|
|
220
|
-
ref: p,
|
|
221
|
-
style: {
|
|
222
|
-
height: W ? "100%" : $,
|
|
223
|
-
pointerEvents: P ? "none" : void 0,
|
|
224
|
-
width: W ? $ : "100%"
|
|
225
|
-
}
|
|
226
|
-
}));
|
|
227
|
-
}, _._callPropsCallbacks = function() {
|
|
228
|
-
if (typeof this.props.onItemsRendered == "function") {
|
|
229
|
-
var e = this.props.itemCount;
|
|
230
|
-
if (e > 0) {
|
|
231
|
-
var i = this._getRangeToRender(), o = i[0], f = i[1], u = i[2], p = i[3];
|
|
232
|
-
this._callOnItemsRendered(o, f, u, p);
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
if (typeof this.props.onScroll == "function") {
|
|
236
|
-
var d = this.state, m = d.scrollDirection, v = d.scrollOffset, T = d.scrollUpdateWasRequested;
|
|
237
|
-
this._callOnScroll(m, v, T);
|
|
238
|
-
}
|
|
239
|
-
}, _._getRangeToRender = function() {
|
|
240
|
-
var e = this.props, i = e.itemCount, o = e.overscanCount, f = this.state, u = f.isScrolling, p = f.scrollDirection, d = f.scrollOffset;
|
|
241
|
-
if (i === 0)
|
|
242
|
-
return [0, 0, 0, 0];
|
|
243
|
-
var m = s(this.props, d, this._instanceProps), v = h(this.props, m, d, this._instanceProps), T = !u || p === "backward" ? Math.max(1, o) : 1, M = !u || p === "forward" ? Math.max(1, o) : 1;
|
|
244
|
-
return [Math.max(0, m - T), Math.max(0, Math.min(i - 1, v + M)), m, v];
|
|
245
|
-
}, z;
|
|
246
|
-
}(ae), t.defaultProps = {
|
|
247
|
-
direction: "ltr",
|
|
248
|
-
itemData: void 0,
|
|
249
|
-
layout: "vertical",
|
|
250
|
-
overscanCount: 2,
|
|
251
|
-
useIsScrolling: !1
|
|
252
|
-
}, t;
|
|
253
|
-
}
|
|
254
|
-
var de = function(t, r) {
|
|
255
|
-
var a = t.children, n = t.direction, c = t.height, s = t.layout, h = t.innerTagName, y = t.outerTagName, I = t.width, g = r.instance;
|
|
256
|
-
if (process.env.NODE_ENV !== "production") {
|
|
257
|
-
(h != null || y != null) && R && !R.has(g) && (R.add(g), console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead."));
|
|
258
|
-
var w = n === "horizontal" || s === "horizontal";
|
|
259
|
-
switch (n) {
|
|
260
|
-
case "horizontal":
|
|
261
|
-
case "vertical":
|
|
262
|
-
N && !N.has(g) && (N.add(g), console.warn('The direction prop should be either "ltr" (default) or "rtl". Please use the layout prop to specify "vertical" (default) or "horizontal" orientation.'));
|
|
263
|
-
break;
|
|
264
|
-
case "ltr":
|
|
265
|
-
case "rtl":
|
|
266
|
-
break;
|
|
267
|
-
default:
|
|
268
|
-
throw Error('An invalid "direction" prop has been specified. Value should be either "ltr" or "rtl". ' + ('"' + n + '" was specified.'));
|
|
269
|
-
}
|
|
270
|
-
switch (s) {
|
|
271
|
-
case "horizontal":
|
|
272
|
-
case "vertical":
|
|
273
|
-
break;
|
|
274
|
-
default:
|
|
275
|
-
throw Error('An invalid "layout" prop has been specified. Value should be either "horizontal" or "vertical". ' + ('"' + s + '" was specified.'));
|
|
276
|
-
}
|
|
277
|
-
if (a == null)
|
|
278
|
-
throw Error('An invalid "children" prop has been specified. Value should be a React component. ' + ('"' + (a === null ? "null" : typeof a) + '" was specified.'));
|
|
279
|
-
if (w && typeof I != "number")
|
|
280
|
-
throw Error('An invalid "width" prop has been specified. Horizontal lists must specify a number for width. ' + ('"' + (I === null ? "null" : typeof I) + '" was specified.'));
|
|
281
|
-
if (!w && typeof c != "number")
|
|
282
|
-
throw Error('An invalid "height" prop has been specified. Vertical lists must specify a number for height. ' + ('"' + (c === null ? "null" : typeof c) + '" was specified.'));
|
|
283
|
-
}
|
|
284
|
-
}, fe = 50, O = function(t, r, a) {
|
|
285
|
-
var n = t, c = n.itemSize, s = a.itemMetadataMap, h = a.lastMeasuredIndex;
|
|
286
|
-
if (r > h) {
|
|
287
|
-
var y = 0;
|
|
288
|
-
if (h >= 0) {
|
|
289
|
-
var I = s[h];
|
|
290
|
-
y = I.offset + I.size;
|
|
291
|
-
}
|
|
292
|
-
for (var g = h + 1; g <= r; g++) {
|
|
293
|
-
var w = c(g);
|
|
294
|
-
s[g] = {
|
|
295
|
-
offset: y,
|
|
296
|
-
size: w
|
|
297
|
-
}, y += w;
|
|
298
|
-
}
|
|
299
|
-
a.lastMeasuredIndex = r;
|
|
300
|
-
}
|
|
301
|
-
return s[r];
|
|
302
|
-
}, ue = function(t, r, a) {
|
|
303
|
-
var n = r.itemMetadataMap, c = r.lastMeasuredIndex, s = c > 0 ? n[c].offset : 0;
|
|
304
|
-
return s >= a ? j(t, r, c, 0, a) : he(t, r, Math.max(0, c), a);
|
|
305
|
-
}, j = function(t, r, a, n, c) {
|
|
306
|
-
for (; n <= a; ) {
|
|
307
|
-
var s = n + Math.floor((a - n) / 2), h = O(t, s, r).offset;
|
|
308
|
-
if (h === c)
|
|
309
|
-
return s;
|
|
310
|
-
h < c ? n = s + 1 : h > c && (a = s - 1);
|
|
311
|
-
}
|
|
312
|
-
return n > 0 ? n - 1 : 0;
|
|
313
|
-
}, he = function(t, r, a, n) {
|
|
314
|
-
for (var c = t.itemCount, s = 1; a < c && O(t, a, r).offset < n; )
|
|
315
|
-
a += s, s *= 2;
|
|
316
|
-
return j(t, r, Math.min(a, c - 1), Math.floor(a / 2), n);
|
|
317
|
-
}, B = function(t, r) {
|
|
318
|
-
var a = t.itemCount, n = r.itemMetadataMap, c = r.estimatedItemSize, s = r.lastMeasuredIndex, h = 0;
|
|
319
|
-
if (s >= a && (s = a - 1), s >= 0) {
|
|
320
|
-
var y = n[s];
|
|
321
|
-
h = y.offset + y.size;
|
|
322
|
-
}
|
|
323
|
-
var I = a - s - 1, g = I * c;
|
|
324
|
-
return h + g;
|
|
325
|
-
}, Se = /* @__PURE__ */ ce({
|
|
326
|
-
getItemOffset: function(t, r, a) {
|
|
327
|
-
return O(t, r, a).offset;
|
|
328
|
-
},
|
|
329
|
-
getItemSize: function(t, r, a) {
|
|
330
|
-
return a.itemMetadataMap[r].size;
|
|
331
|
-
},
|
|
332
|
-
getEstimatedTotalSize: B,
|
|
333
|
-
getOffsetForIndexAndAlignment: function(t, r, a, n, c, s) {
|
|
334
|
-
var h = t.direction, y = t.height, I = t.layout, g = t.width, w = h === "horizontal" || I === "horizontal", z = w ? g : y, _ = O(t, r, c), S = B(t, c), e = Math.max(0, Math.min(S - z, _.offset)), i = Math.max(0, _.offset - z + _.size + s);
|
|
335
|
-
switch (a === "smart" && (n >= i - z && n <= e + z ? a = "auto" : a = "center"), a) {
|
|
336
|
-
case "start":
|
|
337
|
-
return e;
|
|
338
|
-
case "end":
|
|
339
|
-
return i;
|
|
340
|
-
case "center":
|
|
341
|
-
return Math.round(i + (e - i) / 2);
|
|
342
|
-
case "auto":
|
|
343
|
-
default:
|
|
344
|
-
return n >= i && n <= e ? n : n < i ? i : e;
|
|
345
|
-
}
|
|
346
|
-
},
|
|
347
|
-
getStartIndexForOffset: function(t, r, a) {
|
|
348
|
-
return ue(t, a, r);
|
|
349
|
-
},
|
|
350
|
-
getStopIndexForStartIndex: function(t, r, a, n) {
|
|
351
|
-
for (var c = t.direction, s = t.height, h = t.itemCount, y = t.layout, I = t.width, g = c === "horizontal" || y === "horizontal", w = g ? I : s, z = O(t, r, n), _ = a + w, S = z.offset + z.size, e = r; e < h - 1 && S < _; )
|
|
352
|
-
e++, S += O(t, e, n).size;
|
|
353
|
-
return e;
|
|
354
|
-
},
|
|
355
|
-
initInstanceProps: function(t, r) {
|
|
356
|
-
var a = t, n = a.estimatedItemSize, c = {
|
|
357
|
-
itemMetadataMap: {},
|
|
358
|
-
estimatedItemSize: n || fe,
|
|
359
|
-
lastMeasuredIndex: -1
|
|
360
|
-
};
|
|
361
|
-
return r.resetAfterIndex = function(s, h) {
|
|
362
|
-
h === void 0 && (h = !0), c.lastMeasuredIndex = Math.min(c.lastMeasuredIndex, s - 1), r._getItemStyleCache(-1), h && r.forceUpdate();
|
|
363
|
-
}, c;
|
|
364
|
-
},
|
|
365
|
-
shouldResetStyleCacheOnItemSizeChange: !1,
|
|
366
|
-
validateProps: function(t) {
|
|
367
|
-
var r = t.itemSize;
|
|
368
|
-
if (process.env.NODE_ENV !== "production" && typeof r != "function")
|
|
369
|
-
throw Error('An invalid "itemSize" prop has been specified. Value should be a function. ' + ('"' + (r === null ? "null" : typeof r) + '" was specified.'));
|
|
370
|
-
}
|
|
371
|
-
});
|
|
372
|
-
export {
|
|
373
|
-
Se as VariableSizeList
|
|
374
|
-
};
|
|
375
|
-
//# sourceMappingURL=index.esm.js.map
|