deepsea-components 5.13.0 → 5.13.1

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.
@@ -44,7 +44,7 @@ var external_ScrollMask_module_cjs_default = /*#__PURE__*/ __webpack_require__.n
44
44
  const ScrollMask = ({ className, style, position = "top", size = 16, from = "rgba(0, 0, 0, 0.15)", to = "rgba(0, 0, 0, 0)", contentClassName, contentStyle, showRadian = false, ...rest })=>{
45
45
  const ref = (0, external_react_namespaceObject.useRef)(null);
46
46
  const contentSize = (0, external_soda_hooks_namespaceObject.useSize)(ref);
47
- const radius = (0, external_deepsea_tools_namespaceObject.isNonNullable)(contentSize) ? "top" === position || "bottom" === position ? (contentSize.width ** 2 / 4 + contentSize.height ** 2) * (2 * contentSize.height) : (contentSize.height ** 2 / 4 + contentSize.width ** 2) * (2 * contentSize.width) : void 0;
47
+ const radius = (0, external_deepsea_tools_namespaceObject.isNonNullable)(contentSize) ? "top" === position || "bottom" === position ? (contentSize.width ** 2 / 4 + contentSize.height ** 2) / (2 * contentSize.height) : (contentSize.height ** 2 / 4 + contentSize.width ** 2) / (2 * contentSize.width) : void 0;
48
48
  const clipPath = showRadian && (0, external_deepsea_tools_namespaceObject.isNonNullable)(radius) ? "top" === position ? `circle(${radius}px at 50% -${radius - contentSize.height}px)` : "bottom" === position ? `circle(${radius}px at 50% ${radius}px)` : "left" === position ? `circle(${radius}px at -${radius - contentSize.width} 50%)` : "right" === position ? `circle(${radius}px at ${radius}px 50%)` : "none" : "none";
49
49
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
50
50
  className: (0, external_deepsea_tools_namespaceObject.clsx)(external_ScrollMask_module_cjs_default()["scroll-mask"], external_ScrollMask_module_cjs_default()[`${position}-scroll-mask`], className),
@@ -6,7 +6,7 @@ import * as __WEBPACK_EXTERNAL_MODULE__ScrollMask_module_js_e15d4b28__ from "./S
6
6
  const ScrollMask = ({ className, style, position = "top", size = 16, from = "rgba(0, 0, 0, 0.15)", to = "rgba(0, 0, 0, 0)", contentClassName, contentStyle, showRadian = false, ...rest })=>{
7
7
  const ref = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(null);
8
8
  const contentSize = (0, __WEBPACK_EXTERNAL_MODULE_soda_hooks_b1fef7dd__.useSize)(ref);
9
- const radius = (0, __WEBPACK_EXTERNAL_MODULE_deepsea_tools_8ecdf5a5__.isNonNullable)(contentSize) ? "top" === position || "bottom" === position ? (contentSize.width ** 2 / 4 + contentSize.height ** 2) * (2 * contentSize.height) : (contentSize.height ** 2 / 4 + contentSize.width ** 2) * (2 * contentSize.width) : void 0;
9
+ const radius = (0, __WEBPACK_EXTERNAL_MODULE_deepsea_tools_8ecdf5a5__.isNonNullable)(contentSize) ? "top" === position || "bottom" === position ? (contentSize.width ** 2 / 4 + contentSize.height ** 2) / (2 * contentSize.height) : (contentSize.height ** 2 / 4 + contentSize.width ** 2) / (2 * contentSize.width) : void 0;
10
10
  const clipPath = showRadian && (0, __WEBPACK_EXTERNAL_MODULE_deepsea_tools_8ecdf5a5__.isNonNullable)(radius) ? "top" === position ? `circle(${radius}px at 50% -${radius - contentSize.height}px)` : "bottom" === position ? `circle(${radius}px at 50% ${radius}px)` : "left" === position ? `circle(${radius}px at -${radius - contentSize.width} 50%)` : "right" === position ? `circle(${radius}px at ${radius}px 50%)` : "none" : "none";
11
11
  return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
12
12
  className: (0, __WEBPACK_EXTERNAL_MODULE_deepsea_tools_8ecdf5a5__.clsx)(__WEBPACK_EXTERNAL_MODULE__ScrollMask_module_js_e15d4b28__["default"]["scroll-mask"], __WEBPACK_EXTERNAL_MODULE__ScrollMask_module_js_e15d4b28__["default"][`${position}-scroll-mask`], className),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deepsea-components",
3
- "version": "5.13.0",
3
+ "version": "5.13.1",
4
4
  "description": "格数科技自用组件库",
5
5
  "type": "module",
6
6
  "exports": {
@@ -32,8 +32,8 @@ export const ScrollMask: FC<ScrollMaskProps> = ({
32
32
  const contentSize = useSize(ref)
33
33
  const radius = isNonNullable(contentSize)
34
34
  ? position === "top" || position === "bottom"
35
- ? (contentSize.width ** 2 / 4 + contentSize.height ** 2) * (contentSize.height * 2)
36
- : (contentSize.height ** 2 / 4 + contentSize.width ** 2) * (contentSize.width * 2)
35
+ ? (contentSize.width ** 2 / 4 + contentSize.height ** 2) / (contentSize.height * 2)
36
+ : (contentSize.height ** 2 / 4 + contentSize.width ** 2) / (contentSize.width * 2)
37
37
  : undefined
38
38
  const clipPath =
39
39
  showRadian && isNonNullable(radius)