react-os-shell 1.3.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.
Files changed (30) hide show
  1. package/dist/{Browser-VTTA3X6R.js → Browser-L5CB7K7B.js} +4 -4
  2. package/dist/{Browser-VTTA3X6R.js.map → Browser-L5CB7K7B.js.map} +1 -1
  3. package/dist/{Documents-RRKY4LNJ.js → Documents-3V4WI42V.js} +3 -3
  4. package/dist/{Documents-RRKY4LNJ.js.map → Documents-3V4WI42V.js.map} +1 -1
  5. package/dist/{Files-QM7OERST.js → Files-3R7EHNSF.js} +7 -7
  6. package/dist/{Files-QM7OERST.js.map → Files-3R7EHNSF.js.map} +1 -1
  7. package/dist/{Notepad-7HBOCTJX.js → Notepad-6V4JVBVJ.js} +3 -3
  8. package/dist/{Notepad-7HBOCTJX.js.map → Notepad-6V4JVBVJ.js.map} +1 -1
  9. package/dist/Preview-BTFJ7A6T.js +9 -0
  10. package/dist/{Preview-S54JZBKK.js.map → Preview-BTFJ7A6T.js.map} +1 -1
  11. package/dist/{Spreadsheet-PRO6WI45.js → Spreadsheet-UAYZUO4B.js} +4 -4
  12. package/dist/{Spreadsheet-PRO6WI45.js.map → Spreadsheet-UAYZUO4B.js.map} +1 -1
  13. package/dist/apps/index.js +12 -12
  14. package/dist/{chunk-V2BMSY64.js → chunk-2HWXLIAQ.js} +4 -4
  15. package/dist/{chunk-V2BMSY64.js.map → chunk-2HWXLIAQ.js.map} +1 -1
  16. package/dist/{chunk-T4USMWTS.js → chunk-5BZBQGMU.js} +3 -3
  17. package/dist/{chunk-T4USMWTS.js.map → chunk-5BZBQGMU.js.map} +1 -1
  18. package/dist/{chunk-BDGH2GKX.js → chunk-CJH5U3BW.js} +3 -3
  19. package/dist/{chunk-BDGH2GKX.js.map → chunk-CJH5U3BW.js.map} +1 -1
  20. package/dist/{chunk-DLOIO7UD.js → chunk-EUP5PCNL.js} +3 -3
  21. package/dist/{chunk-DLOIO7UD.js.map → chunk-EUP5PCNL.js.map} +1 -1
  22. package/dist/{chunk-WMOF4TAP.js → chunk-HBJUIVN3.js} +4 -4
  23. package/dist/{chunk-WMOF4TAP.js.map → chunk-HBJUIVN3.js.map} +1 -1
  24. package/dist/{chunk-HQWHWS7V.js → chunk-T6TOGZ2V.js} +3 -3
  25. package/dist/{chunk-HQWHWS7V.js.map → chunk-T6TOGZ2V.js.map} +1 -1
  26. package/dist/index.d.ts +21 -2
  27. package/dist/index.js +49 -18
  28. package/dist/index.js.map +1 -1
  29. package/package.json +1 -1
  30. package/dist/Preview-S54JZBKK.js +0 -9
package/dist/index.d.ts CHANGED
@@ -945,8 +945,27 @@ interface LayoutProps {
945
945
  * the shell. The shell renders the node as-is — keep it small (a
946
946
  * single icon-sized button) so it fits the existing tray rhythm. */
947
947
  taskbarTrayLeft?: ReactNode;
948
+ /** Taskbar clock popover config — lets the host surface per-day content
949
+ * (e.g. tasks due that day) inside the mini month calendar. When omitted
950
+ * the popover stays a plain date grid. */
951
+ clockCalendar?: ClockCalendarConfig;
948
952
  }
