Skip to content

Commit ee01913

Browse files
authored
🐛 fix: 解决网站运行白屏 (#191)
* 🐛 fix: slove website run error * 🐛 fix: udpate * ✏️ fix: types fixed
1 parent 568e14e commit ee01913

File tree

3 files changed

+190
-43
lines changed

3 files changed

+190
-43
lines changed

package.json

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ant-design/pro-editor",
3-
"version": "1.1.2",
3+
"version": "1.2.1",
44
"description": "🌟 Lightweight Editor UI Framework",
55
"homepage": "https://github.com/ant-design/pro-editor",
66
"bugs": {
@@ -60,7 +60,7 @@
6060
},
6161
"dependencies": {
6262
"@ant-design/icons": "^5.3.7",
63-
"@babel/runtime": "^7.24.5",
63+
"@babel/runtime": "^7.24.7",
6464
"@dnd-kit/core": "^6.1.0",
6565
"@dnd-kit/modifiers": "^6.0.1",
6666
"@dnd-kit/sortable": "^7.0.2",
@@ -72,7 +72,7 @@
7272
"color": "^4.2.3",
7373
"copy-to-clipboard": "^3.3.3",
7474
"diff": "^5.2.0",
75-
"dompurify": "^3.1.2",
75+
"dompurify": "^3.1.6",
7676
"fast-deep-equal": "^3.1.3",
7777
"immer": "^9.0.21",
7878
"lodash.flatten": "^4.4.0",
@@ -89,53 +89,53 @@
8989
"lodash.uniq": "^4.5.0",
9090
"nanoid": "^5.0.7",
9191
"polished": "^4.3.1",
92-
"rc-util": "^5.39.3",
93-
"re-resizable": "^6.9.16",
92+
"rc-util": "^5.43.0",
93+
"re-resizable": "^6.9.17",
9494
"react-copy-to-clipboard": "^5.1.0",
9595
"react-hotkeys-hook": "^4.5.0",
9696
"react-layout-kit": "^1.9.0",
9797
"react-markdown": "^8.0.7",
98-
"react-rnd": "^10.4.10",
98+
"react-rnd": "^10.4.11",
9999
"react-window": "^1.8.10",
100-
"reactflow": "^11.11.3",
100+
"reactflow": "^11.11.4",
101101
"rehype-katex": "^6.0.3",
102102
"remark-gfm": "^3.0.1",
103103
"remark-math": "^5.1.1",
104104
"rxjs": "^7.8.1",
105-
"shiki": "^1.4.0",
105+
"shiki": "^1.10.3",
106106
"type-fest": "^3.13.1",
107107
"use-merge-value": "^1.2.0",
108-
"yjs": "^13.6.15",
109-
"zustand": "^4.5.2",
108+
"yjs": "^13.6.18",
109+
"zustand": "^4.5.4",
110110
"zustand-middleware-yjs": "^1.3.1",
111111
"zustand-utils": "^1.3.2"
112112
},
113113
"devDependencies": {
114114
"@ant-design/leva-panel": "^1.0.0",
115115
"@emotion/jest": "^11.11.0",
116116
"@lobehub/i18n-cli": "^1.18.1",
117-
"@testing-library/jest-dom": "^6.4.5",
117+
"@testing-library/jest-dom": "^6.4.6",
118118
"@testing-library/react": "^13.4.0",
119119
"@testing-library/user-event": "^14.5.2",
120120
"@types/color": "^3.0.6",
121121
"@types/json-schema": "^7.0.15",
122-
"@types/react": "^18.3.1",
122+
"@types/react": "^18.3.3",
123123
"@types/react-dom": "^18.3.0",
124124
"@types/react-window": "^1.8.8",
125-
"@umijs/lint": "^4.1.10",
125+
"@umijs/lint": "^4.3.2",
126126
"@vitest/coverage-v8": "latest",
127127
"antd": "~5.12.8",
128128
"antd-style": "^3.6.2",
129129
"babel-plugin-antd-style": "^1.0.4",
130130
"commitlint": "^17.8.1",
131131
"commitlint-config-gitmoji": "^2.3.1",
132132
"conventional-changelog-gitmoji-config": "^1.5.2",
133-
"dumi": "^2.2.17",
133+
"dumi": "2.2.16",
134134
"dumi-theme-antd-style": "latest",
135135
"eslint": "^8.57.0",
136-
"father": "^4.4.0",
136+
"father": "^4.4.4",
137137
"gh-pages": "^5.0.0",
138-
"glob": "^10.3.12",
138+
"glob": "^10.4.5",
139139
"husky": "^8.0.3",
140140
"jsdom": "^22.1.0",
141141
"lint-staged": "^13.3.0",
@@ -149,7 +149,7 @@
149149
"semantic-release": "^21.1.2",
150150
"semantic-release-config-gitmoji": "^1.5.3",
151151
"stylelint": "^15.11.0",
152-
"typescript": "^5.4.5",
152+
"typescript": "^5.5.3",
153153
"vitest": "latest",
154154
"wait-on": "^6.0.1",
155155
"y-protocols": "^1.0.6",

src/DraggablePanel/FloatMode.tsx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import type { Enable, NumberSize, Size } from 're-resizable';
22
import { HandleClassName } from 're-resizable';
33
import type { CSSProperties, FC, ReactNode } from 'react';
44
import { memo, useMemo } from 'react';
5-
import type { Position, Props as RndProps } from 'react-rnd';
5+
import type { Position, Props, Props as RndProps } from 'react-rnd';
66
import { Rnd } from 'react-rnd';
77

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

162162
return (
163163
<Rnd
164164
position={position}
165165
resizeHandleClasses={resizeHandleClassNames}
166-
default={{
167-
...defaultPosition,
168-
...defaultSize,
169-
}}
166+
default={
167+
{
168+
...defaultPosition,
169+
...defaultSize,
170+
} as Props[`default`]
171+
}
170172
onDragStop={(e, data) => {
171173
onPositionChange?.({ x: data.x, y: data.y });
172174
}}

0 commit comments

Comments
 (0)