@pexip-engage-public/utils 0.1.47 → 0.1.48
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/CHANGELOG.md
CHANGED
package/dist/useEffectEvent.d.ts
CHANGED
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
* Polyfill until actual `useEffectEvent` lands:
|
|
3
3
|
* https://beta.reactjs.org/learn/separating-events-from-effects#declaring-an-effect-event
|
|
4
4
|
*/
|
|
5
|
-
export declare function
|
|
5
|
+
export declare function useRefEffectEvent<Args extends unknown[], ReturnType>(fn: (...args: Args) => ReturnType): (...args: Args) => ReturnType;
|
|
6
6
|
//# sourceMappingURL=useEffectEvent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useEffectEvent.d.ts","sourceRoot":"","sources":["../src/useEffectEvent.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,wBAAgB,
|
|
1
|
+
{"version":3,"file":"useEffectEvent.d.ts","sourceRoot":"","sources":["../src/useEffectEvent.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,SAAS,OAAO,EAAE,EAAE,UAAU,EAClE,EAAE,EAAE,CAAC,GAAG,IAAI,EAAE,IAAI,KAAK,UAAU,aAQJ,IAAI,gBAClC"}
|
package/dist/useEffectEvent.js
CHANGED
|
@@ -3,7 +3,7 @@ import { useCallback, useEffect, useRef } from "react";
|
|
|
3
3
|
* Polyfill until actual `useEffectEvent` lands:
|
|
4
4
|
* https://beta.reactjs.org/learn/separating-events-from-effects#declaring-an-effect-event
|
|
5
5
|
*/
|
|
6
|
-
export function
|
|
6
|
+
export function useRefEffectEvent(fn) {
|
|
7
7
|
const ref = useRef(fn);
|
|
8
8
|
useEffect(() => {
|
|
9
9
|
ref.current = fn;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useEffectEvent.js","sourceRoot":"","sources":["../src/useEffectEvent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAEvD;;;GAGG;AACH,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"useEffectEvent.js","sourceRoot":"","sources":["../src/useEffectEvent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAEvD;;;GAGG;AACH,MAAM,UAAU,iBAAiB,CAC/B,EAAiC;IAEjC,MAAM,GAAG,GAAG,MAAM,CAAC,EAAE,CAAC,CAAC;IAEvB,SAAS,CAAC,GAAG,EAAE;QACb,GAAG,CAAC,OAAO,GAAG,EAAE,CAAC;IACnB,CAAC,CAAC,CAAC;IAEH,OAAO,WAAW,CAAC,CAAC,GAAG,IAAU,EAAE,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;AAClE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pexip-engage-public/utils",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.48",
|
|
4
4
|
"description": "Shared utils for Pexip Engage",
|
|
5
5
|
"homepage": "https://github.com/skedify/frontend-mono/tree/develop/packages/utils#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -34,12 +34,12 @@
|
|
|
34
34
|
"src"
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"react": "^19.
|
|
37
|
+
"react": "^19.2.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"vitest": "^
|
|
40
|
+
"vitest": "^4.0.3",
|
|
41
41
|
"@pexip-engage/tsconfig": "0.1.1",
|
|
42
|
-
"eslint-config-pexip-engage": "1.1.
|
|
42
|
+
"eslint-config-pexip-engage": "1.1.36"
|
|
43
43
|
},
|
|
44
44
|
"volta": {
|
|
45
45
|
"extends": "../../package.json"
|
package/src/useEffectEvent.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { useCallback, useEffect, useRef } from "react";
|
|
|
4
4
|
* Polyfill until actual `useEffectEvent` lands:
|
|
5
5
|
* https://beta.reactjs.org/learn/separating-events-from-effects#declaring-an-effect-event
|
|
6
6
|
*/
|
|
7
|
-
export function
|
|
7
|
+
export function useRefEffectEvent<Args extends unknown[], ReturnType>(
|
|
8
8
|
fn: (...args: Args) => ReturnType,
|
|
9
9
|
) {
|
|
10
10
|
const ref = useRef(fn);
|