@foxglove/embed-react 0.67.0 → 0.68.0
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":"useShouldNotChangeOften.d.ts","sourceRoot":"","sources":["../src/useShouldNotChangeOften.ts"],"names":[],"mappings":"AAKA,+DAA+D;AAC/D,wBAAgB,uBAAuB,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,IAAI,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"useShouldNotChangeOften.d.ts","sourceRoot":"","sources":["../src/useShouldNotChangeOften.ts"],"names":[],"mappings":"AAKA,+DAA+D;AAC/D,wBAAgB,uBAAuB,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,IAAI,GAAG,CAAC,CAqBxE"}
|
|
@@ -6,13 +6,20 @@ export function useShouldNotChangeOften(value, warn) {
|
|
|
6
6
|
const prev = useRef(value);
|
|
7
7
|
const prevPrev = useRef(value);
|
|
8
8
|
const lastTime = useRef(Date.now());
|
|
9
|
-
if (
|
|
9
|
+
if (
|
|
10
|
+
// eslint-disable-next-line react-hooks/refs -- Pre-existing violation, not yet migrated.
|
|
11
|
+
value !== prev.current &&
|
|
12
|
+
// eslint-disable-next-line react-hooks/refs -- Pre-existing violation, not yet migrated.
|
|
10
13
|
prev.current !== prevPrev.current &&
|
|
14
|
+
// eslint-disable-next-line react-hooks/refs -- Pre-existing violation, not yet migrated.
|
|
11
15
|
Date.now() - lastTime.current < 200) {
|
|
12
16
|
warn();
|
|
13
17
|
}
|
|
18
|
+
// eslint-disable-next-line react-hooks/refs -- Pre-existing violation, not yet migrated.
|
|
14
19
|
prevPrev.current = prev.current;
|
|
20
|
+
// eslint-disable-next-line react-hooks/refs -- Pre-existing violation, not yet migrated.
|
|
15
21
|
prev.current = value;
|
|
22
|
+
// eslint-disable-next-line react-hooks/refs -- Pre-existing violation, not yet migrated.
|
|
16
23
|
lastTime.current = Date.now();
|
|
17
24
|
return value;
|
|
18
25
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useShouldNotChangeOften.js","sourceRoot":"","sources":["../src/useShouldNotChangeOften.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,0DAA0D;AAE1D,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAE/B,+DAA+D;AAC/D,MAAM,UAAU,uBAAuB,CAAI,KAAQ,EAAE,IAAgB;IACnE,MAAM,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAC3B,MAAM,QAAQ,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAC/B,MAAM,QAAQ,GAAG,MAAM,CAAS,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;IAC5C
|
|
1
|
+
{"version":3,"file":"useShouldNotChangeOften.js","sourceRoot":"","sources":["../src/useShouldNotChangeOften.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,0DAA0D;AAE1D,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAE/B,+DAA+D;AAC/D,MAAM,UAAU,uBAAuB,CAAI,KAAQ,EAAE,IAAgB;IACnE,MAAM,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAC3B,MAAM,QAAQ,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAC/B,MAAM,QAAQ,GAAG,MAAM,CAAS,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;IAC5C;IACE,yFAAyF;IACzF,KAAK,KAAK,IAAI,CAAC,OAAO;QACtB,yFAAyF;QACzF,IAAI,CAAC,OAAO,KAAK,QAAQ,CAAC,OAAO;QACjC,yFAAyF;QACzF,IAAI,CAAC,GAAG,EAAE,GAAG,QAAQ,CAAC,OAAO,GAAG,GAAG,EACnC,CAAC;QACD,IAAI,EAAE,CAAC;IACT,CAAC;IACD,yFAAyF;IACzF,QAAQ,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;IAChC,yFAAyF;IACzF,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;IACrB,yFAAyF;IACzF,QAAQ,CAAC,OAAO,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IAC9B,OAAO,KAAK,CAAC;AACf,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@foxglove/embed-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.68.0",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"foxglove",
|
|
6
6
|
"react",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"prepack": "yarn build"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@foxglove/embed": "0.
|
|
34
|
+
"@foxglove/embed": "0.68.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@types/react": "19.2.18",
|
|
@@ -9,14 +9,20 @@ export function useShouldNotChangeOften<T>(value: T, warn: () => void): T {
|
|
|
9
9
|
const prevPrev = useRef(value);
|
|
10
10
|
const lastTime = useRef<number>(Date.now());
|
|
11
11
|
if (
|
|
12
|
+
// eslint-disable-next-line react-hooks/refs -- Pre-existing violation, not yet migrated.
|
|
12
13
|
value !== prev.current &&
|
|
14
|
+
// eslint-disable-next-line react-hooks/refs -- Pre-existing violation, not yet migrated.
|
|
13
15
|
prev.current !== prevPrev.current &&
|
|
16
|
+
// eslint-disable-next-line react-hooks/refs -- Pre-existing violation, not yet migrated.
|
|
14
17
|
Date.now() - lastTime.current < 200
|
|
15
18
|
) {
|
|
16
19
|
warn();
|
|
17
20
|
}
|
|
21
|
+
// eslint-disable-next-line react-hooks/refs -- Pre-existing violation, not yet migrated.
|
|
18
22
|
prevPrev.current = prev.current;
|
|
23
|
+
// eslint-disable-next-line react-hooks/refs -- Pre-existing violation, not yet migrated.
|
|
19
24
|
prev.current = value;
|
|
25
|
+
// eslint-disable-next-line react-hooks/refs -- Pre-existing violation, not yet migrated.
|
|
20
26
|
lastTime.current = Date.now();
|
|
21
27
|
return value;
|
|
22
28
|
}
|