949
- declare function Layout({ productName, productIcon, wallpapers, navSections, navIcons, sectionIcons, categories, notifications, search, taskbarTrayLeft, }?: LayoutProps): react_jsx_runtime.JSX.Element;
953
+ interface ClockCalendarConfig {
954
+ /** Local dates (YYYY-MM-DD) to mark with a dot in the mini month grid —
955
+ * typically days that have items on them. */
956
+ markedDates?: string[];
957
+ /** Render content for the selected day below the grid. The popover
958
+ * defaults the selection to today when it opens, so clicking the clock
959
+ * immediately shows today's items; clicking any day in the grid
960
+ * re-renders the panel for that day (days outside the shown month also
961
+ * flip the grid to their month). `close` dismisses the popover — call
962
+ * it when a row click opens a window so the popup doesn't linger over
963
+ * it. */
964
+ renderDay?: (dateISO: string, api: {
965
+ close: () => void;
966
+ }) => ReactNode;
967
+ }
968
+ declare function Layout({ productName, productIcon, wallpapers, navSections, navIcons, sectionIcons, categories, notifications, search, taskbarTrayLeft, clockCalendar, }?: LayoutProps): react_jsx_runtime.JSX.Element;
950
969
 
951
970
  interface StartMenuProps {
952
971
  open: boolean;
@@ -1512,4 +1531,4 @@ declare function useNewHotkey(callback: () => void): void;
1512
1531
  */
1513
1532
  declare function useEditHotkey(callback: (() => void) | null): void;
1514
1533
 
1515
- export { ALT, ALT_SHIFT_D, ALT_SHIFT_E, ALT_SHIFT_N, BehaviorPanel, type BreadcrumbItem, Breadcrumbs, type BreadcrumbsProps, type BugReport, type BugReportConfig, BugReportConfigProvider, BugReportDetail, type BugReportExtraField, type BugReportExtraSelectField, BugReportProvider, type BugReportSubmission, type BugReportSubmitPayload, CMD_A, CMD_DOT, CMD_ENTER, CMD_K, CMD_S, CancelButton, type CellStyle, type ChangelogEntry, type ColumnDef, ConfirmProvider, CopyButton, Customization, type CustomizationOmitSection, type CustomizationProps, type CustomizationSection, DEV_BANNER_TEXT, Desktop, type DesktopContextMenuItem, type DesktopHostConfig, DesktopHostProvider, DevIndicator, DocFavStar, ENTER, EditableGrid, type EditableGridProps, type EntityFetcher, EntityList, type EntityListColumn, type EntityListProps, GLASS_DIVIDER, GLASS_INPUT_BG, GlobalSearch, type GridColumn, HelpCenter, type HelpCenterDoc, type HelpCenterProps, Kanban, type KanbanColumn, type KanbanProps, Layout, type LayoutProps, ListFooter, MOD, Markdown, type MarkdownProps, Modal, ModalActions, NotificationBell, type NotificationsConfig, type PaginatedResponse, PopupMenu, PopupMenuDivider, PopupMenuItem, PopupMenuLabel, type ReportType, ResizableTable, SHIFT, type SearchConfig, type SearchProvider, type SearchResult, type SemanticGroup, type ShellAuth, ShellAuthProvider, ShellEntityFetcherProvider, type ShellNotification, type ShellPrefsAdapter, ShellPrefsProvider, ShortcutHelp, SidebarLayout, type SidebarLayoutProps, type SortState, SoundsPanel, StartMenu, StatusBadge, StatusBadgeProvider, type StickyEntityRef, type StickyResolver, SystemPreferences, type SystemPreferencesProps, type SystemPreferencesSection, type TodoProvider, type TodoTask, TopNav, type TopNavItem, type TopNavProps, VERSION, WidgetManager, WindowManagerProvider, WindowRegistry, WindowTitle, applyDevTitle, commitExposeHighlight, confirm, confirmDestructive, createWindowRegistry, exitExposeMode, formatDate, getActiveWindowRoute, getExposeHighlight, getWindowPosition, glassStyle, isDevEnv, isMac, openBugReportDialog, prompt, reportBug, setExposeHighlight, setShellApiClient, setShellAuthBridge, setShellNavIcons, setShellTodoProvider, setWindowDefaultPosition, setWindowPosition, subscribeExposeHighlight, toast, toggleExposeMode, useBugReport, useClickOutside, useColumnConfig, useDesktopHost, useEditHotkey, useInfiniteScroll, useLocalStoragePrefs, useModalActive, useNewHotkey, useShellAuth, useShellEntityFetcher, useShellPrefs, useSort, useTableNav, useWidgetSettings, useWindowManager, useWindowMenuItem, useWindowTitle };
1534
+ export { ALT, ALT_SHIFT_D, ALT_SHIFT_E, ALT_SHIFT_N, BehaviorPanel, type BreadcrumbItem, Breadcrumbs, type BreadcrumbsProps, type BugReport, type BugReportConfig, BugReportConfigProvider, BugReportDetail, type BugReportExtraField, type BugReportExtraSelectField, BugReportProvider, type BugReportSubmission, type BugReportSubmitPayload, CMD_A, CMD_DOT, CMD_ENTER, CMD_K, CMD_S, CancelButton, type CellStyle, type ChangelogEntry, type ClockCalendarConfig, type ColumnDef, ConfirmProvider, CopyButton, Customization, type CustomizationOmitSection, type CustomizationProps, type CustomizationSection, DEV_BANNER_TEXT, Desktop, type DesktopContextMenuItem, type DesktopHostConfig, DesktopHostProvider, DevIndicator, DocFavStar, ENTER, EditableGrid, type EditableGridProps, type EntityFetcher, EntityList, type EntityListColumn, type EntityListProps, GLASS_DIVIDER, GLASS_INPUT_BG, GlobalSearch, type GridColumn, HelpCenter, type HelpCenterDoc, type HelpCenterProps, Kanban, type KanbanColumn, type KanbanProps, Layout, type LayoutProps, ListFooter, MOD, Markdown, type MarkdownProps, Modal, ModalActions, NotificationBell, type NotificationsConfig, type PaginatedResponse, PopupMenu, PopupMenuDivider, PopupMenuItem, PopupMenuLabel, type ReportType, ResizableTable, SHIFT, type SearchConfig, type SearchProvider, type SearchResult, type SemanticGroup, type ShellAuth, ShellAuthProvider, ShellEntityFetcherProvider, type ShellNotification, type ShellPrefsAdapter, ShellPrefsProvider, ShortcutHelp, SidebarLayout, type SidebarLayoutProps, type SortState, SoundsPanel, StartMenu, StatusBadge, StatusBadgeProvider, type StickyEntityRef, type StickyResolver, SystemPreferences, type SystemPreferencesProps, type SystemPreferencesSection, type TodoProvider, type TodoTask, TopNav, type TopNavItem, type TopNavProps, VERSION, WidgetManager, WindowManagerProvider, WindowRegistry, WindowTitle, applyDevTitle, commitExposeHighlight, confirm, confirmDestructive, createWindowRegistry, exitExposeMode, formatDate, getActiveWindowRoute, getExposeHighlight, getWindowPosition, glassStyle, isDevEnv, isMac, openBugReportDialog, prompt, reportBug, setExposeHighlight, setShellApiClient, setShellAuthBridge, setShellNavIcons, setShellTodoProvider, setWindowDefaultPosition, setWindowPosition, subscribeExposeHighlight, toast, toggleExposeMode, useBugReport, useClickOutside, useColumnConfig, useDesktopHost, useEditHotkey, useInfiniteScroll, useLocalStoragePrefs, useModalActive, useNewHotkey, useShellAuth, useShellEntityFetcher, useShellPrefs, useSort, useTableNav, useWidgetSettings, useWindowManager, useWindowMenuItem, useWindowTitle };
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-WMOF4TAP.js';
8
- export { Breadcrumbs } from './chunk-WMOF4TAP.js';
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-BDGH2GKX.js';
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-HQWHWS7V.js';
17
- import { APP_VERSION } from './chunk-DLOIO7UD.js';
18
- export { VERSION } from './chunk-DLOIO7UD.js';
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
- function CalendarPopup({ now }) {
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", children: [
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
- return /* @__PURE__ */ jsx(
4557
- "div",
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: `text-[12px] py-1.5 rounded-md transition-colors ${todayCell ? "bg-blue-500 text-white font-semibold" : cell.thisMonth ? "text-gray-700 hover:bg-gray-100" : "text-gray-300"}`,
4560
- children: cell.day
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
  ]