@fileverse-dev/fortune-react 1.1.59 → 1.1.61

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.
@@ -75,16 +75,16 @@ export var DraggableDiv = function DraggableDiv(_a) {
75
75
  var newY = e.clientY - dragOffset.y;
76
76
  var elementWidth = ((_a = divRef.current) === null || _a === void 0 ? void 0 : _a.offsetWidth) || 0;
77
77
  var elementHeight = ((_b = divRef.current) === null || _b === void 0 ? void 0 : _b.offsetHeight) || 0;
78
- if (newX + initialWindowPos.x + 150 > window.innerWidth - elementWidth) {
78
+ if (newX + initialWindowPos.x + 320 > window.innerWidth - elementWidth) {
79
79
  newX = current.x;
80
80
  }
81
- if (newY + initialWindowPos.y + 200 > window.innerHeight - elementHeight) {
81
+ if (newY + initialWindowPos.y + 275 > window.innerHeight - elementHeight) {
82
82
  newY = current.y;
83
83
  }
84
- if (newX + initialWindowPos.x < 0) {
84
+ if (newX + initialWindowPos.x - 35 < 0) {
85
85
  newX = current.x;
86
86
  }
87
- if (newY + initialWindowPos.y < 0) {
87
+ if (newY + initialWindowPos.y - 60 < 0) {
88
88
  newY = current.y;
89
89
  }
90
90
  return {
@@ -104,16 +104,16 @@ export var DraggableDiv = function DraggableDiv(_a) {
104
104
  var newY = touch.clientY - dragOffset.y;
105
105
  var elementWidth = ((_a = divRef.current) === null || _a === void 0 ? void 0 : _a.offsetWidth) || 0;
106
106
  var elementHeight = ((_b = divRef.current) === null || _b === void 0 ? void 0 : _b.offsetHeight) || 0;
107
- if (newX + initialWindowPos.x + 100 > window.innerWidth - elementWidth) {
107
+ if (newX + initialWindowPos.x + 250 > window.innerWidth - elementWidth) {
108
108
  newX = current.x;
109
109
  }
110
- if (newY + initialWindowPos.y + 200 > window.innerHeight - elementHeight) {
110
+ if (newY + initialWindowPos.y + 220 > window.innerHeight - elementHeight) {
111
111
  newY = current.y;
112
112
  }
113
- if (newX + initialWindowPos.x < 0) {
113
+ if (newX + initialWindowPos.x - 10 < 0) {
114
114
  newX = current.x;
115
115
  }
116
- if (newY + initialWindowPos.y < 0) {
116
+ if (newY + initialWindowPos.y - 25 < 0) {
117
117
  newY = current.y;
118
118
  }
119
119
  return {
@@ -258,7 +258,8 @@ var FormulaHint = function FormulaHint(props) {
258
258
  style: {
259
259
  backgroundColor: "".concat(fn.BRAND_COLOR ? fn.BRAND_COLOR : "#F8F9FA"),
260
260
  maxHeight: "284px",
261
- overflowY: "scroll"
261
+ overflowY: "scroll",
262
+ cursor: "auto"
262
263
  }
263
264
  }, fn.API_KEY && (/*#__PURE__*/React.createElement("div", {
264
265
  style: {
@@ -82,16 +82,16 @@ var DraggableDiv = exports.DraggableDiv = function DraggableDiv(_a) {
82
82
  var newY = e.clientY - dragOffset.y;
83
83
  var elementWidth = ((_a = divRef.current) === null || _a === void 0 ? void 0 : _a.offsetWidth) || 0;
84
84
  var elementHeight = ((_b = divRef.current) === null || _b === void 0 ? void 0 : _b.offsetHeight) || 0;
85
- if (newX + initialWindowPos.x + 150 > window.innerWidth - elementWidth) {
85
+ if (newX + initialWindowPos.x + 320 > window.innerWidth - elementWidth) {
86
86
  newX = current.x;
87
87
  }
88
- if (newY + initialWindowPos.y + 200 > window.innerHeight - elementHeight) {
88
+ if (newY + initialWindowPos.y + 275 > window.innerHeight - elementHeight) {
89
89
  newY = current.y;
90
90
  }
91
- if (newX + initialWindowPos.x < 0) {
91
+ if (newX + initialWindowPos.x - 35 < 0) {
92
92
  newX = current.x;
93
93
  }
94
- if (newY + initialWindowPos.y < 0) {
94
+ if (newY + initialWindowPos.y - 60 < 0) {
95
95
  newY = current.y;
96
96
  }
97
97
  return {
@@ -111,16 +111,16 @@ var DraggableDiv = exports.DraggableDiv = function DraggableDiv(_a) {
111
111
  var newY = touch.clientY - dragOffset.y;
112
112
  var elementWidth = ((_a = divRef.current) === null || _a === void 0 ? void 0 : _a.offsetWidth) || 0;
113
113
  var elementHeight = ((_b = divRef.current) === null || _b === void 0 ? void 0 : _b.offsetHeight) || 0;
114
- if (newX + initialWindowPos.x + 100 > window.innerWidth - elementWidth) {
114
+ if (newX + initialWindowPos.x + 250 > window.innerWidth - elementWidth) {
115
115
  newX = current.x;
116
116
  }
117
- if (newY + initialWindowPos.y + 200 > window.innerHeight - elementHeight) {
117
+ if (newY + initialWindowPos.y + 220 > window.innerHeight - elementHeight) {
118
118
  newY = current.y;
119
119
  }
120
- if (newX + initialWindowPos.x < 0) {
120
+ if (newX + initialWindowPos.x - 10 < 0) {
121
121
  newX = current.x;
122
122
  }
123
- if (newY + initialWindowPos.y < 0) {
123
+ if (newY + initialWindowPos.y - 25 < 0) {
124
124
  newY = current.y;
125
125
  }
126
126
  return {
@@ -267,7 +267,8 @@ var FormulaHint = function FormulaHint(props) {
267
267
  style: {
268
268
  backgroundColor: "".concat(fn.BRAND_COLOR ? fn.BRAND_COLOR : "#F8F9FA"),
269
269
  maxHeight: "284px",
270
- overflowY: "scroll"
270
+ overflowY: "scroll",
271
+ cursor: "auto"
271
272
  }
272
273
  }, fn.API_KEY && (/*#__PURE__*/_react.default.createElement("div", {
273
274
  style: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fileverse-dev/fortune-react",
3
- "version": "1.1.59",
3
+ "version": "1.1.61",
4
4
  "main": "lib/index.js",
5
5
  "types": "lib/index.d.ts",
6
6
  "module": "es/index.js",
@@ -16,7 +16,7 @@
16
16
  "tsc": "tsc"
17
17
  },
18
18
  "dependencies": {
19
- "@fileverse-dev/fortune-core": "1.1.59",
19
+ "@fileverse-dev/fortune-core": "1.1.61",
20
20
  "@fileverse/ui": "^4.1.7-patch-21",
21
21
  "@tippyjs/react": "^4.2.6",
22
22
  "@types/regenerator-runtime": "^0.13.6",