Changeset 79a0317 for imaps-frontend/node_modules/react-use
- Timestamp:
- 01/21/25 03:08:24 (3 days ago)
- Branches:
- main
- Parents:
- 0c6b92a
- Location:
- imaps-frontend/node_modules/react-use
- Files:
-
- 1 deleted
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
imaps-frontend/node_modules/react-use/esm/useWindowSize.d.ts
r0c6b92a r79a0317 1 declare const useWindowSize: (initialWidth?: number, initialHeight?: number) => { 1 interface Options { 2 initialWidth?: number; 3 initialHeight?: number; 4 onChange?: (width: number, height: number) => void; 5 } 6 declare const useWindowSize: ({ initialWidth, initialHeight, onChange, }?: Options) => { 2 7 width: number; 3 8 height: number; -
imaps-frontend/node_modules/react-use/esm/useWindowSize.js
r0c6b92a r79a0317 2 2 import useRafState from './useRafState'; 3 3 import { isBrowser, off, on } from './misc/util'; 4 var useWindowSize = function ( initialWidth, initialHeight) {5 if (initialWidth === void 0) { initialWidth = Infinity; }6 if (initialHeight === void 0) { initialHeight = Infinity; }7 var _ a= useRafState({4 var useWindowSize = function (_a) { 5 var _b = _a === void 0 ? {} : _a, _c = _b.initialWidth, initialWidth = _c === void 0 ? Infinity : _c, _d = _b.initialHeight, initialHeight = _d === void 0 ? Infinity : _d, onChange = _b.onChange; 6 // Use the useRafState hook to maintain the current window size (width and height) 7 var _e = useRafState({ 8 8 width: isBrowser ? window.innerWidth : initialWidth, 9 9 height: isBrowser ? window.innerHeight : initialHeight, 10 }), state = _ a[0], setState = _a[1];10 }), state = _e[0], setState = _e[1]; 11 11 useEffect(function () { 12 // Only run the effect on the browser (to avoid issues with SSR) 12 13 if (isBrowser) { 13 14 var handler_1 = function () { 15 var width = window.innerWidth; 16 var height = window.innerHeight; 17 // Update the state with the new window size 14 18 setState({ 15 width: wi ndow.innerWidth,16 height: window.innerHeight,19 width: width, 20 height: height, 17 21 }); 22 // If an onChange callback is provided, call it with the new dimensions 23 if (onChange) 24 onChange(width, height); 18 25 }; 26 // Add event listener for the resize event 19 27 on(window, 'resize', handler_1); 28 // Cleanup function to remove the event listener when the component is unmounted (it's for performance optimization) 20 29 return function () { 21 30 off(window, 'resize', handler_1); … … 23 32 } 24 33 }, []); 34 // Return the current window size (width and height) 25 35 return state; 26 36 }; -
imaps-frontend/node_modules/react-use/lib/useWindowSize.d.ts
r0c6b92a r79a0317 1 declare const useWindowSize: (initialWidth?: number, initialHeight?: number) => { 1 interface Options { 2 initialWidth?: number; 3 initialHeight?: number; 4 onChange?: (width: number, height: number) => void; 5 } 6 declare const useWindowSize: ({ initialWidth, initialHeight, onChange, }?: Options) => { 2 7 width: number; 3 8 height: number; -
imaps-frontend/node_modules/react-use/lib/useWindowSize.js
r0c6b92a r79a0317 5 5 var useRafState_1 = tslib_1.__importDefault(require("./useRafState")); 6 6 var util_1 = require("./misc/util"); 7 var useWindowSize = function ( initialWidth, initialHeight) {8 if (initialWidth === void 0) { initialWidth = Infinity; }9 if (initialHeight === void 0) { initialHeight = Infinity; }10 var _ a= useRafState_1.default({7 var useWindowSize = function (_a) { 8 var _b = _a === void 0 ? {} : _a, _c = _b.initialWidth, initialWidth = _c === void 0 ? Infinity : _c, _d = _b.initialHeight, initialHeight = _d === void 0 ? Infinity : _d, onChange = _b.onChange; 9 // Use the useRafState hook to maintain the current window size (width and height) 10 var _e = useRafState_1.default({ 11 11 width: util_1.isBrowser ? window.innerWidth : initialWidth, 12 12 height: util_1.isBrowser ? window.innerHeight : initialHeight, 13 }), state = _ a[0], setState = _a[1];13 }), state = _e[0], setState = _e[1]; 14 14 react_1.useEffect(function () { 15 // Only run the effect on the browser (to avoid issues with SSR) 15 16 if (util_1.isBrowser) { 16 17 var handler_1 = function () { 18 var width = window.innerWidth; 19 var height = window.innerHeight; 20 // Update the state with the new window size 17 21 setState({ 18 width: wi ndow.innerWidth,19 height: window.innerHeight,22 width: width, 23 height: height, 20 24 }); 25 // If an onChange callback is provided, call it with the new dimensions 26 if (onChange) 27 onChange(width, height); 21 28 }; 29 // Add event listener for the resize event 22 30 util_1.on(window, 'resize', handler_1); 31 // Cleanup function to remove the event listener when the component is unmounted (it's for performance optimization) 23 32 return function () { 24 33 util_1.off(window, 'resize', handler_1); … … 26 35 } 27 36 }, []); 37 // Return the current window size (width and height) 28 38 return state; 29 39 }; -
imaps-frontend/node_modules/react-use/package.json
r0c6b92a r79a0317 1 1 { 2 "name": "react-use", 3 "version": "17.5.1", 4 "description": "Collection of React Hooks", 5 "main": "lib/index.js", 6 "module": "esm/index.js", 7 "sideEffects": false, 8 "files": [ 9 "lib/", 10 "esm/" 2 "_from": "react-use@17.6.0", 3 "_id": "react-use@17.6.0", 4 "_inBundle": false, 5 "_integrity": "sha512-OmedEScUMKFfzn1Ir8dBxiLLSOzhKe/dPZwVxcujweSj45aNM7BEGPb9BEVIgVEqEXx6f3/TsXzwIktNgUR02g==", 6 "_location": "/react-use", 7 "_phantomChildren": {}, 8 "_requested": { 9 "type": "version", 10 "registry": true, 11 "raw": "react-use@17.6.0", 12 "name": "react-use", 13 "escapedName": "react-use", 14 "rawSpec": "17.6.0", 15 "saveSpec": null, 16 "fetchSpec": "17.6.0" 17 }, 18 "_requiredBy": [ 19 "/react-tiles-dnd" 11 20 ], 12 "types": "lib/index.d.ts", 13 "typings": "lib/index.d.ts", 14 "scripts": { 15 "start": "yarn storybook", 16 "test": "jest --maxWorkers 2", 17 "test:ssr": "jest --maxWorkers 2 --config ./jest.config.node.ts", 18 "test:watch": "jest --watch", 19 "test:coverage": "jest --coverage", 20 "lint": "eslint \"{src,tests,stories}/**/*.{ts,tsx}\"", 21 "lint:fix": "yarn lint --fix", 22 "lint:types": "tsc --noEmit", 23 "build:cjs": "tsc", 24 "build:es": "tsc -m esNext --outDir esm", 25 "build": "yarn build:cjs && yarn build:es", 26 "clean": "rimraf lib storybook-static esm", 27 "storybook": "start-storybook -p 6008", 28 "storybook:build": "build-storybook", 29 "storybook:upload": "gh-pages -d storybook-static --git \"$(which git)\"", 30 "storybook:clean": "rimraf storybook-static", 31 "release": "semantic-release" 32 }, 33 "husky": { 34 "hooks": { 35 "pre-commit": "lint-staged", 36 "pre-push": "yarn lint && yarn clean && yarn build && yarn test" 37 } 38 }, 39 "author": "@streamich", 40 "license": "Unlicense", 41 "repository": { 42 "type": "git", 43 "url": "https://github.com/streamich/react-use" 21 "_resolved": "https://registry.npmjs.org/react-use/-/react-use-17.6.0.tgz", 22 "_shasum": "2101a3a79dc965a25866b21f5d6de4b128488a14", 23 "_spec": "react-use@17.6.0", 24 "_where": "/home/stevetosak/Proekt/IMaps/imaps-frontend/node_modules/react-tiles-dnd", 25 "author": { 26 "name": "@streamich" 44 27 }, 45 28 "bugs": { 46 29 "url": "https://github.com/streamich/react-use/issues" 47 30 }, 48 "homepage": "https://github.com/streamich/react-use#readme", 31 "bundleDependencies": false, 32 "collective": { 33 "type": "opencollective", 34 "url": "https://opencollective.com/react-use" 35 }, 36 "config": { 37 "commitizen": { 38 "path": "git-cz" 39 } 40 }, 49 41 "dependencies": { 50 42 "@types/js-cookie": "^2.2.6", … … 63 55 "tslib": "^2.1.0" 64 56 }, 65 "peerDependencies": { 66 "react": "*", 67 "react-dom": "*" 68 }, 57 "deprecated": false, 58 "description": "Collection of React Hooks", 69 59 "devDependencies": { 70 "@babel/core": "7.2 0.2",60 "@babel/core": "7.24.9", 71 61 "@babel/plugin-syntax-dynamic-import": "7.8.3", 72 "@babel/preset-env": "7.2 0.2",73 "@babel/preset-react": "7. 18.6",74 "@babel/preset-typescript": "7. 18.6",75 "@semantic-release/changelog": " 5.0.1",76 "@semantic-release/git": " 9.0.1",77 "@semantic-release/npm": " 7.1.3",62 "@babel/preset-env": "7.24.8", 63 "@babel/preset-react": "7.24.7", 64 "@babel/preset-typescript": "7.24.7", 65 "@semantic-release/changelog": "6.0.3", 66 "@semantic-release/git": "10.0.1", 67 "@semantic-release/npm": "12.0.1", 78 68 "@shopify/jest-dom-mocks": "2.11.7", 79 69 "@storybook/addon-actions": "6.4.9", 80 "@storybook/addon-knobs": "6. 2.9",70 "@storybook/addon-knobs": "6.4.0", 81 71 "@storybook/addon-notes": "5.3.21", 82 72 "@storybook/addon-options": "5.3.21", … … 86 76 "@types/jest": "27.5.2", 87 77 "@types/react": "17.0.0", 88 "@typescript-eslint/eslint-plugin": "5.6 .0",89 "@typescript-eslint/parser": "5.6 .0",78 "@typescript-eslint/eslint-plugin": "5.62.0", 79 "@typescript-eslint/parser": "5.62.0", 90 80 "babel-core": "6.26.3", 91 81 "babel-eslint": "10.1.0", 92 82 "babel-loader": "8.3.0", 93 83 "babel-plugin-dynamic-import-node": "2.3.3", 94 "eslint": "8. 28.0",95 "eslint-config-prettier": "8. 5.0",84 "eslint": "8.57.0", 85 "eslint-config-prettier": "8.10.0", 96 86 "eslint-config-react-app": "6.0.0", 97 87 "eslint-plugin-flowtype": "8.0.3", 98 "eslint-plugin-import": "2.2 6.0",99 "eslint-plugin-jsx-a11y": "6. 6.1",88 "eslint-plugin-import": "2.29.1", 89 "eslint-plugin-jsx-a11y": "6.9.0", 100 90 "eslint-plugin-prettier": "4.2.1", 101 "eslint-plugin-react": "7.3 1.11",91 "eslint-plugin-react": "7.35.0", 102 92 "eslint-plugin-react-hooks": "4.6.0", 103 "fork-ts-checker-webpack-plugin": "6.5. 2",104 "gh-pages": " 3.2.3",93 "fork-ts-checker-webpack-plugin": "6.5.3", 94 "gh-pages": "5.0.0", 105 95 "husky": "7.0.4", 106 96 "jest": "26.6.3", 107 "jest-localstorage-mock": "2.4.2 2",97 "jest-localstorage-mock": "2.4.26", 108 98 "keyboardjs": "2.7.0", 109 99 "lint-staged": "12.5.0", … … 113 103 "react": "17.0.2", 114 104 "react-dom": "17.0.2", 115 "react-frame-component": "5.2. 3",116 "react-spring": "9. 5.5",105 "react-frame-component": "5.2.7", 106 "react-spring": "9.7.4", 117 107 "react-test-renderer": "17.0.2", 118 108 "rebound": "0.1.0", … … 120 110 "redux-thunk": "2.4.2", 121 111 "rimraf": "3.0.2", 122 "rxjs": "7. 5.7",123 "semantic-release": " 17.4.7",112 "rxjs": "7.8.1", 113 "semantic-release": "24.0.0", 124 114 "ts-jest": "26.5.6", 125 115 "ts-loader": "8.4.0", 126 "ts-node": "10.9. 1",116 "ts-node": "10.9.2", 127 117 "typescript": "4.1.5" 128 118 }, 129 "config": { 130 "commitizen": { 131 "path": "git-cz" 119 "files": [ 120 "lib/", 121 "esm/" 122 ], 123 "homepage": "https://github.com/streamich/react-use#readme", 124 "husky": { 125 "hooks": { 126 "pre-commit": "lint-staged", 127 "pre-push": "yarn lint && yarn clean && yarn build && yarn test" 132 128 } 129 }, 130 "license": "Unlicense", 131 "lint-staged": { 132 "src/**/**/*.{ts,tsx}": [ 133 "eslint --fix", 134 "git add" 135 ] 136 }, 137 "main": "lib/index.js", 138 "module": "esm/index.js", 139 "name": "react-use", 140 "peerDependencies": { 141 "react": "*", 142 "react-dom": "*" 133 143 }, 134 144 "release": { … … 151 161 ] 152 162 }, 153 "lint-staged": { 154 "src/**/**/*.{ts,tsx}": [ 155 "eslint --fix", 156 "git add" 157 ] 163 "repository": { 164 "type": "git", 165 "url": "git+https://github.com/streamich/react-use.git" 158 166 }, 167 "scripts": { 168 "build": "yarn build:cjs && yarn build:es", 169 "build:cjs": "tsc", 170 "build:es": "tsc -m esNext --outDir esm", 171 "clean": "rimraf lib storybook-static esm", 172 "lint": "eslint \"{src,tests,stories}/**/*.{ts,tsx}\"", 173 "lint:fix": "yarn lint --fix", 174 "lint:types": "tsc --noEmit", 175 "release": "semantic-release", 176 "start": "yarn storybook", 177 "storybook": "start-storybook -p 6008", 178 "storybook:build": "build-storybook", 179 "storybook:clean": "rimraf storybook-static", 180 "storybook:upload": "gh-pages -d storybook-static --git \"$(which git)\"", 181 "test": "jest --maxWorkers 2", 182 "test:coverage": "jest --coverage", 183 "test:ssr": "jest --maxWorkers 2 --config ./jest.config.node.ts", 184 "test:watch": "jest --watch" 185 }, 186 "sideEffects": false, 187 "types": "lib/index.d.ts", 188 "typings": "lib/index.d.ts", 189 "version": "17.6.0", 159 190 "volta": { 160 "node": "14.21.1", 161 "yarn": "1.22.19" 162 }, 163 "collective": { 164 "type": "opencollective", 165 "url": "https://opencollective.com/react-use" 191 "node": "14.21.3", 192 "yarn": "1.22.22" 166 193 } 167 194 }
Note:
See TracChangeset
for help on using the changeset viewer.