publ-echo 0.0.58 → 0.0.59

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.
@@ -116,7 +116,7 @@ var GridItem = function (_a) {
116
116
  * @param {Object} position Position object (pixel values)
117
117
  * @return {Element} Child wrapped in Resizable.
118
118
  */
119
- var mixinResizable = function (child, position, isResizable) {
119
+ var mixinResizable = function (child, position, isResizable, placeholderHeight) {
120
120
  var positionParams = getPositionParams();
121
121
  // const maxWidth = calcGridItemPosition(
122
122
  // positionParams,
@@ -133,6 +133,8 @@ var GridItem = function (_a) {
133
133
  Math.min(maxes.width, containerWidth),
134
134
  Math.min(maxes.height, Infinity),
135
135
  ];
136
+ console.log('from mixin: ', textContentHeight);
137
+ console.log('prop value: ', placeholderHeight);
136
138
  return (_jsx(Resizable, { draggableOpts: {
137
139
  disabled: !isResizable,
138
140
  }, className: isResizable ? undefined : "react-resizable-hide", width: position.width, height: position.height, top: position.top, left: position.left, minConstraints: minConstraints, maxConstraints: maxConstraints, onResizeStop: onResizeStop, onResizeStart: onResizeStart, onResize: onResize, transformScale: transformScale, resizeHandles: props.resizeHandles, handle: resizeHandle, children: child }));
@@ -448,7 +450,7 @@ var GridItem = function (_a) {
448
450
  }),
449
451
  style: __assign(__assign(__assign({}, props.style), child.props.style), createStyle(pos)),
450
452
  });
451
- newChild = mixinResizable(newChild, pos, isResizable);
453
+ newChild = mixinResizable(newChild, pos, isResizable, textContentHeight !== null && textContentHeight !== void 0 ? textContentHeight : 0);
452
454
  newChild = mixinDraggable(newChild, isDraggable);
453
455
  return newChild;
454
456
  };
@@ -46,6 +46,11 @@ var Resizable = function (_a) {
46
46
  ne: useRef(null),
47
47
  nw: useRef(null),
48
48
  });
49
+ // const elementRef = useRef<HTMLDivElement>(null);
50
+ // const { textContentHeight, myHeightRef } = useResizeObserver({
51
+ // ref: elementRef,
52
+ // box: 'border-box',
53
+ // } ,[])
49
54
  var startPosition = useRef(null);
50
55
  var startSize = useRef(null);
51
56
  var lastHandleRect = null;
@@ -103,6 +103,7 @@ export function useResizeObserver(options, deps) {
103
103
  observer.disconnect();
104
104
  };
105
105
  }, __spreadArray([box, ref, isMounted], deps, true));
106
+ console.log('--SIZE FROM OBSERVER--', size.textContentHeight);
106
107
  return __assign(__assign({}, size), { myHeightRef: refvalue });
107
108
  }
108
109
  function extractSize(entry, box, sizeType) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "publ-echo",
3
- "version": "0.0.58",
3
+ "version": "0.0.59",
4
4
  "private": false,
5
5
  "main": "dist/lib/index.js",
6
6
  "types": "dist/lib/index.d.js",