ywana-core8 0.2.5 → 0.2.6
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.
- package/dist/index.css +682 -0
- package/dist/index.js +28 -3
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +28 -3
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +28 -3
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/desktop/Desktop.stories.jsx +170 -0
- package/src/desktop/WindowContext.js +1 -0
- package/src/desktop/WindowManager.js +23 -0
- package/src/desktop/desktop-linux.css +232 -0
- package/src/desktop/desktop-macos.css +260 -0
- package/src/desktop/desktop-windows.css +190 -0
- package/src/desktop/desktop.js +8 -2
- package/src/desktop/window.js +9 -2
@@ -0,0 +1,260 @@
|
|
1
|
+
/* macOS Desktop Theme */
|
2
|
+
|
3
|
+
.desktop--macos {
|
4
|
+
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
5
|
+
font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', Arial, sans-serif;
|
6
|
+
}
|
7
|
+
|
8
|
+
.desktop--macos .desktop__background {
|
9
|
+
background-image:
|
10
|
+
radial-gradient(circle at 25% 75%, rgba(102, 126, 234, 0.3) 0%, transparent 50%),
|
11
|
+
radial-gradient(circle at 75% 25%, rgba(118, 75, 162, 0.3) 0%, transparent 50%),
|
12
|
+
radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
|
13
|
+
}
|
14
|
+
|
15
|
+
/* macOS-style windows */
|
16
|
+
.desktop--macos .window {
|
17
|
+
border: 1px solid rgba(0, 0, 0, 0.1);
|
18
|
+
border-radius: 12px;
|
19
|
+
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
|
20
|
+
background: rgba(255, 255, 255, 0.95);
|
21
|
+
backdrop-filter: blur(20px);
|
22
|
+
overflow: hidden;
|
23
|
+
}
|
24
|
+
|
25
|
+
.desktop--macos .window__header {
|
26
|
+
background: linear-gradient(180deg, rgba(255, 255, 255, 0.8) 0%, rgba(245, 245, 245, 0.8) 100%);
|
27
|
+
backdrop-filter: blur(20px);
|
28
|
+
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
|
29
|
+
border-radius: 12px 12px 0 0;
|
30
|
+
height: 36px;
|
31
|
+
padding: 0 16px;
|
32
|
+
}
|
33
|
+
|
34
|
+
.desktop--macos .window__title {
|
35
|
+
font-size: 13px;
|
36
|
+
font-weight: 600;
|
37
|
+
color: #1d1d1f;
|
38
|
+
text-align: center;
|
39
|
+
}
|
40
|
+
|
41
|
+
.desktop--macos .window__controls {
|
42
|
+
order: -1;
|
43
|
+
margin-right: auto;
|
44
|
+
}
|
45
|
+
|
46
|
+
.desktop--macos .window__control {
|
47
|
+
width: 12px;
|
48
|
+
height: 12px;
|
49
|
+
border: none;
|
50
|
+
border-radius: 50%;
|
51
|
+
font-size: 8px;
|
52
|
+
color: rgba(0, 0, 0, 0.6);
|
53
|
+
display: flex;
|
54
|
+
align-items: center;
|
55
|
+
justify-content: center;
|
56
|
+
transition: all 0.2s ease;
|
57
|
+
margin-right: 8px;
|
58
|
+
position: relative;
|
59
|
+
}
|
60
|
+
|
61
|
+
.desktop--macos .window__control::before {
|
62
|
+
opacity: 0;
|
63
|
+
transition: opacity 0.2s ease;
|
64
|
+
}
|
65
|
+
|
66
|
+
.desktop--macos .window:hover .window__control::before {
|
67
|
+
opacity: 1;
|
68
|
+
}
|
69
|
+
|
70
|
+
.desktop--macos .window__control--close {
|
71
|
+
background: #ff5f57;
|
72
|
+
border: 0.5px solid #e0443e;
|
73
|
+
}
|
74
|
+
|
75
|
+
.desktop--macos .window__control--minimize {
|
76
|
+
background: #ffbd2e;
|
77
|
+
border: 0.5px solid #dea123;
|
78
|
+
}
|
79
|
+
|
80
|
+
.desktop--macos .window__control--maximize {
|
81
|
+
background: #28ca42;
|
82
|
+
border: 0.5px solid #1aad34;
|
83
|
+
}
|
84
|
+
|
85
|
+
.desktop--macos .window__control:hover {
|
86
|
+
transform: scale(1.1);
|
87
|
+
}
|
88
|
+
|
89
|
+
.desktop--macos .window__control--close::before {
|
90
|
+
content: '×';
|
91
|
+
font-weight: bold;
|
92
|
+
font-size: 10px;
|
93
|
+
}
|
94
|
+
|
95
|
+
.desktop--macos .window__control--minimize::before {
|
96
|
+
content: '−';
|
97
|
+
font-weight: bold;
|
98
|
+
font-size: 8px;
|
99
|
+
}
|
100
|
+
|
101
|
+
.desktop--macos .window__control--maximize::before {
|
102
|
+
content: '+';
|
103
|
+
font-weight: bold;
|
104
|
+
font-size: 8px;
|
105
|
+
}
|
106
|
+
|
107
|
+
/* macOS taskbar styling (Dock-inspired) */
|
108
|
+
.desktop--macos .desktop-taskbar {
|
109
|
+
background: rgba(255, 255, 255, 0.8);
|
110
|
+
backdrop-filter: blur(20px);
|
111
|
+
border-top: 1px solid rgba(0, 0, 0, 0.1);
|
112
|
+
border-radius: 16px 16px 0 0;
|
113
|
+
}
|
114
|
+
|
115
|
+
.desktop--macos .taskbar-button {
|
116
|
+
background: rgba(0, 0, 0, 0.05);
|
117
|
+
border: 1px solid rgba(0, 0, 0, 0.1);
|
118
|
+
border-radius: 12px;
|
119
|
+
color: #1d1d1f;
|
120
|
+
font-family: -apple-system, BlinkMacSystemFont, sans-serif;
|
121
|
+
font-size: 13px;
|
122
|
+
font-weight: 500;
|
123
|
+
transition: all 0.3s ease;
|
124
|
+
backdrop-filter: blur(10px);
|
125
|
+
}
|
126
|
+
|
127
|
+
.desktop--macos .taskbar-button:hover {
|
128
|
+
background: rgba(0, 0, 0, 0.1);
|
129
|
+
border-color: rgba(0, 0, 0, 0.2);
|
130
|
+
transform: translateY(-2px);
|
131
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
132
|
+
}
|
133
|
+
|
134
|
+
.desktop--macos .taskbar-button--active {
|
135
|
+
background: rgba(0, 122, 255, 0.15);
|
136
|
+
border-color: rgba(0, 122, 255, 0.3);
|
137
|
+
color: #007aff;
|
138
|
+
}
|
139
|
+
|
140
|
+
/* macOS Application Menu (Launchpad-inspired) */
|
141
|
+
.desktop--macos .application-menu {
|
142
|
+
background: rgba(255, 255, 255, 0.9);
|
143
|
+
backdrop-filter: blur(40px);
|
144
|
+
border: 1px solid rgba(0, 0, 0, 0.1);
|
145
|
+
border-radius: 20px;
|
146
|
+
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
|
147
|
+
}
|
148
|
+
|
149
|
+
.desktop--macos .application-menu__header {
|
150
|
+
background: linear-gradient(180deg, rgba(255, 255, 255, 0.8) 0%, rgba(248, 248, 248, 0.8) 100%);
|
151
|
+
backdrop-filter: blur(20px);
|
152
|
+
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
|
153
|
+
border-radius: 20px 20px 0 0;
|
154
|
+
}
|
155
|
+
|
156
|
+
.desktop--macos .application-menu__header h2 {
|
157
|
+
color: #1d1d1f;
|
158
|
+
font-family: -apple-system, BlinkMacSystemFont, sans-serif;
|
159
|
+
font-weight: 600;
|
160
|
+
font-size: 20px;
|
161
|
+
}
|
162
|
+
|
163
|
+
.desktop--macos .application-menu__close {
|
164
|
+
color: #8e8e93;
|
165
|
+
background: rgba(0, 0, 0, 0.05);
|
166
|
+
border-radius: 8px;
|
167
|
+
font-size: 18px;
|
168
|
+
}
|
169
|
+
|
170
|
+
.desktop--macos .application-menu__close:hover {
|
171
|
+
background: rgba(255, 95, 87, 0.8);
|
172
|
+
color: white;
|
173
|
+
}
|
174
|
+
|
175
|
+
.desktop--macos .application-menu__search-input {
|
176
|
+
background: rgba(0, 0, 0, 0.05);
|
177
|
+
border: 2px solid rgba(0, 0, 0, 0.1);
|
178
|
+
border-radius: 12px;
|
179
|
+
color: #1d1d1f;
|
180
|
+
font-family: -apple-system, BlinkMacSystemFont, sans-serif;
|
181
|
+
font-size: 15px;
|
182
|
+
}
|
183
|
+
|
184
|
+
.desktop--macos .application-menu__search-input::placeholder {
|
185
|
+
color: #8e8e93;
|
186
|
+
}
|
187
|
+
|
188
|
+
.desktop--macos .application-menu__search-input:focus {
|
189
|
+
border-color: rgba(0, 122, 255, 0.8);
|
190
|
+
background: rgba(255, 255, 255, 0.8);
|
191
|
+
outline: none;
|
192
|
+
box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
|
193
|
+
}
|
194
|
+
|
195
|
+
.desktop--macos .application-menu__category {
|
196
|
+
background: rgba(0, 0, 0, 0.05);
|
197
|
+
border: 1px solid rgba(0, 0, 0, 0.1);
|
198
|
+
border-radius: 20px;
|
199
|
+
color: #1d1d1f;
|
200
|
+
font-family: -apple-system, BlinkMacSystemFont, sans-serif;
|
201
|
+
font-size: 13px;
|
202
|
+
font-weight: 500;
|
203
|
+
}
|
204
|
+
|
205
|
+
.desktop--macos .application-menu__category:hover {
|
206
|
+
background: rgba(0, 0, 0, 0.1);
|
207
|
+
border-color: rgba(0, 0, 0, 0.2);
|
208
|
+
}
|
209
|
+
|
210
|
+
.desktop--macos .application-menu__category.active {
|
211
|
+
background: rgba(0, 122, 255, 0.8);
|
212
|
+
border-color: rgba(0, 122, 255, 1);
|
213
|
+
color: white;
|
214
|
+
}
|
215
|
+
|
216
|
+
.desktop--macos .application-menu__app {
|
217
|
+
background: rgba(255, 255, 255, 0.6);
|
218
|
+
border: 1px solid transparent;
|
219
|
+
border-radius: 16px;
|
220
|
+
transition: all 0.3s ease;
|
221
|
+
backdrop-filter: blur(10px);
|
222
|
+
}
|
223
|
+
|
224
|
+
.desktop--macos .application-menu__app:hover {
|
225
|
+
background: rgba(255, 255, 255, 0.8);
|
226
|
+
border-color: rgba(0, 0, 0, 0.1);
|
227
|
+
transform: translateY(-4px) scale(1.05);
|
228
|
+
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
|
229
|
+
}
|
230
|
+
|
231
|
+
.desktop--macos .app-name {
|
232
|
+
font-family: -apple-system, BlinkMacSystemFont, sans-serif;
|
233
|
+
font-size: 12px;
|
234
|
+
font-weight: 500;
|
235
|
+
color: #1d1d1f;
|
236
|
+
}
|
237
|
+
|
238
|
+
.desktop--macos .category-title {
|
239
|
+
color: #1d1d1f;
|
240
|
+
font-family: -apple-system, BlinkMacSystemFont, sans-serif;
|
241
|
+
font-weight: 600;
|
242
|
+
}
|
243
|
+
|
244
|
+
/* macOS scrollbar */
|
245
|
+
.desktop--macos .application-menu__content::-webkit-scrollbar {
|
246
|
+
width: 6px;
|
247
|
+
}
|
248
|
+
|
249
|
+
.desktop--macos .application-menu__content::-webkit-scrollbar-track {
|
250
|
+
background: transparent;
|
251
|
+
}
|
252
|
+
|
253
|
+
.desktop--macos .application-menu__content::-webkit-scrollbar-thumb {
|
254
|
+
background: rgba(0, 0, 0, 0.2);
|
255
|
+
border-radius: 3px;
|
256
|
+
}
|
257
|
+
|
258
|
+
.desktop--macos .application-menu__content::-webkit-scrollbar-thumb:hover {
|
259
|
+
background: rgba(0, 0, 0, 0.4);
|
260
|
+
}
|
@@ -0,0 +1,190 @@
|
|
1
|
+
/* Windows Desktop Theme */
|
2
|
+
|
3
|
+
.desktop--windows {
|
4
|
+
background: linear-gradient(135deg, #0078d4 0%, #106ebe 100%);
|
5
|
+
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
6
|
+
}
|
7
|
+
|
8
|
+
.desktop--windows .desktop__background {
|
9
|
+
background-image:
|
10
|
+
radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
|
11
|
+
radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.15) 0%, transparent 50%),
|
12
|
+
radial-gradient(circle at 40% 40%, rgba(120, 119, 198, 0.15) 0%, transparent 50%);
|
13
|
+
}
|
14
|
+
|
15
|
+
/* Windows-style taskbar */
|
16
|
+
.desktop--windows .window {
|
17
|
+
border: 1px solid #cccccc;
|
18
|
+
border-radius: 8px;
|
19
|
+
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
|
20
|
+
background: #ffffff;
|
21
|
+
}
|
22
|
+
|
23
|
+
.desktop--windows .window__header {
|
24
|
+
background: linear-gradient(180deg, #f0f0f0 0%, #e5e5e5 100%);
|
25
|
+
border-bottom: 1px solid #d0d0d0;
|
26
|
+
border-radius: 8px 8px 0 0;
|
27
|
+
height: 32px;
|
28
|
+
padding: 0 12px;
|
29
|
+
}
|
30
|
+
|
31
|
+
.desktop--windows .window__title {
|
32
|
+
font-size: 13px;
|
33
|
+
font-weight: 400;
|
34
|
+
color: #333333;
|
35
|
+
}
|
36
|
+
|
37
|
+
.desktop--windows .window__control {
|
38
|
+
width: 46px;
|
39
|
+
height: 32px;
|
40
|
+
border: none;
|
41
|
+
background: transparent;
|
42
|
+
font-size: 10px;
|
43
|
+
font-family: 'Segoe MDL2 Assets', 'Segoe UI Symbol', sans-serif;
|
44
|
+
color: #333333;
|
45
|
+
display: flex;
|
46
|
+
align-items: center;
|
47
|
+
justify-content: center;
|
48
|
+
transition: background-color 0.1s ease;
|
49
|
+
}
|
50
|
+
|
51
|
+
.desktop--windows .window__control:hover {
|
52
|
+
background: rgba(0, 0, 0, 0.1);
|
53
|
+
}
|
54
|
+
|
55
|
+
.desktop--windows .window__control--minimize:hover {
|
56
|
+
background: #e5e5e5;
|
57
|
+
}
|
58
|
+
|
59
|
+
.desktop--windows .window__control--maximize:hover {
|
60
|
+
background: #e5e5e5;
|
61
|
+
}
|
62
|
+
|
63
|
+
.desktop--windows .window__control--close:hover {
|
64
|
+
background: #e81123;
|
65
|
+
color: white;
|
66
|
+
}
|
67
|
+
|
68
|
+
.desktop--windows .window__control--minimize::before {
|
69
|
+
content: '🗕';
|
70
|
+
}
|
71
|
+
|
72
|
+
.desktop--windows .window__control--maximize::before {
|
73
|
+
content: '🗖';
|
74
|
+
}
|
75
|
+
|
76
|
+
.desktop--windows .window__control--close::before {
|
77
|
+
content: '🗙';
|
78
|
+
}
|
79
|
+
|
80
|
+
/* Windows taskbar styling */
|
81
|
+
.desktop--windows .desktop-taskbar {
|
82
|
+
background: rgba(0, 0, 0, 0.8);
|
83
|
+
backdrop-filter: blur(20px);
|
84
|
+
border-top: 1px solid rgba(255, 255, 255, 0.1);
|
85
|
+
}
|
86
|
+
|
87
|
+
.desktop--windows .taskbar-button {
|
88
|
+
background: rgba(255, 255, 255, 0.1);
|
89
|
+
border: 1px solid rgba(255, 255, 255, 0.2);
|
90
|
+
border-radius: 4px;
|
91
|
+
color: white;
|
92
|
+
font-family: 'Segoe UI', sans-serif;
|
93
|
+
font-size: 14px;
|
94
|
+
transition: all 0.2s ease;
|
95
|
+
}
|
96
|
+
|
97
|
+
.desktop--windows .taskbar-button:hover {
|
98
|
+
background: rgba(255, 255, 255, 0.2);
|
99
|
+
border-color: rgba(255, 255, 255, 0.3);
|
100
|
+
}
|
101
|
+
|
102
|
+
.desktop--windows .taskbar-button--active {
|
103
|
+
background: rgba(255, 255, 255, 0.25);
|
104
|
+
border-color: rgba(255, 255, 255, 0.4);
|
105
|
+
}
|
106
|
+
|
107
|
+
/* Windows Application Menu */
|
108
|
+
.desktop--windows .application-menu {
|
109
|
+
background: rgba(248, 248, 248, 0.95);
|
110
|
+
backdrop-filter: blur(20px);
|
111
|
+
border: 1px solid rgba(0, 0, 0, 0.1);
|
112
|
+
border-radius: 8px;
|
113
|
+
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
|
114
|
+
}
|
115
|
+
|
116
|
+
.desktop--windows .application-menu__header {
|
117
|
+
background: linear-gradient(180deg, #f8f8f8 0%, #e8e8e8 100%);
|
118
|
+
border-bottom: 1px solid #d0d0d0;
|
119
|
+
}
|
120
|
+
|
121
|
+
.desktop--windows .application-menu__search-input {
|
122
|
+
border: 2px solid #e0e0e0;
|
123
|
+
border-radius: 4px;
|
124
|
+
font-family: 'Segoe UI', sans-serif;
|
125
|
+
}
|
126
|
+
|
127
|
+
.desktop--windows .application-menu__search-input:focus {
|
128
|
+
border-color: #0078d4;
|
129
|
+
outline: none;
|
130
|
+
}
|
131
|
+
|
132
|
+
.desktop--windows .application-menu__category {
|
133
|
+
background: #ffffff;
|
134
|
+
border: 1px solid #e0e0e0;
|
135
|
+
border-radius: 16px;
|
136
|
+
font-family: 'Segoe UI', sans-serif;
|
137
|
+
font-size: 13px;
|
138
|
+
}
|
139
|
+
|
140
|
+
.desktop--windows .application-menu__category:hover {
|
141
|
+
background: #f5f5f5;
|
142
|
+
border-color: #d0d0d0;
|
143
|
+
}
|
144
|
+
|
145
|
+
.desktop--windows .application-menu__category.active {
|
146
|
+
background: #0078d4;
|
147
|
+
border-color: #0078d4;
|
148
|
+
color: white;
|
149
|
+
}
|
150
|
+
|
151
|
+
.desktop--windows .application-menu__app {
|
152
|
+
background: #ffffff;
|
153
|
+
border: 1px solid transparent;
|
154
|
+
border-radius: 8px;
|
155
|
+
transition: all 0.15s ease;
|
156
|
+
}
|
157
|
+
|
158
|
+
.desktop--windows .application-menu__app:hover {
|
159
|
+
background: #f5f5f5;
|
160
|
+
border-color: #e0e0e0;
|
161
|
+
transform: translateY(-1px);
|
162
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
163
|
+
}
|
164
|
+
|
165
|
+
.desktop--windows .app-name {
|
166
|
+
font-family: 'Segoe UI', sans-serif;
|
167
|
+
font-size: 13px;
|
168
|
+
font-weight: 400;
|
169
|
+
color: #333333;
|
170
|
+
}
|
171
|
+
|
172
|
+
/* Windows scrollbar */
|
173
|
+
.desktop--windows .application-menu__content::-webkit-scrollbar {
|
174
|
+
width: 12px;
|
175
|
+
}
|
176
|
+
|
177
|
+
.desktop--windows .application-menu__content::-webkit-scrollbar-track {
|
178
|
+
background: #f1f1f1;
|
179
|
+
border-radius: 6px;
|
180
|
+
}
|
181
|
+
|
182
|
+
.desktop--windows .application-menu__content::-webkit-scrollbar-thumb {
|
183
|
+
background: #c1c1c1;
|
184
|
+
border-radius: 6px;
|
185
|
+
border: 2px solid #f1f1f1;
|
186
|
+
}
|
187
|
+
|
188
|
+
.desktop--windows .application-menu__content::-webkit-scrollbar-thumb:hover {
|
189
|
+
background: #a8a8a8;
|
190
|
+
}
|
package/src/desktop/desktop.js
CHANGED
@@ -4,6 +4,9 @@ import { Window } from './window'
|
|
4
4
|
import { ApplicationMenu } from './ApplicationMenu'
|
5
5
|
import { defaultAppManager } from './AppManager'
|
6
6
|
import './desktop.css'
|
7
|
+
import './desktop-windows.css'
|
8
|
+
import './desktop-linux.css'
|
9
|
+
import './desktop-macos.css'
|
7
10
|
|
8
11
|
/**
|
9
12
|
* Context for Application state
|
@@ -54,7 +57,7 @@ export const AppProvider = ({ children, appManager = defaultAppManager }) => {
|
|
54
57
|
/**
|
55
58
|
* Desktop layout component - manages overall desktop structure and sizing
|
56
59
|
*/
|
57
|
-
const DesktopLayout = ({ children, className = '', ...props }) => {
|
60
|
+
const DesktopLayout = ({ children, className = '', theme = 'windows', ...props }) => {
|
58
61
|
const desktopRef = useRef(null)
|
59
62
|
const { windowManager } = useWindows()
|
60
63
|
|
@@ -99,10 +102,13 @@ const DesktopLayout = ({ children, className = '', ...props }) => {
|
|
99
102
|
console.log('Desktop context menu at:', e.clientX, e.clientY)
|
100
103
|
}
|
101
104
|
|
105
|
+
// Generate theme class name
|
106
|
+
const themeClass = `desktop--${theme}`
|
107
|
+
|
102
108
|
return (
|
103
109
|
<div
|
104
110
|
ref={desktopRef}
|
105
|
-
className={`desktop ${className}`}
|
111
|
+
className={`desktop ${themeClass} ${className}`}
|
106
112
|
onContextMenu={handleContextMenu}
|
107
113
|
{...props}
|
108
114
|
>
|
package/src/desktop/window.js
CHANGED
@@ -25,14 +25,21 @@ export const Window = ({
|
|
25
25
|
const headerRef = useRef(null)
|
26
26
|
|
27
27
|
// Get window data from WindowManager
|
28
|
-
const { getWindow, updateWindowPosition, closeWindow, minimizeWindow, maximizeWindow, focusWindow } = useWindows()
|
28
|
+
const { getWindow, updateWindowPosition, updateWindowSize, closeWindow, minimizeWindow, maximizeWindow, focusWindow } = useWindows()
|
29
29
|
const windowData = getWindow(id)
|
30
|
-
|
30
|
+
|
31
31
|
// Local state for dragging
|
32
32
|
const [isDragging, setIsDragging] = useState(false)
|
33
33
|
const [dragOffset, setDragOffset] = useState({ x: 0, y: 0 })
|
34
34
|
const [dragStartPosition, setDragStartPosition] = useState({ x: 0, y: 0 })
|
35
35
|
|
36
|
+
// Local state for resizing
|
37
|
+
const [isResizing, setIsResizing] = useState(false)
|
38
|
+
const [resizeDirection, setResizeDirection] = useState('')
|
39
|
+
const [resizeStartSize, setResizeStartSize] = useState({ width: 0, height: 0 })
|
40
|
+
const [resizeStartPosition, setResizeStartPosition] = useState({ x: 0, y: 0 })
|
41
|
+
const [resizeStartMouse, setResizeStartMouse] = useState({ x: 0, y: 0 })
|
42
|
+
|
36
43
|
// If window doesn't exist in WindowManager, don't render
|
37
44
|
if (!windowData) {
|
38
45
|
return null
|