react-os-shell 4.1.0 → 4.1.3

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 (53) hide show
  1. package/dist/{Browser-HTVB5HW3.js → Browser-XUBVGSAU.js} +6 -6
  2. package/dist/{Browser-HTVB5HW3.js.map → Browser-XUBVGSAU.js.map} +1 -1
  3. package/dist/{Calculator-6N4ZRX4D.js → Calculator-YI4FFJNC.js} +5 -5
  4. package/dist/{Calculator-6N4ZRX4D.js.map → Calculator-YI4FFJNC.js.map} +1 -1
  5. package/dist/ConfirmDialog-774RXRGC.js +4 -0
  6. package/dist/{ConfirmDialog-TJHQS6QS.js.map → ConfirmDialog-774RXRGC.js.map} +1 -1
  7. package/dist/{CurrencyConverter-VKBPC4IE.js → CurrencyConverter-LUX2UEHY.js} +5 -5
  8. package/dist/{CurrencyConverter-VKBPC4IE.js.map → CurrencyConverter-LUX2UEHY.js.map} +1 -1
  9. package/dist/{Documents-IFFAYGP2.js → Documents-LO76T67B.js} +6 -6
  10. package/dist/{Documents-IFFAYGP2.js.map → Documents-LO76T67B.js.map} +1 -1
  11. package/dist/{Files-WOWU6GMV.js → Files-JA26E7LT.js} +8 -8
  12. package/dist/{Files-WOWU6GMV.js.map → Files-JA26E7LT.js.map} +1 -1
  13. package/dist/{Notepad-WIXN44JH.js → Notepad-CDB5AOED.js} +6 -6
  14. package/dist/{Notepad-WIXN44JH.js.map → Notepad-CDB5AOED.js.map} +1 -1
  15. package/dist/{PomodoroTimer-WN6OLUEK.js → PomodoroTimer-XPG5D63T.js} +6 -6
  16. package/dist/{PomodoroTimer-WN6OLUEK.js.map → PomodoroTimer-XPG5D63T.js.map} +1 -1
  17. package/dist/{Preview-SIVXP5P3.js → Preview-CVP4RXD5.js} +6 -6
  18. package/dist/{Preview-SIVXP5P3.js.map → Preview-CVP4RXD5.js.map} +1 -1
  19. package/dist/{Sidebar-AGFOKQ5J.js → Sidebar-VF2IOOFX.js} +7 -8
  20. package/dist/Sidebar-VF2IOOFX.js.map +1 -0
  21. package/dist/{Spreadsheet-2MEBKGG6.js → Spreadsheet-HJTRTQQU.js} +6 -6
  22. package/dist/{Spreadsheet-2MEBKGG6.js.map → Spreadsheet-HJTRTQQU.js.map} +1 -1
  23. package/dist/{Stock-4KHVBZST.js → Stock-7QVYY7WE.js} +5 -5
  24. package/dist/{Stock-4KHVBZST.js.map → Stock-7QVYY7WE.js.map} +1 -1
  25. package/dist/{Weather-VVS77N24.js → Weather-UESMYSNG.js} +5 -5
  26. package/dist/{Weather-VVS77N24.js.map → Weather-UESMYSNG.js.map} +1 -1
  27. package/dist/{WorldClock-GMZFC3F3.js → WorldClock-UONWHVMF.js} +5 -5
  28. package/dist/{WorldClock-GMZFC3F3.js.map → WorldClock-UONWHVMF.js.map} +1 -1
  29. package/dist/apps/index.js +18 -18
  30. package/dist/{chunk-QXWBHX7J.js → chunk-52RFL3OQ.js} +3 -3
  31. package/dist/{chunk-QXWBHX7J.js.map → chunk-52RFL3OQ.js.map} +1 -1
  32. package/dist/{chunk-GW3RA6IS.js → chunk-6Q4KYGMH.js} +9 -3
  33. package/dist/chunk-6Q4KYGMH.js.map +1 -0
  34. package/dist/{chunk-RFXXKB3Z.js → chunk-AT2OO6B4.js} +3 -3
  35. package/dist/{chunk-RFXXKB3Z.js.map → chunk-AT2OO6B4.js.map} +1 -1
  36. package/dist/{chunk-3JR7SZN4.js → chunk-C7AKG4RE.js} +3 -3
  37. package/dist/{chunk-3JR7SZN4.js.map → chunk-C7AKG4RE.js.map} +1 -1
  38. package/dist/{chunk-RVUMXSQE.js → chunk-CWFH34LM.js} +3 -3
  39. package/dist/{chunk-RVUMXSQE.js.map → chunk-CWFH34LM.js.map} +1 -1
  40. package/dist/chunk-HWOOGLDG.js +7 -0
  41. package/dist/{chunk-C6KDEVSY.js.map → chunk-HWOOGLDG.js.map} +1 -1
  42. package/dist/{chunk-WEHUSJH7.js → chunk-N36CKRJH.js} +5 -5
  43. package/dist/{chunk-WEHUSJH7.js.map → chunk-N36CKRJH.js.map} +1 -1
  44. package/dist/{chunk-GJUL4R5U.js → chunk-OGL3C2T2.js} +4 -4
  45. package/dist/{chunk-GJUL4R5U.js.map → chunk-OGL3C2T2.js.map} +1 -1
  46. package/dist/index.d.ts +3 -0
  47. package/dist/index.js +28 -19
  48. package/dist/index.js.map +1 -1
  49. package/package.json +1 -1
  50. package/dist/ConfirmDialog-TJHQS6QS.js +0 -4
  51. package/dist/Sidebar-AGFOKQ5J.js.map +0 -1
  52. package/dist/chunk-C6KDEVSY.js +0 -7
  53. package/dist/chunk-GW3RA6IS.js.map +0 -1
