publ-echo-test 0.0.12 → 0.0.14

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.
@@ -53,9 +53,12 @@ var Resizable = function (_a) {
53
53
  var className = props.className, draggableOpts = props.draggableOpts, width = props.width, height = props.height, handle = props.handle, onResize = props.onResize, onResizeStop = props.onResizeStop, onResizeStart = props.onResizeStart, restProps = __rest(props, ["className", "draggableOpts", "width", "height", "handle", "onResize", "onResizeStop", "onResizeStart"]);
54
54
  var elementRef = children.ref;
55
55
  var extendedHeightRef = useRef(null);
56
+ var minWidth = useRef(0);
56
57
  useEffect(function () {
58
+ var _a;
57
59
  if (!isResizing) {
58
60
  extendedHeightRef.current = null;
61
+ minWidth.current = 0;
59
62
  return;
60
63
  }
61
64
  if (!elementRef.current) {
@@ -65,13 +68,18 @@ var Resizable = function (_a) {
65
68
  if (!placeholder) {
66
69
  return;
67
70
  }
68
- var target = placeholder.children[0].children[0];
71
+ var target = (_a = placeholder.children[0].children[0].children[0]) !== null && _a !== void 0 ? _a : placeholder.children[0].children[0];
69
72
  if (target.clientHeight > elementRef.current.clientHeight) {
70
73
  extendedHeightRef.current = target.clientHeight;
71
74
  }
72
75
  else {
73
76
  extendedHeightRef.current = null;
74
77
  }
78
+ var minWidthStyle = target.computedStyleMap().get('min-width');
79
+ console.log('minwidth Style: ', minWidthStyle);
80
+ if (typeof minWidthStyle.value === 'number') {
81
+ minWidth.current = minWidthStyle.value;
82
+ }
75
83
  }, [isResizing, children]);
76
84
  var resetData = function () {
77
85
  lastHandleRect = slack = null;
@@ -202,6 +210,7 @@ var Resizable = function (_a) {
202
210
  if (axisH === "w") {
203
211
  left = left - deltaX;
204
212
  }
213
+ width = width > minWidth.current ? width : minWidth.current;
205
214
  if (extendedHeightRef.current) {
206
215
  height = extendedHeightRef.current;
207
216
  handleAxis = removeNorthHandle(handleAxis);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "publ-echo-test",
3
- "version": "0.0.12",
3
+ "version": "0.0.14",
4
4
  "private": false,
5
5
  "main": "dist/lib/index.js",
6
6
  "types": "dist/lib/index.d.js",