react-os-shell 0.1.55 → 0.2.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.
- package/dist/{Browser-34KKFXNU.js → Browser-IAQ5N3LL.js} +3 -3
- package/dist/{Browser-34KKFXNU.js.map → Browser-IAQ5N3LL.js.map} +1 -1
- package/dist/{Calculator-LJMNOIS6.js → Calculator-7MIONNJK.js} +4 -4
- package/dist/{Calculator-LJMNOIS6.js.map → Calculator-7MIONNJK.js.map} +1 -1
- package/dist/{Calendar-MK27QPLK.js → Calendar-2R2DWXTG.js} +3 -3
- package/dist/{Calendar-MK27QPLK.js.map → Calendar-2R2DWXTG.js.map} +1 -1
- package/dist/{CurrencyConverter-HFPJAIPX.js → CurrencyConverter-BMTB7FLA.js} +4 -4
- package/dist/{CurrencyConverter-HFPJAIPX.js.map → CurrencyConverter-BMTB7FLA.js.map} +1 -1
- package/dist/{Documents-3UPQ5QTF.js → Documents-CBNJAM3Q.js} +88 -124
- package/dist/Documents-CBNJAM3Q.js.map +1 -0
- package/dist/{Email-ANMJEGEV.js → Email-BS6MESSZ.js} +3 -3
- package/dist/{Email-ANMJEGEV.js.map → Email-BS6MESSZ.js.map} +1 -1
- package/dist/Files-U3BSTCC3.js +7 -0
- package/dist/{Files-N3QQLSXV.js.map → Files-U3BSTCC3.js.map} +1 -1
- package/dist/{Minesweeper-UUHQCDAC.js → Minesweeper-XOSH6BW2.js} +3 -3
- package/dist/{Minesweeper-UUHQCDAC.js.map → Minesweeper-XOSH6BW2.js.map} +1 -1
- package/dist/{Notepad-W2PKOGWE.js → Notepad-DMSBGGMS.js} +3 -3
- package/dist/{Notepad-W2PKOGWE.js.map → Notepad-DMSBGGMS.js.map} +1 -1
- package/dist/{PomodoroTimer-4ZYITLNH.js → PomodoroTimer-3XLLIDV3.js} +4 -4
- package/dist/{PomodoroTimer-4ZYITLNH.js.map → PomodoroTimer-3XLLIDV3.js.map} +1 -1
- package/dist/Preview-Y2LMO2DL.js +6 -0
- package/dist/{Preview-IEPHQIJE.js.map → Preview-Y2LMO2DL.js.map} +1 -1
- package/dist/{Spreadsheet-QIBLYKVF.js → Spreadsheet-IRPGCABR.js} +3 -3
- package/dist/{Spreadsheet-QIBLYKVF.js.map → Spreadsheet-IRPGCABR.js.map} +1 -1
- package/dist/{Weather-ZJE7DNKB.js → Weather-5IW43PAQ.js} +4 -4
- package/dist/{Weather-ZJE7DNKB.js.map → Weather-5IW43PAQ.js.map} +1 -1
- package/dist/apps/index.d.ts +1 -1
- package/dist/apps/index.js +22 -22
- package/dist/apps/index.js.map +1 -1
- package/dist/{chunk-53CE7OVT.js → chunk-7P6DO3NC.js} +184 -20
- package/dist/chunk-7P6DO3NC.js.map +1 -0
- package/dist/{chunk-OZFHOQYG.js → chunk-DIJ46HNS.js} +3 -3
- package/dist/{chunk-OZFHOQYG.js.map → chunk-DIJ46HNS.js.map} +1 -1
- package/dist/{chunk-K6COBRQA.js → chunk-IQV6QQBQ.js} +155 -122
- package/dist/chunk-IQV6QQBQ.js.map +1 -0
- package/dist/{chunk-CEBFLP6R.js → chunk-JEJHECSO.js} +4 -4
- package/dist/{chunk-CEBFLP6R.js.map → chunk-JEJHECSO.js.map} +1 -1
- package/dist/index.d.ts +15 -4
- package/dist/index.js +1029 -155
- package/dist/index.js.map +1 -1
- package/dist/{types-BKoa7nhP.d.ts → types-D_4ifuf-.d.ts} +14 -1
- package/package.json +1 -1
- package/dist/Documents-3UPQ5QTF.js.map +0 -1
- package/dist/Files-N3QQLSXV.js +0 -7
- package/dist/Preview-IEPHQIJE.js +0 -6
- package/dist/chunk-53CE7OVT.js.map +0 -1
- package/dist/chunk-K6COBRQA.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { confirm } from './chunk-PLGHQ7QW.js';
|
|
2
2
|
import 'axios';
|
|
3
|
-
import { createContext, useRef, useEffect, useContext, useState,
|
|
3
|
+
import { createContext, useRef, useEffect, useSyncExternalStore, useContext, useState, useCallback, isValidElement, cloneElement, useLayoutEffect, Suspense, useMemo } from 'react';
|
|
4
4
|
import { useLocation } from 'react-router-dom';
|
|
5
5
|
import { createPortal } from 'react-dom';
|
|
6
6
|
import { useQueryClient, useQuery } from '@tanstack/react-query';
|
|
@@ -238,6 +238,46 @@ function PopupMenuLabel({ children }) {
|
|
|
238
238
|
}
|
|
239
239
|
);
|
|
240
240
|
}
|
|
241
|
+
var QUERY = "(max-width: 767px), (pointer: coarse)";
|
|
242
|
+
function getSnapshot() {
|
|
243
|
+
if (typeof window === "undefined" || !window.matchMedia) return false;
|
|
244
|
+
return window.matchMedia(QUERY).matches;
|
|
245
|
+
}
|
|
246
|
+
function getServerSnapshot() {
|
|
247
|
+
return false;
|
|
248
|
+
}
|
|
249
|
+
function subscribe(cb) {
|
|
250
|
+
if (typeof window === "undefined" || !window.matchMedia) return () => {
|
|
251
|
+
};
|
|
252
|
+
const mql = window.matchMedia(QUERY);
|
|
253
|
+
if (mql.addEventListener) {
|
|
254
|
+
mql.addEventListener("change", cb);
|
|
255
|
+
return () => mql.removeEventListener("change", cb);
|
|
256
|
+
}
|
|
257
|
+
mql.addListener(cb);
|
|
258
|
+
return () => mql.removeListener(cb);
|
|
259
|
+
}
|
|
260
|
+
function useIsMobile() {
|
|
261
|
+
return useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
// src/shell/mobileShellStore.ts
|
|
265
|
+
var _mode = "home";
|
|
266
|
+
var listeners = /* @__PURE__ */ new Set();
|
|
267
|
+
function getMobileMode() {
|
|
268
|
+
return _mode;
|
|
269
|
+
}
|
|
270
|
+
function setMobileMode(mode) {
|
|
271
|
+
if (_mode === mode) return;
|
|
272
|
+
_mode = mode;
|
|
273
|
+
listeners.forEach((fn) => fn());
|
|
274
|
+
}
|
|
275
|
+
function subscribeMobileMode(cb) {
|
|
276
|
+
listeners.add(cb);
|
|
277
|
+
return () => {
|
|
278
|
+
listeners.delete(cb);
|
|
279
|
+
};
|
|
280
|
+
}
|
|
241
281
|
var ModalIdContext = createContext("");
|
|
242
282
|
function useWidgetSettings(handler) {
|
|
243
283
|
const id = useContext(ModalIdContext);
|
|
@@ -507,7 +547,59 @@ function useIsActiveModal(modalId) {
|
|
|
507
547
|
function triggerSplitView() {
|
|
508
548
|
window.dispatchEvent(new CustomEvent("modal-split-view"));
|
|
509
549
|
}
|
|
510
|
-
function Modal({ open, onClose, title, icon, copyText, size = "lg", dirty = false, onNext, onPrev, footer, bodyScroll, onMinimize, initialBox, actions, actionsLeft, allowPinOnTop, initialPosition, widget, compact, autoHeight, widgetMenu, dimensions, windowKey, children }) {
|
|
550
|
+
function Modal({ open, onClose, title, icon, copyText, size = "lg", dirty = false, onNext, onPrev, footer, bodyScroll, onMinimize, initialBox, actions, actionsLeft, allowPinOnTop, initialPosition, widget, compact, appStyle, autoHeight, autoMinHeight, widgetMenu, dimensions, windowKey, children }) {
|
|
551
|
+
const isMobile = useIsMobile();
|
|
552
|
+
const [swipeX, setSwipeX] = useState(0);
|
|
553
|
+
const [swipeDragging, setSwipeDragging] = useState(false);
|
|
554
|
+
const swipeStartRef = useRef(null);
|
|
555
|
+
const swipeXRef = useRef(0);
|
|
556
|
+
useEffect(() => {
|
|
557
|
+
swipeXRef.current = swipeX;
|
|
558
|
+
}, [swipeX]);
|
|
559
|
+
const handleEdgePointerDown = useCallback((e) => {
|
|
560
|
+
if (!isMobile) return;
|
|
561
|
+
swipeStartRef.current = { startX: e.clientX, startY: e.clientY, pointerId: e.pointerId };
|
|
562
|
+
setSwipeDragging(true);
|
|
563
|
+
}, [isMobile]);
|
|
564
|
+
useEffect(() => {
|
|
565
|
+
if (!swipeDragging) return;
|
|
566
|
+
const onMove = (ev) => {
|
|
567
|
+
if (!swipeStartRef.current) return;
|
|
568
|
+
const dx = ev.clientX - swipeStartRef.current.startX;
|
|
569
|
+
const dy = Math.abs(ev.clientY - swipeStartRef.current.startY);
|
|
570
|
+
if (dy > Math.abs(dx) + 12) {
|
|
571
|
+
swipeStartRef.current = null;
|
|
572
|
+
setSwipeDragging(false);
|
|
573
|
+
setSwipeX(0);
|
|
574
|
+
return;
|
|
575
|
+
}
|
|
576
|
+
setSwipeX(Math.max(0, dx));
|
|
577
|
+
};
|
|
578
|
+
const onUp = () => {
|
|
579
|
+
if (!swipeStartRef.current) return;
|
|
580
|
+
const threshold = window.innerWidth * 0.3;
|
|
581
|
+
const past = swipeXRef.current > threshold;
|
|
582
|
+
swipeStartRef.current = null;
|
|
583
|
+
setSwipeDragging(false);
|
|
584
|
+
if (past) {
|
|
585
|
+
setSwipeX(window.innerWidth);
|
|
586
|
+
setTimeout(() => {
|
|
587
|
+
setMobileMode("home");
|
|
588
|
+
setSwipeX(0);
|
|
589
|
+
}, 180);
|
|
590
|
+
} else {
|
|
591
|
+
setSwipeX(0);
|
|
592
|
+
}
|
|
593
|
+
};
|
|
594
|
+
window.addEventListener("pointermove", onMove);
|
|
595
|
+
window.addEventListener("pointerup", onUp);
|
|
596
|
+
window.addEventListener("pointercancel", onUp);
|
|
597
|
+
return () => {
|
|
598
|
+
window.removeEventListener("pointermove", onMove);
|
|
599
|
+
window.removeEventListener("pointerup", onUp);
|
|
600
|
+
window.removeEventListener("pointercancel", onUp);
|
|
601
|
+
};
|
|
602
|
+
}, [swipeDragging]);
|
|
511
603
|
const [displayTitle, setDisplayTitle] = useState(title);
|
|
512
604
|
useEffect(() => {
|
|
513
605
|
setDisplayTitle(title);
|
|
@@ -647,13 +739,13 @@ function Modal({ open, onClose, title, icon, copyText, size = "lg", dirty = fals
|
|
|
647
739
|
setZIndex(getZForModal(modalId));
|
|
648
740
|
};
|
|
649
741
|
const onSplitView = () => {
|
|
650
|
-
if (allowPinOnTop) return;
|
|
742
|
+
if (allowPinOnTop || widget) return;
|
|
651
743
|
const allPanels = document.querySelectorAll("[data-modal-panel]");
|
|
652
744
|
let nonUtilityCount = 0;
|
|
653
745
|
let myNonUtilIdx = -1;
|
|
654
746
|
activationOrder.forEach((id, _i) => {
|
|
655
747
|
const panel = Array.from(allPanels).find((p) => p.getAttribute("data-modal-id") === id);
|
|
656
|
-
if (panel && !panel.hasAttribute("data-utility")) {
|
|
748
|
+
if (panel && !panel.hasAttribute("data-utility") && !panel.hasAttribute("data-widget")) {
|
|
657
749
|
if (id === modalId) myNonUtilIdx = nonUtilityCount;
|
|
658
750
|
nonUtilityCount++;
|
|
659
751
|
}
|
|
@@ -662,13 +754,12 @@ function Modal({ open, onClose, title, icon, copyText, size = "lg", dirty = fals
|
|
|
662
754
|
if (count < 2) return;
|
|
663
755
|
const myIdx = myNonUtilIdx;
|
|
664
756
|
if (myIdx < 0) return;
|
|
665
|
-
const
|
|
666
|
-
const
|
|
667
|
-
const
|
|
668
|
-
const
|
|
669
|
-
const
|
|
670
|
-
|
|
671
|
-
setBox({ x, y: padding2, w: colW, h: availH });
|
|
757
|
+
const a = workArea();
|
|
758
|
+
const baseW = Math.floor(a.w / count);
|
|
759
|
+
const remainder = a.w - baseW * count;
|
|
760
|
+
const colW = baseW + (myIdx < remainder ? 1 : 0);
|
|
761
|
+
const xOffset = myIdx * baseW + Math.min(myIdx, remainder);
|
|
762
|
+
setBox({ x: a.x + xOffset, y: a.y, w: colW, h: a.h });
|
|
672
763
|
setMaximized(false);
|
|
673
764
|
};
|
|
674
765
|
const onCenter = (e) => {
|
|
@@ -1029,6 +1120,7 @@ function Modal({ open, onClose, title, icon, copyText, size = "lg", dirty = fals
|
|
|
1029
1120
|
"data-modal-id": modalId,
|
|
1030
1121
|
"data-window-key": windowKey || void 0,
|
|
1031
1122
|
...allowPinOnTop ? { "data-utility": "" } : {},
|
|
1123
|
+
...widget ? { "data-widget": "" } : {},
|
|
1032
1124
|
className: `fixed rounded-lg flex flex-col overflow-hidden group ${widget ? isActive ? "shadow-2xl" : "shadow-lg" : `border ${isActive ? "shadow-2xl border-gray-200" : "shadow-lg border-gray-300"}`}`,
|
|
1033
1125
|
onMouseDown: (e) => {
|
|
1034
1126
|
setWindowMenu(null);
|
|
@@ -1038,19 +1130,46 @@ function Modal({ open, onClose, title, icon, copyText, size = "lg", dirty = fals
|
|
|
1038
1130
|
activateModal(modalId);
|
|
1039
1131
|
}
|
|
1040
1132
|
},
|
|
1041
|
-
style: {
|
|
1133
|
+
style: isMobile ? {
|
|
1134
|
+
// Mobile fullscreen: ignore stored box, fill viewport down to bottom
|
|
1135
|
+
// nav. Widgets stay hidden on mobile.
|
|
1136
|
+
zIndex: zIndex + 1,
|
|
1137
|
+
top: 0,
|
|
1138
|
+
left: 0,
|
|
1139
|
+
right: 0,
|
|
1140
|
+
bottom: "var(--mobile-bottom-nav, 56px)",
|
|
1141
|
+
width: "auto",
|
|
1142
|
+
height: "auto",
|
|
1143
|
+
transform: `translateX(${swipeX}px)`,
|
|
1144
|
+
transition: swipeDragging ? "none" : "transform 180ms ease-out",
|
|
1145
|
+
...widget ? { display: "none" } : {},
|
|
1146
|
+
...zIndex < 0 ? { display: "none" } : {}
|
|
1147
|
+
} : {
|
|
1042
1148
|
zIndex: pinnedOnTop ? 999 : zIndex + 1,
|
|
1043
1149
|
width: box.w,
|
|
1044
1150
|
height: autoHeight ? "auto" : box.h,
|
|
1045
1151
|
top: box.y,
|
|
1152
|
+
...autoHeight ? {
|
|
1153
|
+
minHeight: `${autoMinHeight ?? 240}px`,
|
|
1154
|
+
maxHeight: `calc(100vh - var(--taskbar-height, 0px) - 24px)`
|
|
1155
|
+
} : {},
|
|
1046
1156
|
...widget && widgetAnchor === "right" ? { right: window.innerWidth - box.x - box.w } : { left: box.x },
|
|
1047
1157
|
...zIndex < 0 && !pinnedOnTop ? { display: "none" } : {}
|
|
1048
1158
|
},
|
|
1049
1159
|
children: [
|
|
1160
|
+
isMobile && !widget && /* @__PURE__ */ jsx(
|
|
1161
|
+
"div",
|
|
1162
|
+
{
|
|
1163
|
+
onPointerDown: handleEdgePointerDown,
|
|
1164
|
+
className: "absolute top-0 bottom-0 left-0 w-[22px] z-[5]",
|
|
1165
|
+
style: { touchAction: "pan-y" },
|
|
1166
|
+
"aria-hidden": "true"
|
|
1167
|
+
}
|
|
1168
|
+
),
|
|
1050
1169
|
widget ? (
|
|
1051
1170
|
/* Widget: no title bar — drag via body, close via right-click context menu */
|
|
1052
1171
|
null
|
|
1053
|
-
) : compact ? (
|
|
1172
|
+
) : isMobile ? null : compact ? (
|
|
1054
1173
|
/* Compact: smaller title bar with title + close only */
|
|
1055
1174
|
/* @__PURE__ */ jsxs(
|
|
1056
1175
|
"div",
|
|
@@ -1078,6 +1197,48 @@ function Modal({ open, onClose, title, icon, copyText, size = "lg", dirty = fals
|
|
|
1078
1197
|
]
|
|
1079
1198
|
}
|
|
1080
1199
|
)
|
|
1200
|
+
) : appStyle ? (
|
|
1201
|
+
/* App style: small title bar like compact, but keeps minimize/maximize for full window control. */
|
|
1202
|
+
/* @__PURE__ */ jsxs(
|
|
1203
|
+
"div",
|
|
1204
|
+
{
|
|
1205
|
+
onPointerDown: startDrag,
|
|
1206
|
+
className: `flex items-center justify-between px-3 py-1.5 border-b border-gray-200 shrink-0 cursor-move select-none rounded-t-lg ${isActive ? "backdrop-blur-sm" : ""}`,
|
|
1207
|
+
style: { touchAction: "none", backgroundColor: isActive ? `rgb(var(--window-header-rgb) / var(--active-header-opacity, 0.8))` : `rgb(var(--window-header-rgb) / var(--inactive-header-opacity, 0.7))` },
|
|
1208
|
+
children: [
|
|
1209
|
+
/* @__PURE__ */ jsxs("div", { className: "text-sm font-medium min-w-0 flex-1 truncate flex items-center gap-1.5", style: { color: isActive ? "rgb(17 24 39)" : "rgb(156 163 175)" }, children: [
|
|
1210
|
+
renderIconButton(),
|
|
1211
|
+
/* @__PURE__ */ jsx("span", { className: "truncate", children: displayTitle })
|
|
1212
|
+
] }),
|
|
1213
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-0.5 shrink-0 ml-2", children: [
|
|
1214
|
+
allowPinOnTop && /* @__PURE__ */ jsx(
|
|
1215
|
+
"button",
|
|
1216
|
+
{
|
|
1217
|
+
onClick: () => setPinnedOnTop((p) => !p),
|
|
1218
|
+
title: pinnedOnTop ? "Unpin from top" : "Pin on top",
|
|
1219
|
+
className: `p-0.5 rounded hover:bg-gray-200 ${pinnedOnTop ? "text-blue-600" : "text-gray-400 hover:text-gray-600"}`,
|
|
1220
|
+
children: /* @__PURE__ */ jsx("svg", { className: "h-3 w-3", fill: pinnedOnTop ? "currentColor" : "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M16.5 3.75V16.5L12 14.25 7.5 16.5V3.75m9 0H18A2.25 2.25 0 0120.25 6v12A2.25 2.25 0 0118 20.25H6A2.25 2.25 0 013.75 18V6A2.25 2.25 0 016 3.75h1.5m9 0h-9" }) })
|
|
1221
|
+
}
|
|
1222
|
+
),
|
|
1223
|
+
/* @__PURE__ */ jsx("button", { onClick: () => {
|
|
1224
|
+
const idx = activationOrder.indexOf(modalId);
|
|
1225
|
+
if (idx !== -1) activationOrder.splice(idx, 1);
|
|
1226
|
+
activeListeners.forEach((fn) => fn());
|
|
1227
|
+
window.dispatchEvent(new CustomEvent("modal-reorder"));
|
|
1228
|
+
}, title: "Minimize", className: "text-gray-400 hover:text-gray-600 px-1 py-0.5 rounded hover:bg-gray-200 text-xs leading-none", children: "\u2500" }),
|
|
1229
|
+
/* @__PURE__ */ jsx("button", { onClick: () => {
|
|
1230
|
+
if (maximized) {
|
|
1231
|
+
setMaximized(false);
|
|
1232
|
+
setBox(calcWindowed());
|
|
1233
|
+
} else {
|
|
1234
|
+
reset();
|
|
1235
|
+
}
|
|
1236
|
+
}, title: maximized ? "Windowed" : "Maximize", className: "text-gray-400 hover:text-gray-600 px-1 py-0.5 rounded hover:bg-gray-200 text-xs leading-none", children: maximized ? "\u2750" : "\u2922" }),
|
|
1237
|
+
/* @__PURE__ */ jsx("button", { type: "button", onClick: guardedClose, className: "rounded p-0.5 text-gray-400 hover:text-gray-600 hover:bg-gray-200", children: /* @__PURE__ */ jsx(XMarkIcon, { className: "h-4 w-4" }) })
|
|
1238
|
+
] })
|
|
1239
|
+
]
|
|
1240
|
+
}
|
|
1241
|
+
)
|
|
1081
1242
|
) : /* @__PURE__ */ jsxs(
|
|
1082
1243
|
"div",
|
|
1083
1244
|
{
|
|
@@ -1132,7 +1293,7 @@ function Modal({ open, onClose, title, icon, copyText, size = "lg", dirty = fals
|
|
|
1132
1293
|
e.preventDefault();
|
|
1133
1294
|
setCtxMenu({ x: e.clientX, y: e.clientY });
|
|
1134
1295
|
} } : {},
|
|
1135
|
-
className: `flex-1 min-h-0 flex flex-col ${widget ? "p-0 cursor-move" : compact ? "p-2" : "p-4"} ${widget ? "" : "backdrop-blur-sm"} ${bodyScroll === false ? "overflow-hidden" : "overflow-y-auto"} ${widget ? "rounded-lg select-none" : ""}`,
|
|
1296
|
+
className: `flex-1 min-h-0 flex flex-col ${widget ? "p-0 cursor-move" : appStyle ? "p-0" : compact ? "p-2" : "p-4"} ${widget ? "" : "backdrop-blur-sm"} ${bodyScroll === false || appStyle ? "overflow-hidden" : "overflow-y-auto"} ${widget ? "rounded-lg select-none" : ""}`,
|
|
1136
1297
|
style: { ...widget ? { touchAction: "none" } : {}, backgroundColor: widget ? "transparent" : isActive ? `rgb(var(--window-content-rgb) / var(--active-content-opacity, 0.9))` : `rgb(var(--window-content-rgb) / var(--inactive-content-opacity, 0.8))` },
|
|
1137
1298
|
children
|
|
1138
1299
|
}
|
|
@@ -1164,7 +1325,7 @@ function Modal({ open, onClose, title, icon, copyText, size = "lg", dirty = fals
|
|
|
1164
1325
|
"div",
|
|
1165
1326
|
{
|
|
1166
1327
|
onPointerDown: startDrag,
|
|
1167
|
-
className: `px-4 py-2 border-t border-gray-200 shrink-0 flex items-center justify-between text-xs select-none cursor-move${isActive ? " backdrop-blur-sm" : ""}${widget || compact || !footer && !hasActions && !actions && !actionsLeft ? " hidden" : ""}`,
|
|
1328
|
+
className: `px-4 py-2 border-t border-gray-200 shrink-0 flex items-center justify-between text-xs select-none cursor-move${isActive ? " backdrop-blur-sm" : ""}${widget || compact || appStyle || isMobile || !footer && !hasActions && !actions && !actionsLeft ? " hidden" : ""}`,
|
|
1168
1329
|
style: { touchAction: "none", backgroundColor: isActive ? `rgb(var(--window-footer-rgb) / var(--active-header-opacity, 0.8))` : `rgb(var(--window-footer-rgb) / var(--inactive-header-opacity, 0.7))` },
|
|
1169
1330
|
children: [
|
|
1170
1331
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 min-w-0", children: [
|
|
@@ -1179,7 +1340,7 @@ function Modal({ open, onClose, title, icon, copyText, size = "lg", dirty = fals
|
|
|
1179
1340
|
]
|
|
1180
1341
|
}
|
|
1181
1342
|
),
|
|
1182
|
-
!widget && isActive && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1343
|
+
!widget && !isMobile && isActive && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1183
1344
|
/* @__PURE__ */ jsx("div", { onPointerDown: (e) => startResizeCorner(e, "se"), className: "absolute bottom-0 right-0 w-3 h-3 cursor-nwse-resize z-10" }),
|
|
1184
1345
|
/* @__PURE__ */ jsx("div", { onPointerDown: (e) => startResizeCorner(e, "sw"), className: "absolute bottom-0 left-0 w-3 h-3 cursor-nesw-resize z-10" }),
|
|
1185
1346
|
/* @__PURE__ */ jsx("div", { onPointerDown: (e) => startResizeCorner(e, "ne"), className: "absolute top-0 right-0 w-3 h-3 cursor-nesw-resize z-10" }),
|
|
@@ -1293,7 +1454,7 @@ function PageWindow({ item, onClose }) {
|
|
|
1293
1454
|
if (!raw || !isPageEntry(raw)) return null;
|
|
1294
1455
|
const entry = raw;
|
|
1295
1456
|
const Component = entry.component;
|
|
1296
|
-
return /* @__PURE__ */ jsxs(Modal, { open: true, onClose, icon: navIcons[item.route], title: entry.label, size: entry.size || "2xl", allowPinOnTop: entry.allowPinOnTop, initialPosition: entry.initialPosition, widget: entry.widget, compact: entry.compact, autoHeight: entry.autoHeight, dimensions: entry.dimensions, windowKey: item.id, children: [
|
|
1457
|
+
return /* @__PURE__ */ jsxs(Modal, { open: true, onClose, icon: navIcons[item.route], title: entry.label, size: entry.size || "2xl", allowPinOnTop: entry.allowPinOnTop, initialPosition: entry.initialPosition, widget: entry.widget, compact: entry.compact, appStyle: entry.appStyle, autoHeight: entry.autoHeight, autoMinHeight: entry.autoMinHeight, dimensions: entry.dimensions, windowKey: item.id, children: [
|
|
1297
1458
|
/* @__PURE__ */ jsx(DesktopShortcutMenuItem, { item }),
|
|
1298
1459
|
/* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center py-12", children: /* @__PURE__ */ jsx(LoadingSpinner, {}) }), children: /* @__PURE__ */ jsx(Component, {}) })
|
|
1299
1460
|
] });
|
|
@@ -1379,6 +1540,9 @@ function RestoredRegistryModal({ item, onClose, onMinimize }) {
|
|
|
1379
1540
|
copyText: item.id,
|
|
1380
1541
|
windowKey: item.id,
|
|
1381
1542
|
size: entry.size || "2xl",
|
|
1543
|
+
autoHeight: entry.autoHeight,
|
|
1544
|
+
autoMinHeight: entry.autoMinHeight,
|
|
1545
|
+
appStyle: entry.appStyle,
|
|
1382
1546
|
children: [
|
|
1383
1547
|
/* @__PURE__ */ jsx(DesktopShortcutMenuItem, { item }),
|
|
1384
1548
|
/* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(LoadingSpinner, {}), children: entry.selfFetching ? entry.render(null, handleClose, item.entityId, editing, setEditing) : isLoading && !entity ? /* @__PURE__ */ jsx(LoadingSpinner, {}) : entity ? entry.render(entity, handleClose, item.entityId, editing, setEditing) : /* @__PURE__ */ jsx("p", { className: "text-sm text-gray-500 py-8 text-center", children: "Not found." }) })
|
|
@@ -1845,6 +2009,6 @@ function WindowManagerProvider({ children }) {
|
|
|
1845
2009
|
] });
|
|
1846
2010
|
}
|
|
1847
2011
|
|
|
1848
|
-
export { CancelButton, CopyButton, DocFavStar, GLASS_DIVIDER, GLASS_INPUT_BG, Modal, ModalActions, PopupMenu, PopupMenuDivider, PopupMenuItem, PopupMenuLabel, WindowManagerProvider, WindowTitle, client_default, getActiveModalId, glassStyle, isEntityEntry, isPageEntry, isSection, navIcons, navSections, sectionIcons, setShellApiClient, setShellNavIcons, setShellWindowRegistry, startMenuCategories, useModalActive, useWidgetSettings, useWindowManager, useWindowMenuItem, useWindowTitle };
|
|
1849
|
-
//# sourceMappingURL=chunk-
|
|
1850
|
-
//# sourceMappingURL=chunk-
|
|
2012
|
+
export { CancelButton, CopyButton, DocFavStar, GLASS_DIVIDER, GLASS_INPUT_BG, LoadingSpinner, Modal, ModalActions, PopupMenu, PopupMenuDivider, PopupMenuItem, PopupMenuLabel, ThumbCard, WINDOW_REGISTRY, WindowManagerProvider, WindowTitle, activateModal, client_default, getActiveModalId, getMobileMode, glassStyle, isEntityEntry, isPageEntry, isSection, navIcons, navSections, sectionIcons, setMobileMode, setShellApiClient, setShellNavIcons, setShellWindowRegistry, startMenuCategories, subscribeMobileMode, useIsMobile, useModalActive, useWidgetSettings, useWindowManager, useWindowMenuItem, useWindowTitle };
|
|
2013
|
+
//# sourceMappingURL=chunk-7P6DO3NC.js.map
|
|
2014
|
+
//# sourceMappingURL=chunk-7P6DO3NC.js.map
|