package/dist/index.d.ts CHANGED
@@ -1646,6 +1646,9 @@ declare function Label({ required, children, className, ...rest }: LabelProps):
1646
1646
  * 32-hex upload prefix, and URL-decode.
1647
1647
  *
1648
1648
  * "/media/uploads/9f3…a1_My Clip.mp4?v=2" → "My Clip.mp4"
1649
+ *
1650
+ * `data:` URLs have no path, so they are named from their media type instead
1651
+ * — see `dataUrlName`.
1649
1652
  */
1650
1653
  declare function mediaFileName(url: string): string;
1651
1654
 
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { subscribePomo, getPomoSnapshot } from './chunk-RFXXKB3Z.js';
2
- export { setShellTodoProvider } from './chunk-RFXXKB3Z.js';
1
+ import { subscribePomo, getPomoSnapshot } from './chunk-AT2OO6B4.js';
2
+ export { setShellTodoProvider } from './chunk-AT2OO6B4.js';
3
3
  export { ImageAnnotator_default as ImageAnnotator } from './chunk-QU5L5ZYM.js';
4
4
  import { PREVIEW_OPENED_EVENT, openPreviewFile } from './chunk-DINNWYVB.js';
5
5
  export { Breadcrumbs } from './chunk-DINNWYVB.js';
@@ -7,7 +7,7 @@ import { SidebarLayout } from './chunk-YG45DAUT.js';
7
7
  export { SidebarLayout } from './chunk-YG45DAUT.js';
8
8
  import { toast_default } from './chunk-VENYVK3L.js';
9
9
  export { toast_default as toast } from './chunk-VENYVK3L.js';
10
- import { publishDesktopFolders, requestFilesTrashView, FolderGlyph, requestFilesDesktopFolderView, FileIconTile } from './chunk-QXWBHX7J.js';
10
+ import { publishDesktopFolders, requestFilesTrashView, FolderGlyph, requestFilesDesktopFolderView, FileIconTile } from './chunk-52RFL3OQ.js';
11
11
  import { setPdfPreview } from './chunk-BV6SQ46N.js';
12
12
  import { playNotification, playStartup, soundsEnabled, getSoundConfig, SOUND_PACK_KEYS, SOUND_PACKS, SOUND_TYPES, SOUND_TYPE_LABELS, setSoundForType, previewSound, setAllSounds, playLogout } from './chunk-D7PYW2QS.js';
13
13
  import { useAuth, useShellAuth } from './chunk-ADJ3CERD.js';
@@ -15,12 +15,12 @@ export { ShellAuthProvider, setShellAuthBridge, useShellAuth } from './chunk-ADJ
15
15
  import { EditableGrid } from './chunk-GP4Y3VCB.js';
16
16
  export { EditableGrid } from './chunk-GP4Y3VCB.js';
17
17
  import './chunk-4SQU5YV6.js';
