@os-design/use-long-press 1.0.28 → 1.0.30

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/index.js CHANGED
@@ -3,7 +3,7 @@ import { useCallback, useEffect, useRef, useState } from 'react';
3
3
  const useLongPress = (callback, ms = 500) => {
4
4
  const callbackRef = useRef(callback);
5
5
  const msRef = useRef(ms);
6
- const timeout = useRef();
6
+ const timeout = useRef(undefined);
7
7
  const [pressed, setPressed] = useState(false);
8
8
  useEffect(() => {
9
9
  callbackRef.current = callback;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@os-design/use-long-press",
3
- "version": "1.0.28",
3
+ "version": "1.0.30",
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-prevent-default-event": "^1.0.28"
32
+ "@os-design/use-prevent-default-event": "^1.0.30"
33
33
  },
34
34
  "peerDependencies": {
35
- "react": "18"
35
+ "react": "19"
36
36
  },
37
- "gitHead": "60ba6c5b1658a4a302a3542e71e2ab3ce6407665"
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 UseLongPressExample from './index.example';
3
3
 
4
4
  <Meta title='Utils/useLongPress' />
package/src/index.ts CHANGED
@@ -19,7 +19,7 @@ const useLongPress = (
19
19
  ): LongPressHandlers => {
20
20
  const callbackRef = useRef(callback);
21
21
  const msRef = useRef(ms);
22
- const timeout = useRef<NodeJS.Timeout>();
22
+ const timeout = useRef<NodeJS.Timeout>(undefined);
23
23
  const [pressed, setPressed] = useState(false);
24
24
 
25
25
  useEffect(() => {