react-os-shell 0.1.11 → 0.1.12

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 (31) hide show
  1. package/dist/{Calculator-IQQNLUEG.js → Calculator-PBCTMZCM.js} +4 -4
  2. package/dist/{Calculator-IQQNLUEG.js.map → Calculator-PBCTMZCM.js.map} +1 -1
  3. package/dist/{Calendar-B3L6PE3V.js → Calendar-ULBZI2ZZ.js} +4 -4
  4. package/dist/{Calendar-B3L6PE3V.js.map → Calendar-ULBZI2ZZ.js.map} +1 -1
  5. package/dist/{CurrencyConverter-5XMVYIYB.js → CurrencyConverter-6LQTPUPC.js} +4 -4
  6. package/dist/{CurrencyConverter-5XMVYIYB.js.map → CurrencyConverter-6LQTPUPC.js.map} +1 -1
  7. package/dist/{Email-UQLMH622.js → Email-CJYW4OOP.js} +3 -3
  8. package/dist/{Email-UQLMH622.js.map → Email-CJYW4OOP.js.map} +1 -1
  9. package/dist/{Minesweeper-MD5ST4KN.js → Minesweeper-YNR4S3EJ.js} +3 -3
  10. package/dist/{Minesweeper-MD5ST4KN.js.map → Minesweeper-YNR4S3EJ.js.map} +1 -1
  11. package/dist/{Notepad-5VX7KKQS.js → Notepad-7ALDRLDP.js} +4 -4
  12. package/dist/{Notepad-5VX7KKQS.js.map → Notepad-7ALDRLDP.js.map} +1 -1
  13. package/dist/{PomodoroTimer-CVARINV5.js → PomodoroTimer-F2NAJ63E.js} +4 -4
  14. package/dist/{PomodoroTimer-CVARINV5.js.map → PomodoroTimer-F2NAJ63E.js.map} +1 -1
  15. package/dist/{Spreadsheet-WHCIBSVA.js → Spreadsheet-RJKUJDQS.js} +3 -3
  16. package/dist/{Spreadsheet-WHCIBSVA.js.map → Spreadsheet-RJKUJDQS.js.map} +1 -1
  17. package/dist/{Weather-N6OWKTQ3.js → Weather-CQ4ECULG.js} +5 -5
  18. package/dist/{Weather-N6OWKTQ3.js.map → Weather-CQ4ECULG.js.map} +1 -1
  19. package/dist/apps/index.js +9 -9
  20. package/dist/{chunk-CANJJID5.js → chunk-24K73LGZ.js} +43 -25
  21. package/dist/chunk-24K73LGZ.js.map +1 -0
  22. package/dist/{chunk-TFGOLXGD.js → chunk-36VM54SC.js} +6 -5
  23. package/dist/chunk-36VM54SC.js.map +1 -0
  24. package/dist/{chunk-WCA5UZYR.js → chunk-TAQJD73Z.js} +3 -3
  25. package/dist/{chunk-WCA5UZYR.js.map → chunk-TAQJD73Z.js.map} +1 -1
  26. package/dist/index.d.ts +6 -2
  27. package/dist/index.js +35 -9
  28. package/dist/index.js.map +1 -1
  29. package/package.json +1 -1
  30. package/dist/chunk-CANJJID5.js.map +0 -1
  31. package/dist/chunk-TFGOLXGD.js.map +0 -1
package/dist/index.js CHANGED
@@ -5,10 +5,10 @@ export { formatDate } from './chunk-NSU7OHPC.js';
5
5
  import { toast_default } from './chunk-WIJ45SYD.js';
6
6
  export { toast_default as toast } from './chunk-WIJ45SYD.js';
7
7
  import { playStartup, soundsEnabled, getSoundConfig, SOUND_PACK_KEYS, SOUND_PACKS, SOUND_TYPES, SOUND_TYPE_LABELS, playLogout, setSoundForType, previewSound, setAllSounds } from './chunk-D7PYW2QS.js';
8
- import { useShellPrefs } from './chunk-TFGOLXGD.js';
9
- export { ShellPrefsProvider, useLocalStoragePrefs, useShellPrefs } from './chunk-TFGOLXGD.js';
10
- import { useWindowManager, glassStyle, PopupMenu, PopupMenuLabel, PopupMenuDivider, PopupMenuItem, Modal, startMenuCategories, navSections, isSection, GLASS_INPUT_BG, navIcons, sectionIcons, ModalActions, useModalActive } from './chunk-CANJJID5.js';
11
- export { CancelButton, CopyButton, DocFavStar, GLASS_DIVIDER, GLASS_INPUT_BG, Modal, ModalActions, PopupMenu, PopupMenuDivider, PopupMenuItem, PopupMenuLabel, WindowManagerProvider, WindowTitle, glassStyle, isEntityEntry, isPageEntry, setShellApiClient, setShellNavIcons, setShellWindowRegistry, useModalActive, useWidgetSettings, useWindowManager, useWindowMenuItem, useWindowTitle } from './chunk-CANJJID5.js';
8
+ import { useShellPrefs } from './chunk-36VM54SC.js';
9
+ export { ShellPrefsProvider, useLocalStoragePrefs, useShellPrefs } from './chunk-36VM54SC.js';
10
+ import { useWindowManager, glassStyle, PopupMenu, PopupMenuLabel, PopupMenuDivider, PopupMenuItem, Modal, startMenuCategories, navSections, isSection, GLASS_INPUT_BG, navIcons, sectionIcons, ModalActions, useModalActive } from './chunk-24K73LGZ.js';
11
+ export { CancelButton, CopyButton, DocFavStar, GLASS_DIVIDER, GLASS_INPUT_BG, Modal, ModalActions, PopupMenu, PopupMenuDivider, PopupMenuItem, PopupMenuLabel, WindowManagerProvider, WindowTitle, glassStyle, isEntityEntry, isPageEntry, setShellApiClient, setShellNavIcons, setShellWindowRegistry, useModalActive, useWidgetSettings, useWindowManager, useWindowMenuItem, useWindowTitle } from './chunk-24K73LGZ.js';
12
12
  export { ConfirmProvider, confirm, confirmDestructive } from './chunk-RFTLYCSF.js';