18
- import { APP_VERSION, VERSION } from './chunk-C6KDEVSY.js';
19
- export { VERSION } from './chunk-C6KDEVSY.js';
20
- import { registerModalEscapeInterceptor, useIsMobile, useWindowManager, PopupMenu, PopupMenuLabel, PopupMenuDivider, PopupMenuItem, WINDOW_REGISTRY, isPageEntry, Modal, useShellPrefs, SIDEBAR_STRIP_W, forgetMaximizedWindowBoxes, ModalActions, useModalActive, client_default, LoadingSpinner, isShellApiClientConfigured, CancelButton, setWindowPosition } from './chunk-GJUL4R5U.js';
21
- export { CancelButton, ConfirmProvider, CopyButton, DocFavStar, Modal, ModalActions, PopupMenu, PopupMenuDivider, PopupMenuItem, PopupMenuLabel, ShellPrefsProvider, WindowCrashedFallback, WindowErrorBoundary, WindowManagerProvider, WindowTitle, commitExposeHighlight, confirm, confirmDestructive, exitExposeMode, getActiveWindowRoute, getExposeHighlight, getWindowPosition, isEntityEntry, isPageEntry, prompt, registerModalEscapeInterceptor, setExposeHighlight, setShellApiClient, setShellWindowRegistry, setWindowDefaultPosition, setWindowPosition, subscribeExposeHighlight, toggleExposeMode, useLocalStoragePrefs, useModalActive, useShellPrefs, useWidgetSettings, useWindowManager, useWindowMenuItem, useWindowTitle } from './chunk-GJUL4R5U.js';
22
- import { glassStyle, startMenuCategories, navSections, isSection, GLASS_INPUT_BG, navIcons, sectionIcons } from './chunk-GW3RA6IS.js';
23
- export { GLASS_DIVIDER, GLASS_INPUT_BG, glassStyle, setShellNavIcons } from './chunk-GW3RA6IS.js';
18
+ import { APP_VERSION, VERSION } from './chunk-HWOOGLDG.js';
19
+ export { VERSION } from './chunk-HWOOGLDG.js';
20
+ import { registerModalEscapeInterceptor, useIsMobile, useWindowManager, PopupMenu, PopupMenuLabel, PopupMenuDivider, PopupMenuItem, WINDOW_REGISTRY, isPageEntry, Modal, useShellPrefs, SIDEBAR_STRIP_W, forgetMaximizedWindowBoxes, ModalActions, useModalActive, client_default, LoadingSpinner, isShellApiClientConfigured, CancelButton, setWindowPosition } from './chunk-OGL3C2T2.js';
21
+ export { CancelButton, ConfirmProvider, CopyButton, DocFavStar, Modal, ModalActions, PopupMenu, PopupMenuDivider, PopupMenuItem, PopupMenuLabel, ShellPrefsProvider, WindowCrashedFallback, WindowErrorBoundary, WindowManagerProvider, WindowTitle, commitExposeHighlight, confirm, confirmDestructive, exitExposeMode, getActiveWindowRoute, getExposeHighlight, getWindowPosition, isEntityEntry, isPageEntry, prompt, registerModalEscapeInterceptor, setExposeHighlight, setShellApiClient, setShellWindowRegistry, setWindowDefaultPosition, setWindowPosition, subscribeExposeHighlight, toggleExposeMode, useLocalStoragePrefs, useModalActive, useShellPrefs, useWidgetSettings, useWindowManager, useWindowMenuItem, useWindowTitle } from './chunk-OGL3C2T2.js';
22
+ import { glassStyle, startMenuCategories, navSections, isSection, GLASS_INPUT_BG, navIcons, isReachable, sectionIcons, visibleChildren } from './chunk-6Q4KYGMH.js';
23
+ export { GLASS_DIVIDER, GLASS_INPUT_BG, glassStyle, setShellNavIcons } from './chunk-6Q4KYGMH.js';
24
24
  import { createContext, lazy, forwardRef, useCallback, useState, useRef, useId, useEffect, useLayoutEffect, useMemo, useContext, isValidElement, cloneElement, Suspense, Fragment as Fragment$1, Children, useSyncExternalStore } from 'react';
25
25
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
26
26
  import { Dialog, DialogBackdrop, DialogPanel } from '@headlessui/react';
