@chakra-ui/react-env
Advanced tools
Comparing version 2.0.6 to 2.0.7
{ | ||
"name": "@chakra-ui/react-env", | ||
"version": "2.0.6", | ||
"version": "2.0.7", | ||
"description": "Component and hook for handling window and document object in iframe or ssr environment", | ||
@@ -34,5 +34,2 @@ "keywords": [ | ||
}, | ||
"dependencies": { | ||
"@chakra-ui/utils": "2.0.6" | ||
}, | ||
"peerDependencies": { | ||
@@ -52,4 +49,3 @@ "react": ">=18" | ||
"build:fast": "JSX=1 tsup src/index.ts" | ||
}, | ||
"readme": "# @chakra-ui/react-env\n\nReact component and hook for handling window and document object in iframe or\nssr environment\n\n> This is an internal utility, not intended for public usage.\n\n## Installation\n\n```sh\nyarn add @chakra-ui/react-env\n# or\nnpm i @chakra-ui/react-env\n```\n\n## Usage\n\nTo get it working, you need to wrap your app in `EnvironmentProvider` and call\nthe `useEnvironment` hook anywhere in your app to get access to the correct\n`window` and `document`.\n\n```jsx\nimport { EnvironmentProvider } from \"@chakra-ui/react-env\"\n\n// in your App\nconst App = ({ children }) => {\n return <EnvironmentProvider>{children}</EnvironmentProvider>\n}\n\n// read the environment\nconst WindowSize = () => {\n const { window } = useEnvironment()\n return (\n <pre>\n {JSON.stringify({\n w: window.innerWidth,\n h: window.innerHeight,\n })}\n </pre>\n )\n}\n```\n\nIf you wrap specific aspects of your app within an `iframe`, you'll need to wrap\nthe content in the iframe in `EnvironmentProvider` to provide the correct\n`window` and `document` to its content.\n\n```jsx\n// in your app\nconst EmbeddedIFrame = () => {\n return (\n <Frame>\n <EnvironmentProvider>\n <WindowSize />\n </EnvironmentProvider>\n </Frame>\n )\n}\n```\n\n## Contribution\n\nYes please! See the\n[contributing guidelines](https://github.com/chakra-ui/chakra-ui/blob/master/CONTRIBUTING.md)\nfor details.\n\n## Licence\n\nThis project is licensed under the terms of the\n[MIT license](https://github.com/chakra-ui/chakra-ui/blob/master/LICENSE).\n" | ||
} | ||
} |
Empty package
Supply chain riskPackage does not contain any code. It may be removed, is name squatting, or the result of a faulty package publish.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
1
3817
3
0
2
- Removed@chakra-ui/utils@2.0.6
- Removed@chakra-ui/utils@2.0.6(transitive)
- Removed@types/lodash@4.17.15(transitive)
- Removed@types/lodash.mergewith@4.6.6(transitive)
- Removedcss-box-model@1.2.1(transitive)
- Removedframesync@5.3.0(transitive)
- Removedlodash.mergewith@4.6.2(transitive)
- Removedtiny-invariant@1.3.3(transitive)
- Removedtslib@2.8.1(transitive)