Skip to content

Commit

Permalink
🐛 fix: 解决网站运行白屏 (#191)
Browse files Browse the repository at this point in the history
* 🐛 fix: slove website run error

* 🐛 fix: udpate

* ✏️ fix: types fixed
  • Loading branch information
ONLY-yours authored Jul 11, 2024
1 parent 568e14e commit ee01913
Show file tree
Hide file tree
Showing 3 changed files with 190 additions and 43 deletions.
34 changes: 17 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ant-design/pro-editor",
"version": "1.1.2",
"version": "1.2.1",
"description": "🌟 Lightweight Editor UI Framework",
"homepage": "https://github.com/ant-design/pro-editor",
"bugs": {
Expand Down Expand Up @@ -60,7 +60,7 @@
},
"dependencies": {
"@ant-design/icons": "^5.3.7",
"@babel/runtime": "^7.24.5",
"@babel/runtime": "^7.24.7",
"@dnd-kit/core": "^6.1.0",
"@dnd-kit/modifiers": "^6.0.1",
"@dnd-kit/sortable": "^7.0.2",
Expand All @@ -72,7 +72,7 @@
"color": "^4.2.3",
"copy-to-clipboard": "^3.3.3",
"diff": "^5.2.0",
"dompurify": "^3.1.2",
"dompurify": "^3.1.6",
"fast-deep-equal": "^3.1.3",
"immer": "^9.0.21",
"lodash.flatten": "^4.4.0",
Expand All @@ -89,53 +89,53 @@
"lodash.uniq": "^4.5.0",
"nanoid": "^5.0.7",
"polished": "^4.3.1",
"rc-util": "^5.39.3",
"re-resizable": "^6.9.16",
"rc-util": "^5.43.0",
"re-resizable": "^6.9.17",
"react-copy-to-clipboard": "^5.1.0",
"react-hotkeys-hook": "^4.5.0",
"react-layout-kit": "^1.9.0",
"react-markdown": "^8.0.7",
"react-rnd": "^10.4.10",
"react-rnd": "^10.4.11",
"react-window": "^1.8.10",
"reactflow": "^11.11.3",
"reactflow": "^11.11.4",
"rehype-katex": "^6.0.3",
"remark-gfm": "^3.0.1",
"remark-math": "^5.1.1",
"rxjs": "^7.8.1",
"shiki": "^1.4.0",
"shiki": "^1.10.3",
"type-fest": "^3.13.1",
"use-merge-value": "^1.2.0",
"yjs": "^13.6.15",
"zustand": "^4.5.2",
"yjs": "^13.6.18",
"zustand": "^4.5.4",
"zustand-middleware-yjs": "^1.3.1",
"zustand-utils": "^1.3.2"
},
"devDependencies": {
"@ant-design/leva-panel": "^1.0.0",
"@emotion/jest": "^11.11.0",
"@lobehub/i18n-cli": "^1.18.1",
"@testing-library/jest-dom": "^6.4.5",
"@testing-library/jest-dom": "^6.4.6",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^14.5.2",
"@types/color": "^3.0.6",
"@types/json-schema": "^7.0.15",
"@types/react": "^18.3.1",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@types/react-window": "^1.8.8",
"@umijs/lint": "^4.1.10",
"@umijs/lint": "^4.3.2",
"@vitest/coverage-v8": "latest",
"antd": "~5.12.8",
"antd-style": "^3.6.2",
"babel-plugin-antd-style": "^1.0.4",
"commitlint": "^17.8.1",
"commitlint-config-gitmoji": "^2.3.1",
"conventional-changelog-gitmoji-config": "^1.5.2",
"dumi": "^2.2.17",
"dumi": "2.2.16",
"dumi-theme-antd-style": "latest",
"eslint": "^8.57.0",
"father": "^4.4.0",
"father": "^4.4.4",
"gh-pages": "^5.0.0",
"glob": "^10.3.12",
"glob": "^10.4.5",
"husky": "^8.0.3",
"jsdom": "^22.1.0",
"lint-staged": "^13.3.0",
Expand All @@ -149,7 +149,7 @@
"semantic-release": "^21.1.2",
"semantic-release-config-gitmoji": "^1.5.3",
"stylelint": "^15.11.0",
"typescript": "^5.4.5",
"typescript": "^5.5.3",
"vitest": "latest",
"wait-on": "^6.0.1",
"y-protocols": "^1.0.6",
Expand Down
14 changes: 8 additions & 6 deletions src/DraggablePanel/FloatMode.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { Enable, NumberSize, Size } from 're-resizable';
import { HandleClassName } from 're-resizable';
import type { CSSProperties, FC, ReactNode } from 'react';
import { memo, useMemo } from 'react';
import type { Position, Props as RndProps } from 'react-rnd';
import type { Position, Props, Props as RndProps } from 'react-rnd';
import { Rnd } from 'react-rnd';

import { useStyle } from './style';
Expand Down Expand Up @@ -155,18 +155,20 @@ export const FloatMode: FC<FloatProps> = memo(
maxHeight: maxHeight ? Math.max(maxHeight, 0) : undefined,
maxWidth: maxWidth ? Math.max(maxWidth, 0) : undefined,
defaultSize,
size: size as Size,
size: size as Props[`size`],
style,
};

return (
<Rnd
position={position}
resizeHandleClasses={resizeHandleClassNames}
default={{
...defaultPosition,
...defaultSize,
}}
default={
{
...defaultPosition,
...defaultSize,
} as Props[`default`]
}
onDragStop={(e, data) => {
onPositionChange?.({ x: data.x, y: data.y });
}}
Expand Down
Loading

0 comments on commit ee01913

Please sign in to comment.