react-spring-carousel 3.0.0-beta055 → 3.0.0-beta056

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-spring-carousel",
3
- "version": "3.0.0-beta055",
3
+ "version": "3.0.0-beta056",
4
4
  "description": "A new <Carousel /> experience for the web",
5
5
  "homepage": "https://react-spring-carousel.emilianobucci.com",
6
6
  "repository": "https://github.com/Emiliano-Bucci/react-spring-carousel",
@@ -38,40 +38,41 @@
38
38
  "release:beta": "git push && npm run build:lib && npm publish --tag beta"
39
39
  },
40
40
  "devDependencies": {
41
- "@babel/core": "^7.19.3",
42
- "@rollup/plugin-commonjs": "^21.0.2",
43
- "@rollup/plugin-node-resolve": "^13.1.3",
44
- "@storybook/addon-actions": "^6.5.12",
45
- "@storybook/addon-essentials": "^6.5.12",
46
- "@storybook/addon-interactions": "^6.5.12",
47
- "@storybook/addon-links": "^6.5.12",
48
- "@storybook/builder-webpack4": "^6.5.12",
49
- "@storybook/manager-webpack4": "^6.5.12",
50
- "@storybook/react": "^6.5.12",
41
+ "@babel/core": "^7.20.12",
42
+ "@rollup/plugin-commonjs": "^24.0.0",
43
+ "@rollup/plugin-node-resolve": "^15.0.1",
44
+ "@storybook/addon-actions": "^6.5.15",
45
+ "@storybook/addon-essentials": "^6.5.15",
46
+ "@storybook/addon-interactions": "^6.5.15",
47
+ "@storybook/addon-links": "^6.5.15",
48
+ "@storybook/builder-webpack4": "^6.5.15",
49
+ "@storybook/manager-webpack4": "^6.5.15",
50
+ "@storybook/react": "^6.5.15",
51
51
  "@storybook/testing-library": "^0.0.13",
52
- "@types/react": "^18.0.21",
53
- "@types/react-dom": "^18.0.6",
54
- "@typescript-eslint/eslint-plugin": "^5.40.0",
55
- "@typescript-eslint/parser": "^5.40.0",
56
- "babel-loader": "^8.2.5",
57
- "eslint": "^8.25.0",
58
- "eslint-config-prettier": "^8.5.0",
52
+ "@types/react": "^18.0.26",
53
+ "@types/react-dom": "^18.0.10",
54
+ "@typescript-eslint/eslint-plugin": "^5.48.0",
55
+ "@typescript-eslint/parser": "^5.48.0",
56
+ "babel-loader": "^9.1.2",
57
+ "eslint": "^8.31.0",
58
+ "eslint-config-prettier": "^8.6.0",
59
59
  "eslint-plugin-prettier": "^4.2.1",
60
- "eslint-plugin-react": "^7.31.10",
60
+ "eslint-plugin-react": "^7.31.11",
61
61
  "eslint-plugin-react-hooks": "^4.6.0",
62
+ "html-webpack-plugin": "^5.5.0",
62
63
  "react": "^18.2.0",
63
64
  "react-dom": "^18.2.0",
64
65
  "rimraf": "^3.0.2",
65
- "rollup": "^3.1.0",
66
+ "rollup": "^3.9.1",
66
67
  "rollup-plugin-babel": "^4.4.0",
67
- "rollup-plugin-exclude-dependencies-from-bundle": "^1.1.22",
68
+ "rollup-plugin-exclude-dependencies-from-bundle": "^1.1.23",
68
69
  "rollup-plugin-filesize": "^9.1.2",
69
70
  "rollup-plugin-peer-deps-external": "^2.2.4",
70
71
  "rollup-plugin-terser": "^7.0.2",
71
72
  "rollup-plugin-typescript2": "^0.34.1",
72
- "rollup-plugin-visualizer": "^5.8.2",
73
+ "rollup-plugin-visualizer": "^5.9.0",
73
74
  "ts-node": "^10.9.1",
74
- "typescript": "^4.8.4"
75
+ "typescript": "^4.9.4"
75
76
  },
76
77
  "peerDependencies": {
77
78
  "@react-spring/web": "^9.5.5",
@@ -79,7 +80,7 @@
79
80
  "react-dom": "^18.0.0"
80
81
  },
81
82
  "dependencies": {
82
- "@use-gesture/react": "^10.2.20",
83
+ "@use-gesture/react": "^10.2.23",
83
84
  "resize-observer-polyfill": "^1.5.1",
84
85
  "screenfull": "^5.2.0"
85
86
  }
@@ -1,2 +0,0 @@
1
- import{useRef as t,useEffect as e}from"react";import{jsx as n}from"react/jsx-runtime";import{useSpring as r}from"@react-spring/web";function i(){const n=t(null);return{useListenToCustomEvent:function(t){e((()=>{function e(e){t(e.detail)}if(n.current||(n.current=document.createElement("div")),n.current)return n.current.addEventListener("RSC::Event",e,!1),()=>{var t;null===(t=n.current)||void 0===t||t.removeEventListener("RSC::Event",e,!1)}}),[t])},emitEvent:function(t){if(n.current){const e=new CustomEvent("RSC::Event",{detail:t});n.current.dispatchEvent(e)}}}}function o({thumbsSlideAxis:e="x",withThumbs:i=!1,prepareThumbsData:o,items:u,renderThumbFnProps:c}){const l=t(null),[s,a]=r((()=>({val:0})));function m(){var t;return Math.round(Number(null===(t=l.current)||void 0===t?void 0:t["x"===e?"scrollWidth":"scrollHeight"])-l.current.getBoundingClientRect()["x"===e?"width":"height"])}return{thumbsFragment:i?n("div",Object.assign({className:"use-spring-carousel-thumbs-wrapper",ref:l,onWheel:()=>s.val.stop(),style:Object.assign({display:"flex",flex:"1",position:"relative",width:"100%",height:"100%",flexDirection:"x"===e?"row":"column"},"x"===e?{overflowX:"auto"}:{overflowY:"auto",maxHeight:"100%"})},{children:function(){function t(t){return t.map((t=>({id:t.id,renderThumb:t.renderThumb})))}return o?o(t(u)):t(u)}().map((({id:t,renderThumb:e})=>{const r=`thumb-item-${t}`;return n("div",Object.assign({id:r,className:"thumb-item"},{children:"function"==typeof e?e(c):e}),r)}))})):null,handleScroll:function(t){var n,r;const i=l.current?l.current.querySelector(`#thumb-item-${u[t].id}`):null;if(i&&l.current&&!function(t){const e=t.getBoundingClientRect();return e.top>=0&&e.left>=0&&e.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&e.right<=(window.innerWidth||document.documentElement.clientWidth)}(i)){const t=i.offsetLeft,o=t>m()?m():t;a.start({from:{val:null!==(r=null===(n=l.current)||void 0===n?void 0:n["x"===e?"scrollLeft":"scrollTop"])&&void 0!==r?r:0},to:{val:o},onChange:({value:t})=>{l.current&&(l.current["x"===e?"scrollLeft":"scrollTop"]=Math.abs(t.val))}})}}}}export{o as a,i as u};
2
- //# sourceMappingURL=useThumbsModule-ff8a59da.js.map