@maomaolabs/core 1.0.2 → 1.1.0

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.es.js CHANGED
@@ -1,21 +1,25 @@
1
1
  "use client";
2
- import { jsx as i, Fragment as X, jsxs as _ } from "react/jsx-runtime";
3
- import C, { useSyncExternalStore as ve, useState as $, useRef as z, useEffect as V, memo as Y, useCallback as f, useMemo as D, createContext as ge, useContext as xe } from "react";
4
- import { createPortal as ie } from "react-dom";
5
- function wn({ children: e }) {
6
- return /* @__PURE__ */ i(X, { children: e });
2
+ import { jsx as o, Fragment as G, jsxs as p } from "react/jsx-runtime";
3
+ import J, { createContext as ne, useContext as ie, useSyncExternalStore as Ce, useState as z, useRef as M, useEffect as H, memo as V, useCallback as f, useMemo as E } from "react";
4
+ import { createPortal as oe } from "react-dom";
5
+ const se = ne("default");
6
+ function we() {
7
+ return ie(se);
8
+ }
9
+ function Rn({ children: e, systemStyle: t = "default" }) {
10
+ return /* @__PURE__ */ o(se.Provider, { value: t, children: e });
7
11
  }
8
- function ye(e) {
12
+ function $e(e) {
9
13
  let t;
10
- const o = /* @__PURE__ */ new Set(), n = (r, l) => {
14
+ const i = /* @__PURE__ */ new Set(), n = (r, l) => {
11
15
  const u = typeof r == "function" ? r(t) : r;
12
- u !== t && (t = l ? u : Object.assign({}, t, u), o.forEach((d) => d()));
13
- }, s = () => t, c = (r) => (o.add(r), () => {
14
- o.delete(r);
16
+ u !== t && (t = l ? u : Object.assign({}, t, u), i.forEach((d) => d()));
17
+ }, s = () => t, c = (r) => (i.add(r), () => {
18
+ i.delete(r);
15
19
  });
16
20
  t = e(n, s);
17
21
  const a = (r) => {
18
- const l = ve(c, s, s);
22
+ const l = Ce(c, s, s);
19
23
  return r ? r(l) : l;
20
24
  };
21
25
  return Object.assign(a, {
@@ -24,29 +28,29 @@ function ye(e) {
24
28
  subscribe: c
25
29
  }), a;
26
30
  }
27
- const se = 768, Me = 200, ze = () => typeof window < "u" && window.innerWidth <= se, te = (e, t) => {
28
- const o = e.find((r) => r.id === t);
29
- if (!o)
31
+ const re = 768, Ne = 200, Le = () => typeof window < "u" && window.innerWidth <= re, U = (e, t) => {
32
+ const i = e.find((r) => r.id === t);
33
+ if (!i)
30
34
  return e;
31
- const c = [...[...e].sort((r, l) => (r.zIndex || 0) - (l.zIndex || 0)).filter((r) => r.id !== t), o], a = new Map(c.map((r, l) => [r.id, l + 1]));
35
+ const c = [...[...e].sort((r, l) => (r.zIndex || 0) - (l.zIndex || 0)).filter((r) => r.id !== t), i], a = new Map(c.map((r, l) => [r.id, l + 1]));
32
36
  return e.map((r) => ({
33
37
  ...r,
34
38
  zIndex: a.get(r.id)
35
39
  }));
36
- }, ee = ye((e) => ({
40
+ }, Q = $e((e) => ({
37
41
  windows: [],
38
42
  snapPreview: null,
39
43
  setSnapPreview: (t) => e({ snapPreview: t }),
40
44
  openWindow: (t) => {
41
- e((o) => {
42
- const n = o.windows;
43
- if (n.find((h) => h.id === t.id))
45
+ e((i) => {
46
+ const n = i.windows;
47
+ if (n.find((m) => m.id === t.id))
44
48
  return {
45
- windows: te(n, t.id).map(
49
+ windows: U(n, t.id).map(
46
50
  (x) => x.id === t.id ? { ...x, isMinimized: !1 } : x
47
51
  )
48
52
  };
49
- const c = ze(), { initialSize: a, initialPosition: r, ...l } = t, u = t, d = n.length > 0 ? Math.max(...n.map((h) => h.zIndex || 0)) : 0, m = {
53
+ const c = Le(), { initialSize: a, initialPosition: r, ...l } = t, u = t, d = n.length > 0 ? Math.max(...n.map((m) => m.zIndex || 0)) : 0, h = {
50
54
  ...l,
51
55
  zIndex: d + 1,
52
56
  isMinimized: !1,
@@ -55,46 +59,46 @@ const se = 768, Me = 200, ze = () => typeof window < "u" && window.innerWidth <=
55
59
  size: u.size || a || { width: 400, height: 300 },
56
60
  position: u.position || r || { x: 50, y: 50 }
57
61
  };
58
- return { windows: [...n, m] };
62
+ return { windows: [...n, h] };
59
63
  });
60
64
  },
61
65
  closeWindow: (t) => {
62
- e((o) => ({
63
- windows: o.windows.filter((n) => n.id !== t)
66
+ e((i) => ({
67
+ windows: i.windows.filter((n) => n.id !== t)
64
68
  }));
65
69
  },
66
70
  focusWindow: (t) => {
67
- e((o) => o.windows.some((c) => c.id === t) ? {
68
- windows: te(o.windows, t).map(
71
+ e((i) => i.windows.some((c) => c.id === t) ? {
72
+ windows: U(i.windows, t).map(
69
73
  (c) => c.id === t ? { ...c, isMinimized: !1 } : c
70
74
  )
71
- } : o);
75
+ } : i);
72
76
  },
73
- updateWindow: (t, o) => {
77
+ updateWindow: (t, i) => {
74
78
  e((n) => ({
75
- windows: n.windows.map((s) => s.id === t ? { ...s, ...o } : s)
79
+ windows: n.windows.map((s) => s.id === t ? { ...s, ...i } : s)
76
80
  }));
77
81
  }
78
82
  }));
79
- function re() {
80
- return ee((e) => ({
83
+ function le() {
84
+ return Q((e) => ({
81
85
  openWindow: e.openWindow,
82
86
  closeWindow: e.closeWindow,
83
87
  focusWindow: e.focusWindow,
84
88
  updateWindow: e.updateWindow
85
89
  }));
86
90
  }
87
- function le() {
88
- return ee((e) => ({
91
+ function ce() {
92
+ return Q((e) => ({
89
93
  snapPreview: e.snapPreview,
90
94
  setSnapPreview: e.setSnapPreview
91
95
  }));
92
96
  }
93
- function ce() {
94
- return ee((e) => e.windows);
97
+ function ae() {
98
+ return Q((e) => e.windows);
95
99
  }
96
- function we() {
97
- const [e, t] = $(!1);
100
+ function ke() {
101
+ const [e, t] = z(!1);
98
102
  return {
99
103
  isOpen: e,
100
104
  setIsOpen: t,
@@ -103,78 +107,78 @@ function we() {
103
107
  }
104
108
  };
105
109
  }
106
- const Ce = "_container_173at_1", $e = "_menuLeft_173at_29", Ne = "_dockWrapper_173at_43", Le = "_menuRight_173at_55", We = "_dock_173at_43", Te = "_catIcon_173at_103", ke = "_launcher_173at_119", Re = "_folderWrapper_173at_159", Ie = "_folderMenuPortal_173at_173", Se = "_folderMenuPortalVisible_173at_217", Be = "_folderLabel_173at_229", Ee = "_menuContentBase_173at_263", Oe = "_menuContentRight_173at_379 _menuContentBase_173at_263", He = "_menuOpen_173at_389", Ae = "_menuClosed_173at_401", De = "_menuContentLeft_173at_413 _menuContentBase_173at_263", g = {
107
- container: Ce,
108
- menuLeft: $e,
109
- dockWrapper: Ne,
110
- menuRight: Le,
111
- dock: We,
112
- catIcon: Te,
113
- launcher: ke,
114
- folderWrapper: Re,
115
- folderMenuPortal: Ie,
116
- folderMenuPortalVisible: Se,
117
- folderLabel: Be,
118
- menuContentBase: Ee,
119
- menuContentRight: Oe,
120
- menuOpen: He,
121
- menuClosed: Ae,
122
- menuContentLeft: De
123
- }, Pe = "_zzzContainer_13qis_1", Fe = "_z_13qis_1", Ve = "_floatZ_13qis_1", J = {
124
- zzzContainer: Pe,
125
- z: Fe,
126
- floatZ: Ve
110
+ const Te = "_container_173at_1", We = "_menuLeft_173at_29", Re = "_dockWrapper_173at_43", Se = "_menuRight_173at_55", Ie = "_dock_173at_43", Be = "_catIcon_173at_103", Ee = "_launcher_173at_119", Oe = "_folderWrapper_173at_159", He = "_folderMenuPortal_173at_173", Ae = "_folderMenuPortalVisible_173at_217", De = "_folderLabel_173at_229", Pe = "_menuContentBase_173at_263", Fe = "_menuContentRight_173at_379 _menuContentBase_173at_263", Ve = "_menuOpen_173at_389", je = "_menuClosed_173at_401", Ze = "_menuContentLeft_173at_413 _menuContentBase_173at_263", v = {
111
+ container: Te,
112
+ menuLeft: We,
113
+ dockWrapper: Re,
114
+ menuRight: Se,
115
+ dock: Ie,
116
+ catIcon: Be,
117
+ launcher: Ee,
118
+ folderWrapper: Oe,
119
+ folderMenuPortal: He,
120
+ folderMenuPortalVisible: Ae,
121
+ folderLabel: De,
122
+ menuContentBase: Pe,
123
+ menuContentRight: Fe,
124
+ menuOpen: Ve,
125
+ menuClosed: je,
126
+ menuContentLeft: Ze
127
+ }, qe = "_zzzContainer_13qis_1", Xe = "_z_13qis_1", Ye = "_floatZ_13qis_1", X = {
128
+ zzzContainer: qe,
129
+ z: Xe,
130
+ floatZ: Ye
127
131
  };
128
- function ae({ show: e }) {
129
- return /* @__PURE__ */ i(X, { children: e && /* @__PURE__ */ _("div", { className: J.zzzContainer, "aria-hidden": "true", children: [
130
- /* @__PURE__ */ i("span", { className: J.z, children: "z" }),
131
- /* @__PURE__ */ i("span", { className: J.z, children: "z" }),
132
- /* @__PURE__ */ i("span", { className: J.z, children: "z" })
132
+ function de({ show: e }) {
133
+ return /* @__PURE__ */ o(G, { children: e && /* @__PURE__ */ p("div", { className: X.zzzContainer, "aria-hidden": "true", children: [
134
+ /* @__PURE__ */ o("span", { className: X.z, children: "z" }),
135
+ /* @__PURE__ */ o("span", { className: X.z, children: "z" }),
136
+ /* @__PURE__ */ o("span", { className: X.z, children: "z" })
133
137
  ] }) });
134
138
  }
135
- const je = "_buttonWrapper_1hhpx_1", qe = "_button_1hhpx_1", Ze = "_activeIndicator_1hhpx_61", Xe = "_preview_1hhpx_85", Ye = "_fadeIn_1hhpx_1", Ge = "_previewHeader_1hhpx_125", Ke = "_previewTitle_1hhpx_143", Je = "_previewClose_1hhpx_163", Qe = "_previewBody_1hhpx_203", Ue = "_previewContent_1hhpx_231", et = "_labelTooltip_1hhpx_255", tt = "_fadeInLabel_1hhpx_1", B = {
136
- buttonWrapper: je,
137
- button: qe,
138
- activeIndicator: Ze,
139
- preview: Xe,
140
- fadeIn: Ye,
141
- previewHeader: Ge,
142
- previewTitle: Ke,
143
- previewClose: Je,
144
- previewBody: Qe,
145
- previewContent: Ue,
146
- labelTooltip: et,
147
- fadeInLabel: tt
139
+ const Ge = "_buttonWrapper_1hhpx_1", Ke = "_button_1hhpx_1", Je = "_activeIndicator_1hhpx_61", Qe = "_preview_1hhpx_85", Ue = "_fadeIn_1hhpx_1", et = "_previewHeader_1hhpx_125", tt = "_previewTitle_1hhpx_143", nt = "_previewClose_1hhpx_163", it = "_previewBody_1hhpx_203", ot = "_previewContent_1hhpx_231", st = "_labelTooltip_1hhpx_255", rt = "_fadeInLabel_1hhpx_1", S = {
140
+ buttonWrapper: Ge,
141
+ button: Ke,
142
+ activeIndicator: Je,
143
+ preview: Qe,
144
+ fadeIn: Ue,
145
+ previewHeader: et,
146
+ previewTitle: tt,
147
+ previewClose: nt,
148
+ previewBody: it,
149
+ previewContent: ot,
150
+ labelTooltip: st,
151
+ fadeInLabel: rt
148
152
  };
149
- function nt({ windowId: e }) {
150
- const t = z(null);
151
- return V(() => {
152
- const o = t.current;
153
- if (!o)
153
+ function lt({ windowId: e }) {
154
+ const t = M(null);
155
+ return H(() => {
156
+ const i = t.current;
157
+ if (!i)
154
158
  return;
155
- const n = ot(e);
159
+ const n = ct(e);
156
160
  if (!n) {
157
- o.replaceChildren();
161
+ i.replaceChildren();
158
162
  return;
159
163
  }
160
- const s = it(n);
161
- o.replaceChildren(s);
162
- }, [e]), /* @__PURE__ */ i("div", { ref: t, className: "window-preview-container" });
164
+ const s = at(n);
165
+ i.replaceChildren(s);
166
+ }, [e]), /* @__PURE__ */ o("div", { ref: t, className: "window-preview-container" });
163
167
  }
164
- function ot(e) {
168
+ function ct(e) {
165
169
  const t = document.getElementById(`window-${e}`);
166
170
  return t instanceof HTMLElement ? t : null;
167
171
  }
168
- function it(e) {
172
+ function at(e) {
169
173
  const t = e.cloneNode(!0);
170
- return st(t), t;
174
+ return dt(t), t;
171
175
  }
172
- function st(e) {
173
- e.removeAttribute("id"), e.querySelectorAll("[id]").forEach((o) => o.removeAttribute("id")), rt(e);
176
+ function dt(e) {
177
+ e.removeAttribute("id"), e.querySelectorAll("[id]").forEach((i) => i.removeAttribute("id")), ut(e);
174
178
  const t = e.querySelector(".window-scrollbar");
175
179
  t && t.style.setProperty("display", "flex", "important");
176
180
  }
177
- function rt(e) {
181
+ function ut(e) {
178
182
  const t = {
179
183
  display: "flex",
180
184
  position: "static",
@@ -187,95 +191,98 @@ function rt(e) {
187
191
  zIndex: "auto",
188
192
  boxShadow: "none"
189
193
  };
190
- for (const [o, n] of Object.entries(t))
191
- e.style.setProperty(o, n, "important");
194
+ for (const [i, n] of Object.entries(t))
195
+ e.style.setProperty(i, n, "important");
192
196
  }
193
- const lt = "_controls_1014q_1", ct = "_button_1014q_13", at = "_close_1014q_59", Z = {
194
- controls: lt,
195
- button: ct,
196
- close: at
197
- }, dt = () => /* @__PURE__ */ _("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
198
- /* @__PURE__ */ i("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
199
- /* @__PURE__ */ i("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
197
+ const mt = "_controls_1rfhk_1", ht = "_button_1rfhk_13", ft = "_close_1rfhk_59", _t = "_minimize_1rfhk_79", pt = "_maximize_1rfhk_87", A = {
198
+ controls: mt,
199
+ button: ht,
200
+ close: ft,
201
+ minimize: _t,
202
+ maximize: pt
203
+ }, bt = () => /* @__PURE__ */ p("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
204
+ /* @__PURE__ */ o("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
205
+ /* @__PURE__ */ o("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
200
206
  ] });
201
- function de({ onClose: e, disabled: t }) {
202
- return /* @__PURE__ */ i(
207
+ function ue({ onClose: e, disabled: t }) {
208
+ return /* @__PURE__ */ o(
203
209
  "button",
204
210
  {
205
- className: `terminal-btn close ${Z.button} ${Z.close}`,
211
+ className: `terminal-btn ${A.button} ${A.close}`,
206
212
  onClick: e,
207
213
  disabled: t,
208
214
  title: "Close",
209
- children: /* @__PURE__ */ i(dt, {})
215
+ "data-action": "close",
216
+ children: /* @__PURE__ */ o(bt, {})
210
217
  }
211
218
  );
212
219
  }
213
- function ut({ icon: e, onClick: t, label: o, isActive: n, onClose: s, component: c, windowId: a, showTooltip: r = !0 }) {
214
- const [l, u] = $(!1), d = z(null), m = z(null), h = () => {
215
- m.current && (clearTimeout(m.current), m.current = null), u(!0);
220
+ function gt({ icon: e, onClick: t, label: i, isActive: n, onClose: s, component: c, windowId: a, showTooltip: r = !0 }) {
221
+ const [l, u] = z(!1), d = M(null), h = M(null), m = () => {
222
+ h.current && (clearTimeout(h.current), h.current = null), u(!0);
216
223
  }, x = () => {
217
- m.current = setTimeout(() => {
224
+ h.current = setTimeout(() => {
218
225
  u(!1);
219
226
  }, 100);
220
227
  };
221
- return /* @__PURE__ */ _(
228
+ return /* @__PURE__ */ p(
222
229
  "div",
223
230
  {
224
231
  ref: d,
225
- className: B.buttonWrapper,
226
- onMouseEnter: h,
232
+ className: S.buttonWrapper,
233
+ onMouseEnter: m,
227
234
  onMouseLeave: x,
228
235
  children: [
229
- l && typeof document < "u" && ie(
230
- n && s ? /* @__PURE__ */ _(
236
+ l && typeof document < "u" && oe(
237
+ n && s ? /* @__PURE__ */ p(
231
238
  "div",
232
239
  {
233
- className: B.preview,
240
+ className: S.preview,
234
241
  style: {
235
242
  left: d.current ? d.current.getBoundingClientRect().left + d.current.getBoundingClientRect().width / 2 : 0,
236
243
  top: d.current ? d.current.getBoundingClientRect().top : 0
237
244
  },
238
- onMouseEnter: h,
245
+ onMouseEnter: m,
239
246
  onMouseLeave: x,
240
247
  children: [
241
- /* @__PURE__ */ _("div", { className: B.previewHeader, children: [
242
- /* @__PURE__ */ i("span", { className: B.previewTitle, children: o }),
243
- /* @__PURE__ */ i(
244
- de,
248
+ /* @__PURE__ */ p("div", { className: S.previewHeader, children: [
249
+ /* @__PURE__ */ o("span", { className: S.previewTitle, children: i }),
250
+ /* @__PURE__ */ o(
251
+ ue,
245
252
  {
246
- onClose: (p) => {
247
- p == null || p.preventDefault(), p == null || p.stopPropagation(), s();
253
+ onClose: (_) => {
254
+ _ == null || _.preventDefault(), _ == null || _.stopPropagation(), s();
248
255
  }
249
256
  }
250
257
  )
251
258
  ] }),
252
- /* @__PURE__ */ i("div", { className: B.previewBody, onClick: (p) => {
253
- p.stopPropagation(), t();
254
- }, children: /* @__PURE__ */ i("div", { className: B.previewContent, children: a ? /* @__PURE__ */ i(nt, { windowId: a }) : c }) })
259
+ /* @__PURE__ */ o("div", { className: S.previewBody, onClick: (_) => {
260
+ _.stopPropagation(), t();
261
+ }, children: /* @__PURE__ */ o("div", { className: S.previewContent, children: a ? /* @__PURE__ */ o(lt, { windowId: a }) : c }) })
255
262
  ]
256
263
  }
257
- ) : r ? /* @__PURE__ */ i(
264
+ ) : r ? /* @__PURE__ */ o(
258
265
  "div",
259
266
  {
260
- className: B.labelTooltip,
267
+ className: S.labelTooltip,
261
268
  style: {
262
269
  left: d.current ? d.current.getBoundingClientRect().left + d.current.getBoundingClientRect().width / 2 : 0,
263
270
  top: d.current ? d.current.getBoundingClientRect().top : 0
264
271
  },
265
- children: o
272
+ children: i
266
273
  }
267
274
  ) : null,
268
275
  document.body
269
276
  ),
270
- /* @__PURE__ */ _(
277
+ /* @__PURE__ */ p(
271
278
  "button",
272
279
  {
273
280
  onClick: t,
274
- "aria-label": o,
275
- className: B.button,
281
+ "aria-label": i,
282
+ className: S.button,
276
283
  children: [
277
284
  e,
278
- n && /* @__PURE__ */ i("div", { className: B.activeIndicator })
285
+ n && /* @__PURE__ */ o("div", { className: S.activeIndicator })
279
286
  ]
280
287
  }
281
288
  )
@@ -283,10 +290,10 @@ function ut({ icon: e, onClick: t, label: o, isActive: n, onClose: s, component:
283
290
  }
284
291
  );
285
292
  }
286
- const mt = C.memo(ut), G = mt, ue = Y(({ window: e, currentWindows: t, openWindow: o }) => {
287
- const n = t.some((c) => c.id === e.id), s = f(() => o(e), [o, e]);
288
- return /* @__PURE__ */ i(
289
- G,
293
+ const vt = J.memo(gt), Z = vt, me = V(({ window: e, currentWindows: t, openWindow: i }) => {
294
+ const n = t.some((c) => c.id === e.id), s = f(() => i(e), [i, e]);
295
+ return /* @__PURE__ */ o(
296
+ Z,
290
297
  {
291
298
  icon: e.icon,
292
299
  label: e.title,
@@ -294,12 +301,12 @@ const mt = C.memo(ut), G = mt, ue = Y(({ window: e, currentWindows: t, openWindo
294
301
  isActive: n
295
302
  }
296
303
  );
297
- }), me = () => /* @__PURE__ */ i("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ i("path", { d: "M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.93a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 2H4a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2Z" }) }), ht = Y(({ folder: e, currentWindows: t, openWindow: o }) => {
298
- const [n, s] = $(!1), [c, a] = $(!1), [r, l] = $(!1), [u, d] = $(null), m = z(null), h = z(null);
299
- V(() => {
304
+ }), he = () => /* @__PURE__ */ o("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ o("path", { d: "M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.93a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 2H4a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2Z" }) }), xt = V(({ folder: e, currentWindows: t, openWindow: i }) => {
305
+ const [n, s] = z(!1), [c, a] = z(!1), [r, l] = z(!1), [u, d] = z(null), h = M(null), m = M(null);
306
+ H(() => {
300
307
  if (n) {
301
- if (m.current) {
302
- const b = m.current.getBoundingClientRect();
308
+ if (h.current) {
309
+ const b = h.current.getBoundingClientRect();
303
310
  d({
304
311
  left: b.left + b.width / 2,
305
312
  bottom: window.innerHeight - b.top + 10
@@ -315,51 +322,51 @@ const mt = C.memo(ut), G = mt, ue = Y(({ window: e, currentWindows: t, openWindo
315
322
  }
316
323
  }, [n]);
317
324
  const x = f(() => {
318
- h.current && (clearTimeout(h.current), h.current = null), s(!0);
319
- }, []), p = f(() => {
320
- h.current = setTimeout(() => {
325
+ m.current && (clearTimeout(m.current), m.current = null), s(!0);
326
+ }, []), _ = f(() => {
327
+ m.current = setTimeout(() => {
321
328
  s(!1);
322
329
  }, 200);
323
330
  }, []);
324
- return /* @__PURE__ */ _(
331
+ return /* @__PURE__ */ p(
325
332
  "div",
326
333
  {
327
- ref: m,
328
- className: g.folderWrapper,
334
+ ref: h,
335
+ className: v.folderWrapper,
329
336
  onMouseEnter: x,
330
- onMouseLeave: p,
337
+ onMouseLeave: _,
331
338
  children: [
332
- c && u && typeof document < "u" && ie(
333
- /* @__PURE__ */ _(
339
+ c && u && typeof document < "u" && oe(
340
+ /* @__PURE__ */ p(
334
341
  "div",
335
342
  {
336
- className: `${g.folderMenuPortal} ${r ? g.folderMenuPortalVisible : ""}`,
343
+ className: `${v.folderMenuPortal} ${r ? v.folderMenuPortalVisible : ""}`,
337
344
  style: {
338
345
  left: u.left,
339
346
  bottom: u.bottom
340
347
  },
341
348
  onMouseEnter: x,
342
- onMouseLeave: p,
349
+ onMouseLeave: _,
343
350
  children: [
344
- e.apps.map((b) => /* @__PURE__ */ i(
345
- ue,
351
+ e.apps.map((b) => /* @__PURE__ */ o(
352
+ me,
346
353
  {
347
354
  window: b,
348
355
  currentWindows: t,
349
- openWindow: o
356
+ openWindow: i
350
357
  },
351
358
  b.id
352
359
  )),
353
- /* @__PURE__ */ i("div", { className: g.folderLabel, children: e.title })
360
+ /* @__PURE__ */ o("div", { className: v.folderLabel, children: e.title })
354
361
  ]
355
362
  }
356
363
  ),
357
364
  document.body
358
365
  ),
359
- /* @__PURE__ */ i(
360
- G,
366
+ /* @__PURE__ */ o(
367
+ Z,
361
368
  {
362
- icon: e.icon || /* @__PURE__ */ i(me, {}),
369
+ icon: e.icon || /* @__PURE__ */ o(he, {}),
363
370
  label: e.title,
364
371
  onClick: () => s((b) => !b),
365
372
  isActive: !1,
@@ -369,10 +376,10 @@ const mt = C.memo(ut), G = mt, ue = Y(({ window: e, currentWindows: t, openWindo
369
376
  ]
370
377
  }
371
378
  );
372
- }), ft = Y(({ window: e, currentWindows: t, openWindow: o, closeWindow: n }) => {
373
- const s = t.some((r) => r.id === e.id), c = f(() => o({ ...e, zIndex: 0, layer: e.layer || "normal" }), [o, e]), a = f(() => n(e.id), [n, e.id]);
374
- return /* @__PURE__ */ i(
375
- G,
379
+ }), yt = V(({ window: e, currentWindows: t, openWindow: i, closeWindow: n }) => {
380
+ const s = t.some((r) => r.id === e.id), c = f(() => i({ ...e, zIndex: 0, layer: e.layer || "normal" }), [i, e]), a = f(() => n(e.id), [n, e.id]);
381
+ return /* @__PURE__ */ o(
382
+ Z,
376
383
  {
377
384
  icon: e.icon,
378
385
  label: e.title,
@@ -384,17 +391,17 @@ const mt = C.memo(ut), G = mt, ue = Y(({ window: e, currentWindows: t, openWindo
384
391
  }
385
392
  );
386
393
  });
387
- function _t(e) {
394
+ function zt(e) {
388
395
  return "apps" in e;
389
396
  }
390
- function he(e, t) {
391
- const o = D(() => Array.isArray(e) ? e : [], [e]);
392
- return D(() => o, [o]), {
393
- windowsOptions: o,
394
- isFolder: _t
397
+ function fe(e, t) {
398
+ const i = E(() => Array.isArray(e) ? e : [], [e]);
399
+ return E(() => i, [i]), {
400
+ windowsOptions: i,
401
+ isFolder: zt
395
402
  };
396
403
  }
397
- const U = {
404
+ const K = {
398
405
  idle: `/\\_/\\
399
406
  ( -.- )
400
407
  > ^ <`,
@@ -405,38 +412,38 @@ const U = {
405
412
  ( ^.^ )
406
413
  > ^ <`
407
414
  };
408
- function pt({
415
+ function Mt({
409
416
  openWindow: e,
410
417
  closeWindow: t,
411
- toolbarItems: o = [],
418
+ toolbarItems: i = [],
412
419
  currentWindows: n,
413
420
  isOpen: s,
414
421
  toggleOpen: c,
415
422
  setIsOpen: a,
416
423
  showLogo: r = !0
417
424
  }) {
418
- const l = C.useRef(null), { windowsOptions: u, isFolder: d } = he(o), m = s ? U.open : n.length > 0 ? U.active : U.idle, h = () => {
425
+ const l = J.useRef(null), { windowsOptions: u, isFolder: d } = fe(i), h = s ? K.open : n.length > 0 ? K.active : K.idle, m = () => {
419
426
  l.current && (clearTimeout(l.current), l.current = null);
420
427
  }, x = () => {
421
- h(), a(!0);
422
- }, p = () => {
423
- h();
428
+ m(), a(!0);
429
+ }, _ = () => {
430
+ m();
424
431
  }, b = () => {
425
432
  l.current = setTimeout(() => {
426
433
  a(!1);
427
434
  }, 100);
428
435
  };
429
- return C.useEffect(() => () => {
436
+ return J.useEffect(() => () => {
430
437
  l.current && clearTimeout(l.current);
431
- }, []), /* @__PURE__ */ _(
438
+ }, []), /* @__PURE__ */ p(
432
439
  "div",
433
440
  {
434
- className: g.container,
441
+ className: v.container,
435
442
  role: "toolbar",
436
443
  "aria-label": "Desktop Toolbar",
437
444
  children: [
438
- /* @__PURE__ */ i("div", { className: `${g.menuLeft} ${n.length > 0 ? g.menuOpen : g.menuClosed}`, children: /* @__PURE__ */ i("div", { className: g.menuContentLeft, children: n.map((y) => /* @__PURE__ */ i(
439
- ft,
445
+ /* @__PURE__ */ o("div", { className: `${v.menuLeft} ${n.length > 0 ? v.menuOpen : v.menuClosed}`, children: /* @__PURE__ */ o("div", { className: v.menuContentLeft, children: n.map((y) => /* @__PURE__ */ o(
446
+ yt,
440
447
  {
441
448
  window: y,
442
449
  currentWindows: n,
@@ -445,46 +452,46 @@ function pt({
445
452
  },
446
453
  y.id
447
454
  )) }) }),
448
- /* @__PURE__ */ i(
455
+ /* @__PURE__ */ o(
449
456
  "div",
450
457
  {
451
- className: g.dockWrapper,
458
+ className: v.dockWrapper,
452
459
  onMouseEnter: x,
453
460
  onMouseLeave: b,
454
- children: /* @__PURE__ */ i("div", { className: g.dock, children: /* @__PURE__ */ _(
461
+ children: /* @__PURE__ */ o("div", { className: v.dock, children: /* @__PURE__ */ p(
455
462
  "button",
456
463
  {
457
- className: g.launcher,
464
+ className: v.launcher,
458
465
  onClick: c,
459
466
  "aria-label": s ? "Close Menu" : "Open Menu",
460
467
  "aria-expanded": s,
461
468
  children: [
462
- r && /* @__PURE__ */ _(X, { children: [
463
- /* @__PURE__ */ i(ae, { show: !s && n.length === 0 }),
464
- /* @__PURE__ */ i("span", { className: `${g.catIcon}`, children: m })
469
+ r && /* @__PURE__ */ p(G, { children: [
470
+ /* @__PURE__ */ o(de, { show: !s && n.length === 0 }),
471
+ /* @__PURE__ */ o("span", { className: `${v.catIcon}`, children: h })
465
472
  ] }),
466
- !r && /* @__PURE__ */ i("span", { className: g.catIcon, style: { fontSize: "1.5rem" }, children: "🪟" })
473
+ !r && /* @__PURE__ */ o("span", { className: v.catIcon, style: { fontSize: "1.5rem" }, children: "🪟" })
467
474
  ]
468
475
  }
469
476
  ) })
470
477
  }
471
478
  ),
472
- /* @__PURE__ */ i(
479
+ /* @__PURE__ */ o(
473
480
  "div",
474
481
  {
475
- className: `${g.menuRight} ${s ? g.menuOpen : g.menuClosed}`,
476
- onMouseEnter: p,
482
+ className: `${v.menuRight} ${s ? v.menuOpen : v.menuClosed}`,
483
+ onMouseEnter: _,
477
484
  onMouseLeave: b,
478
- children: /* @__PURE__ */ i("div", { className: g.menuContentRight, children: u.map((y, T) => d(y) ? /* @__PURE__ */ i(
479
- ht,
485
+ children: /* @__PURE__ */ o("div", { className: v.menuContentRight, children: u.map((y, L) => d(y) ? /* @__PURE__ */ o(
486
+ xt,
480
487
  {
481
488
  folder: y,
482
489
  currentWindows: n,
483
490
  openWindow: e
484
491
  },
485
- y.id ?? T
486
- ) : n.some((N) => N.id === y.id) ? null : /* @__PURE__ */ i(
487
- ue,
492
+ y.id ?? L
493
+ ) : n.some((O) => O.id === y.id) ? null : /* @__PURE__ */ o(
494
+ me,
488
495
  {
489
496
  window: y,
490
497
  currentWindows: n,
@@ -498,24 +505,24 @@ function pt({
498
505
  }
499
506
  );
500
507
  }
501
- const bt = "_desktopOnly_ec5se_1", vt = "_mobileOnly_ec5se_9", gt = "_icon_ec5se_17", ne = {
502
- desktopOnly: bt,
503
- mobileOnly: vt,
504
- icon: gt
505
- }, xt = "_pawButton_n7khn_1", yt = "_mobileItems_n7khn_57", Mt = "_mobileItemsVisible_n7khn_103", zt = "_mobileIcon_n7khn_115", wt = "_folderContainer_n7khn_191", Ct = "_folderHeader_n7khn_203", $t = "_folderContent_n7khn_213", O = {
506
- pawButton: xt,
507
- mobileItems: yt,
508
- mobileItemsVisible: Mt,
509
- mobileIcon: zt,
510
- folderContainer: wt,
511
- folderHeader: Ct,
512
- folderContent: $t
513
- }, fe = Y(({ window: e, currentWindows: t, openWindow: o, closeMenu: n }) => {
508
+ const Ct = "_desktopOnly_ec5se_1", wt = "_mobileOnly_ec5se_9", $t = "_icon_ec5se_17", ee = {
509
+ desktopOnly: Ct,
510
+ mobileOnly: wt,
511
+ icon: $t
512
+ }, Nt = "_pawButton_n7khn_1", Lt = "_mobileItems_n7khn_57", kt = "_mobileItemsVisible_n7khn_103", Tt = "_mobileIcon_n7khn_115", Wt = "_folderContainer_n7khn_191", Rt = "_folderHeader_n7khn_203", St = "_folderContent_n7khn_213", B = {
513
+ pawButton: Nt,
514
+ mobileItems: Lt,
515
+ mobileItemsVisible: kt,
516
+ mobileIcon: Tt,
517
+ folderContainer: Wt,
518
+ folderHeader: Rt,
519
+ folderContent: St
520
+ }, _e = V(({ window: e, currentWindows: t, openWindow: i, closeMenu: n }) => {
514
521
  const s = t.some((a) => a.id === e.id), c = f(() => {
515
- o(e), n();
516
- }, [o, e, n]);
517
- return /* @__PURE__ */ i(
518
- G,
522
+ i(e), n();
523
+ }, [i, e, n]);
524
+ return /* @__PURE__ */ o(
525
+ Z,
519
526
  {
520
527
  icon: e.icon,
521
528
  label: e.title,
@@ -524,101 +531,101 @@ const bt = "_desktopOnly_ec5se_1", vt = "_mobileOnly_ec5se_9", gt = "_icon_ec5se
524
531
  showTooltip: !1
525
532
  }
526
533
  );
527
- }), Nt = Y(({ folder: e, currentWindows: t, openWindow: o, closeMenu: n }) => {
528
- const [s, c] = $(!1);
529
- return /* @__PURE__ */ _("div", { className: O.folderContainer, children: [
530
- /* @__PURE__ */ i("div", { className: O.folderHeader, children: /* @__PURE__ */ i(
531
- G,
534
+ }), It = V(({ folder: e, currentWindows: t, openWindow: i, closeMenu: n }) => {
535
+ const [s, c] = z(!1);
536
+ return /* @__PURE__ */ p("div", { className: B.folderContainer, children: [
537
+ /* @__PURE__ */ o("div", { className: B.folderHeader, children: /* @__PURE__ */ o(
538
+ Z,
532
539
  {
533
- icon: e.icon || /* @__PURE__ */ i(me, {}),
540
+ icon: e.icon || /* @__PURE__ */ o(he, {}),
534
541
  label: e.title,
535
542
  onClick: () => c((a) => !a),
536
543
  isActive: s,
537
544
  showTooltip: !1
538
545
  }
539
546
  ) }),
540
- s && /* @__PURE__ */ i("div", { className: O.folderContent, children: e.apps.map((a) => /* @__PURE__ */ i(
541
- fe,
547
+ s && /* @__PURE__ */ o("div", { className: B.folderContent, children: e.apps.map((a) => /* @__PURE__ */ o(
548
+ _e,
542
549
  {
543
550
  window: a,
544
551
  currentWindows: t,
545
- openWindow: o,
552
+ openWindow: i,
546
553
  closeMenu: n
547
554
  },
548
555
  a.id
549
556
  )) })
550
557
  ] });
551
- }), oe = {
558
+ }), te = {
552
559
  IDLE: `/\\_/\\
553
560
  ( -.- )`,
554
561
  OPEN: `/\\_/\\
555
562
  ( ^.^ )`
556
563
  };
557
- function Lt({
564
+ function Bt({
558
565
  openWindow: e,
559
566
  toolbarItems: t,
560
- currentWindows: o,
567
+ currentWindows: i,
561
568
  isOpen: n,
562
569
  toggleOpen: s,
563
570
  setIsOpen: c
564
571
  }) {
565
- const { windowsOptions: a, isFolder: r } = he(t), l = n ? oe.OPEN : oe.IDLE, u = () => c(!1);
566
- return /* @__PURE__ */ _("div", { className: ne.mobileOnly, children: [
567
- /* @__PURE__ */ i("div", { className: `${O.mobileItems} ${n ? O.mobileItemsVisible : ""}`, children: a.length === 0 ? /* @__PURE__ */ i("span", { children: "No apps available" }) : a.map((d, m) => r(d) ? /* @__PURE__ */ i(
568
- Nt,
572
+ const { windowsOptions: a, isFolder: r } = fe(t), l = n ? te.OPEN : te.IDLE, u = () => c(!1);
573
+ return /* @__PURE__ */ p("div", { className: ee.mobileOnly, children: [
574
+ /* @__PURE__ */ o("div", { className: `${B.mobileItems} ${n ? B.mobileItemsVisible : ""}`, children: a.length === 0 ? /* @__PURE__ */ o("span", { children: "No apps available" }) : a.map((d, h) => r(d) ? /* @__PURE__ */ o(
575
+ It,
569
576
  {
570
577
  folder: d,
571
- currentWindows: o,
578
+ currentWindows: i,
572
579
  openWindow: e,
573
580
  closeMenu: u
574
581
  },
575
- d.id || m
576
- ) : /* @__PURE__ */ i(
577
- fe,
582
+ d.id || h
583
+ ) : /* @__PURE__ */ o(
584
+ _e,
578
585
  {
579
586
  window: d,
580
- currentWindows: o,
587
+ currentWindows: i,
581
588
  openWindow: e,
582
589
  closeMenu: u
583
590
  },
584
591
  d.id
585
592
  )) }),
586
- /* @__PURE__ */ _(
593
+ /* @__PURE__ */ p(
587
594
  "button",
588
595
  {
589
- className: `${O.pawButton} ${n ? O.pawButtonActive : ""}`,
596
+ className: `${B.pawButton} ${n ? B.pawButtonActive : ""}`,
590
597
  onClick: s,
591
598
  children: [
592
- /* @__PURE__ */ i(ae, { show: !n }),
593
- /* @__PURE__ */ i("span", { className: `${ne.icon} ${O.mobileIcon}`, children: l })
599
+ /* @__PURE__ */ o(de, { show: !n }),
600
+ /* @__PURE__ */ o("span", { className: `${ee.icon} ${B.mobileIcon}`, children: l })
594
601
  ]
595
602
  }
596
603
  )
597
604
  ] });
598
605
  }
599
- function _e(e = 768) {
600
- const [t, o] = $(!1);
601
- return V(() => {
602
- const n = window.matchMedia(`(max-width: ${e}px)`), s = () => o(n.matches);
606
+ function pe(e = 768) {
607
+ const [t, i] = z(!1);
608
+ return H(() => {
609
+ const n = window.matchMedia(`(max-width: ${e}px)`), s = () => i(n.matches);
603
610
  return s(), n.addEventListener("change", s), () => n.removeEventListener("change", s);
604
611
  }, [e]), t;
605
612
  }
606
- function Cn({ toolbarItems: e, ...t }) {
607
- const { openWindow: o, closeWindow: n } = re(), s = ce(), { isOpen: c, toggleOpen: a, setIsOpen: r } = we(), l = _e();
608
- return /* @__PURE__ */ i(X, { children: l ? /* @__PURE__ */ i(
609
- Lt,
613
+ function Sn({ toolbarItems: e, ...t }) {
614
+ const { openWindow: i, closeWindow: n } = le(), s = ae(), { isOpen: c, toggleOpen: a, setIsOpen: r } = ke(), l = pe();
615
+ return /* @__PURE__ */ o(G, { children: l ? /* @__PURE__ */ o(
616
+ Bt,
610
617
  {
611
- openWindow: o,
618
+ openWindow: i,
612
619
  toolbarItems: e,
613
620
  currentWindows: s,
614
621
  isOpen: c,
615
622
  toggleOpen: a,
616
623
  setIsOpen: r
617
624
  }
618
- ) : /* @__PURE__ */ i(
619
- pt,
625
+ ) : /* @__PURE__ */ o(
626
+ Mt,
620
627
  {
621
- openWindow: o,
628
+ openWindow: i,
622
629
  closeWindow: n,
623
630
  toolbarItems: e,
624
631
  currentWindows: s,
@@ -629,268 +636,332 @@ function Cn({ toolbarItems: e, ...t }) {
629
636
  }
630
637
  ) });
631
638
  }
632
- const pe = ge(null), Wt = () => {
633
- const e = xe(pe);
639
+ const be = ne(null), Et = () => {
640
+ const e = ie(be);
634
641
  if (!e)
635
642
  throw new Error("useWindowUI must be used within Window (WindowContext.Provider)");
636
643
  return e;
637
- }, Tt = 300, kt = 42, Rt = { width: 500, height: 300 }, It = { x: 100, y: 100 }, F = 20;
638
- function St(e, t, o, n, s) {
639
- const c = z(!1), a = z({ x: 0, y: 0 }), r = f((d) => {
644
+ }, Ot = 300, Ht = 42, At = { width: 500, height: 300 }, Dt = { x: 100, y: 100 }, F = 20;
645
+ function Pt(e, t, i, n, s) {
646
+ const c = M(!1), a = M({ x: 0, y: 0 }), r = f((d) => {
640
647
  if (!c.current)
641
648
  return;
642
649
  s == null || s(d.clientX, d.clientY);
643
- const m = Math.min(
650
+ const h = Math.min(
644
651
  Math.max(0, d.clientX - a.current.x),
645
652
  window.innerWidth - e.width
646
- ), h = Math.min(
653
+ ), m = Math.min(
647
654
  Math.max(0, d.clientY - a.current.y),
648
655
  window.innerHeight - e.height
649
656
  );
650
- o.current && (o.current.style.left = `${m}px`, o.current.style.top = `${h}px`), n({ x: m, y: h });
657
+ i.current && (i.current.style.left = `${h}px`, i.current.style.top = `${m}px`), n({ x: h, y: m });
651
658
  }, [e, n, s]), l = f((d) => {
652
- var m;
653
- (m = window.getSelection()) == null || m.removeAllRanges(), document.body.style.userSelect = "none", a.current = {
659
+ var h;
660
+ (h = window.getSelection()) == null || h.removeAllRanges(), document.body.style.userSelect = "none", a.current = {
654
661
  x: d.clientX - t.x,
655
662
  y: d.clientY - t.y
656
663
  }, c.current = !0;
657
664
  }, [t.x, t.y]), u = f(() => {
658
665
  c.current = !1, document.body.style.userSelect = "auto";
659
666
  }, []);
660
- return D(() => ({
667
+ return E(() => ({
661
668
  dragTo: r,
662
669
  startDrag: l,
663
670
  stopDrag: u,
664
671
  isDragging: c
665
672
  }), [r, l, u]);
666
673
  }
667
- function Bt(e, t, o) {
668
- const n = z(!1), s = z({ x: 0, y: 0, w: 0, h: 0 }), c = f((l) => {
674
+ function Ft(e, t, i) {
675
+ const n = M(!1), s = M({ x: 0, y: 0, w: 0, h: 0 }), c = f((l) => {
669
676
  if (!n.current)
670
677
  return;
671
- const u = Math.min(window.innerWidth, Math.max(Tt, s.current.w + l.clientX - s.current.x)), d = Math.min(window.innerHeight, Math.max(kt, s.current.h + l.clientY - s.current.y));
672
- t.current && (t.current.style.width = `${u}px`, t.current.style.height = `${d}px`), o({ width: u, height: d });
673
- }, [o]), a = f((l) => {
678
+ const u = Math.min(window.innerWidth, Math.max(Ot, s.current.w + l.clientX - s.current.x)), d = Math.min(window.innerHeight, Math.max(Ht, s.current.h + l.clientY - s.current.y));
679
+ t.current && (t.current.style.width = `${u}px`, t.current.style.height = `${d}px`), i({ width: u, height: d });
680
+ }, [i]), a = f((l) => {
674
681
  var u;
675
682
  (u = window.getSelection()) == null || u.removeAllRanges(), document.body.style.userSelect = "none", s.current = { x: l.clientX, y: l.clientY, w: e.width, h: e.height }, n.current = !0;
676
683
  }, [e.width, e.height]), r = f(() => {
677
684
  n.current = !1, document.body.style.userSelect = "auto";
678
685
  }, []);
679
- return D(() => ({
686
+ return E(() => ({
680
687
  resizeTo: c,
681
688
  startResize: a,
682
689
  stopResize: r,
683
690
  isResizing: n
684
691
  }), [c, a, r]);
685
692
  }
686
- function Et(e) {
687
- const t = z(null), o = f((s, c) => {
693
+ function Vt(e) {
694
+ const t = M(null), i = f((s, c) => {
688
695
  const a = window.innerWidth, r = window.innerHeight;
689
696
  let l = null;
690
697
  s < F ? c < F ? l = "top-left" : c > r - F ? l = "bottom-left" : l = "left" : s > a - F && (c < F ? l = "top-right" : c > r - F ? l = "bottom-right" : l = "right"), l !== t.current && (t.current = l, e == null || e(l ? { side: l } : null));
691
698
  }, [e]), n = f(() => {
692
699
  t.current = null, e == null || e(null);
693
700
  }, [e]);
694
- return D(() => ({ currentSide: t, detectSnap: o, resetSnap: n }), [o, n]);
701
+ return E(() => ({ currentSide: t, detectSnap: i, resetSnap: n }), [i, n]);
695
702
  }
696
- function Ot({
697
- initialSize: e = Rt,
698
- initialPosition: t = It,
699
- isSnapped: o,
703
+ function jt({
704
+ initialSize: e = At,
705
+ initialPosition: t = Dt,
706
+ isSnapped: i,
700
707
  onSnap: n,
701
708
  onUnsnap: s,
702
709
  setSnapPreview: c,
703
710
  onPositionChange: a,
704
711
  onSizeChange: r
705
712
  }) {
706
- const [l, u] = $(e), [d, m] = $(t), [h, x] = $(!1), [p, b] = $(!1), y = z(e), T = z(t), N = z(null), E = f((w) => {
707
- T.current = w;
708
- }, []), H = f((w) => {
709
- y.current = w;
713
+ const [l, u] = z(e), [d, h] = z(t), [m, x] = z(!1), [_, b] = z(!1), y = M(e), L = M(t), O = M(null), k = f((C) => {
714
+ L.current = C;
715
+ }, []), T = f((C) => {
716
+ y.current = C;
710
717
  }, []);
711
- V(() => {
712
- u(e), H(e);
713
- }, [e, H]), V(() => {
714
- m(t), E(t);
715
- }, [t, E]);
716
- const k = Et(c), R = St(l, d, N, E, k.detectSnap), L = Bt(l, N, H), P = f((w) => {
717
- x(!0), R.startDrag(w);
718
- }, [R]), K = f((w) => {
719
- b(!0), L.startResize(w);
720
- }, [L]);
721
- return V(() => {
722
- if (!h && !p)
718
+ H(() => {
719
+ u(e), T(e);
720
+ }, [e, T]), H(() => {
721
+ h(t), k(t);
722
+ }, [t, k]);
723
+ const W = Vt(c), $ = Pt(l, d, O, k, W.detectSnap), R = Ft(l, O, T), D = f((C) => {
724
+ x(!0), $.startDrag(C);
725
+ }, [$]), P = f((C) => {
726
+ b(!0), R.startResize(C);
727
+ }, [R]);
728
+ return H(() => {
729
+ if (!m && !_)
723
730
  return;
724
- const w = (S) => {
725
- R.dragTo(S), L.resizeTo(S);
726
- }, I = () => {
727
- if (R.isDragging.current) {
728
- const S = T.current.x !== d.x || T.current.y !== d.y;
729
- m(T.current), k.currentSide.current && n ? (n(k.currentSide.current), k.resetSnap()) : S && (o && (s == null || s()), a == null || a(T.current)), R.stopDrag(), x(!1);
731
+ const C = (w) => {
732
+ $.dragTo(w), R.resizeTo(w);
733
+ }, q = () => {
734
+ if ($.isDragging.current) {
735
+ const w = L.current.x !== d.x || L.current.y !== d.y;
736
+ h(L.current), W.currentSide.current && n ? (n(W.currentSide.current), W.resetSnap()) : w && (i && (s == null || s()), a == null || a(L.current)), $.stopDrag(), x(!1);
730
737
  }
731
- L.isResizing.current && (u(y.current), r == null || r(y.current), o && (s == null || s()), L.stopResize(), b(!1));
738
+ R.isResizing.current && (u(y.current), r == null || r(y.current), i && (s == null || s()), R.stopResize(), b(!1));
732
739
  };
733
- return window.addEventListener("mousemove", w), window.addEventListener("mouseup", I), () => {
734
- window.removeEventListener("mousemove", w), window.removeEventListener("mouseup", I);
740
+ return window.addEventListener("mousemove", C), window.addEventListener("mouseup", q), () => {
741
+ window.removeEventListener("mousemove", C), window.removeEventListener("mouseup", q);
735
742
  };
736
- }, [R, L, n, s, o, k, a, r, h, p]), D(() => ({
743
+ }, [$, R, n, s, i, W, a, r, m, _]), E(() => ({
737
744
  size: l,
738
745
  position: d,
739
- windowRef: N,
740
- drag: P,
741
- resize: K,
742
- isDragging: h,
743
- isResizing: p
744
- }), [l, d, h, p, P, K]);
746
+ windowRef: O,
747
+ drag: D,
748
+ resize: P,
749
+ isDragging: m,
750
+ isResizing: _
751
+ }), [l, d, m, _, D, P]);
745
752
  }
746
- const Ht = () => /* @__PURE__ */ i("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ i("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2", ry: "2" }) }), At = () => /* @__PURE__ */ _("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
747
- /* @__PURE__ */ i("rect", { x: "5", y: "9", width: "14", height: "14", rx: "2", ry: "2" }),
748
- /* @__PURE__ */ i("path", { d: "M9 5h10a2 2 0 0 1 2 2v10" })
753
+ const Zt = () => /* @__PURE__ */ o("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ o("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2", ry: "2" }) }), qt = () => /* @__PURE__ */ p("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
754
+ /* @__PURE__ */ o("rect", { x: "5", y: "9", width: "14", height: "14", rx: "2", ry: "2" }),
755
+ /* @__PURE__ */ o("path", { d: "M9 5h10a2 2 0 0 1 2 2v10" })
749
756
  ] });
750
- function Dt({ onClick: e, isMaximized: t, disabled: o }) {
751
- return /* @__PURE__ */ i(
757
+ function Xt({ onClick: e, isMaximized: t, disabled: i }) {
758
+ return /* @__PURE__ */ o(
752
759
  "button",
753
760
  {
754
- className: `terminal-btn ${Z.button}`,
761
+ className: `terminal-btn ${A.button} ${A.maximize}`,
755
762
  onClick: () => {
756
763
  e();
757
764
  },
758
- disabled: o,
765
+ disabled: i,
759
766
  title: t ? "Restore" : "Maximize",
760
- children: t ? /* @__PURE__ */ i(At, {}) : /* @__PURE__ */ i(Ht, {})
767
+ "data-action": "maximize",
768
+ children: t ? /* @__PURE__ */ o(qt, {}) : /* @__PURE__ */ o(Zt, {})
761
769
  }
762
770
  );
763
771
  }
764
- const Pt = () => /* @__PURE__ */ i("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ i("line", { x1: "5", y1: "12", x2: "19", y2: "12" }) });
765
- function Ft({ onClick: e, isMinimized: t, disabled: o }) {
766
- return /* @__PURE__ */ i(
772
+ const Yt = () => /* @__PURE__ */ o("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ o("line", { x1: "5", y1: "12", x2: "19", y2: "12" }) });
773
+ function Gt({ onClick: e, isMinimized: t, disabled: i }) {
774
+ return /* @__PURE__ */ o(
767
775
  "button",
768
776
  {
769
- className: `terminal-btn ${Z.button}`,
777
+ className: `terminal-btn ${A.button} ${A.minimize}`,
770
778
  onClick: () => {
771
779
  e();
772
780
  },
773
- disabled: o || t,
781
+ disabled: i || t,
774
782
  title: t ? "Restore" : "Minimize",
775
- children: /* @__PURE__ */ i(Pt, {})
783
+ "data-action": "minimize",
784
+ children: /* @__PURE__ */ o(Yt, {})
776
785
  }
777
786
  );
778
787
  }
779
- const Vt = "_container_m621b_1", jt = "_header_m621b_27", qt = "_body_m621b_57", Zt = "_resizeHandle_m621b_73", Xt = "_content_m621b_93", Yt = "_scrollbar_m621b_181", Gt = "_transition_m621b_225", Kt = "_focused_m621b_247", Jt = "_maximized_m621b_261", Qt = "_minimized_m621b_279", Ut = "_visible_m621b_287", en = "_hidden_m621b_297", tn = "_scrollbarX_m621b_351", W = {
780
- container: Vt,
781
- header: jt,
782
- body: qt,
783
- resizeHandle: Zt,
784
- content: Xt,
785
- scrollbar: Yt,
786
- transition: Gt,
787
- focused: Kt,
788
- maximized: Jt,
789
- minimized: Qt,
790
- visible: Ut,
791
- hidden: en,
792
- scrollbarX: tn
793
- }, nn = "_title_tn8yk_1", on = "_brandText_tn8yk_25", sn = "_windowIcon_tn8yk_35", Q = {
794
- title: nn,
795
- brandText: on,
796
- windowIcon: sn
788
+ const Kt = "_container_xnmir_1", Jt = "_header_xnmir_27", Qt = "_body_xnmir_57", Ut = "_resizeHandle_xnmir_73", en = "_content_xnmir_93", tn = "_scrollbar_xnmir_181", nn = "_transition_xnmir_225", on = "_focused_xnmir_247", sn = "_maximized_xnmir_259", rn = "_minimized_xnmir_277", ln = "_visible_xnmir_285", cn = "_hidden_xnmir_295", an = "_scrollbarX_xnmir_347", N = {
789
+ container: Kt,
790
+ header: Jt,
791
+ body: Qt,
792
+ resizeHandle: Ut,
793
+ content: en,
794
+ scrollbar: tn,
795
+ transition: nn,
796
+ focused: on,
797
+ maximized: sn,
798
+ minimized: rn,
799
+ visible: ln,
800
+ hidden: cn,
801
+ scrollbarX: an
802
+ }, dn = "_title_tn8yk_1", un = "_brandText_tn8yk_25", mn = "_windowIcon_tn8yk_35", Y = {
803
+ title: dn,
804
+ brandText: un,
805
+ windowIcon: mn
797
806
  };
798
- function rn({ onClose: e, title: t, icon: o, canMinimize: n, canMaximize: s, canClose: c }) {
807
+ function hn({ onClose: e, title: t, icon: i, canMinimize: n, canMaximize: s, canClose: c }) {
799
808
  const {
800
809
  drag: a,
801
810
  isMaximized: r,
802
811
  isMinimized: l,
803
812
  minimize: u,
804
813
  maximize: d,
805
- restore: m
806
- } = Wt(), h = _e(se);
807
- return /* @__PURE__ */ _(
814
+ restore: h
815
+ } = Et(), m = pe(re);
816
+ return /* @__PURE__ */ p(
808
817
  "div",
809
818
  {
810
- className: `window-header ${W.header}`,
819
+ className: `window-header ${N.header}`,
811
820
  onMouseDown: a,
812
821
  children: [
813
- /* @__PURE__ */ _("span", { className: `window-title ${Q.title}`, children: [
814
- o && /* @__PURE__ */ i("span", { className: `window-icon ${Q.windowIcon} ${Q.brandText}`, children: o }),
815
- /* @__PURE__ */ i("span", { className: `brand-text ${Q.brandText}`, children: t })
822
+ /* @__PURE__ */ p("span", { className: `window-title ${Y.title}`, children: [
823
+ i && /* @__PURE__ */ o("span", { className: `window-icon ${Y.windowIcon} ${Y.brandText}`, children: i }),
824
+ /* @__PURE__ */ o("span", { className: `brand-text ${Y.brandText}`, children: t })
816
825
  ] }),
817
- /* @__PURE__ */ _("div", { className: `window-controls ${Z.controls}`, children: [
818
- /* @__PURE__ */ i(Ft, { onClick: u, isMinimized: l, disabled: n === !1 }),
819
- /* @__PURE__ */ i(Dt, { onClick: r ? m : d, isMaximized: r, disabled: s === !1 || h }),
820
- /* @__PURE__ */ i(de, { onClose: e, disabled: c === !1 })
826
+ /* @__PURE__ */ p("div", { className: `window-controls ${A.controls}`, children: [
827
+ /* @__PURE__ */ o(Gt, { onClick: u, isMinimized: l, disabled: n === !1 }),
828
+ /* @__PURE__ */ o(Xt, { onClick: r ? h : d, isMaximized: r, disabled: s === !1 || m }),
829
+ /* @__PURE__ */ o(ue, { onClose: e, disabled: c === !1 })
821
830
  ] })
822
831
  ]
823
832
  }
824
833
  );
825
834
  }
826
- const ln = ({ window: e }) => {
827
- const { closeWindow: t, focusWindow: o, updateWindow: n } = re(), { setSnapPreview: s } = le(), [c, a] = C.useState(!1), [r, l] = C.useState(!1), u = C.useRef(null);
828
- C.useEffect(() => {
829
- let M;
830
- return M = requestAnimationFrame(() => a(!0)), () => {
831
- cancelAnimationFrame(M), u.current && clearTimeout(u.current);
835
+ function fn() {
836
+ if (typeof window > "u")
837
+ return {
838
+ left: { width: 0, height: 0, x: 0, y: 0 },
839
+ right: { width: 0, height: 0, x: 0, y: 0 },
840
+ "top-left": { width: 0, height: 0, x: 0, y: 0 },
841
+ "top-right": { width: 0, height: 0, x: 0, y: 0 },
842
+ "bottom-left": { width: 0, height: 0, x: 0, y: 0 },
843
+ "bottom-right": { width: 0, height: 0, x: 0, y: 0 }
844
+ };
845
+ const e = window.innerWidth / 2, t = window.innerHeight / 2, i = window.innerHeight;
846
+ return {
847
+ left: {
848
+ width: e,
849
+ height: i,
850
+ x: 0,
851
+ y: 0
852
+ },
853
+ right: {
854
+ width: e,
855
+ height: i,
856
+ x: e,
857
+ y: 0
858
+ },
859
+ "top-left": {
860
+ width: e,
861
+ height: t,
862
+ x: 0,
863
+ y: 0
864
+ },
865
+ "top-right": {
866
+ width: e,
867
+ height: t,
868
+ x: e,
869
+ y: 0
870
+ },
871
+ "bottom-left": {
872
+ width: e,
873
+ height: t,
874
+ x: 0,
875
+ y: t
876
+ },
877
+ "bottom-right": {
878
+ width: e,
879
+ height: t,
880
+ x: e,
881
+ y: t
882
+ }
883
+ };
884
+ }
885
+ const _n = ({ window: e }) => {
886
+ const { closeWindow: t, focusWindow: i, updateWindow: n } = le(), { setSnapPreview: s } = ce(), c = we(), [a, r] = z(!1), [l, u] = z(!1), d = M(null);
887
+ H(() => {
888
+ let I;
889
+ return I = requestAnimationFrame(() => r(!0)), () => {
890
+ cancelAnimationFrame(I), d.current && clearTimeout(d.current);
832
891
  };
833
892
  }, []);
834
- const d = f(() => {
835
- l(!0), u.current = setTimeout(() => {
893
+ const h = f(() => {
894
+ u(!0), d.current = setTimeout(() => {
836
895
  t(e.id);
837
- }, Me);
896
+ }, Ne);
838
897
  }, [t, e.id]), m = f(() => {
839
898
  n(e.id, { isMinimized: !0 });
840
- }, [n, e.id]), h = f(() => {
841
- n(e.id, { isMaximized: !0, isMinimized: !1, isSnapped: !1 });
842
899
  }, [n, e.id]), x = f(() => {
900
+ n(e.id, { isMaximized: !0, isMinimized: !1, isSnapped: !1 });
901
+ }, [n, e.id]), _ = f(() => {
843
902
  n(e.id, { isMinimized: !1, isMaximized: !1, isSnapped: !1 });
844
- }, [n, e.id]), p = C.useCallback((M) => {
845
- let be = window.innerWidth / 2, j = window.innerHeight, A = 0, q = 0;
846
- M === "left" ? A = 0 : M === "right" ? A = window.innerWidth / 2 : M === "top-left" ? (j = window.innerHeight / 2, A = 0, q = 0) : M === "top-right" ? (j = window.innerHeight / 2, A = window.innerWidth / 2, q = 0) : M === "bottom-left" ? (j = window.innerHeight / 2, A = 0, q = window.innerHeight / 2) : M === "bottom-right" && (j = window.innerHeight / 2, A = window.innerWidth / 2, q = window.innerHeight / 2), n(e.id, {
847
- isSnapped: !0,
848
- isMaximized: !1,
849
- isMinimized: !1,
850
- size: { width: be, height: j },
851
- position: { x: A, y: q }
852
- });
853
- }, [n, e.id]), b = C.useCallback(() => {
903
+ }, [n, e.id]), b = f(
904
+ (I) => {
905
+ const ve = fn(), { width: xe, height: ye, x: ze, y: Me } = ve[I];
906
+ n(e.id, {
907
+ isSnapped: !0,
908
+ isMaximized: !1,
909
+ isMinimized: !1,
910
+ size: { width: xe, height: ye },
911
+ position: { x: ze, y: Me }
912
+ });
913
+ },
914
+ [n, e.id]
915
+ ), y = f(() => {
854
916
  n(e.id, { isSnapped: !1 });
855
- }, [n, e.id]), y = C.useCallback((M) => {
856
- n(e.id, { position: M });
857
- }, [n, e.id]), T = C.useCallback((M) => {
858
- n(e.id, { size: M });
917
+ }, [n, e.id]), L = f((I) => {
918
+ n(e.id, { position: I });
919
+ }, [n, e.id]), O = f((I) => {
920
+ n(e.id, { size: I });
859
921
  }, [n, e.id]), {
860
- size: N,
861
- position: E,
862
- isDragging: H,
863
- isResizing: k,
922
+ size: k,
923
+ position: T,
924
+ isDragging: W,
925
+ isResizing: $,
864
926
  drag: R,
865
- resize: L,
927
+ resize: D,
866
928
  windowRef: P
867
- } = Ot({
929
+ } = jt({
868
930
  initialSize: e.size,
869
931
  initialPosition: e.position,
870
932
  isMinimized: e.isMinimized || !1,
871
933
  isMaximized: e.isMaximized || !1,
872
934
  isSnapped: e.isSnapped || !1,
873
- onSnap: p,
874
- onUnsnap: b,
935
+ onSnap: b,
936
+ onUnsnap: y,
875
937
  setSnapPreview: s,
876
- onPositionChange: y,
877
- onSizeChange: T
878
- }), K = D(() => ({
879
- size: N,
880
- position: E,
881
- isDragging: H,
882
- isResizing: k,
938
+ onPositionChange: L,
939
+ onSizeChange: O
940
+ }), C = E(() => ({
941
+ size: k,
942
+ position: T,
943
+ isDragging: W,
944
+ isResizing: $,
883
945
  drag: R,
884
- resize: L,
946
+ resize: D,
885
947
  windowRef: P,
886
948
  isMinimized: e.isMinimized || !1,
887
949
  isMaximized: e.isMaximized || !1,
888
950
  isSnapped: e.isSnapped || !1,
889
951
  minimize: m,
890
- maximize: h,
891
- restore: x
892
- }), [N, E, H, k, R, L, P, e.isMinimized, e.isMaximized, e.isSnapped, m, h, x]), w = c && !r && !e.isMinimized, I = e.isMaximized, S = e.isMinimized;
893
- return /* @__PURE__ */ i(pe.Provider, { value: K, children: /* @__PURE__ */ _(
952
+ maximize: x,
953
+ restore: _
954
+ }), [k, T, W, $, R, D, P, e.isMinimized, e.isMaximized, e.isSnapped, m, x, _]), q = a && !l && !e.isMinimized, w = e.isMaximized, j = e.isMinimized, ge = E(() => ({
955
+ width: w ? void 0 : k.width,
956
+ height: j || w ? void 0 : k.height,
957
+ left: w ? void 0 : T.x,
958
+ top: w ? void 0 : T.y,
959
+ zIndex: e.zIndex,
960
+ display: "flex",
961
+ pointerEvents: j ? "none" : "auto",
962
+ ...e.style
963
+ }), [k, T, w, j, e.zIndex, e.style]);
964
+ return /* @__PURE__ */ o(be.Provider, { value: C, children: /* @__PURE__ */ p(
894
965
  "div",
895
966
  {
896
967
  ref: P,
@@ -900,27 +971,21 @@ const ln = ({ window: e }) => {
900
971
  "aria-modal": "false",
901
972
  tabIndex: -1,
902
973
  className: `window-container
903
- ${W.container}
904
- ${!H && !k ? `${W.transition} window-transition` : ""}
905
- ${w ? W.visible : W.hidden}
906
- ${I ? W.maximized : ""}
907
- ${S ? W.minimized : ""}
974
+ ${N.container}
975
+ ${!W && !$ ? `${N.transition} window-transition` : ""}
976
+ ${q ? N.visible : N.hidden}
977
+ ${w ? N.maximized : ""}
978
+ ${j ? N.minimized : ""}
979
+ ${e.className || ""}
908
980
  `,
909
- style: {
910
- width: I ? void 0 : N.width,
911
- height: S || I ? void 0 : N.height,
912
- left: I ? void 0 : E.x,
913
- top: I ? void 0 : E.y,
914
- zIndex: e.zIndex,
915
- display: "flex",
916
- pointerEvents: S ? "none" : "auto"
917
- },
918
- onMouseDown: () => o(e.id),
981
+ "data-system-style": c,
982
+ style: ge,
983
+ onMouseDown: () => i(e.id),
919
984
  children: [
920
- /* @__PURE__ */ i(
921
- rn,
985
+ /* @__PURE__ */ o(
986
+ hn,
922
987
  {
923
- onClose: d,
988
+ onClose: h,
924
989
  title: e.title,
925
990
  icon: e.icon,
926
991
  canClose: e.canClose,
@@ -928,115 +993,115 @@ const ln = ({ window: e }) => {
928
993
  canMaximize: e.canMaximize
929
994
  }
930
995
  ),
931
- /* @__PURE__ */ i(
996
+ /* @__PURE__ */ o(
932
997
  "div",
933
998
  {
934
- className: `window-scrollbar ${W.scrollbar} ${W.content}`,
935
- style: { display: S ? "none" : "flex" },
999
+ className: `window-scrollbar ${N.scrollbar} ${N.content}`,
1000
+ style: { display: j ? "none" : "flex" },
936
1001
  children: e.component
937
1002
  }
938
1003
  ),
939
- !I && /* @__PURE__ */ i(
1004
+ !w && /* @__PURE__ */ o(
940
1005
  "div",
941
1006
  {
942
- className: `window-resize-handle ${W.resizeHandle}`,
943
- onMouseDown: L
1007
+ className: `window-resize-handle ${N.resizeHandle}`,
1008
+ onMouseDown: D
944
1009
  }
945
1010
  )
946
1011
  ]
947
1012
  }
948
1013
  ) });
949
- }, cn = C.memo(ln), an = "_overlay_16s5n_1", dn = "_overlayCorner_16s5n_37", un = "_visible_16s5n_69", mn = "_left_16s5n_89", hn = "_right_16s5n_101", fn = "_topLeft_16s5n_113", _n = "_topRight_16s5n_129", pn = "_bottomLeft_16s5n_145", bn = "_bottomRight_16s5n_161", v = {
950
- overlay: an,
951
- overlayCorner: dn,
952
- visible: un,
953
- left: mn,
954
- right: hn,
955
- topLeft: fn,
956
- topRight: _n,
957
- bottomLeft: pn,
958
- bottomRight: bn
1014
+ }, pn = V(_n), bn = "_overlay_16s5n_1", gn = "_overlayCorner_16s5n_37", vn = "_visible_16s5n_69", xn = "_left_16s5n_89", yn = "_right_16s5n_101", zn = "_topLeft_16s5n_113", Mn = "_topRight_16s5n_129", Cn = "_bottomLeft_16s5n_145", wn = "_bottomRight_16s5n_161", g = {
1015
+ overlay: bn,
1016
+ overlayCorner: gn,
1017
+ visible: vn,
1018
+ left: xn,
1019
+ right: yn,
1020
+ topLeft: zn,
1021
+ topRight: Mn,
1022
+ bottomLeft: Cn,
1023
+ bottomRight: wn
959
1024
  };
960
- function vn({ side: e }) {
961
- return e ? /* @__PURE__ */ _(X, { children: [
962
- /* @__PURE__ */ i(
1025
+ function $n({ side: e }) {
1026
+ return e ? /* @__PURE__ */ p(G, { children: [
1027
+ /* @__PURE__ */ o(
963
1028
  "div",
964
1029
  {
965
1030
  className: `
966
- ${v.overlay}
967
- ${v.left}
968
- ${e === "left" ? v.visible : ""}
1031
+ ${g.overlay}
1032
+ ${g.left}
1033
+ ${e === "left" ? g.visible : ""}
969
1034
  `
970
1035
  }
971
1036
  ),
972
- /* @__PURE__ */ i(
1037
+ /* @__PURE__ */ o(
973
1038
  "div",
974
1039
  {
975
1040
  className: `
976
- ${v.overlay}
977
- ${v.right}
978
- ${e === "right" ? v.visible : ""}
1041
+ ${g.overlay}
1042
+ ${g.right}
1043
+ ${e === "right" ? g.visible : ""}
979
1044
  `
980
1045
  }
981
1046
  ),
982
- /* @__PURE__ */ i(
1047
+ /* @__PURE__ */ o(
983
1048
  "div",
984
1049
  {
985
1050
  className: `
986
- ${v.overlayCorner}
987
- ${v.topLeft}
988
- ${e === "top-left" ? v.visible : ""}
1051
+ ${g.overlayCorner}
1052
+ ${g.topLeft}
1053
+ ${e === "top-left" ? g.visible : ""}
989
1054
  `
990
1055
  }
991
1056
  ),
992
- /* @__PURE__ */ i(
1057
+ /* @__PURE__ */ o(
993
1058
  "div",
994
1059
  {
995
1060
  className: `
996
- ${v.overlayCorner}
997
- ${v.topRight}
998
- ${e === "top-right" ? v.visible : ""}
1061
+ ${g.overlayCorner}
1062
+ ${g.topRight}
1063
+ ${e === "top-right" ? g.visible : ""}
999
1064
  `
1000
1065
  }
1001
1066
  ),
1002
- /* @__PURE__ */ i(
1067
+ /* @__PURE__ */ o(
1003
1068
  "div",
1004
1069
  {
1005
1070
  className: `
1006
- ${v.overlayCorner}
1007
- ${v.bottomLeft}
1008
- ${e === "bottom-left" ? v.visible : ""}
1071
+ ${g.overlayCorner}
1072
+ ${g.bottomLeft}
1073
+ ${e === "bottom-left" ? g.visible : ""}
1009
1074
  `
1010
1075
  }
1011
1076
  ),
1012
- /* @__PURE__ */ i(
1077
+ /* @__PURE__ */ o(
1013
1078
  "div",
1014
1079
  {
1015
1080
  className: `
1016
- ${v.overlayCorner}
1017
- ${v.bottomRight}
1018
- ${e === "bottom-right" ? v.visible : ""}
1081
+ ${g.overlayCorner}
1082
+ ${g.bottomRight}
1083
+ ${e === "bottom-right" ? g.visible : ""}
1019
1084
  `
1020
1085
  }
1021
1086
  )
1022
1087
  ] }) : null;
1023
1088
  }
1024
- const gn = "_manager_1t6jq_1", xn = {
1025
- manager: gn
1089
+ const Nn = "_manager_1t6jq_1", Ln = {
1090
+ manager: Nn
1026
1091
  };
1027
- function $n() {
1028
- const e = ce(), { snapPreview: t } = le();
1029
- return /* @__PURE__ */ _("div", { className: xn.manager, children: [
1030
- /* @__PURE__ */ i(vn, { side: t ? t.side : null }),
1031
- e.map((o) => /* @__PURE__ */ i(cn, { window: o }, o.id))
1092
+ function In() {
1093
+ const e = ae(), { snapPreview: t } = ce();
1094
+ return /* @__PURE__ */ p("div", { className: Ln.manager, children: [
1095
+ /* @__PURE__ */ o($n, { side: t ? t.side : null }),
1096
+ e.map((i) => /* @__PURE__ */ o(pn, { window: i }, i.id))
1032
1097
  ] });
1033
1098
  }
1034
1099
  export {
1035
- Cn as Toolbar,
1036
- cn as Window,
1037
- $n as WindowManager,
1038
- wn as WindowSystemProvider,
1039
- re as useWindowActions,
1040
- le as useWindowSnap,
1041
- ce as useWindows
1100
+ Sn as Toolbar,
1101
+ pn as Window,
1102
+ In as WindowManager,
1103
+ Rn as WindowSystemProvider,
1104
+ le as useWindowActions,
1105
+ ce as useWindowSnap,
1106
+ ae as useWindows
1042
1107
  };