publ-echo-test 0.0.56 → 0.0.58

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.
@@ -32,8 +32,8 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
32
32
  import { createElement as _createElement } from "react";
33
33
  import { jsx as _jsx } from "react/jsx-runtime";
34
34
  import React, { useEffect, useRef } from "react";
35
- import { DraggableCore } from "react-draggable";
36
35
  import { cloneElement } from "./utils/cloneElement";
36
+ import { DraggableCore } from "../Draggable";
37
37
  var Resizable = function (_a) {
38
38
  var children = _a.children, _b = _a.axis, axis = _b === void 0 ? "both" : _b, _c = _a.handleSize, handleSize = _c === void 0 ? [20, 20] : _c, _d = _a.lockAspectRatio, lockAspectRatio = _d === void 0 ? false : _d, _e = _a.minConstraints, minConstraints = _e === void 0 ? [20, 20] : _e, _f = _a.maxConstraints, maxConstraints = _f === void 0 ? [Infinity, Infinity] : _f, _g = _a.resizeHandles, resizeHandles = _g === void 0 ? ["se"] : _g, _h = _a.transformScale, transformScale = _h === void 0 ? 1 : _h, isResizing = _a.isResizing, autoResize = _a.autoResize, colWidth = _a.colWidth, margin = _a.margin, props = __rest(_a, ["children", "axis", "handleSize", "lockAspectRatio", "minConstraints", "maxConstraints", "resizeHandles", "transformScale", "isResizing", "autoResize", "colWidth", "margin"]);
39
39
  var handleRefs = useRef({
@@ -119,6 +119,8 @@ var Resizable = function (_a) {
119
119
  width = height * ratio;
120
120
  }
121
121
  }
122
+ console.log('w: ', width);
123
+ console.log('minW: ', minWidth.current);
122
124
  var _b = [width, height], oldW = _b[0], oldH = _b[1];
123
125
  var _c = (_a = slack.current) !== null && _a !== void 0 ? _a : [0, 0], slackW = _c[0], slackH = _c[1];
124
126
  width += slackW;
@@ -141,8 +143,6 @@ var Resizable = function (_a) {
141
143
  height = Math.min(maxConstraints[1], height);
142
144
  }
143
145
  slack.current = [slackW + (oldW - width), slackH + (oldH - height)];
144
- console.log(slack.current);
145
- console.log(oldW, width);
146
146
  return [width, height];
147
147
  };
148
148
  var checkTopLeft = function (deltaX, deltaY, top, left, width, height, handleAxis) {
@@ -229,6 +229,7 @@ var Resizable = function (_a) {
229
229
  if (axisV === "n") {
230
230
  deltaY = -deltaY;
231
231
  }
232
+ console.log(deltaX);
232
233
  var width = props.width + (canDragX ? deltaX / transformScale : 0);
233
234
  var height = props.height + (canDragY ? deltaY / transformScale : 0);
234
235
  var left = (_h = props === null || props === void 0 ? void 0 : props.left) !== null && _h !== void 0 ? _h : 0;
@@ -239,7 +240,6 @@ var Resizable = function (_a) {
239
240
  if (axisH === "w") {
240
241
  left = left - deltaX;
241
242
  }
242
- // console.log(width);
243
243
  _b = checkConstraints(width, height), width = _b[0], height = _b[1];
244
244
  if (autoResize && minHeight.current === height) {
245
245
  handleAxis = removeNorthHandle(handleAxis);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "publ-echo-test",
3
- "version": "0.0.56",
3
+ "version": "0.0.58",
4
4
  "private": false,
5
5
  "main": "dist/lib/index.js",
6
6
  "types": "dist/lib/index.d.js",
@@ -52,8 +52,5 @@
52
52
  "styled-components": "^5.3.10",
53
53
  "typescript": "^5.1.6",
54
54
  "web-vitals": "^2.1.4"
55
- },
56
- "dependencies": {
57
- "react-draggable": "^4.4.6"
58
55
  }
59
56
  }