ssovee-os-web-ui 0.1.77 → 0.1.79

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/index.cjs CHANGED
@@ -7,6 +7,9 @@ require('tinymce/tinymce');
7
7
  require('tinymce/icons/default/icons');
8
8
  require('tinymce/themes/silver');
9
9
  require('tinymce/models/dom/model');
10
+ require('tinymce/skins/ui/oxide/skin.css');
11
+ require('tinymce/skins/ui/oxide/content.css');
12
+ require('tinymce/skins/content/default/content.css');
10
13
  var Editor = require('@monaco-editor/react');
11
14
  var uaParserJs = require('ua-parser-js');
12
15
 
@@ -362,6 +365,8 @@ var RichEditor = React23__namespace.default.forwardRef(
362
365
  tinymceApi.init({
363
366
  target: textareaRef.current,
364
367
  selector: void 0,
368
+ skin: "oxide",
369
+ content_css: "default",
365
370
  height,
366
371
  menubar,
367
372
  toolbar,
@@ -1611,85 +1616,6 @@ var Tooltip = ({
1611
1616
  );
1612
1617
  };
1613
1618
  var Tooltip_default = Tooltip;
1614
-
1615
- // src/utils/constants.ts
1616
- var globalKeyboardShortcuts = [
1617
- {
1618
- command: "toggle_theme",
1619
- shortcut: ["Ctrl", "Shift", "M"],
1620
- usage: "Toggle between light and dark theme"
1621
- },
1622
- {
1623
- command: "app_switcher",
1624
- shortcut: ["Ctrl", "Shift", "S"],
1625
- usage: "Switch between open apps"
1626
- },
1627
- {
1628
- command: "exit_app",
1629
- shortcut: ["Ctrl", "E"],
1630
- usage: "Exit or quit the application"
1631
- },
1632
- {
1633
- command: "maximize_app",
1634
- shortcut: ["Ctrl", "ArrowUp"],
1635
- usage: "Maximize the application window"
1636
- },
1637
- {
1638
- command: "minimize_app",
1639
- shortcut: ["Ctrl", "ArrowDown"],
1640
- usage: "Minimize the application window"
1641
- },
1642
- {
1643
- command: "global_search",
1644
- shortcut: ["Ctrl", "Shift", "K"],
1645
- usage: "Open global search"
1646
- },
1647
- {
1648
- command: "toggle_search_mode",
1649
- shortcut: ["Ctrl", "Shift", "L"],
1650
- usage: "Enable AI and Voice command (start/stop voice input in search)"
1651
- },
1652
- {
1653
- command: "toggle_control_center",
1654
- shortcut: ["Ctrl", "Shift", "O"],
1655
- usage: "Toggle control center panel or drawer"
1656
- },
1657
- {
1658
- command: "arrow_up",
1659
- shortcut: ["ArrowUp"],
1660
- usage: "Navigate up in lists, menus and options"
1661
- },
1662
- {
1663
- command: "arrow_down",
1664
- shortcut: ["ArrowDown"],
1665
- usage: "Navigate down in lists, menus and options"
1666
- },
1667
- {
1668
- command: "escape_button_action",
1669
- shortcut: ["Escape"],
1670
- usage: "Close or go back from any open alert, popup, search, or control center"
1671
- },
1672
- {
1673
- command: "enter_button_action",
1674
- shortcut: ["Enter"],
1675
- usage: "Select or confirm the currently focused item"
1676
- },
1677
- {
1678
- command: "toggle_filters",
1679
- shortcut: ["Ctrl", "Shift", "U"],
1680
- usage: "To open or close filters of any current active app"
1681
- },
1682
- {
1683
- command: "focus_search",
1684
- shortcut: ["Ctrl", "k"],
1685
- usage: "Focus on current app search"
1686
- },
1687
- {
1688
- command: "toggle_all_apps",
1689
- shortcut: ["Ctrl", "Shift", "A"],
1690
- usage: "Toggle showing all available apps and plugins"
1691
- }
1692
- ];
1693
1619
  var keyMap = {
1694
1620
  mac: {
1695
1621
  ctrl: "\u2318",
@@ -1744,15 +1670,19 @@ var matchShortcut = (event, shortcut, os) => {
1744
1670
  if (pressed.length !== shortcut.length) return false;
1745
1671
  return pressed.every((k) => keySet.has(k));
1746
1672
  };
1747
- var useShortcutFormatter = () => {
1673
+ var useShortcutFormatter = ({
1674
+ globalKeyboardShortcuts: globalKeyboardShortcuts2 = []
1675
+ }) => {
1748
1676
  const [os, setOS] = React23.useState("windows");
1749
- const listenersRef = React23.useRef(/* @__PURE__ */ new Map());
1677
+ const listenersRef = React23.useRef(
1678
+ /* @__PURE__ */ new Map()
1679
+ );
1750
1680
  React23.useEffect(() => {
1751
1681
  setOS(detectOS());
1752
1682
  }, []);
1753
1683
  React23.useEffect(() => {
1754
1684
  const handleKeyDown = (event) => {
1755
- for (const shortcut of globalKeyboardShortcuts) {
1685
+ for (const shortcut of globalKeyboardShortcuts2) {
1756
1686
  if (matchShortcut(event, shortcut.shortcut, os)) {
1757
1687
  const listeners = listenersRef.current.get(shortcut.command);
1758
1688
  if (listeners) {
@@ -1771,7 +1701,7 @@ var useShortcutFormatter = () => {
1771
1701
  return keys.map((key) => keyMap[os][key.toLowerCase()] || key.toUpperCase()).join(" + ");
1772
1702
  };
1773
1703
  const getShortcutByCommand = (command) => {
1774
- const found = globalKeyboardShortcuts.find((s) => s.command === command);
1704
+ const found = globalKeyboardShortcuts2.find((s) => s.command === command);
1775
1705
  return found ? found.shortcut : [""];
1776
1706
  };
1777
1707
  const addShortcutListener = (command, listener) => {
@@ -1793,6 +1723,30 @@ var useShortcutFormatter = () => {
1793
1723
  };
1794
1724
  };
1795
1725
  var useShortcutFormatter_default = useShortcutFormatter;
1726
+
1727
+ // src/utils/constants.ts
1728
+ var globalKeyboardShortcuts = [
1729
+ {
1730
+ command: "exit_app",
1731
+ shortcut: ["ctrl", "q"],
1732
+ usage: "Exit app"
1733
+ },
1734
+ {
1735
+ command: "minimize_app",
1736
+ shortcut: ["ctrl", "m"],
1737
+ usage: "Minimize app"
1738
+ },
1739
+ {
1740
+ command: "maximize_app",
1741
+ shortcut: ["ctrl", "shift", "m"],
1742
+ usage: "Maximize app"
1743
+ },
1744
+ {
1745
+ command: "focus_search",
1746
+ shortcut: ["ctrl", "k"],
1747
+ usage: "Focus search"
1748
+ }
1749
+ ];
1796
1750
  var SearchInput = React23__namespace.default.forwardRef(
1797
1751
  ({
1798
1752
  onSearch,
@@ -1811,7 +1765,12 @@ var SearchInput = React23__namespace.default.forwardRef(
1811
1765
  const [searchValue, setSearchValue] = React23__namespace.default.useState(value || "");
1812
1766
  const inputRef = React23.useRef(null);
1813
1767
  React23.useImperativeHandle(ref, () => inputRef.current);
1814
- const { addShortcutListener, removeShortcutListener, formatKeys, getShortcutByCommand } = useShortcutFormatter_default();
1768
+ const {
1769
+ addShortcutListener,
1770
+ removeShortcutListener,
1771
+ formatKeys,
1772
+ getShortcutByCommand
1773
+ } = useShortcutFormatter_default({ globalKeyboardShortcuts });
1815
1774
  React23.useEffect(() => {
1816
1775
  setSearchValue(value ?? "");
1817
1776
  }, [value]);
@@ -1846,7 +1805,13 @@ var SearchInput = React23__namespace.default.forwardRef(
1846
1805
  removeShortcutListener("focus_search", handleFocusSearch);
1847
1806
  removeShortcutListener("escape_button_action", handleClearShortcut);
1848
1807
  };
1849
- }, [enableKeyboardShortcuts, isActive, handleClear, addShortcutListener, removeShortcutListener]);
1808
+ }, [
1809
+ enableKeyboardShortcuts,
1810
+ isActive,
1811
+ handleClear,
1812
+ addShortcutListener,
1813
+ removeShortcutListener
1814
+ ]);
1850
1815
  const displayPlaceholder = enableKeyboardShortcuts ? `${placeholder} (${formatKeys(getShortcutByCommand("focus_search"))})` : placeholder;
1851
1816
  const baseClasses = "transition-all duration-200 focus:outline-none rounded-[6px]";
1852
1817
  const variantClasses = {
@@ -1939,7 +1904,24 @@ var SearchInput = React23__namespace.default.forwardRef(
1939
1904
  className: "absolute right-3 top-1/2 -translate-y-1/2 text-neutral-400 hover:text-neutral-600 transition-colors",
1940
1905
  "aria-label": "Clear search",
1941
1906
  type: "button",
1942
- children: /* @__PURE__ */ jsxRuntime.jsx("svg", { className: iconSizeClasses[size], fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) })
1907
+ children: /* @__PURE__ */ jsxRuntime.jsx(
1908
+ "svg",
1909
+ {
1910
+ className: iconSizeClasses[size],
1911
+ fill: "none",
1912
+ stroke: "currentColor",
1913
+ viewBox: "0 0 24 24",
1914
+ children: /* @__PURE__ */ jsxRuntime.jsx(
1915
+ "path",
1916
+ {
1917
+ strokeLinecap: "round",
1918
+ strokeLinejoin: "round",
1919
+ strokeWidth: 2,
1920
+ d: "M6 18L18 6M6 6l12 12"
1921
+ }
1922
+ )
1923
+ }
1924
+ )
1943
1925
  }
1944
1926
  )
1945
1927
  ] });
@@ -2670,7 +2652,7 @@ var WindowWithSideMenu = ({
2670
2652
  addShortcutListener,
2671
2653
  removeShortcutListener,
2672
2654
  getShortcutByCommand
2673
- } = useShortcutFormatter_default();
2655
+ } = useShortcutFormatter_default({ globalKeyboardShortcuts });
2674
2656
  const [state, dispatch] = React23.useReducer(reducer, {
2675
2657
  ...initialState,
2676
2658
  windowSize: app.windowSize.windowSize ?? defaultSize,
@@ -3062,7 +3044,7 @@ var WindowWithoutSideMenu = ({
3062
3044
  addShortcutListener,
3063
3045
  removeShortcutListener,
3064
3046
  getShortcutByCommand
3065
- } = useShortcutFormatter_default();
3047
+ } = useShortcutFormatter_default({ globalKeyboardShortcuts });
3066
3048
  const [state, dispatch] = React23.useReducer(reducer2, {
3067
3049
  ...initialState2,
3068
3050
  windowSize: app.windowSize.windowSize ?? defaultSize,