ssovee-os-web-ui 0.1.78 → 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 +65 -88
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +65 -88
- package/dist/index.js.map +1 -1
- package/dist/sdk.cjs +6 -81
- package/dist/sdk.cjs.map +1 -1
- package/dist/sdk.d.cts +8 -1
- package/dist/sdk.d.ts +8 -1
- package/dist/sdk.js +6 -81
- package/dist/sdk.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1616,85 +1616,6 @@ var Tooltip = ({
|
|
|
1616
1616
|
);
|
|
1617
1617
|
};
|
|
1618
1618
|
var Tooltip_default = Tooltip;
|
|
1619
|
-
|
|
1620
|
-
// src/utils/constants.ts
|
|
1621
|
-
var globalKeyboardShortcuts = [
|
|
1622
|
-
{
|
|
1623
|
-
command: "toggle_theme",
|
|
1624
|
-
shortcut: ["Ctrl", "Shift", "M"],
|
|
1625
|
-
usage: "Toggle between light and dark theme"
|
|
1626
|
-
},
|
|
1627
|
-
{
|
|
1628
|
-
command: "app_switcher",
|
|
1629
|
-
shortcut: ["Ctrl", "Shift", "S"],
|
|
1630
|
-
usage: "Switch between open apps"
|
|
1631
|
-
},
|
|
1632
|
-
{
|
|
1633
|
-
command: "exit_app",
|
|
1634
|
-
shortcut: ["Ctrl", "E"],
|
|
1635
|
-
usage: "Exit or quit the application"
|
|
1636
|
-
},
|
|
1637
|
-
{
|
|
1638
|
-
command: "maximize_app",
|
|
1639
|
-
shortcut: ["Ctrl", "ArrowUp"],
|
|
1640
|
-
usage: "Maximize the application window"
|
|
1641
|
-
},
|
|
1642
|
-
{
|
|
1643
|
-
command: "minimize_app",
|
|
1644
|
-
shortcut: ["Ctrl", "ArrowDown"],
|
|
1645
|
-
usage: "Minimize the application window"
|
|
1646
|
-
},
|
|
1647
|
-
{
|
|
1648
|
-
command: "global_search",
|
|
1649
|
-
shortcut: ["Ctrl", "Shift", "K"],
|
|
1650
|
-
usage: "Open global search"
|
|
1651
|
-
},
|
|
1652
|
-
{
|
|
1653
|
-
command: "toggle_search_mode",
|
|
1654
|
-
shortcut: ["Ctrl", "Shift", "L"],
|
|
1655
|
-
usage: "Enable AI and Voice command (start/stop voice input in search)"
|
|
1656
|
-
},
|
|
1657
|
-
{
|
|
1658
|
-
command: "toggle_control_center",
|
|
1659
|
-
shortcut: ["Ctrl", "Shift", "O"],
|
|
1660
|
-
usage: "Toggle control center panel or drawer"
|
|
1661
|
-
},
|
|
1662
|
-
{
|
|
1663
|
-
command: "arrow_up",
|
|
1664
|
-
shortcut: ["ArrowUp"],
|
|
1665
|
-
usage: "Navigate up in lists, menus and options"
|
|
1666
|
-
},
|
|
1667
|
-
{
|
|
1668
|
-
command: "arrow_down",
|
|
1669
|
-
shortcut: ["ArrowDown"],
|
|
1670
|
-
usage: "Navigate down in lists, menus and options"
|
|
1671
|
-
},
|
|
1672
|
-
{
|
|
1673
|
-
command: "escape_button_action",
|
|
1674
|
-
shortcut: ["Escape"],
|
|
1675
|
-
usage: "Close or go back from any open alert, popup, search, or control center"
|
|
1676
|
-
},
|
|
1677
|
-
{
|
|
1678
|
-
command: "enter_button_action",
|
|
1679
|
-
shortcut: ["Enter"],
|
|
1680
|
-
usage: "Select or confirm the currently focused item"
|
|
1681
|
-
},
|
|
1682
|
-
{
|
|
1683
|
-
command: "toggle_filters",
|
|
1684
|
-
shortcut: ["Ctrl", "Shift", "U"],
|
|
1685
|
-
usage: "To open or close filters of any current active app"
|
|
1686
|
-
},
|
|
1687
|
-
{
|
|
1688
|
-
command: "focus_search",
|
|
1689
|
-
shortcut: ["Ctrl", "k"],
|
|
1690
|
-
usage: "Focus on current app search"
|
|
1691
|
-
},
|
|
1692
|
-
{
|
|
1693
|
-
command: "toggle_all_apps",
|
|
1694
|
-
shortcut: ["Ctrl", "Shift", "A"],
|
|
1695
|
-
usage: "Toggle showing all available apps and plugins"
|
|
1696
|
-
}
|
|
1697
|
-
];
|
|
1698
1619
|
var keyMap = {
|
|
1699
1620
|
mac: {
|
|
1700
1621
|
ctrl: "\u2318",
|
|
@@ -1749,15 +1670,19 @@ var matchShortcut = (event, shortcut, os) => {
|
|
|
1749
1670
|
if (pressed.length !== shortcut.length) return false;
|
|
1750
1671
|
return pressed.every((k) => keySet.has(k));
|
|
1751
1672
|
};
|
|
1752
|
-
var useShortcutFormatter = (
|
|
1673
|
+
var useShortcutFormatter = ({
|
|
1674
|
+
globalKeyboardShortcuts: globalKeyboardShortcuts2 = []
|
|
1675
|
+
}) => {
|
|
1753
1676
|
const [os, setOS] = React23.useState("windows");
|
|
1754
|
-
const listenersRef = React23.useRef(
|
|
1677
|
+
const listenersRef = React23.useRef(
|
|
1678
|
+
/* @__PURE__ */ new Map()
|
|
1679
|
+
);
|
|
1755
1680
|
React23.useEffect(() => {
|
|
1756
1681
|
setOS(detectOS());
|
|
1757
1682
|
}, []);
|
|
1758
1683
|
React23.useEffect(() => {
|
|
1759
1684
|
const handleKeyDown = (event) => {
|
|
1760
|
-
for (const shortcut of
|
|
1685
|
+
for (const shortcut of globalKeyboardShortcuts2) {
|
|
1761
1686
|
if (matchShortcut(event, shortcut.shortcut, os)) {
|
|
1762
1687
|
const listeners = listenersRef.current.get(shortcut.command);
|
|
1763
1688
|
if (listeners) {
|
|
@@ -1776,7 +1701,7 @@ var useShortcutFormatter = () => {
|
|
|
1776
1701
|
return keys.map((key) => keyMap[os][key.toLowerCase()] || key.toUpperCase()).join(" + ");
|
|
1777
1702
|
};
|
|
1778
1703
|
const getShortcutByCommand = (command) => {
|
|
1779
|
-
const found =
|
|
1704
|
+
const found = globalKeyboardShortcuts2.find((s) => s.command === command);
|
|
1780
1705
|
return found ? found.shortcut : [""];
|
|
1781
1706
|
};
|
|
1782
1707
|
const addShortcutListener = (command, listener) => {
|
|
@@ -1798,6 +1723,30 @@ var useShortcutFormatter = () => {
|
|
|
1798
1723
|
};
|
|
1799
1724
|
};
|
|
1800
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
|
+
];
|
|
1801
1750
|
var SearchInput = React23__namespace.default.forwardRef(
|
|
1802
1751
|
({
|
|
1803
1752
|
onSearch,
|
|
@@ -1816,7 +1765,12 @@ var SearchInput = React23__namespace.default.forwardRef(
|
|
|
1816
1765
|
const [searchValue, setSearchValue] = React23__namespace.default.useState(value || "");
|
|
1817
1766
|
const inputRef = React23.useRef(null);
|
|
1818
1767
|
React23.useImperativeHandle(ref, () => inputRef.current);
|
|
1819
|
-
const {
|
|
1768
|
+
const {
|
|
1769
|
+
addShortcutListener,
|
|
1770
|
+
removeShortcutListener,
|
|
1771
|
+
formatKeys,
|
|
1772
|
+
getShortcutByCommand
|
|
1773
|
+
} = useShortcutFormatter_default({ globalKeyboardShortcuts });
|
|
1820
1774
|
React23.useEffect(() => {
|
|
1821
1775
|
setSearchValue(value ?? "");
|
|
1822
1776
|
}, [value]);
|
|
@@ -1851,7 +1805,13 @@ var SearchInput = React23__namespace.default.forwardRef(
|
|
|
1851
1805
|
removeShortcutListener("focus_search", handleFocusSearch);
|
|
1852
1806
|
removeShortcutListener("escape_button_action", handleClearShortcut);
|
|
1853
1807
|
};
|
|
1854
|
-
}, [
|
|
1808
|
+
}, [
|
|
1809
|
+
enableKeyboardShortcuts,
|
|
1810
|
+
isActive,
|
|
1811
|
+
handleClear,
|
|
1812
|
+
addShortcutListener,
|
|
1813
|
+
removeShortcutListener
|
|
1814
|
+
]);
|
|
1855
1815
|
const displayPlaceholder = enableKeyboardShortcuts ? `${placeholder} (${formatKeys(getShortcutByCommand("focus_search"))})` : placeholder;
|
|
1856
1816
|
const baseClasses = "transition-all duration-200 focus:outline-none rounded-[6px]";
|
|
1857
1817
|
const variantClasses = {
|
|
@@ -1944,7 +1904,24 @@ var SearchInput = React23__namespace.default.forwardRef(
|
|
|
1944
1904
|
className: "absolute right-3 top-1/2 -translate-y-1/2 text-neutral-400 hover:text-neutral-600 transition-colors",
|
|
1945
1905
|
"aria-label": "Clear search",
|
|
1946
1906
|
type: "button",
|
|
1947
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
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
|
+
)
|
|
1948
1925
|
}
|
|
1949
1926
|
)
|
|
1950
1927
|
] });
|
|
@@ -2675,7 +2652,7 @@ var WindowWithSideMenu = ({
|
|
|
2675
2652
|
addShortcutListener,
|
|
2676
2653
|
removeShortcutListener,
|
|
2677
2654
|
getShortcutByCommand
|
|
2678
|
-
} = useShortcutFormatter_default();
|
|
2655
|
+
} = useShortcutFormatter_default({ globalKeyboardShortcuts });
|
|
2679
2656
|
const [state, dispatch] = React23.useReducer(reducer, {
|
|
2680
2657
|
...initialState,
|
|
2681
2658
|
windowSize: app.windowSize.windowSize ?? defaultSize,
|
|
@@ -3067,7 +3044,7 @@ var WindowWithoutSideMenu = ({
|
|
|
3067
3044
|
addShortcutListener,
|
|
3068
3045
|
removeShortcutListener,
|
|
3069
3046
|
getShortcutByCommand
|
|
3070
|
-
} = useShortcutFormatter_default();
|
|
3047
|
+
} = useShortcutFormatter_default({ globalKeyboardShortcuts });
|
|
3071
3048
|
const [state, dispatch] = React23.useReducer(reducer2, {
|
|
3072
3049
|
...initialState2,
|
|
3073
3050
|
windowSize: app.windowSize.windowSize ?? defaultSize,
|