react-os-shell 3.6.1 → 3.7.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 (31) hide show
  1. package/dist/{Browser-RGJLDLYV.js → Browser-IYC3LJ5P.js} +4 -4
  2. package/dist/{Browser-RGJLDLYV.js.map → Browser-IYC3LJ5P.js.map} +1 -1
  3. package/dist/{Documents-QXCHQJKC.js → Documents-YK7FB475.js} +3 -3
  4. package/dist/{Documents-QXCHQJKC.js.map → Documents-YK7FB475.js.map} +1 -1
  5. package/dist/Files-FKLB5NV2.js +12 -0
  6. package/dist/{Files-TKXL7YM6.js.map → Files-FKLB5NV2.js.map} +1 -1
  7. package/dist/{Notepad-UJUXL7Y2.js → Notepad-TXUDJ4TG.js} +3 -3
  8. package/dist/{Notepad-UJUXL7Y2.js.map → Notepad-TXUDJ4TG.js.map} +1 -1
  9. package/dist/Preview-WIV5TUJU.js +8 -0
  10. package/dist/{Preview-RXEAN4NM.js.map → Preview-WIV5TUJU.js.map} +1 -1
  11. package/dist/{Spreadsheet-UPQBWU7A.js → Spreadsheet-MUIPMKMH.js} +4 -4
  12. package/dist/{Spreadsheet-UPQBWU7A.js.map → Spreadsheet-MUIPMKMH.js.map} +1 -1
  13. package/dist/apps/index.js +12 -12
  14. package/dist/{chunk-H4NP7TMW.js → chunk-6FKV2CQK.js} +3 -3
  15. package/dist/{chunk-H4NP7TMW.js.map → chunk-6FKV2CQK.js.map} +1 -1
  16. package/dist/{chunk-HIJSKVIO.js → chunk-ACJVFI6M.js} +3 -3
  17. package/dist/{chunk-HIJSKVIO.js.map → chunk-ACJVFI6M.js.map} +1 -1
  18. package/dist/{chunk-O3BLL2WA.js → chunk-AUQ74UJM.js} +3 -3
  19. package/dist/{chunk-O3BLL2WA.js.map → chunk-AUQ74UJM.js.map} +1 -1
  20. package/dist/{chunk-W75O4R5Y.js → chunk-K62Q5WNU.js} +4 -4
  21. package/dist/{chunk-W75O4R5Y.js.map → chunk-K62Q5WNU.js.map} +1 -1
  22. package/dist/{chunk-UNSKKZIK.js → chunk-N3UIMOYF.js} +3 -3
  23. package/dist/{chunk-UNSKKZIK.js.map → chunk-N3UIMOYF.js.map} +1 -1
  24. package/dist/{chunk-5AQOJ5BG.js → chunk-RTT4QFJ7.js} +4 -4
  25. package/dist/{chunk-5AQOJ5BG.js.map → chunk-RTT4QFJ7.js.map} +1 -1
  26. package/dist/index.d.ts +123 -1
  27. package/dist/index.js +192 -7
  28. package/dist/index.js.map +1 -1
  29. package/package.json +1 -1
  30. package/dist/Files-TKXL7YM6.js +0 -12
  31. package/dist/Preview-RXEAN4NM.js +0 -8
package/dist/index.js CHANGED
@@ -1,18 +1,18 @@
1
1
  import { subscribePomo, getPomoSnapshot } from './chunk-L7B66ALK.js';
2
2
  export { setShellTodoProvider } from './chunk-L7B66ALK.js';
3
- import { PREVIEW_OPENED_EVENT, publishDesktopFolders, requestFilesTrashView, FolderGlyph, openPreviewFile, requestFilesDesktopFolderView, FileIconTile, hashGradient } from './chunk-W75O4R5Y.js';
4
- export { Breadcrumbs } from './chunk-W75O4R5Y.js';
3
+ import { PREVIEW_OPENED_EVENT, publishDesktopFolders, requestFilesTrashView, FolderGlyph, openPreviewFile, requestFilesDesktopFolderView, FileIconTile, hashGradient } from './chunk-K62Q5WNU.js';
4
+ export { Breadcrumbs } from './chunk-K62Q5WNU.js';
5
5
  import { SidebarLayout } from './chunk-VGTEM5RZ.js';
