react-os-shell 1.2.0 → 1.4.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/{Browser-I5OETCZP.js → Browser-L5CB7K7B.js} +4 -4
- package/dist/{Browser-I5OETCZP.js.map → Browser-L5CB7K7B.js.map} +1 -1
- package/dist/{Documents-XXR5APHQ.js → Documents-3V4WI42V.js} +3 -3
- package/dist/{Documents-XXR5APHQ.js.map → Documents-3V4WI42V.js.map} +1 -1
- package/dist/{Files-62UEOWMR.js → Files-3R7EHNSF.js} +7 -7
- package/dist/{Files-62UEOWMR.js.map → Files-3R7EHNSF.js.map} +1 -1
- package/dist/{Notepad-ITUWSJKY.js → Notepad-6V4JVBVJ.js} +3 -3
- package/dist/{Notepad-ITUWSJKY.js.map → Notepad-6V4JVBVJ.js.map} +1 -1
- package/dist/Preview-BTFJ7A6T.js +9 -0
- package/dist/{Preview-ABEQRCDE.js.map → Preview-BTFJ7A6T.js.map} +1 -1
- package/dist/{Spreadsheet-7AMQIX6U.js → Spreadsheet-UAYZUO4B.js} +4 -4
- package/dist/{Spreadsheet-7AMQIX6U.js.map → Spreadsheet-UAYZUO4B.js.map} +1 -1
- package/dist/apps/index.d.ts +4 -0
- package/dist/apps/index.js +12 -12
- package/dist/{chunk-CF3SUKOS.js → chunk-2HWXLIAQ.js} +4 -4
- package/dist/{chunk-CF3SUKOS.js.map → chunk-2HWXLIAQ.js.map} +1 -1
- package/dist/{chunk-P7OBFXLO.js → chunk-5BZBQGMU.js} +3 -3
- package/dist/{chunk-P7OBFXLO.js.map → chunk-5BZBQGMU.js.map} +1 -1
- package/dist/{chunk-LAAGWPMR.js → chunk-CJH5U3BW.js} +3 -3
- package/dist/{chunk-LAAGWPMR.js.map → chunk-CJH5U3BW.js.map} +1 -1
- package/dist/{chunk-2YSJRDKZ.js → chunk-EUP5PCNL.js} +4 -4
- package/dist/{chunk-2YSJRDKZ.js.map → chunk-EUP5PCNL.js.map} +1 -1
- package/dist/{chunk-6IQJSIAR.js → chunk-HBJUIVN3.js} +4 -4
- package/dist/{chunk-6IQJSIAR.js.map → chunk-HBJUIVN3.js.map} +1 -1
- package/dist/{chunk-BPPG7CVR.js → chunk-T6TOGZ2V.js} +21 -9
- package/dist/chunk-T6TOGZ2V.js.map +1 -0
- package/dist/index.d.ts +21 -2
- package/dist/index.js +49 -18
- package/dist/index.js.map +1 -1
- package/dist/styles.css +10 -0
- package/package.json +1 -1
- package/dist/Preview-ABEQRCDE.js +0 -9
- package/dist/chunk-BPPG7CVR.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -4,18 +4,18 @@ import { subscribePomo, getPomoSnapshot } from './chunk-5X5LQNOX.js';
|
|
|
4
4
|
export { setShellTodoProvider } from './chunk-5X5LQNOX.js';
|
|
5
5
|
import { useShellPrefs } from './chunk-36VM54SC.js';
|
|
6
6
|
export { ShellPrefsProvider, useLocalStoragePrefs, useShellPrefs } from './chunk-36VM54SC.js';
|
|
7
|
-
import { PREVIEW_OPENED_EVENT, openPreviewFile } from './chunk-
|
|
8
|
-
export { Breadcrumbs } from './chunk-
|
|
7
|
+
import { PREVIEW_OPENED_EVENT, openPreviewFile } from './chunk-HBJUIVN3.js';
|
|
8
|
+
export { Breadcrumbs } from './chunk-HBJUIVN3.js';
|
|
9
9
|
import { SidebarLayout } from './chunk-VGTEM5RZ.js';
|
|
10
10
|
export { SidebarLayout } from './chunk-VGTEM5RZ.js';
|
|
11
11
|
import { playNotification, playStartup, soundsEnabled, getSoundConfig, SOUND_PACK_KEYS, SOUND_PACKS, SOUND_TYPES, SOUND_TYPE_LABELS, setSoundForType, previewSound, setAllSounds, playLogout } from './chunk-D7PYW2QS.js';
|
|
12
|
-
import { setPdfPreview } from './chunk-
|
|
12
|
+
import { setPdfPreview } from './chunk-CJH5U3BW.js';
|
|
13
13
|
import './chunk-KUIPWCTJ.js';
|
|
14
14
|
import { toast_default } from './chunk-WIJ45SYD.js';
|
|
15
15
|
export { toast_default as toast } from './chunk-WIJ45SYD.js';
|
|
16
|
-
export { EditableGrid } from './chunk-
|
|
17
|
-
import { APP_VERSION } from './chunk-
|
|
18
|
-
export { VERSION } from './chunk-
|
|
16
|
+
export { EditableGrid } from './chunk-T6TOGZ2V.js';
|
|
17
|
+
import { APP_VERSION } from './chunk-EUP5PCNL.js';
|
|
18
|
+
export { VERSION } from './chunk-EUP5PCNL.js';
|
|
19
19
|
import { useWindowManager, PopupMenu, PopupMenuLabel, PopupMenuDivider, PopupMenuItem, Modal, WINDOW_REGISTRY, isPageEntry, useIsMobile, ModalActions, useModalActive, client_default, LoadingSpinner, setWindowPosition, ThumbCard, activateModal } from './chunk-GWVVILYQ.js';
|
|
20
20
|
export { CancelButton, CopyButton, DocFavStar, Modal, ModalActions, PopupMenu, PopupMenuDivider, PopupMenuItem, PopupMenuLabel, WindowManagerProvider, WindowTitle, commitExposeHighlight, exitExposeMode, getActiveWindowRoute, getExposeHighlight, getWindowPosition, isEntityEntry, isPageEntry, setExposeHighlight, setShellApiClient, setShellWindowRegistry, setWindowDefaultPosition, setWindowPosition, subscribeExposeHighlight, toggleExposeMode, useModalActive, useWidgetSettings, useWindowManager, useWindowMenuItem, useWindowTitle } from './chunk-GWVVILYQ.js';
|
|
21
21
|
import { confirm } from './chunk-UBN4IUDE.js';
|
|
@@ -4487,7 +4487,7 @@ function TaskbarPomodoro() {
|
|
|
4487
4487
|
}
|
|
4488
4488
|
);
|
|
4489
4489
|
}
|
|
4490
|
-
function TaskbarClock() {
|
|
4490
|
+
function TaskbarClock({ clockCalendar }) {
|
|
4491
4491
|
const [now, setNow] = useState(/* @__PURE__ */ new Date());
|
|
4492
4492
|
const [open, setOpen] = useState(false);
|
|
4493
4493
|
const ref = useRef(null);
|
|
@@ -4510,12 +4510,16 @@ function TaskbarClock() {
|
|
|
4510
4510
|
const rect = buttonRef.current?.getBoundingClientRect();
|
|
4511
4511
|
const right = rect ? Math.max(8, window.innerWidth - rect.right) : 8;
|
|
4512
4512
|
const posStyle = taskbarPos === "top" ? { right, top: (rect?.bottom ?? 0) + 4 } : { right, bottom: window.innerHeight - (rect?.top ?? 0) + 4 };
|
|
4513
|
-
return /* @__PURE__ */ jsx("div", { className: "fixed z-[300] rounded-lg border border-gray-200 bg-white shadow-xl", style: posStyle, children: /* @__PURE__ */ jsx(CalendarPopup, { now }) });
|
|
4513
|
+
return /* @__PURE__ */ jsx("div", { className: "fixed z-[300] rounded-lg border border-gray-200 bg-white shadow-xl", style: posStyle, children: /* @__PURE__ */ jsx(CalendarPopup, { now, config: clockCalendar, close: () => setOpen(false) }) });
|
|
4514
4514
|
})()
|
|
4515
4515
|
] });
|
|
4516
4516
|
}
|
|
4517
|
-
|
|
4517
|
+
var toISODate = (d) => `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, "0")}-${String(d.getDate()).padStart(2, "0")}`;
|
|
4518
|
+
function CalendarPopup({ now, config, close }) {
|
|
4518
4519
|
const [month, setMonth] = useState(() => new Date(now.getFullYear(), now.getMonth(), 1));
|
|
4520
|
+
const [selected, setSelected] = useState(() => toISODate(now));
|
|
4521
|
+
const interactive = !!config?.renderDay;
|
|
4522
|
+
const markedSet = useMemo(() => new Set(config?.markedDates ?? []), [config?.markedDates]);
|
|
4519
4523
|
const monthLabel = month.toLocaleDateString(void 0, { month: "long", year: "numeric" });
|
|
4520
4524
|
const fullDate = now.toLocaleDateString(void 0, { weekday: "long", month: "long", day: "numeric" });
|
|
4521
4525
|
const fullTime = now.toLocaleTimeString(void 0, { hour: "numeric", minute: "2-digit" });
|
|
@@ -4540,7 +4544,7 @@ function CalendarPopup({ now }) {
|
|
|
4540
4544
|
const goPrev = () => setMonth((m) => new Date(m.getFullYear(), m.getMonth() - 1, 1));
|
|
4541
4545
|
const goNext = () => setMonth((m) => new Date(m.getFullYear(), m.getMonth() + 1, 1));
|
|
4542
4546
|
const goToday = () => setMonth(new Date(today.getFullYear(), today.getMonth(), 1));
|
|
4543
|
-
return /* @__PURE__ */ jsxs("div", { className: "w-[260px] p-3
|
|
4547
|
+
return /* @__PURE__ */ jsxs("div", { className: `${interactive ? "w-[300px]" : "w-[260px]"} p-3`, children: [
|
|
4544
4548
|
/* @__PURE__ */ jsxs("div", { className: "px-1 pb-2.5 border-b border-gray-100", children: [
|
|
4545
4549
|
/* @__PURE__ */ jsx("div", { className: "text-[11px] font-semibold text-gray-500 uppercase tracking-wide", children: fullDate }),
|
|
4546
4550
|
/* @__PURE__ */ jsx("div", { className: "text-2xl font-semibold text-gray-800 tabular-nums leading-tight mt-0.5", children: fullTime })
|
|
@@ -4553,15 +4557,41 @@ function CalendarPopup({ now }) {
|
|
|
4553
4557
|
/* @__PURE__ */ jsx("div", { className: "grid grid-cols-7 mb-1 text-[10px] font-semibold text-gray-400 text-center uppercase tracking-wide", children: ["S", "M", "T", "W", "T", "F", "S"].map((d, i) => /* @__PURE__ */ jsx("div", { className: "py-1", children: d }, i)) }),
|
|
4554
4558
|
/* @__PURE__ */ jsx("div", { className: "grid grid-cols-7 gap-px text-center", children: cells.map((cell, i) => {
|
|
4555
4559
|
const todayCell = cell.thisMonth && isToday(cell.date);
|
|
4556
|
-
|
|
4557
|
-
|
|
4560
|
+
const iso = toISODate(cell.date);
|
|
4561
|
+
const isSelected = interactive && selected === iso;
|
|
4562
|
+
const look = isSelected ? "bg-blue-500 text-white font-semibold" : todayCell ? interactive ? "text-blue-600 font-bold hover:bg-gray-100" : "bg-blue-500 text-white font-semibold" : cell.thisMonth ? "text-gray-700 hover:bg-gray-100" : interactive ? "text-gray-300 hover:bg-gray-100" : "text-gray-300";
|
|
4563
|
+
const dayClass = `relative text-[12px] py-1.5 rounded-md transition-colors ${look}`;
|
|
4564
|
+
const dot = markedSet.has(iso) && /* @__PURE__ */ jsx(
|
|
4565
|
+
"span",
|
|
4558
4566
|
{
|
|
4559
|
-
className: `
|
|
4560
|
-
|
|
4567
|
+
className: `absolute bottom-[3px] left-1/2 -translate-x-1/2 h-1 w-1 rounded-full ${isSelected ? "bg-white" : cell.thisMonth ? "bg-blue-500" : "bg-gray-300"}`
|
|
4568
|
+
}
|
|
4569
|
+
);
|
|
4570
|
+
if (!interactive) {
|
|
4571
|
+
return /* @__PURE__ */ jsxs("div", { className: dayClass, children: [
|
|
4572
|
+
cell.day,
|
|
4573
|
+
dot
|
|
4574
|
+
] }, i);
|
|
4575
|
+
}
|
|
4576
|
+
return /* @__PURE__ */ jsxs(
|
|
4577
|
+
"button",
|
|
4578
|
+
{
|
|
4579
|
+
onClick: () => {
|
|
4580
|
+
setSelected(iso);
|
|
4581
|
+
if (!cell.thisMonth) setMonth(new Date(cell.date.getFullYear(), cell.date.getMonth(), 1));
|
|
4582
|
+
},
|
|
4583
|
+
"aria-label": cell.date.toLocaleDateString(void 0, { weekday: "long", year: "numeric", month: "long", day: "numeric" }),
|
|
4584
|
+
"aria-pressed": isSelected,
|
|
4585
|
+
className: `cursor-pointer ${dayClass}`,
|
|
4586
|
+
children: [
|
|
4587
|
+
cell.day,
|
|
4588
|
+
dot
|
|
4589
|
+
]
|
|
4561
4590
|
},
|
|
4562
4591
|
i
|
|
4563
4592
|
);
|
|
4564
|
-
}) })
|
|
4593
|
+
}) }),
|
|
4594
|
+
config?.renderDay && /* @__PURE__ */ jsx("div", { className: "mt-2.5 max-h-[280px] overflow-y-auto border-t border-gray-100 pt-2", children: config.renderDay(selected, { close }) }, selected)
|
|
4565
4595
|
] });
|
|
4566
4596
|
}
|
|
4567
4597
|
function TaskbarContextMenu({ x, y, position, size, onChangePosition, onChangeSize, onClose, onReportBug }) {
|
|
@@ -4629,7 +4659,8 @@ function Layout({
|
|
|
4629
4659
|
categories = startMenuCategories,
|
|
4630
4660
|
notifications,
|
|
4631
4661
|
search,
|
|
4632
|
-
taskbarTrayLeft
|
|
4662
|
+
taskbarTrayLeft,
|
|
4663
|
+
clockCalendar
|
|
4633
4664
|
} = {}) {
|
|
4634
4665
|
const bugReport = useBugReport();
|
|
4635
4666
|
const { user, logout, hasAnyPerm } = useAuth();
|
|
@@ -4953,7 +4984,7 @@ function Layout({
|
|
|
4953
4984
|
isVerticalTaskbar ? (
|
|
4954
4985
|
/* Vertical: clock + bell evenly spaced */
|
|
4955
4986
|
/* @__PURE__ */ jsx("div", { className: "w-full px-2", children: /* @__PURE__ */ jsxs("div", { className: `flex items-center justify-center gap-2 ${taskbarPosition === "right" ? "flex-row-reverse" : ""}`, children: [
|
|
4956
|
-
/* @__PURE__ */ jsx(TaskbarClock, {}),
|
|
4987
|
+
/* @__PURE__ */ jsx(TaskbarClock, { clockCalendar }),
|
|
4957
4988
|
/* @__PURE__ */ jsx(TaskbarPomodoro, {}),
|
|
4958
4989
|
taskbarTrayLeft,
|
|
4959
4990
|
notifications && /* @__PURE__ */ jsx(NotificationBell, { ...notifications, popDirection: taskbarPosition === "right" ? "left" : "right" })
|
|
@@ -4964,7 +4995,7 @@ function Layout({
|
|
|
4964
4995
|
/* @__PURE__ */ jsx(TaskbarPomodoro, {}),
|
|
4965
4996
|
taskbarTrayLeft,
|
|
4966
4997
|
notifications && /* @__PURE__ */ jsx(NotificationBell, { ...notifications }),
|
|
4967
|
-
/* @__PURE__ */ jsx(TaskbarClock, {})
|
|
4998
|
+
/* @__PURE__ */ jsx(TaskbarClock, { clockCalendar })
|
|
4968
4999
|
] })
|
|
4969
5000
|
)
|
|
4970
5001
|
]
|