@burdenoff/fe-libs 2026.1027.8 → 2026.1027.9
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.
|
@@ -27,16 +27,22 @@ var d = ({ isOpen: d, onClose: f, shortcuts: p }) => {
|
|
|
27
27
|
document.body.style.overflow = "";
|
|
28
28
|
};
|
|
29
29
|
}, [d]), !d) return null;
|
|
30
|
-
let _ =
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
let _ = /* @__PURE__ */ new Map();
|
|
31
|
+
for (let e of p) {
|
|
32
|
+
let t = e.category || m("appShell.otherShortcuts", "Other"), n = e.categoryKey ? m(e.categoryKey, t) : t, r = _.get(n);
|
|
33
|
+
r ? r.shortcuts.push(e) : _.set(n, {
|
|
34
|
+
category: t,
|
|
35
|
+
label: n,
|
|
36
|
+
shortcuts: [e]
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
let v = [..._.entries()].sort(([, e], [, t]) => {
|
|
34
40
|
let n = {
|
|
35
41
|
Navigation: 0,
|
|
36
42
|
Actions: 1,
|
|
37
43
|
UI: 2
|
|
38
|
-
}, r = n[e] ?? 99, i = n[t] ?? 99;
|
|
39
|
-
return r === i ? e.localeCompare(t) : r - i;
|
|
44
|
+
}, r = n[e.category] ?? 99, i = n[t.category] ?? 99;
|
|
45
|
+
return r === i ? e.category.localeCompare(t.category) : r - i;
|
|
40
46
|
}), y = n(), b = y === "mac" ? "macOS" : y === "windows" ? "Windows" : "Linux";
|
|
41
47
|
return /* @__PURE__ */ l(i, {
|
|
42
48
|
modal: !0,
|
|
@@ -74,17 +80,17 @@ var d = ({ isOpen: d, onClose: f, shortcuts: p }) => {
|
|
|
74
80
|
className: "flex-1 overflow-y-auto p-6",
|
|
75
81
|
children: /* @__PURE__ */ l("div", {
|
|
76
82
|
className: "grid grid-cols-1 md:grid-cols-2 gap-8",
|
|
77
|
-
children: v.map((e) => /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("h3", {
|
|
83
|
+
children: v.map(([e, t]) => /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("h3", {
|
|
78
84
|
className: "text-sm font-semibold text-text-primary mb-3",
|
|
79
|
-
children:
|
|
85
|
+
children: t.label
|
|
80
86
|
}), /* @__PURE__ */ l("div", {
|
|
81
87
|
className: "space-y-1",
|
|
82
|
-
children:
|
|
88
|
+
children: t.shortcuts.map((e, t) => /* @__PURE__ */ u("div", {
|
|
83
89
|
className: "flex items-center justify-between py-2 px-3 rounded-button hover:bg-bg-sunken transition-all duration-200 hover:translate-x-0.5",
|
|
84
90
|
style: { animationDelay: `${t * 30}ms` },
|
|
85
91
|
children: [/* @__PURE__ */ l("span", {
|
|
86
92
|
className: "text-text-primary text-sm",
|
|
87
|
-
children: e.description
|
|
93
|
+
children: e.descriptionKey ? m(e.descriptionKey, e.description) : e.description
|
|
88
94
|
}), /* @__PURE__ */ l("kbd", {
|
|
89
95
|
className: "ml-4 px-2.5 py-1 bg-bg-sunken border border-border-subtle rounded text-text-secondary text-xs font-mono whitespace-nowrap transition-all duration-200 hover:scale-105",
|
|
90
96
|
children: r(e.keys)
|
|
@@ -13,7 +13,9 @@ function t(t) {
|
|
|
13
13
|
id: "global-nav-home",
|
|
14
14
|
keys: ["g h"],
|
|
15
15
|
description: "Go to Home",
|
|
16
|
+
descriptionKey: "nav.goHome",
|
|
16
17
|
category: "Navigation",
|
|
18
|
+
categoryKey: "chrome.commandPalette.section.navigation",
|
|
17
19
|
action: t.goHome,
|
|
18
20
|
global: !0
|
|
19
21
|
},
|
|
@@ -21,7 +23,9 @@ function t(t) {
|
|
|
21
23
|
id: "global-search",
|
|
22
24
|
keys: e("cmd+k"),
|
|
23
25
|
description: "Open Search",
|
|
26
|
+
descriptionKey: "appShell.shortcuts.openSearch",
|
|
24
27
|
category: "Search",
|
|
28
|
+
categoryKey: "common.search",
|
|
25
29
|
action: t.openSearch,
|
|
26
30
|
global: !0
|
|
27
31
|
},
|
|
@@ -29,7 +33,9 @@ function t(t) {
|
|
|
29
33
|
id: "global-toggle-sidebar",
|
|
30
34
|
keys: e("cmd+\\", "ctrl+\\"),
|
|
31
35
|
description: "Toggle Sidebar",
|
|
36
|
+
descriptionKey: "appShell.toggleSidebar",
|
|
32
37
|
category: "UI",
|
|
38
|
+
categoryKey: "appShell.shortcuts.category.ui",
|
|
33
39
|
action: t.toggleSidebar,
|
|
34
40
|
global: !0
|
|
35
41
|
},
|
|
@@ -37,7 +43,9 @@ function t(t) {
|
|
|
37
43
|
id: "global-toggle-theme",
|
|
38
44
|
keys: e("cmd+shift+d", "ctrl+shift+d"),
|
|
39
45
|
description: "Toggle Dark Mode",
|
|
46
|
+
descriptionKey: "appShell.shortcuts.toggleDarkMode",
|
|
40
47
|
category: "UI",
|
|
48
|
+
categoryKey: "appShell.shortcuts.category.ui",
|
|
41
49
|
action: t.toggleTheme,
|
|
42
50
|
global: !0
|
|
43
51
|
},
|
|
@@ -45,7 +53,9 @@ function t(t) {
|
|
|
45
53
|
id: "global-help",
|
|
46
54
|
keys: e("cmd+/", "ctrl+/"),
|
|
47
55
|
description: "Show Keyboard Shortcuts",
|
|
56
|
+
descriptionKey: "appShell.keyboardShortcuts",
|
|
48
57
|
category: "Help",
|
|
58
|
+
categoryKey: "appShell.shortcuts.category.help",
|
|
49
59
|
action: t.showHelp,
|
|
50
60
|
global: !0
|
|
51
61
|
}
|
|
@@ -54,7 +64,9 @@ function t(t) {
|
|
|
54
64
|
id: "global-nav-settings",
|
|
55
65
|
keys: ["g ,"],
|
|
56
66
|
description: "Go to Settings",
|
|
67
|
+
descriptionKey: "appShell.shortcuts.goToSettings",
|
|
57
68
|
category: "Navigation",
|
|
69
|
+
categoryKey: "chrome.commandPalette.section.navigation",
|
|
58
70
|
action: t.openSettings,
|
|
59
71
|
global: !0
|
|
60
72
|
}), n;
|
|
@@ -29,8 +29,12 @@ export interface KeyboardShortcut {
|
|
|
29
29
|
keys: string[] | PlatformKeys;
|
|
30
30
|
/** Human-readable description */
|
|
31
31
|
description: string;
|
|
32
|
+
/** Optional shell translation key; description remains the English fallback. */
|
|
33
|
+
descriptionKey?: string;
|
|
32
34
|
/** Category for grouping shortcuts (e.g., 'navigation', 'editing') */
|
|
33
35
|
category?: string;
|
|
36
|
+
/** Optional shell translation key; omit to preserve host-supplied category text. */
|
|
37
|
+
categoryKey?: string;
|
|
34
38
|
/** Action to execute when shortcut is triggered */
|
|
35
39
|
action: () => void;
|
|
36
40
|
/** Whether this shortcut is enabled */
|