chore: generate
This commit is contained in:
@@ -263,10 +263,7 @@ function WhichKeyPanel(props: {
|
|||||||
(sum, item) => sum + (item.type === "tab" ? item.group.label.length + 2 : 3),
|
(sum, item) => sum + (item.type === "tab" ? item.group.label.length + 2 : 3),
|
||||||
0,
|
0,
|
||||||
)
|
)
|
||||||
return Math.max(
|
return Math.max(MIN_TAB_GAP, Math.min(TAB_GAP, Math.floor((contentWidth() - itemWidth) / (itemCount - 1))))
|
||||||
MIN_TAB_GAP,
|
|
||||||
Math.min(TAB_GAP, Math.floor((contentWidth() - itemWidth) / (itemCount - 1))),
|
|
||||||
)
|
|
||||||
})
|
})
|
||||||
const nextMode = createMemo(() => (props.mode() === "dock" ? "overlay" : "dock"))
|
const nextMode = createMemo(() => (props.mode() === "dock" ? "overlay" : "dock"))
|
||||||
const look = createMemo(() => skin(props.api))
|
const look = createMemo(() => skin(props.api))
|
||||||
|
|||||||
@@ -428,9 +428,7 @@ test("resolves semantic keymap sections", async () => {
|
|||||||
const config = await getTuiConfig(tmp.path)
|
const config = await getTuiConfig(tmp.path)
|
||||||
expect(config.keymap.sections.global.find((binding) => binding.cmd === "command.palette.show")?.key).toBe("alt+p")
|
expect(config.keymap.sections.global.find((binding) => binding.cmd === "command.palette.show")?.key).toBe("alt+p")
|
||||||
expect(config.keymap.sections.global.find((binding) => binding.cmd === "session.new")?.key).toBe("<leader>n")
|
expect(config.keymap.sections.global.find((binding) => binding.cmd === "session.new")?.key).toBe("<leader>n")
|
||||||
expect(config.keymap.sections.which_key.find((binding) => binding.cmd === "tui-which-key.toggle")?.key).toBe(
|
expect(config.keymap.sections.which_key.find((binding) => binding.cmd === "tui-which-key.toggle")?.key).toBe("alt+k")
|
||||||
"alt+k",
|
|
||||||
)
|
|
||||||
expect(config.keymap.sections.which_key.find((binding) => binding.cmd === "tui-which-key.layout.toggle")?.key).toBe(
|
expect(config.keymap.sections.which_key.find((binding) => binding.cmd === "tui-which-key.layout.toggle")?.key).toBe(
|
||||||
"ctrl+alt+shift+k",
|
"ctrl+alt+shift+k",
|
||||||
)
|
)
|
||||||
@@ -441,9 +439,11 @@ test("resolves semantic keymap sections", async () => {
|
|||||||
"ctrl+alt+right,ctrl+alt+]",
|
"ctrl+alt+right,ctrl+alt+]",
|
||||||
)
|
)
|
||||||
expect(
|
expect(
|
||||||
(config.keymap.sections.which_key.find((binding) => binding.cmd === "tui-which-key.toggle") as
|
(
|
||||||
| { group?: unknown }
|
config.keymap.sections.which_key.find((binding) => binding.cmd === "tui-which-key.toggle") as
|
||||||
| undefined)?.group,
|
| { group?: unknown }
|
||||||
|
| undefined
|
||||||
|
)?.group,
|
||||||
).toBe("System")
|
).toBe("System")
|
||||||
expect(config.keymap.sections.prompt.find((binding) => binding.cmd === "prompt.editor")?.key).toBe("ctrl+e")
|
expect(config.keymap.sections.prompt.find((binding) => binding.cmd === "prompt.editor")?.key).toBe("ctrl+e")
|
||||||
expect(config.keymap.sections.autocomplete.find((binding) => binding.cmd === "prompt.autocomplete.next")?.key).toBe(
|
expect(config.keymap.sections.autocomplete.find((binding) => binding.cmd === "prompt.autocomplete.next")?.key).toBe(
|
||||||
|
|||||||
Reference in New Issue
Block a user