6
6
  export { SidebarLayout } from './chunk-VGTEM5RZ.js';
7
7
  import { playNotification, playStartup, soundsEnabled, getSoundConfig, SOUND_PACK_KEYS, SOUND_PACKS, SOUND_TYPES, SOUND_TYPE_LABELS, setSoundForType, previewSound, setAllSounds, playLogout } from './chunk-D7PYW2QS.js';
8
- export { ImageAnnotator_default as ImageAnnotator } from './chunk-O3BLL2WA.js';
8
+ export { ImageAnnotator_default as ImageAnnotator } from './chunk-AUQ74UJM.js';
9
9
  import { toast_default } from './chunk-VENYVK3L.js';
10
10
  export { toast_default as toast } from './chunk-VENYVK3L.js';
11
- export { EditableGrid } from './chunk-UNSKKZIK.js';
11
+ export { EditableGrid } from './chunk-N3UIMOYF.js';
12
12
  import { useAuth, useShellAuth } from './chunk-ADJ3CERD.js';
13
13
  export { ShellAuthProvider, setShellAuthBridge, useShellAuth } from './chunk-ADJ3CERD.js';
14
- import { APP_VERSION } from './chunk-H4NP7TMW.js';
15
- export { VERSION } from './chunk-H4NP7TMW.js';
14
+ import { APP_VERSION } from './chunk-6FKV2CQK.js';
15
+ export { VERSION } from './chunk-6FKV2CQK.js';
16
16
  import { useWindowManager, PopupMenu, PopupMenuLabel, PopupMenuDivider, PopupMenuItem, WINDOW_REGISTRY, isPageEntry, Modal, useShellPrefs, useIsMobile, ModalActions, useModalActive, client_default, LoadingSpinner, setWindowPosition, ThumbCard, activateModal } from './chunk-S22GZ4OQ.js';
17
17
  export { CancelButton, CopyButton, DocFavStar, Modal, ModalActions, PopupMenu, PopupMenuDivider, PopupMenuItem, PopupMenuLabel, ShellPrefsProvider, WindowCrashedFallback, WindowErrorBoundary, WindowManagerProvider, WindowTitle, commitExposeHighlight, exitExposeMode, getActiveWindowRoute, getExposeHighlight, getWindowPosition, isEntityEntry, isPageEntry, registerModalEscapeInterceptor, setExposeHighlight, setShellApiClient, setShellWindowRegistry, setWindowDefaultPosition, setWindowPosition, subscribeExposeHighlight, toggleExposeMode, useLocalStoragePrefs, useModalActive, useShellPrefs, useWidgetSettings, useWindowManager, useWindowMenuItem, useWindowTitle } from './chunk-S22GZ4OQ.js';
18
18
  export { ConfirmProvider, confirm, confirmDestructive, prompt } from './chunk-UBN4IUDE.js';
@@ -24,6 +24,7 @@ import { Dialog, DialogBackdrop, DialogPanel } from '@headlessui/react';
24
24
  import { createPortal } from 'react-dom';
25
25
  import { useQueryClient, useQuery, useMutation, useInfiniteQuery } from '@tanstack/react-query';
26
26
  import 'react-router-dom';
27
+ import { XMarkIcon } from '@heroicons/react/20/solid';
27
28
 
28
29
  // src/windowRegistry/createWindowRegistry.ts
29
30
  function createWindowRegistry(...partials) {
@@ -6656,6 +6657,190 @@ function Tooltip({ content, side = "top", delay = 200, children }) {
6656
6657
  }
6657
6658
  );