@@ -2915,10 +2915,9 @@ function StartMenu({
2915
2915
  const allItems = [];
2916
2916
  const pushItem = (it, sectionLabel) => {
2917
2917
  if (it.perms && !hasAnyPerm(it.perms)) return;
2918
+ if (!isReachable(it, hasAnyPerm)) return;
2918
2919
  allItems.push({ item: it, sectionLabel });
2919
- if (it.children) {
2920
- for (const c of it.children) pushItem(c, it.label);
2921
- }
2920
+ for (const c of visibleChildren(it, hasAnyPerm)) pushItem(c, it.label);
2922
2921
  };
2923
2922
  for (const entry of navSections2) {
2924
2923
  if (isSection(entry)) {
@@ -2983,15 +2982,16 @@ function StartMenu({
2983
2982
  const footerSections = navSections2.filter((item) => isSection(item) && footerLabels.has(item.label));
2984
2983
  const hasAppsGroup = topItems.length > 0 || systemSections.length > 0 || virtualSections.length > 0;
2985
2984
  const getVisibleItems = (section) => section.items.filter((item) => !item.perms || hasAnyPerm(item.perms));
2985
+ const visibleChildren2 = (item) => visibleChildren(item, hasAnyPerm);
2986
2986
  const matchTree = (it, sectionLabel) => {
2987
2987
  if (it.perms && !hasAnyPerm(it.perms)) return [];
2988
+ if (!isReachable(it, hasAnyPerm)) return [];
2989
+ const kids = visibleChildren2(it);
2988
2990
  const hits = [];
2989
2991
  if (it.label.toLowerCase().includes(search.toLowerCase())) {
2990
2992
  hits.push({ ...it, section: sectionLabel });
2991
2993
  }
2992
- if (it.children) {
2993
- for (const c of it.children) hits.push(...matchTree(c, it.label));
2994
- }
2994
+ for (const c of kids) hits.push(...matchTree(c, it.label));
2995
2995
  return hits;
2996
2996
  };
2997
2997
  const searchResults = search.length >= 2 ? [
@@ -3017,7 +3017,7 @@ function StartMenu({
3017
3017
  };
3018
3018
  const hoveredVirtual = hoveredSection ? virtualByLabel[hoveredSection] : void 0;
3019
3019
  const hoveredData = hoveredVirtual ? null : hoveredSection ? [...erpSections, ...systemSections, ...footerSections].find((s) => s.label === hoveredSection) : null;
3020
- const flyoutItems = hoveredVirtual ? hoveredVirtual.items : hoveredData ? getVisibleItems(hoveredData) : [];
3020
+ const flyoutItems = (hoveredVirtual ? hoveredVirtual.items : hoveredData ? getVisibleItems(hoveredData) : []).filter((item) => isReachable(item, hasAnyPerm));
3021
3021
  const menuDensity = typeof document !== "undefined" ? getComputedStyle(document.documentElement).getPropertyValue("--menu-density")?.trim() || "normal" : "normal";
3022
3022
  const density = menuDensity === "tight" || menuDensity === "large" ? menuDensity : "normal";
3023
3023
  const sizeConfigByDensity = {
@@ -3255,7 +3255,7 @@ function StartMenu({
3255
3255
  }, 200);
3256
3256
  },
3257
3257
  children: /* @__PURE__ */ jsx("div", { className: "py-1 px-1 overflow-y-auto overscroll-contain", style: { maxHeight: availH }, children: flyoutItems.map((item) => {
3258
- const hasChildren = !!item.children && item.children.length > 0;
3258
+ const hasChildren = visibleChildren2(item).length > 0;
3259
3259
  const isChildHovered = hoveredChild === item.to;
3260
3260
  return /* @__PURE__ */ jsxs(
3261
3261
  "div",
@@ -3292,7 +3292,7 @@ function StartMenu({
3292
3292
  (() => {
3293
3293
  if (search.length >= 2 || !hoveredChild) return null;
3294
3294
  const parent = flyoutItems.find((it) => it.to === hoveredChild);
3295
- const kids = (parent?.children ?? []).filter((c) => !c.perms || hasAnyPerm(c.perms));
3295
+ const kids = parent ? visibleChildren2(parent) : [];
3296
3296
  if (!parent || kids.length === 0) return null;
3297
3297
  const flyoutRect = flyoutRef.current?.getBoundingClientRect();
3298
3298
  const subLeft = flyoutRect ? flyoutRect.right + 4 : 0;
@@ -3382,7 +3382,7 @@ function MobileAppLanding({
3382
3382
  }
3383
3383
  );
3384
3384
  }
3385
- var Sidebar = lazy(() => import('./Sidebar-AGFOKQ5J.js'));
3385
+ var Sidebar = lazy(() => import('./Sidebar-VF2IOOFX.js'));
3386
3386
  function useFavorites(wallpapers) {
3387
3387
  const { prefs, save } = useShellPrefs();
3388
3388
  const favorites = prefs.favorite_pages || [];
@@ -6358,7 +6358,16 @@ function Label({ required, children, className = "", ...rest }) {
6358
6358
  required && /* @__PURE__ */ jsx("span", { className: "ml-0.5 text-red-500", children: "*" })
6359
6359
  ] });
6360
6360
  }
6361
+ var DATA_URL_RE = /^data:([a-z0-9!#$&^_.+-]+)\/([a-z0-9!#$&^_.+-]+)/i;
6362
+ function dataUrlName(url) {
6363
+ const m = DATA_URL_RE.exec(url);
6364
+ if (!m) return "media";
6365
+ const [, type, subtype] = m;
6366
+ const ext = subtype.split("+")[0].split(".").pop().replace(/^x-/i, "");
6367
+ return ext ? `${type.toLowerCase()}.${ext.toLowerCase()}` : "media";
6368
+ }
6361
6369
  function mediaFileName(url) {
6370
+ if (/^data:/i.test(url || "")) return dataUrlName(url);
6362
6371
  const path = (url || "").split("?")[0].split("#")[0];
6363
6372
  const last = path.substring(path.lastIndexOf("/") + 1);
6364
6373
  try {