@vuu-ui/vuu-layout 0.8.1-debug → 0.8.2-debug
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/cjs/index.js +13 -7
- package/cjs/index.js.map +2 -2
- package/esm/index.js +13 -7
- package/esm/index.js.map +2 -2
- package/index.css +3 -3
- package/index.css.map +1 -1
- package/package.json +3 -3
- package/types/layout-view/viewTypes.d.ts +1 -0
- package/types/responsive/useResizeObserver.d.ts +1 -1
package/esm/index.js
CHANGED
|
@@ -4065,10 +4065,13 @@ function useResizeObserver(ref, dimensions, onResize, reportInitialSize = false)
|
|
|
4065
4065
|
const dimensionsRef = useRef5(dimensions);
|
|
4066
4066
|
const measure = useCallback8((target) => {
|
|
4067
4067
|
const rect = target.getBoundingClientRect();
|
|
4068
|
-
return dimensionsRef.current.reduce(
|
|
4069
|
-
map
|
|
4070
|
-
|
|
4071
|
-
|
|
4068
|
+
return dimensionsRef.current.reduce(
|
|
4069
|
+
(map, dim) => {
|
|
4070
|
+
map[dim] = getTargetSize(target, rect, dim);
|
|
4071
|
+
return map;
|
|
4072
|
+
},
|
|
4073
|
+
{}
|
|
4074
|
+
);
|
|
4072
4075
|
}, []);
|
|
4073
4076
|
useLayoutEffect(() => {
|
|
4074
4077
|
const target = ref.current;
|
|
@@ -4094,7 +4097,9 @@ function useResizeObserver(ref, dimensions, onResize, reportInitialSize = false)
|
|
|
4094
4097
|
}
|
|
4095
4098
|
if (target) {
|
|
4096
4099
|
if (observedMap.has(target)) {
|
|
4097
|
-
throw Error(
|
|
4100
|
+
throw Error(
|
|
4101
|
+
"useResizeObserver attemping to observe same element twice"
|
|
4102
|
+
);
|
|
4098
4103
|
}
|
|
4099
4104
|
void registerObserver();
|
|
4100
4105
|
}
|
|
@@ -4105,7 +4110,7 @@ function useResizeObserver(ref, dimensions, onResize, reportInitialSize = false)
|
|
|
4105
4110
|
cleanedUp = true;
|
|
4106
4111
|
}
|
|
4107
4112
|
};
|
|
4108
|
-
}, [ref, measure]);
|
|
4113
|
+
}, [ref, measure, reportInitialSize, onResize]);
|
|
4109
4114
|
useLayoutEffect(() => {
|
|
4110
4115
|
const target = ref.current;
|
|
4111
4116
|
const record = observedMap.get(target);
|
|
@@ -4661,6 +4666,7 @@ var View = forwardRef5(function View2(props, forwardedRef) {
|
|
|
4661
4666
|
className,
|
|
4662
4667
|
collapsed,
|
|
4663
4668
|
closeable,
|
|
4669
|
+
"data-path": dataPath,
|
|
4664
4670
|
"data-resizeable": dataResizeable,
|
|
4665
4671
|
dropTargets,
|
|
4666
4672
|
expanded,
|
|
@@ -4668,7 +4674,7 @@ var View = forwardRef5(function View2(props, forwardedRef) {
|
|
|
4668
4674
|
id: idProp,
|
|
4669
4675
|
header,
|
|
4670
4676
|
orientation = "horizontal",
|
|
4671
|
-
path,
|
|
4677
|
+
path = dataPath,
|
|
4672
4678
|
resize = "responsive",
|
|
4673
4679
|
resizeable = dataResizeable,
|
|
4674
4680
|
tearOut,
|