@os-design/use-size 1.0.33 → 1.0.34

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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,EAAoC,MAAM,OAAO,CAAC;AAEzE,UAAU,IAAI;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,QAAA,MAAM,OAAO,GAAI,YAAY,OAAO,GAAG,SAAS,CAAC,OAAO,CAAC,KAAG,IA+B3D,CAAC;AAEF,eAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,EAAoC,MAAM,OAAO,CAAC;AAEzE,UAAU,IAAI;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,QAAA,MAAM,OAAO,GAAI,YAAY,OAAO,GAAG,SAAS,CAAC,OAAO,CAAC,KAAG,IAgC3D,CAAC;AAEF,eAAe,OAAO,CAAC"}
package/dist/index.js CHANGED
@@ -23,6 +23,7 @@ const useSize = container => {
23
23
 
24
24
  // Init the size of the container
25
25
  useEffect(() => {
26
+ // eslint-disable-next-line react-hooks/set-state-in-effect
26
27
  updateSize();
27
28
  }, [updateSize]);
28
29
  useEvent(typeof window !== 'undefined' ? window : undefined, 'resize', updateSize);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@os-design/use-size",
3
- "version": "1.0.33",
3
+ "version": "1.0.34",
4
4
  "license": "UNLICENSED",
5
5
  "repository": "git@gitlab.com:os-team/libs/os-design.git",
6
6
  "type": "module",
@@ -23,16 +23,16 @@
23
23
  "build:esm": "cross-env BABEL_ENV=esm babel src --root-mode upward --extensions .ts,.tsx --out-dir dist",
24
24
  "build:types": "tsc -p tsconfig.build.json --emitDeclarationOnly --declaration --declarationDir dist",
25
25
  "build": "yarn clean && npm-run-all 'build:*'",
26
- "ncu": "ncu -u '/^(?!(react|@types/react)$).*$/'"
26
+ "ncu": "ncu -u"
27
27
  },
28
28
  "publishConfig": {
29
29
  "access": "public"
30
30
  },
31
31
  "dependencies": {
32
- "@os-design/use-event": "^1.0.32"
32
+ "@os-design/use-event": "^1.0.33"
33
33
  },
34
34
  "peerDependencies": {
35
- "react": "18"
35
+ "react": "19"
36
36
  },
37
- "gitHead": "7a2aee283bdbdba8ba69a3212769ad321beaaed2"
37
+ "gitHead": "f333f60e39273574d2227cf0ee70b0c8897b2dde"
38
38
  }
package/src/index.mdx CHANGED
@@ -1,4 +1,4 @@
1
- import { Meta } from '@storybook/blocks';
1
+ import { Meta } from '@storybook/addon-docs/blocks';
2
2
  import UseSizeExample from './index.example';
3
3
 
4
4
  <Meta title='Utils/useSize' />
package/src/index.ts CHANGED
@@ -27,6 +27,7 @@ const useSize = (container?: Element | RefObject<Element>): Size => {
27
27
 
28
28
  // Init the size of the container
29
29
  useEffect(() => {
30
+ // eslint-disable-next-line react-hooks/set-state-in-effect
30
31
  updateSize();
31
32
  }, [updateSize]);
32
33