6658
6659
  }
6660
+ function ColoredBadge({ colorClass, children, size = "sm", capitalize = false }) {
6661
+ const sizeCls = size === "xs" ? "px-2 py-0.5 text-[10px]" : size === "md" ? "px-2.5 py-0.5 text-xs" : "px-2 py-0.5 text-xs";
6662
+ const capCls = capitalize ? "capitalize" : "";
6663
+ return /* @__PURE__ */ jsx("span", { className: `inline-flex items-center rounded-full font-medium ${sizeCls} ${capCls} ${colorClass}`, children });
6664
+ }
6665
+ function EmptyState({
6666
+ title,
6667
+ message,
6668
+ description,
6669
+ hint,
6670
+ variant,
6671
+ frameless,
6672
+ icon,
6673
+ children
6674
+ }) {
6675
+ const v = frameless ? "none" : variant ?? "dashed";
6676
+ const showIcon = icon ?? v !== "card";
6677
+ const primary = message ?? (title ? void 0 : "Nothing here yet.");
6678
+ const secondary = description ?? hint;
6679
+ const frame = v === "card" ? "rounded-md border border-gray-200 bg-white px-6 py-12" : v === "none" ? "px-6 py-12" : "rounded-lg border-2 border-dashed border-gray-300 px-6 py-12";
6680
+ return /* @__PURE__ */ jsxs("div", { className: `flex flex-col items-center justify-center text-center ${frame}`, children: [
6681
+ showIcon && /* @__PURE__ */ jsx("svg", { className: "h-10 w-10 text-gray-300 mb-3", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1, children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M20 13V6a2 2 0 00-2-2H6a2 2 0 00-2 2v7m16 0v5a2 2 0 01-2 2H6a2 2 0 01-2-2v-5m16 0h-2.586a1 1 0 00-.707.293l-2.414 2.414a1 1 0 01-.707.293h-3.172a1 1 0 01-.707-.293l-2.414-2.414A1 1 0 006.586 13H4" }) }),
6682
+ title && /* @__PURE__ */ jsx("h3", { className: "text-sm font-medium text-gray-900", children: title }),
6683
+ primary && /* @__PURE__ */ jsx("p", { className: `text-sm text-gray-500 ${title ? "mt-2" : ""}`, children: primary }),
6684
+ secondary && /* @__PURE__ */ jsx("p", { className: "text-xs text-gray-400 mt-1", children: secondary }),
6685
+ children && /* @__PURE__ */ jsx("div", { className: "mt-4", children })
6686
+ ] });
6687
+ }
6688
+ function PageHeader({ title, description, subtitle, actions, children }) {
6689
+ const desc = description ?? subtitle;
6690
+ const right = actions ?? children;
6691
+ return /* @__PURE__ */ jsxs("div", { className: "mb-6 flex items-start justify-between gap-4", children: [
6692
+ /* @__PURE__ */ jsxs("div", { children: [
6693
+ /* @__PURE__ */ jsx("h1", { className: "text-xl font-semibold text-gray-900", children: title }),
6694
+ desc && /* @__PURE__ */ jsx("p", { className: "mt-1 text-sm text-gray-500", children: desc })
6695
+ ] }),
6696
+ right && /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: right })
6697
+ ] });
6698
+ }
6699
+ function LoadingSpinner2({ size = "md", padding = "py-12", className = "" }) {
6700
+ const dim = size === "sm" ? "h-5 w-5" : size === "lg" ? "h-12 w-12" : "h-8 w-8";
6701
+ return /* @__PURE__ */ jsx("div", { className: `flex items-center justify-center ${padding} ${className}`, children: /* @__PURE__ */ jsx("div", { className: `${dim} animate-spin rounded-full border-2 border-gray-200 border-t-blue-600` }) });
6702
+ }
6703
+ function FilterBar({ filters, values, onChange, onClear, children }) {
6704
+ const activeCount = Object.values(values).filter(Boolean).length;
6705
+ return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 flex-wrap", children: [
6706
+ filters.map((f) => {
6707
+ const isSearchable = f.searchable ?? f.options.length > 8;
6708
+ return isSearchable ? /* @__PURE__ */ jsx(
6709
+ SearchableFilter,
6710
+ {
6711
+ filter: f,
6712
+ value: values[f.field] || "",
6713
+ onChange: (v) => onChange(f.field, v)
6714
+ },
6715
+ f.field
6716
+ ) : /* @__PURE__ */ jsxs(
6717
+ "select",
6718
+ {
6719
+ value: values[f.field] || "",
6720
+ onChange: (e) => onChange(f.field, e.target.value),
6721
+ className: `border rounded-lg px-2.5 py-1.5 text-sm ${values[f.field] ? "border-blue-400 bg-blue-50 text-blue-700" : "border-gray-300 text-gray-600"}`,
6722
+ children: [
6723
+ /* @__PURE__ */ jsx("option", { value: "", children: f.label }),
6724
+ f.options.map((o) => /* @__PURE__ */ jsx("option", { value: o.value, children: o.label }, o.value))
6725
+ ]
6726
+ },
6727
+ f.field
6728
+ );
6729
+ }),
6730
+ children,
6731
+ activeCount > 0 && /* @__PURE__ */ jsxs("button", { onClick: onClear, className: "flex items-center gap-1 text-sm text-gray-500 hover:text-gray-700", children: [
6732
+ /* @__PURE__ */ jsx(XMarkIcon, { className: "h-4 w-4" }),
6733
+ "Clear filters"
6734
+ ] })
6735
+ ] });
6736
+ }
6737
+ function SearchableFilter({ filter, value, onChange }) {
6738
+ const [open, setOpen] = useState(false);
6739
+ const [search, setSearch] = useState("");
6740
+ const ref = useRef(null);
6741
+ const inputRef = useRef(null);
6742
+ const selectedLabel = value ? filter.options.find((o) => o.value === value)?.label : null;
6743
+ useClickOutside(ref, useCallback(() => {
6744
+ if (open) {
6745
+ setOpen(false);
6746
+ setSearch("");
6747
+ }
6748
+ }, [open]));
6749
+ useEffect(() => {
6750
+ if (open) setTimeout(() => inputRef.current?.focus(), 50);
6751
+ }, [open]);
6752
+ const filtered = search ? filter.options.filter((o) => o.label.toLowerCase().includes(search.toLowerCase())) : filter.options;
6753
+ return /* @__PURE__ */ jsxs("div", { ref, className: "relative", children: [
6754
+ /* @__PURE__ */ jsxs(
6755
+ "button",
6756
+ {
6757
+ onClick: () => setOpen(!open),
6758
+ className: `flex items-center gap-1.5 border rounded-lg px-2.5 py-1.5 text-sm transition-colors ${value ? "border-blue-400 bg-blue-50 text-blue-700" : "border-gray-300 text-gray-600 hover:border-gray-400"}`,
6759
+ children: [
6760
+ /* @__PURE__ */ jsx("span", { className: "truncate max-w-[140px]", children: selectedLabel || filter.label }),
6761
+ value ? /* @__PURE__ */ jsx("button", { onClick: (e) => {
6762
+ e.stopPropagation();
6763
+ onChange("");
6764
+ setSearch("");
6765
+ }, className: "text-blue-400 hover:text-blue-600", children: /* @__PURE__ */ jsx(XMarkIcon, { className: "h-3.5 w-3.5" }) }) : /* @__PURE__ */ jsx("svg", { className: `h-3.5 w-3.5 text-gray-400 transition-transform ${open ? "rotate-180" : ""}`, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19.5 8.25l-7.5 7.5-7.5-7.5" }) })
6766
+ ]
6767
+ }
6768
+ ),
6769
+ open && /* @__PURE__ */ jsxs("div", { className: "absolute top-full left-0 mt-1 w-56 rounded-2xl z-[400] overflow-hidden", style: glassStyle(), children: [
6770
+ /* @__PURE__ */ jsx("div", { className: "p-1.5 border-b border-gray-100", children: /* @__PURE__ */ jsx(
6771
+ "input",
6772
+ {
6773
+ ref: inputRef,
6774
+ value: search,
6775
+ onChange: (e) => setSearch(e.target.value),
6776
+ placeholder: `Search ${filter.label.replace(/^All\s*/i, "").toLowerCase()}...`,
6777
+ className: "w-full rounded-md border border-gray-200 px-2.5 py-1.5 text-sm focus:border-blue-400 focus:ring-0 outline-none"
6778
+ }
6779
+ ) }),
6780
+ /* @__PURE__ */ jsxs("div", { className: "max-h-52 overflow-y-auto", children: [
6781
+ /* @__PURE__ */ jsx(
6782
+ "button",
6783
+ {
6784
+ onClick: () => {
6785
+ onChange("");
6786
+ setOpen(false);
6787
+ setSearch("");
6788
+ },
6789
+ className: `w-full text-left px-3 py-1.5 text-sm hover:bg-gray-50 ${!value ? "text-blue-600 font-medium bg-blue-50/50" : "text-gray-600"}`,
6790
+ children: filter.label
6791
+ }
6792
+ ),
6793
+ filtered.length === 0 ? /* @__PURE__ */ jsx("p", { className: "px-3 py-3 text-sm text-gray-400 text-center", children: "No matches" }) : filtered.map((o) => /* @__PURE__ */ jsx(
6794
+ "button",
6795
+ {
6796
+ onClick: () => {
6797
+ onChange(o.value);
6798
+ setOpen(false);
6799
+ setSearch("");
6800
+ },
6801
+ className: `w-full text-left px-3 py-1.5 text-sm hover:bg-gray-50 truncate ${value === o.value ? "text-blue-600 font-medium bg-blue-50/50" : "text-gray-700"}`,
6802
+ children: o.label
6803
+ },
6804
+ o.value
6805
+ ))
6806
+ ] })
6807
+ ] })
6808
+ ] });
6809
+ }
6810
+ function useFilters() {
6811
+ const [filterValues, setFilterValues] = useState({});
6812
+ const setFilter = (field, value) => {
6813
+ setFilterValues((prev) => {
6814
+ const next = { ...prev };
6815
+ if (value) next[field] = value;
6816
+ else delete next[field];
6817
+ return next;
6818
+ });
6819
+ };
6820
+ const clearFilters = () => setFilterValues({});
6821
+ const filterParams = {};
6822
+ for (const [k, v] of Object.entries(filterValues)) {
6823
+ if (v) filterParams[k] = v;
6824
+ }
6825
+ return { filterValues, setFilter, clearFilters, filterParams };
6826
+ }
6827
+ function SidebarGroupLabel({ children }) {
6828
+ return /* @__PURE__ */ jsx("p", { className: "px-2.5 pb-1 pt-1 text-[11px] font-semibold uppercase tracking-wide text-gray-400", children });
6829
+ }
6830
+ function SidebarNavItem({ label, count, active, onClick }) {
6831
+ return /* @__PURE__ */ jsxs(
6832
+ "button",
6833
+ {
6834
+ type: "button",
6835
+ onClick,
6836
+ className: `flex w-full items-center justify-between gap-2 rounded-lg px-2.5 py-1.5 text-sm text-left ${active ? "bg-blue-50 font-medium text-blue-700" : "text-gray-700 hover:bg-gray-100"}`,
6837
+ children: [
6838
+ /* @__PURE__ */ jsx("span", { className: "truncate", children: label }),
6839
+ count != null && count > 0 && /* @__PURE__ */ jsx("span", { className: `shrink-0 inline-flex items-center justify-center min-w-[1.25rem] px-1.5 h-5 rounded-full text-[11px] font-medium ${active ? "bg-blue-100 text-blue-700" : "bg-gray-100 text-gray-600"}`, children: count })
6840
+ ]
6841
+ }
6842
+ );
6843
+ }
6659
6844
  function Sparkline({
6660
6845
  data,
6661
6846
  width = 120,
@@ -7376,6 +7561,6 @@ function useEditHotkey(callback) {
7376
7561
  }, [callback, isActive]);
7377
7562
  }
7378
7563
 
7379
- export { ALT, ALT_SHIFT_D, ALT_SHIFT_E, ALT_SHIFT_N, Accordion, AuthScreen, Avatar, AvatarGroup, Banner, BarChart, BehaviorPanel, Button_default as Button, CMD_A, CMD_DOT, CMD_ENTER, CMD_K, CMD_S, Card, ChatTemplate, Checkbox_default as Checkbox, CheckoutTemplate, Customization, DEV_BANNER_TEXT, DashboardTemplate, DataTablePage, Desktop, DesktopHostProvider, DevIndicator, DonutChart, ENTER, EmailTemplate, EntityList, ErrorPage, FormField, FormLayoutPage, GalleryTemplate, GlobalSearch, HelpCenter, INPUT_BASE, Input_default as Input, Kanban, Label, Layout, ListFooter, MOD, Markdown, NotificationBell, Pagination, Radio_default as Radio, ResizableTable, SHIFT, SearchableSelect, Select_default as Select, ShellEntityFetcherProvider, ShortcutHelp, SoundsPanel, Sparkline, StartMenu, StatCard, StatusBadge, StatusBadgeProvider, SystemPreferences, Tabs, Textarea_default as Textarea, Tooltip, TopNav, WidgetManager, applyDevTitle, createWindowRegistry, formatDate, inputClasses, isDevEnv, isMac, useClickOutside, useColumnConfig, useDesktopHost, useEditHotkey, useInfiniteScroll, useNewHotkey, useShellEntityFetcher, useSort, useTableNav };
7564
+ export { ALT, ALT_SHIFT_D, ALT_SHIFT_E, ALT_SHIFT_N, Accordion, AuthScreen, Avatar, AvatarGroup, Banner, BarChart, BehaviorPanel, Button_default as Button, CMD_A, CMD_DOT, CMD_ENTER, CMD_K, CMD_S, Card, ChatTemplate, Checkbox_default as Checkbox, CheckoutTemplate, ColoredBadge, Customization, DEV_BANNER_TEXT, DashboardTemplate, DataTablePage, Desktop, DesktopHostProvider, DevIndicator, DonutChart, ENTER, EmailTemplate, EmptyState, EntityList, ErrorPage, FilterBar, FormField, FormLayoutPage, GalleryTemplate, GlobalSearch, HelpCenter, INPUT_BASE, Input_default as Input, Kanban, Label, Layout, ListFooter, LoadingSpinner2 as LoadingSpinner, MOD, Markdown, NotificationBell, PageHeader, Pagination, Radio_default as Radio, ResizableTable, SHIFT, SearchableSelect, Select_default as Select, ShellEntityFetcherProvider, ShortcutHelp, SidebarGroupLabel, SidebarNavItem, SoundsPanel, Sparkline, StartMenu, StatCard, StatusBadge, StatusBadgeProvider, SystemPreferences, Tabs, Textarea_default as Textarea, Tooltip, TopNav, WidgetManager, applyDevTitle, createWindowRegistry, formatDate, inputClasses, isDevEnv, isMac, useClickOutside, useColumnConfig, useDesktopHost, useEditHotkey, useFilters, useInfiniteScroll, useNewHotkey, useShellEntityFetcher, useSort, useTableNav };
7380
7565
  //# sourceMappingURL=index.js.map
7381
7566
  //# sourceMappingURL=index.js.map