@pinnacle0/web-ui 0.5.62 → 0.5.63
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.
|
@@ -19,7 +19,7 @@ export declare const canMinus: (_: {
|
|
|
19
19
|
export declare const getDisplayValue: (_: {
|
|
20
20
|
value: number | null;
|
|
21
21
|
scale: number;
|
|
22
|
-
displayRenderer?: (
|
|
22
|
+
displayRenderer?: (value: number) => string;
|
|
23
23
|
}) => string;
|
|
24
24
|
/**
|
|
25
25
|
* @param userInput Raw text from the input field, may or may not be convertible to `null` or a valid number
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "../internal/polyfill/ResizeObserver";
|
|
3
|
+
export function useResizeObserver(onResize) {
|
|
4
|
+
var ref = React.useRef(null);
|
|
5
|
+
var observer = React.useMemo(function () {
|
|
6
|
+
return new ResizeObserver(function (entries) {
|
|
7
|
+
onResize(entries[0].contentRect);
|
|
8
|
+
});
|
|
9
|
+
}, [onResize]);
|
|
10
|
+
React.useEffect(function () {
|
|
11
|
+
var current = ref.current;
|
|
12
|
+
if (current !== null) {
|
|
13
|
+
observer.observe(current);
|
|
14
|
+
}
|
|
15
|
+
return function () {
|
|
16
|
+
if (current !== null) {
|
|
17
|
+
observer.unobserve(current);
|
|
18
|
+
}
|
|
19
|
+
observer.disconnect();
|
|
20
|
+
};
|
|
21
|
+
}, [observer]);
|
|
22
|
+
return ref;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=useResizeObserver.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useResizeObserver.js","sourceRoot":"","sources":["../../src/hooks/useResizeObserver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,qCAAqC,CAAC;AAE7C,MAAM,UAAU,iBAAiB,CAAC,QAAiC;IAC/D,IAAM,GAAG,GAAG,KAAK,CAAC,MAAM,CAAiB,IAAI,CAAC,CAAC;IAE/C,IAAM,QAAQ,GAAG,KAAK,CAAC,OAAO,CAC1B;QACI,OAAA,IAAI,cAAc,CAAC,UAAA,OAAO;YACtB,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC;QACrC,CAAC,CAAC;IAFF,CAEE,EACN,CAAC,QAAQ,CAAC,CACb,CAAC;IAEF,KAAK,CAAC,SAAS,CAAC;QACZ,IAAM,OAAO,GAAG,GAAG,CAAC,OAAO,CAAC;QAE5B,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;YACnB,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QAC9B,CAAC;QAED,OAAO;YACH,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;gBACnB,QAAQ,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;YAChC,CAAC;YACD,QAAQ,CAAC,UAAU,EAAE,CAAC;QAC1B,CAAC,CAAC;IACN,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,OAAO,GAAG,CAAC;AACf,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pinnacle0/web-ui",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.63",
|
|
4
4
|
"author": "Pinnacle",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"sideEffects": [
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
"react": "18.3.1",
|
|
50
50
|
"react-dom": "18.3.1",
|
|
51
51
|
"react-router-dom": "5.3.0",
|
|
52
|
-
"@pinnacle0/
|
|
53
|
-
"@pinnacle0/
|
|
52
|
+
"@pinnacle0/devtool-util": "1.2.13",
|
|
53
|
+
"@pinnacle0/webpack-util": "0.6.4"
|
|
54
54
|
},
|
|
55
55
|
"publishConfig": {
|
|
56
56
|
"directory": "build",
|