13
13
  import { createContext, useState, useRef, useEffect, useCallback, useLayoutEffect, useContext, isValidElement, cloneElement, useSyncExternalStore } from 'react';
14
14
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
@@ -643,7 +643,7 @@ function StatusBadge({ status }) {
643
643
  }
644
644
 
645
645
  // src/version.ts
646
- var VERSION = "0.1.11" ;
646
+ var VERSION = "0.1.12" ;
647
647
  var APP_VERSION = VERSION;
648
648
 
649
649
  // src/changelog.ts
@@ -958,6 +958,24 @@ function Desktop({ profile }) {
958
958
  const fp = getFolderPos(f, fi);
959
959
  return Math.abs(singleItem.finalRight - fp.right) < 40 && Math.abs(singleItem.finalTop - fp.top) < 40;
960
960
  }) : void 0;
961
+ if (droppedOnFolder && singleItem?.entry.el) {
962
+ const itemEl = singleItem.entry.el;
963
+ const folderIdx = folders.indexOf(droppedOnFolder);
964
+ const folderEl = document.querySelector(`[data-desktop-icon="folder-${folderIdx}"]`);
965
+ if (folderEl) {
966
+ const ir = itemEl.getBoundingClientRect();
967
+ const fr = folderEl.getBoundingClientRect();
968
+ const dx2 = fr.left + fr.width / 2 - (ir.left + ir.width / 2);
969
+ const dy2 = fr.top + fr.height / 2 - (ir.top + ir.height / 2);
970
+ itemEl.style.transition = "transform 220ms ease-out, opacity 220ms ease-out";
971
+ itemEl.style.transform = `translate(${dx2}px, ${dy2}px) scale(0.2)`;
972
+ itemEl.style.opacity = "0";
973
+ }
974
+ folderEl?.animate(
975
+ [{ transform: "scale(1)" }, { transform: "scale(1.15)" }, { transform: "scale(1)" }],
976
+ { duration: 280, easing: "ease-out" }
977
+ );
978
+ }
961
979
  for (const move2 of itemMoves) {
962
980
  const desktopIdx = favDocs.indexOf(desktopItems[move2.entry.idx]);
963
981
  if (desktopIdx === -1) continue;
@@ -968,10 +986,14 @@ function Desktop({ profile }) {
968
986
  positionsPatch[`item-${desktopIdx}`] = { right: move2.finalRight, top: move2.finalTop };
969
987
  }
970
988
  }
971
- saveDocs(updated);
972
- if (Object.keys(positionsPatch).length > 0) {
973
- setLocalPositions((prev) => ({ ...prev, ...positionsPatch }));
974
- }
989
+ const commit = () => {
990
+ saveDocs(updated);
991
+ if (Object.keys(positionsPatch).length > 0) {
992
+ setLocalPositions((prev) => ({ ...prev, ...positionsPatch }));
993
+ }
994
+ };
995
+ if (droppedOnFolder) setTimeout(commit, 220);
996
+ else commit();
975
997
  }
976
998
  const folderMoves = computedPositions.filter((p) => p.entry.type === "folder");
977
999
  if (folderMoves.length > 0) {
@@ -1395,6 +1417,7 @@ function Desktop({ profile }) {
1395
1417
  /* @__PURE__ */ jsx("div", { className: "flex items-center gap-1", children: /* @__PURE__ */ jsx(
1396
1418
  "button",
1397
1419
  {
1420
+ onPointerDown: (e) => e.stopPropagation(),
1398
1421
  onClick: (e) => {
1399
1422
  e.stopPropagation();
1400
1423
  cycleStickyColor(note.id);
@@ -1407,6 +1430,7 @@ function Desktop({ profile }) {
1407
1430
  /* @__PURE__ */ jsx(
1408
1431
  "button",
1409
1432
  {
1433
+ onPointerDown: (e) => e.stopPropagation(),
1410
1434
  onClick: (e) => {
1411
1435
  e.stopPropagation();
1412
1436
  toggleStickyOnTop(note.id);
@@ -1422,6 +1446,7 @@ function Desktop({ profile }) {
1422
1446
  /* @__PURE__ */ jsx(
1423
1447
  "button",
1424
1448
  {
1449
+ onPointerDown: (e) => e.stopPropagation(),
1425
1450
  onClick: (e) => {
1426
1451
  e.stopPropagation();
1427
1452
  removeStickyFromDesktop(note.id);
@@ -1434,6 +1459,7 @@ function Desktop({ profile }) {
1434
1459
  /* @__PURE__ */ jsx(
1435
1460
  "button",
1436
1461
  {
1462
+ onPointerDown: (e) => e.stopPropagation(),
1437
1463
  onClick: (e) => {
1438
1464
  e.stopPropagation();
1439
1465
  deleteStickyNote(note.id);