@narumitw/pi-ticker 0.1.1 → 0.1.2
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/chunks/{menu-L3RY6JMO.ts → menu-SMXTISJV.ts} +2 -2
- package/dist/chunks/{tui-menu-26V6EKZK.ts → tui-menu-644RY6QY.ts} +11 -12
- package/dist/chunks/tui-menu-644RY6QY.ts.map +7 -0
- package/dist/index.ts +1 -1
- package/package.json +5 -5
- package/src/tui-menu.ts +10 -13
- package/dist/chunks/tui-menu-26V6EKZK.ts.map +0 -7
- /package/dist/chunks/{menu-L3RY6JMO.ts.map → menu-SMXTISJV.ts.map} +0 -0
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
async function showTickerMenu(ctx, options) {
|
|
9
9
|
if (options.signal.aborted || !options.isCurrent()) return;
|
|
10
10
|
if (ctx.mode === "tui") {
|
|
11
|
-
const { showTickerTuiMenu } = await import("./tui-menu-
|
|
11
|
+
const { showTickerTuiMenu } = await import("./tui-menu-644RY6QY.ts");
|
|
12
12
|
if (options.signal.aborted || !options.isCurrent()) return;
|
|
13
13
|
await showTickerTuiMenu(ctx, options);
|
|
14
14
|
return;
|
|
@@ -202,4 +202,4 @@ function orderedSymbols(selected, candidates) {
|
|
|
202
202
|
export {
|
|
203
203
|
showTickerMenu
|
|
204
204
|
};
|
|
205
|
-
//# sourceMappingURL=menu-
|
|
205
|
+
//# sourceMappingURL=menu-SMXTISJV.ts.map
|
|
@@ -33,7 +33,13 @@ var RESERVED_INPUT_BINDINGS = [
|
|
|
33
33
|
"tui.editor.cursorWordRight"
|
|
34
34
|
];
|
|
35
35
|
async function showTickerTuiMenu(ctx, options) {
|
|
36
|
-
const {
|
|
36
|
+
const {
|
|
37
|
+
canonicalizeConfiguredKey,
|
|
38
|
+
formatInteractionHints,
|
|
39
|
+
HorizontalRule,
|
|
40
|
+
runCustomInteraction,
|
|
41
|
+
sanitizeTerminalText
|
|
42
|
+
} = await import("@narumitw/pi-tui-kit");
|
|
37
43
|
while (!options.signal.aborted && options.isCurrent()) {
|
|
38
44
|
const result = await runCustomInteraction(ctx, {
|
|
39
45
|
signal: options.signal,
|
|
@@ -55,8 +61,8 @@ async function showTickerTuiMenu(ctx, options) {
|
|
|
55
61
|
let pasteActive = false;
|
|
56
62
|
let errorMessage;
|
|
57
63
|
let pending = Promise.resolve();
|
|
58
|
-
const shortcutUp = shortcutAvailable(keybindings, "shift+up");
|
|
59
|
-
const shortcutDown = shortcutAvailable(keybindings, "shift+down");
|
|
64
|
+
const shortcutUp = shortcutAvailable(keybindings, "shift+up", canonicalizeConfiguredKey);
|
|
65
|
+
const shortcutDown = shortcutAvailable(keybindings, "shift+down", canonicalizeConfiguredKey);
|
|
60
66
|
const activationHint = (label) => formatInteractionHints(keybindings, [{ bindings: ["tui.select.confirm"], keys: ["space"], label }]);
|
|
61
67
|
const reorderKeys = [shortcutUp, shortcutDown].filter(
|
|
62
68
|
(shortcut) => shortcut !== void 0
|
|
@@ -387,7 +393,7 @@ function availableRows(terminalRows, rowCount) {
|
|
|
387
393
|
const boundedRows = Number.isFinite(terminalRows) ? Math.max(1, Math.floor(terminalRows) - 9) : 10;
|
|
388
394
|
return Math.max(1, Math.min(rowCount, boundedRows, 12));
|
|
389
395
|
}
|
|
390
|
-
function shortcutAvailable(keybindings, shortcut) {
|
|
396
|
+
function shortcutAvailable(keybindings, shortcut, canonicalKey) {
|
|
391
397
|
const unavailable = new Set(
|
|
392
398
|
[
|
|
393
399
|
"ctrl+c",
|
|
@@ -399,14 +405,7 @@ function shortcutAvailable(keybindings, shortcut) {
|
|
|
399
405
|
);
|
|
400
406
|
return unavailable.has(canonicalKey(shortcut)) ? void 0 : shortcut;
|
|
401
407
|
}
|
|
402
|
-
function canonicalKey(value) {
|
|
403
|
-
const parts = value.toLowerCase().split("+");
|
|
404
|
-
const base = parts.at(-1) ?? "";
|
|
405
|
-
const canonicalBase = base === "escape" ? "esc" : base === "return" ? "enter" : base;
|
|
406
|
-
const modifiers = ["ctrl", "shift", "alt", "super"].filter((modifier) => parts.includes(modifier));
|
|
407
|
-
return [...modifiers, canonicalBase].join("+");
|
|
408
|
-
}
|
|
409
408
|
export {
|
|
410
409
|
showTickerTuiMenu
|
|
411
410
|
};
|
|
412
|
-
//# sourceMappingURL=tui-menu-
|
|
411
|
+
//# sourceMappingURL=tui-menu-644RY6QY.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/tui-menu.ts"],
|
|
4
|
+
"sourcesContent": ["import type { ExtensionCommandContext } from \"@earendil-works/pi-coding-agent\";\nimport { fuzzyFilter, Input, Key, matchesKey, truncateToWidth } from \"@earendil-works/pi-tui\";\nimport type { TickerMenuOptions } from \"./menu.js\";\nimport { parseSymbols } from \"./settings.js\";\n\ntype TuiMenuResult = \"add\" | \"close\";\ntype TickerRow = { kind: \"ticker\"; id: string; symbol: string };\ntype ActionRow = {\n kind: \"action\";\n id: \"add\" | \"widget\" | \"refresh\";\n label: string;\n description: string;\n};\ntype Row = TickerRow | ActionRow;\n\nconst PASTE_START = \"\\u001b[200~\";\nconst PASTE_END = \"\\u001b[201~\";\n// Keep these aligned with Input.handleInput so configured editing actions beat additive reorder.\nconst RESERVED_INPUT_BINDINGS = [\n \"tui.select.up\",\n \"tui.select.down\",\n \"tui.select.pageUp\",\n \"tui.select.pageDown\",\n \"tui.select.confirm\",\n \"tui.select.cancel\",\n \"tui.editor.undo\",\n \"tui.input.submit\",\n \"tui.editor.deleteCharBackward\",\n \"tui.editor.deleteCharForward\",\n \"tui.editor.deleteWordBackward\",\n \"tui.editor.deleteWordForward\",\n \"tui.editor.deleteToLineStart\",\n \"tui.editor.deleteToLineEnd\",\n \"tui.editor.yank\",\n \"tui.editor.yankPop\",\n \"tui.editor.cursorLeft\",\n \"tui.editor.cursorRight\",\n \"tui.editor.cursorLineStart\",\n \"tui.editor.cursorLineEnd\",\n \"tui.editor.cursorWordLeft\",\n \"tui.editor.cursorWordRight\",\n] as const;\n\n// Pi TUI Kit multi-select screens do not expose in-place row-reorder shortcuts.\n// This specialized TUI keeps the same search, toggle, action, binding, and cancellation behavior\n// while RPC mode continues to use the Kit's declarative adapter in menu.ts.\nexport async function showTickerTuiMenu(ctx: ExtensionCommandContext, options: TickerMenuOptions): Promise<void> {\n const {\n canonicalizeConfiguredKey,\n formatInteractionHints,\n HorizontalRule,\n runCustomInteraction,\n sanitizeTerminalText,\n } = await import(\"@narumitw/pi-tui-kit\");\n\n while (!options.signal.aborted && options.isCurrent()) {\n const result = await runCustomInteraction<TuiMenuResult>(ctx, {\n signal: options.signal,\n isCurrent: options.isCurrent,\n onError: (errorCtx, error) => {\n if (!errorCtx.hasUI) return;\n const message = error instanceof Error ? error.message : String(error);\n errorCtx.ui.notify(sanitizeTerminalText(message), \"error\");\n },\n create: ({ tui, theme, keybindings, complete }) => {\n let symbols = [...options.getSymbols()];\n let widgetEnabled = options.getWidgetEnabled();\n const rawSearchInput = new Input();\n const searchInput = new Input();\n let selectedIndex = 0;\n let rows: Row[] = [];\n let busy = false;\n let disposed = false;\n let pasteActive = false;\n let errorMessage: string | undefined;\n let pending = Promise.resolve();\n const shortcutUp = shortcutAvailable(keybindings, \"shift+up\", canonicalizeConfiguredKey);\n const shortcutDown = shortcutAvailable(keybindings, \"shift+down\", canonicalizeConfiguredKey);\n const activationHint = (label: string) =>\n formatInteractionHints(keybindings, [{ bindings: [\"tui.select.confirm\"], keys: [\"space\"], label }]);\n const reorderKeys = [shortcutUp, shortcutDown].filter(\n (shortcut): shortcut is \"shift+up\" | \"shift+down\" => shortcut !== undefined,\n );\n const tickerDescription = `${[\n activationHint(\"removes this ticker\"),\n ...(reorderKeys.length > 0 ? [`${reorderKeys.join(\"/\")} changes its order`] : []),\n ].join(\"; \")}.`;\n const topRule = new HorizontalRule({\n label: \"Manage tickers\",\n labelAlignment: \"left\",\n ruleStyle: (text) => theme.fg(\"borderMuted\", text),\n labelStyle: (text) => theme.fg(\"accent\", text),\n });\n const bottomRule = new HorizontalRule({\n ruleStyle: (text) => theme.fg(\"borderMuted\", text),\n });\n const hint = formatInteractionHints(keybindings, [\n { bindings: [\"tui.select.up\", \"tui.select.down\"], label: \"select\" },\n ...(shortcutUp ? [{ keys: [shortcutUp], label: \"move up\" }] : []),\n ...(shortcutDown ? [{ keys: [shortcutDown], label: \"move down\" }] : []),\n { bindings: [\"tui.select.confirm\"], keys: [\"space\"], label: \"toggle/select\" },\n {\n bindings: [\"tui.select.cancel\"],\n excludeKeys: [\"ctrl+c\"],\n label: \"close\",\n },\n { keys: [\"ctrl+c\"], label: \"close\" },\n ]);\n\n const actionRows = (directSymbol?: string): ActionRow[] => [\n {\n kind: \"action\",\n id: \"add\",\n label: directSymbol ? `Add ${sanitizeTerminalText(directSymbol)}` : \"Add custom ticker\u2026\",\n description: directSymbol\n ? `${activationHint(`adds ${sanitizeTerminalText(directSymbol)} directly`)}.`\n : \"Add and select one Yahoo Finance symbol.\",\n },\n {\n kind: \"action\",\n id: \"widget\",\n label: `Widget: ${widgetEnabled ? \"On\" : \"Off\"}`,\n description: \"Show or hide the editor widget and persist this setting.\",\n },\n {\n kind: \"action\",\n id: \"refresh\",\n label: \"Refresh now\",\n description: widgetEnabled\n ? \"Fetch the selected symbols immediately.\"\n : \"Enable the widget before refreshing.\",\n },\n ];\n const buildRows = (): Row[] => {\n const tickerRows = symbols.map((symbol): TickerRow => ({ kind: \"ticker\", id: symbol, symbol }));\n const query = searchInput.getValue().toLowerCase();\n const filtered = fuzzyFilter(tickerRows, query, (row) =>\n sanitizeTerminalText(row.symbol.replaceAll(\"-\", \" \")).toLowerCase(),\n );\n const directSymbol = filtered.length === 0 ? tryDirectSymbol(rawSearchInput.getValue()) : undefined;\n return [...filtered, ...actionRows(directSymbol)];\n };\n const selectedRow = () => rows[selectedIndex];\n const rebuild = (preferredId?: string, fallbackIndex = selectedIndex) => {\n rows = buildRows();\n const preferredIndex = preferredId ? rows.findIndex((row) => row.id === preferredId) : -1;\n selectedIndex = preferredIndex >= 0 ? preferredIndex : Math.max(0, Math.min(fallbackIndex, rows.length - 1));\n tui.requestRender();\n };\n rebuild();\n\n const select = (index: number, wrap: boolean) => {\n if (rows.length === 0) return;\n selectedIndex = wrap ? (index + rows.length) % rows.length : Math.max(0, Math.min(index, rows.length - 1));\n tui.requestRender();\n };\n const persist = (\n nextSymbols: readonly string[],\n previousSymbols: readonly string[],\n preferredId: string | undefined,\n previousIndex: number,\n clearSearchOnSuccess = false,\n ) => {\n busy = true;\n errorMessage = undefined;\n symbols = [...nextSymbols];\n rebuild(preferredId, previousIndex);\n pending = (async () => {\n try {\n await options.applySymbols(symbols, options.signal);\n if (options.signal.aborted || !options.isCurrent()) return;\n symbols = [...options.getSymbols()];\n if (clearSearchOnSuccess) {\n rawSearchInput.setValue(\"\");\n searchInput.setValue(\"\");\n }\n } catch (error) {\n if (options.signal.aborted || !options.isCurrent()) return;\n symbols = [...previousSymbols];\n errorMessage = sanitizeTerminalText(error instanceof Error ? error.message : String(error));\n ctx.ui.notify(`Ticker settings were not saved: ${errorMessage}`, \"error\");\n } finally {\n busy = false;\n if (!disposed && !options.signal.aborted && options.isCurrent()) {\n rebuild(preferredId, previousIndex);\n }\n }\n })();\n };\n const persistWidgetEnabled = (nextWidgetEnabled: boolean) => {\n const previousWidgetEnabled = widgetEnabled;\n widgetEnabled = nextWidgetEnabled;\n busy = true;\n errorMessage = undefined;\n rebuild(\"widget\");\n pending = (async () => {\n try {\n await options.applyWidgetEnabled(nextWidgetEnabled, options.signal);\n if (options.signal.aborted || !options.isCurrent()) return;\n widgetEnabled = options.getWidgetEnabled();\n } catch (error) {\n if (options.signal.aborted || !options.isCurrent()) return;\n widgetEnabled = previousWidgetEnabled;\n errorMessage = sanitizeTerminalText(error instanceof Error ? error.message : String(error));\n ctx.ui.notify(`Ticker settings were not saved: ${errorMessage}`, \"error\");\n } finally {\n busy = false;\n if (!disposed && !options.signal.aborted && options.isCurrent()) rebuild(\"widget\");\n }\n })();\n };\n const toggle = () => {\n if (busy || disposed) return;\n const row = selectedRow();\n if (row?.kind !== \"ticker\") return;\n const previous = [...symbols];\n const next = symbols.filter((symbol) => symbol !== row.symbol);\n persist(next, previous, undefined, selectedIndex);\n };\n const moveTicker = (direction: -1 | 1) => {\n if (busy || disposed || rawSearchInput.getValue() || options.signal.aborted || !options.isCurrent()) {\n return;\n }\n const row = selectedRow();\n if (row?.kind !== \"ticker\") return;\n const from = symbols.indexOf(row.symbol);\n const to = from + direction;\n if (from < 0 || to < 0 || to >= symbols.length) return;\n const previous = [...symbols];\n const next = [...symbols];\n const [symbol] = next.splice(from, 1);\n if (!symbol) return;\n next.splice(to, 0, symbol);\n persist(next, previous, symbol, selectedIndex);\n };\n const activate = () => {\n if (busy || disposed) return;\n const row = selectedRow();\n if (!row) return;\n if (row.kind === \"ticker\") {\n toggle();\n return;\n }\n if (row.id === \"add\") {\n const query = rawSearchInput.getValue();\n const hasTickerMatch = rows.some((candidate) => candidate.kind === \"ticker\");\n if (query.trim() && !hasTickerMatch) {\n let symbol: string;\n try {\n symbol = parseDirectSymbol(query);\n } catch (error) {\n const message = error instanceof Error ? error.message : String(error);\n errorMessage = sanitizeTerminalText(message);\n ctx.ui.notify(errorMessage, \"error\");\n tui.requestRender();\n return;\n }\n if (symbols.includes(symbol)) {\n ctx.ui.notify(`${symbol} is already selected.`, \"info\");\n return;\n }\n persist([...symbols, symbol], [...symbols], symbol, selectedIndex, true);\n return;\n }\n complete(\"add\");\n } else if (row.id === \"widget\") persistWidgetEnabled(!widgetEnabled);\n else options.refresh();\n };\n const handleSearch = (data: string) => {\n const previousId = selectedRow()?.id;\n errorMessage = undefined;\n rawSearchInput.handleInput(data);\n searchInput.handleInput(data);\n searchInput.setValue(sanitizeTerminalText(rawSearchInput.getValue()));\n rebuild(previousId, 0);\n };\n\n return {\n render(width: number) {\n const safeWidth = Number.isFinite(width) ? Math.max(0, Math.floor(width)) : 0;\n if (safeWidth === 0) return [\"\"];\n const viewportSize = availableRows(tui.terminal.rows, rows.length);\n const viewportStart = Math.max(\n 0,\n Math.min(selectedIndex - Math.floor(viewportSize / 2), rows.length - viewportSize),\n );\n const visibleRows = rows.slice(viewportStart, viewportStart + viewportSize);\n const content = visibleRows.map((row, offset) => {\n const index = viewportStart + offset;\n const focused = index === selectedIndex;\n const label =\n row.kind === \"ticker\"\n ? `${focused ? \"\u203A\" : \" \"} [x] ${sanitizeTerminalText(row.symbol)}`\n : `${focused ? \"\u203A\" : \" \"} ${row.label}`;\n const bounded = truncateToWidth(label, safeWidth, safeWidth > 1 ? \"\u2026\" : \"\");\n return focused ? theme.fg(\"accent\", bounded) : bounded;\n });\n if (viewportSize < rows.length) {\n content.push(theme.fg(\"dim\", truncateToWidth(` (${selectedIndex + 1}/${rows.length})`, safeWidth, \"\")));\n }\n const row = selectedRow();\n const description =\n row?.kind === \"ticker\"\n ? rawSearchInput.getValue()\n ? \"Clear search before reordering.\"\n : tickerDescription\n : row?.description;\n const status = errorMessage\n ? theme.fg(\"error\", errorMessage)\n : busy\n ? theme.fg(\"muted\", \"Saving changes\u2026\")\n : undefined;\n return [\n ...topRule.render(safeWidth),\n theme.fg(\n \"muted\",\n truncateToWidth(`${symbols.length} selected \u00B7 changes save immediately`, safeWidth, \"\"),\n ),\n ...searchInput.render(safeWidth).map((line) => truncateToWidth(line, safeWidth, \"\")),\n ...content,\n ...(description ? [theme.fg(\"dim\", truncateToWidth(` ${description}`, safeWidth, \"\"))] : []),\n ...(status ? [truncateToWidth(status, safeWidth, \"\")] : []),\n ...bottomRule.render(safeWidth),\n theme.fg(\"dim\", truncateToWidth(hint, safeWidth, \"\")),\n ];\n },\n invalidate() {\n searchInput.invalidate();\n },\n handleInput(data: string) {\n if (pasteActive || data.includes(PASTE_START)) {\n pasteActive = !data.includes(PASTE_END);\n handleSearch(data);\n return;\n }\n if (matchesKey(data, Key.ctrl(\"c\"))) {\n complete(\"close\");\n return;\n }\n if (keybindings.matches(data, \"tui.select.cancel\")) {\n complete(\"close\");\n return;\n }\n if (keybindings.matches(data, \"tui.select.up\")) {\n select(selectedIndex - 1, true);\n return;\n }\n if (keybindings.matches(data, \"tui.select.down\")) {\n select(selectedIndex + 1, true);\n return;\n }\n if (keybindings.matches(data, \"tui.select.pageUp\")) {\n select(selectedIndex - availableRows(tui.terminal.rows, rows.length), false);\n return;\n }\n if (keybindings.matches(data, \"tui.select.pageDown\")) {\n select(selectedIndex + availableRows(tui.terminal.rows, rows.length), false);\n return;\n }\n if (keybindings.matches(data, \"tui.select.confirm\") || data === \" \") {\n activate();\n return;\n }\n if (shortcutUp && matchesKey(data, shortcutUp)) {\n moveTicker(-1);\n return;\n }\n if (shortcutDown && matchesKey(data, shortcutDown)) {\n moveTicker(1);\n return;\n }\n handleSearch(data);\n },\n async waitForPending() {\n await pending;\n },\n dispose() {\n disposed = true;\n },\n get focused() {\n return searchInput.focused;\n },\n set focused(value: boolean) {\n searchInput.focused = value;\n },\n };\n },\n });\n\n if (result.kind !== \"completed\" || result.value === \"close\") return;\n const entered = await ctx.ui.input(\"Add custom ticker\", \"Yahoo symbol, for example MSFT or SOL-USD\", {\n signal: options.signal,\n });\n if (options.signal.aborted || !options.isCurrent()) return;\n if (!entered?.trim()) continue;\n try {\n const parsed = parseSymbols([entered]);\n if (parsed.length !== 1) throw new Error(\"Enter exactly one Yahoo Finance symbol.\");\n const symbol = parsed[0];\n if (!symbol) continue;\n const current = options.getSymbols();\n if (current.includes(symbol)) {\n ctx.ui.notify(`${symbol} is already selected.`, \"info\");\n continue;\n }\n await options.applySymbols([...current, symbol], options.signal);\n if (options.signal.aborted || !options.isCurrent()) return;\n } catch (error) {\n if (options.signal.aborted || !options.isCurrent()) return;\n const message = error instanceof Error ? error.message : String(error);\n ctx.ui.notify(sanitizeTerminalText(message), \"error\");\n }\n }\n}\n\nfunction parseDirectSymbol(value: string): string {\n const parsed = parseSymbols([value]);\n if (parsed.length !== 1) throw new Error(\"Enter exactly one Yahoo Finance symbol.\");\n const symbol = parsed[0];\n if (!symbol) throw new Error(\"Enter one Yahoo Finance symbol.\");\n return symbol;\n}\n\nfunction tryDirectSymbol(value: string): string | undefined {\n if (!value.trim()) return undefined;\n try {\n return parseDirectSymbol(value);\n } catch {\n return undefined;\n }\n}\n\nfunction availableRows(terminalRows: number, rowCount: number): number {\n const boundedRows = Number.isFinite(terminalRows) ? Math.max(1, Math.floor(terminalRows) - 9) : 10;\n return Math.max(1, Math.min(rowCount, boundedRows, 12));\n}\n\nfunction shortcutAvailable(\n keybindings: {\n getKeys(binding: string): readonly string[];\n },\n shortcut: \"shift+up\" | \"shift+down\",\n canonicalKey: (value: unknown) => string | undefined,\n): typeof shortcut | undefined {\n const unavailable = new Set(\n [\n \"ctrl+c\",\n \"home\",\n \"end\",\n \"space\",\n ...RESERVED_INPUT_BINDINGS.flatMap((binding) => keybindings.getKeys(binding)),\n ].map(canonicalKey),\n );\n return unavailable.has(canonicalKey(shortcut)) ? undefined : shortcut;\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;AACA,SAAS,aAAa,OAAO,KAAK,YAAY,uBAAuB;AAcrE,IAAM,cAAc;AACpB,IAAM,YAAY;AAElB,IAAM,0BAA0B;AAAA,EAC9B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAKA,eAAsB,kBAAkB,KAA8B,SAA2C;AAC/G,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI,MAAM,OAAO,sBAAsB;AAEvC,SAAO,CAAC,QAAQ,OAAO,WAAW,QAAQ,UAAU,GAAG;AACrD,UAAM,SAAS,MA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,SAAS,cAAc,cAAsB,UAA0B;AACrE,QAAM,cAAc,OAAO,SAAS,YAAY,IAAI,KAAK,IAAI,GAAG,KAAK,MAAM,YAAY,IAAI,CAAC,IAAI;AAChG,SAAO,KAAK,IAAI,GAAG,KAAK,IAAI,UAAU,aAAa,EAAE,CAAC;AACxD;AAEA,SAAS,kBACP,aAGA,UACA,cAC6B;AAC7B,QAAM,cAAc,IAAI;AAAA,IACtB;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,GAAG,wBAAwB,QAAQ,CAAC,YAAY,YAAY,QAAQ,OAAO,CAAC;AAAA,IAC9E,EAAE,IAAI,YAAY;AAAA,EACpB;AACA,SAAO,YAAY,IAAI,aAAa,QAAQ,CAAC,IAAI,SAAY;AAC/D;",
|
|
6
|
+
"names": ["row"]
|
|
7
|
+
}
|
package/dist/index.ts
CHANGED
|
@@ -319,7 +319,7 @@ function stockTicker(pi, dependencies = {}) {
|
|
|
319
319
|
const expectedGeneration = generation;
|
|
320
320
|
if (!controller || controller.signal.aborted || !ownsSession(ctx, expectedGeneration)) return;
|
|
321
321
|
const running = (async () => {
|
|
322
|
-
const { showTickerMenu } = await import("./chunks/menu-
|
|
322
|
+
const { showTickerMenu } = await import("./chunks/menu-SMXTISJV.ts");
|
|
323
323
|
if (controller.signal.aborted || !ownsSession(ctx, expectedGeneration)) return;
|
|
324
324
|
await showTickerMenu(ctx, {
|
|
325
325
|
signal: controller.signal,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@narumitw/pi-ticker",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Pi extension that shows configurable Yahoo Finance quotes above the editor.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -35,16 +35,16 @@
|
|
|
35
35
|
"prepack": "npm run build"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@narumitw/pi-tui-kit": "^0.
|
|
38
|
+
"@narumitw/pi-tui-kit": "^0.66.0"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"@earendil-works/pi-coding-agent": "*",
|
|
42
42
|
"@earendil-works/pi-tui": "*"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@earendil-works/pi-coding-agent": "
|
|
46
|
-
"@earendil-works/pi-tui": "
|
|
47
|
-
"@types/node": "26.6.
|
|
45
|
+
"@earendil-works/pi-coding-agent": "1.3.0",
|
|
46
|
+
"@earendil-works/pi-tui": "1.3.0",
|
|
47
|
+
"@types/node": "26.6.5",
|
|
48
48
|
"esbuild": "0.28.2",
|
|
49
49
|
"typescript": "7.0.2"
|
|
50
50
|
},
|
package/src/tui-menu.ts
CHANGED
|
@@ -45,9 +45,13 @@ const RESERVED_INPUT_BINDINGS = [
|
|
|
45
45
|
// This specialized TUI keeps the same search, toggle, action, binding, and cancellation behavior
|
|
46
46
|
// while RPC mode continues to use the Kit's declarative adapter in menu.ts.
|
|
47
47
|
export async function showTickerTuiMenu(ctx: ExtensionCommandContext, options: TickerMenuOptions): Promise<void> {
|
|
48
|
-
const {
|
|
49
|
-
|
|
50
|
-
|
|
48
|
+
const {
|
|
49
|
+
canonicalizeConfiguredKey,
|
|
50
|
+
formatInteractionHints,
|
|
51
|
+
HorizontalRule,
|
|
52
|
+
runCustomInteraction,
|
|
53
|
+
sanitizeTerminalText,
|
|
54
|
+
} = await import("@narumitw/pi-tui-kit");
|
|
51
55
|
|
|
52
56
|
while (!options.signal.aborted && options.isCurrent()) {
|
|
53
57
|
const result = await runCustomInteraction<TuiMenuResult>(ctx, {
|
|
@@ -70,8 +74,8 @@ export async function showTickerTuiMenu(ctx: ExtensionCommandContext, options: T
|
|
|
70
74
|
let pasteActive = false;
|
|
71
75
|
let errorMessage: string | undefined;
|
|
72
76
|
let pending = Promise.resolve();
|
|
73
|
-
const shortcutUp = shortcutAvailable(keybindings, "shift+up");
|
|
74
|
-
const shortcutDown = shortcutAvailable(keybindings, "shift+down");
|
|
77
|
+
const shortcutUp = shortcutAvailable(keybindings, "shift+up", canonicalizeConfiguredKey);
|
|
78
|
+
const shortcutDown = shortcutAvailable(keybindings, "shift+down", canonicalizeConfiguredKey);
|
|
75
79
|
const activationHint = (label: string) =>
|
|
76
80
|
formatInteractionHints(keybindings, [{ bindings: ["tui.select.confirm"], keys: ["space"], label }]);
|
|
77
81
|
const reorderKeys = [shortcutUp, shortcutDown].filter(
|
|
@@ -436,6 +440,7 @@ function shortcutAvailable(
|
|
|
436
440
|
getKeys(binding: string): readonly string[];
|
|
437
441
|
},
|
|
438
442
|
shortcut: "shift+up" | "shift+down",
|
|
443
|
+
canonicalKey: (value: unknown) => string | undefined,
|
|
439
444
|
): typeof shortcut | undefined {
|
|
440
445
|
const unavailable = new Set(
|
|
441
446
|
[
|
|
@@ -448,11 +453,3 @@ function shortcutAvailable(
|
|
|
448
453
|
);
|
|
449
454
|
return unavailable.has(canonicalKey(shortcut)) ? undefined : shortcut;
|
|
450
455
|
}
|
|
451
|
-
|
|
452
|
-
function canonicalKey(value: string): string {
|
|
453
|
-
const parts = value.toLowerCase().split("+");
|
|
454
|
-
const base = parts.at(-1) ?? "";
|
|
455
|
-
const canonicalBase = base === "escape" ? "esc" : base === "return" ? "enter" : base;
|
|
456
|
-
const modifiers = ["ctrl", "shift", "alt", "super"].filter((modifier) => parts.includes(modifier));
|
|
457
|
-
return [...modifiers, canonicalBase].join("+");
|
|
458
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/tui-menu.ts"],
|
|
4
|
-
"sourcesContent": ["import type { ExtensionCommandContext } from \"@earendil-works/pi-coding-agent\";\nimport { fuzzyFilter, Input, Key, matchesKey, truncateToWidth } from \"@earendil-works/pi-tui\";\nimport type { TickerMenuOptions } from \"./menu.js\";\nimport { parseSymbols } from \"./settings.js\";\n\ntype TuiMenuResult = \"add\" | \"close\";\ntype TickerRow = { kind: \"ticker\"; id: string; symbol: string };\ntype ActionRow = {\n kind: \"action\";\n id: \"add\" | \"widget\" | \"refresh\";\n label: string;\n description: string;\n};\ntype Row = TickerRow | ActionRow;\n\nconst PASTE_START = \"\\u001b[200~\";\nconst PASTE_END = \"\\u001b[201~\";\n// Keep these aligned with Input.handleInput so configured editing actions beat additive reorder.\nconst RESERVED_INPUT_BINDINGS = [\n \"tui.select.up\",\n \"tui.select.down\",\n \"tui.select.pageUp\",\n \"tui.select.pageDown\",\n \"tui.select.confirm\",\n \"tui.select.cancel\",\n \"tui.editor.undo\",\n \"tui.input.submit\",\n \"tui.editor.deleteCharBackward\",\n \"tui.editor.deleteCharForward\",\n \"tui.editor.deleteWordBackward\",\n \"tui.editor.deleteWordForward\",\n \"tui.editor.deleteToLineStart\",\n \"tui.editor.deleteToLineEnd\",\n \"tui.editor.yank\",\n \"tui.editor.yankPop\",\n \"tui.editor.cursorLeft\",\n \"tui.editor.cursorRight\",\n \"tui.editor.cursorLineStart\",\n \"tui.editor.cursorLineEnd\",\n \"tui.editor.cursorWordLeft\",\n \"tui.editor.cursorWordRight\",\n] as const;\n\n// Pi TUI Kit multi-select screens do not expose in-place row-reorder shortcuts.\n// This specialized TUI keeps the same search, toggle, action, binding, and cancellation behavior\n// while RPC mode continues to use the Kit's declarative adapter in menu.ts.\nexport async function showTickerTuiMenu(ctx: ExtensionCommandContext, options: TickerMenuOptions): Promise<void> {\n const { formatInteractionHints, HorizontalRule, runCustomInteraction, sanitizeTerminalText } = await import(\n \"@narumitw/pi-tui-kit\"\n );\n\n while (!options.signal.aborted && options.isCurrent()) {\n const result = await runCustomInteraction<TuiMenuResult>(ctx, {\n signal: options.signal,\n isCurrent: options.isCurrent,\n onError: (errorCtx, error) => {\n if (!errorCtx.hasUI) return;\n const message = error instanceof Error ? error.message : String(error);\n errorCtx.ui.notify(sanitizeTerminalText(message), \"error\");\n },\n create: ({ tui, theme, keybindings, complete }) => {\n let symbols = [...options.getSymbols()];\n let widgetEnabled = options.getWidgetEnabled();\n const rawSearchInput = new Input();\n const searchInput = new Input();\n let selectedIndex = 0;\n let rows: Row[] = [];\n let busy = false;\n let disposed = false;\n let pasteActive = false;\n let errorMessage: string | undefined;\n let pending = Promise.resolve();\n const shortcutUp = shortcutAvailable(keybindings, \"shift+up\");\n const shortcutDown = shortcutAvailable(keybindings, \"shift+down\");\n const activationHint = (label: string) =>\n formatInteractionHints(keybindings, [{ bindings: [\"tui.select.confirm\"], keys: [\"space\"], label }]);\n const reorderKeys = [shortcutUp, shortcutDown].filter(\n (shortcut): shortcut is \"shift+up\" | \"shift+down\" => shortcut !== undefined,\n );\n const tickerDescription = `${[\n activationHint(\"removes this ticker\"),\n ...(reorderKeys.length > 0 ? [`${reorderKeys.join(\"/\")} changes its order`] : []),\n ].join(\"; \")}.`;\n const topRule = new HorizontalRule({\n label: \"Manage tickers\",\n labelAlignment: \"left\",\n ruleStyle: (text) => theme.fg(\"borderMuted\", text),\n labelStyle: (text) => theme.fg(\"accent\", text),\n });\n const bottomRule = new HorizontalRule({\n ruleStyle: (text) => theme.fg(\"borderMuted\", text),\n });\n const hint = formatInteractionHints(keybindings, [\n { bindings: [\"tui.select.up\", \"tui.select.down\"], label: \"select\" },\n ...(shortcutUp ? [{ keys: [shortcutUp], label: \"move up\" }] : []),\n ...(shortcutDown ? [{ keys: [shortcutDown], label: \"move down\" }] : []),\n { bindings: [\"tui.select.confirm\"], keys: [\"space\"], label: \"toggle/select\" },\n {\n bindings: [\"tui.select.cancel\"],\n excludeKeys: [\"ctrl+c\"],\n label: \"close\",\n },\n { keys: [\"ctrl+c\"], label: \"close\" },\n ]);\n\n const actionRows = (directSymbol?: string): ActionRow[] => [\n {\n kind: \"action\",\n id: \"add\",\n label: directSymbol ? `Add ${sanitizeTerminalText(directSymbol)}` : \"Add custom ticker\u2026\",\n description: directSymbol\n ? `${activationHint(`adds ${sanitizeTerminalText(directSymbol)} directly`)}.`\n : \"Add and select one Yahoo Finance symbol.\",\n },\n {\n kind: \"action\",\n id: \"widget\",\n label: `Widget: ${widgetEnabled ? \"On\" : \"Off\"}`,\n description: \"Show or hide the editor widget and persist this setting.\",\n },\n {\n kind: \"action\",\n id: \"refresh\",\n label: \"Refresh now\",\n description: widgetEnabled\n ? \"Fetch the selected symbols immediately.\"\n : \"Enable the widget before refreshing.\",\n },\n ];\n const buildRows = (): Row[] => {\n const tickerRows = symbols.map((symbol): TickerRow => ({ kind: \"ticker\", id: symbol, symbol }));\n const query = searchInput.getValue().toLowerCase();\n const filtered = fuzzyFilter(tickerRows, query, (row) =>\n sanitizeTerminalText(row.symbol.replaceAll(\"-\", \" \")).toLowerCase(),\n );\n const directSymbol = filtered.length === 0 ? tryDirectSymbol(rawSearchInput.getValue()) : undefined;\n return [...filtered, ...actionRows(directSymbol)];\n };\n const selectedRow = () => rows[selectedIndex];\n const rebuild = (preferredId?: string, fallbackIndex = selectedIndex) => {\n rows = buildRows();\n const preferredIndex = preferredId ? rows.findIndex((row) => row.id === preferredId) : -1;\n selectedIndex = preferredIndex >= 0 ? preferredIndex : Math.max(0, Math.min(fallbackIndex, rows.length - 1));\n tui.requestRender();\n };\n rebuild();\n\n const select = (index: number, wrap: boolean) => {\n if (rows.length === 0) return;\n selectedIndex = wrap ? (index + rows.length) % rows.length : Math.max(0, Math.min(index, rows.length - 1));\n tui.requestRender();\n };\n const persist = (\n nextSymbols: readonly string[],\n previousSymbols: readonly string[],\n preferredId: string | undefined,\n previousIndex: number,\n clearSearchOnSuccess = false,\n ) => {\n busy = true;\n errorMessage = undefined;\n symbols = [...nextSymbols];\n rebuild(preferredId, previousIndex);\n pending = (async () => {\n try {\n await options.applySymbols(symbols, options.signal);\n if (options.signal.aborted || !options.isCurrent()) return;\n symbols = [...options.getSymbols()];\n if (clearSearchOnSuccess) {\n rawSearchInput.setValue(\"\");\n searchInput.setValue(\"\");\n }\n } catch (error) {\n if (options.signal.aborted || !options.isCurrent()) return;\n symbols = [...previousSymbols];\n errorMessage = sanitizeTerminalText(error instanceof Error ? error.message : String(error));\n ctx.ui.notify(`Ticker settings were not saved: ${errorMessage}`, \"error\");\n } finally {\n busy = false;\n if (!disposed && !options.signal.aborted && options.isCurrent()) {\n rebuild(preferredId, previousIndex);\n }\n }\n })();\n };\n const persistWidgetEnabled = (nextWidgetEnabled: boolean) => {\n const previousWidgetEnabled = widgetEnabled;\n widgetEnabled = nextWidgetEnabled;\n busy = true;\n errorMessage = undefined;\n rebuild(\"widget\");\n pending = (async () => {\n try {\n await options.applyWidgetEnabled(nextWidgetEnabled, options.signal);\n if (options.signal.aborted || !options.isCurrent()) return;\n widgetEnabled = options.getWidgetEnabled();\n } catch (error) {\n if (options.signal.aborted || !options.isCurrent()) return;\n widgetEnabled = previousWidgetEnabled;\n errorMessage = sanitizeTerminalText(error instanceof Error ? error.message : String(error));\n ctx.ui.notify(`Ticker settings were not saved: ${errorMessage}`, \"error\");\n } finally {\n busy = false;\n if (!disposed && !options.signal.aborted && options.isCurrent()) rebuild(\"widget\");\n }\n })();\n };\n const toggle = () => {\n if (busy || disposed) return;\n const row = selectedRow();\n if (row?.kind !== \"ticker\") return;\n const previous = [...symbols];\n const next = symbols.filter((symbol) => symbol !== row.symbol);\n persist(next, previous, undefined, selectedIndex);\n };\n const moveTicker = (direction: -1 | 1) => {\n if (busy || disposed || rawSearchInput.getValue() || options.signal.aborted || !options.isCurrent()) {\n return;\n }\n const row = selectedRow();\n if (row?.kind !== \"ticker\") return;\n const from = symbols.indexOf(row.symbol);\n const to = from + direction;\n if (from < 0 || to < 0 || to >= symbols.length) return;\n const previous = [...symbols];\n const next = [...symbols];\n const [symbol] = next.splice(from, 1);\n if (!symbol) return;\n next.splice(to, 0, symbol);\n persist(next, previous, symbol, selectedIndex);\n };\n const activate = () => {\n if (busy || disposed) return;\n const row = selectedRow();\n if (!row) return;\n if (row.kind === \"ticker\") {\n toggle();\n return;\n }\n if (row.id === \"add\") {\n const query = rawSearchInput.getValue();\n const hasTickerMatch = rows.some((candidate) => candidate.kind === \"ticker\");\n if (query.trim() && !hasTickerMatch) {\n let symbol: string;\n try {\n symbol = parseDirectSymbol(query);\n } catch (error) {\n const message = error instanceof Error ? error.message : String(error);\n errorMessage = sanitizeTerminalText(message);\n ctx.ui.notify(errorMessage, \"error\");\n tui.requestRender();\n return;\n }\n if (symbols.includes(symbol)) {\n ctx.ui.notify(`${symbol} is already selected.`, \"info\");\n return;\n }\n persist([...symbols, symbol], [...symbols], symbol, selectedIndex, true);\n return;\n }\n complete(\"add\");\n } else if (row.id === \"widget\") persistWidgetEnabled(!widgetEnabled);\n else options.refresh();\n };\n const handleSearch = (data: string) => {\n const previousId = selectedRow()?.id;\n errorMessage = undefined;\n rawSearchInput.handleInput(data);\n searchInput.handleInput(data);\n searchInput.setValue(sanitizeTerminalText(rawSearchInput.getValue()));\n rebuild(previousId, 0);\n };\n\n return {\n render(width: number) {\n const safeWidth = Number.isFinite(width) ? Math.max(0, Math.floor(width)) : 0;\n if (safeWidth === 0) return [\"\"];\n const viewportSize = availableRows(tui.terminal.rows, rows.length);\n const viewportStart = Math.max(\n 0,\n Math.min(selectedIndex - Math.floor(viewportSize / 2), rows.length - viewportSize),\n );\n const visibleRows = rows.slice(viewportStart, viewportStart + viewportSize);\n const content = visibleRows.map((row, offset) => {\n const index = viewportStart + offset;\n const focused = index === selectedIndex;\n const label =\n row.kind === \"ticker\"\n ? `${focused ? \"\u203A\" : \" \"} [x] ${sanitizeTerminalText(row.symbol)}`\n : `${focused ? \"\u203A\" : \" \"} ${row.label}`;\n const bounded = truncateToWidth(label, safeWidth, safeWidth > 1 ? \"\u2026\" : \"\");\n return focused ? theme.fg(\"accent\", bounded) : bounded;\n });\n if (viewportSize < rows.length) {\n content.push(theme.fg(\"dim\", truncateToWidth(` (${selectedIndex + 1}/${rows.length})`, safeWidth, \"\")));\n }\n const row = selectedRow();\n const description =\n row?.kind === \"ticker\"\n ? rawSearchInput.getValue()\n ? \"Clear search before reordering.\"\n : tickerDescription\n : row?.description;\n const status = errorMessage\n ? theme.fg(\"error\", errorMessage)\n : busy\n ? theme.fg(\"muted\", \"Saving changes\u2026\")\n : undefined;\n return [\n ...topRule.render(safeWidth),\n theme.fg(\n \"muted\",\n truncateToWidth(`${symbols.length} selected \u00B7 changes save immediately`, safeWidth, \"\"),\n ),\n ...searchInput.render(safeWidth).map((line) => truncateToWidth(line, safeWidth, \"\")),\n ...content,\n ...(description ? [theme.fg(\"dim\", truncateToWidth(` ${description}`, safeWidth, \"\"))] : []),\n ...(status ? [truncateToWidth(status, safeWidth, \"\")] : []),\n ...bottomRule.render(safeWidth),\n theme.fg(\"dim\", truncateToWidth(hint, safeWidth, \"\")),\n ];\n },\n invalidate() {\n searchInput.invalidate();\n },\n handleInput(data: string) {\n if (pasteActive || data.includes(PASTE_START)) {\n pasteActive = !data.includes(PASTE_END);\n handleSearch(data);\n return;\n }\n if (matchesKey(data, Key.ctrl(\"c\"))) {\n complete(\"close\");\n return;\n }\n if (keybindings.matches(data, \"tui.select.cancel\")) {\n complete(\"close\");\n return;\n }\n if (keybindings.matches(data, \"tui.select.up\")) {\n select(selectedIndex - 1, true);\n return;\n }\n if (keybindings.matches(data, \"tui.select.down\")) {\n select(selectedIndex + 1, true);\n return;\n }\n if (keybindings.matches(data, \"tui.select.pageUp\")) {\n select(selectedIndex - availableRows(tui.terminal.rows, rows.length), false);\n return;\n }\n if (keybindings.matches(data, \"tui.select.pageDown\")) {\n select(selectedIndex + availableRows(tui.terminal.rows, rows.length), false);\n return;\n }\n if (keybindings.matches(data, \"tui.select.confirm\") || data === \" \") {\n activate();\n return;\n }\n if (shortcutUp && matchesKey(data, shortcutUp)) {\n moveTicker(-1);\n return;\n }\n if (shortcutDown && matchesKey(data, shortcutDown)) {\n moveTicker(1);\n return;\n }\n handleSearch(data);\n },\n async waitForPending() {\n await pending;\n },\n dispose() {\n disposed = true;\n },\n get focused() {\n return searchInput.focused;\n },\n set focused(value: boolean) {\n searchInput.focused = value;\n },\n };\n },\n });\n\n if (result.kind !== \"completed\" || result.value === \"close\") return;\n const entered = await ctx.ui.input(\"Add custom ticker\", \"Yahoo symbol, for example MSFT or SOL-USD\", {\n signal: options.signal,\n });\n if (options.signal.aborted || !options.isCurrent()) return;\n if (!entered?.trim()) continue;\n try {\n const parsed = parseSymbols([entered]);\n if (parsed.length !== 1) throw new Error(\"Enter exactly one Yahoo Finance symbol.\");\n const symbol = parsed[0];\n if (!symbol) continue;\n const current = options.getSymbols();\n if (current.includes(symbol)) {\n ctx.ui.notify(`${symbol} is already selected.`, \"info\");\n continue;\n }\n await options.applySymbols([...current, symbol], options.signal);\n if (options.signal.aborted || !options.isCurrent()) return;\n } catch (error) {\n if (options.signal.aborted || !options.isCurrent()) return;\n const message = error instanceof Error ? error.message : String(error);\n ctx.ui.notify(sanitizeTerminalText(message), \"error\");\n }\n }\n}\n\nfunction parseDirectSymbol(value: string): string {\n const parsed = parseSymbols([value]);\n if (parsed.length !== 1) throw new Error(\"Enter exactly one Yahoo Finance symbol.\");\n const symbol = parsed[0];\n if (!symbol) throw new Error(\"Enter one Yahoo Finance symbol.\");\n return symbol;\n}\n\nfunction tryDirectSymbol(value: string): string | undefined {\n if (!value.trim()) return undefined;\n try {\n return parseDirectSymbol(value);\n } catch {\n return undefined;\n }\n}\n\nfunction availableRows(terminalRows: number, rowCount: number): number {\n const boundedRows = Number.isFinite(terminalRows) ? Math.max(1, Math.floor(terminalRows) - 9) : 10;\n return Math.max(1, Math.min(rowCount, boundedRows, 12));\n}\n\nfunction shortcutAvailable(\n keybindings: {\n getKeys(binding: string): readonly string[];\n },\n shortcut: \"shift+up\" | \"shift+down\",\n): typeof shortcut | undefined {\n const unavailable = new Set(\n [\n \"ctrl+c\",\n \"home\",\n \"end\",\n \"space\",\n ...RESERVED_INPUT_BINDINGS.flatMap((binding) => keybindings.getKeys(binding)),\n ].map(canonicalKey),\n );\n return unavailable.has(canonicalKey(shortcut)) ? undefined : shortcut;\n}\n\nfunction canonicalKey(value: string): string {\n const parts = value.toLowerCase().split(\"+\");\n const base = parts.at(-1) ?? \"\";\n const canonicalBase = base === \"escape\" ? \"esc\" : base === \"return\" ? \"enter\" : base;\n const modifiers = [\"ctrl\", \"shift\", \"alt\", \"super\"].filter((modifier) => parts.includes(modifier));\n return [...modifiers, canonicalBase].join(\"+\");\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;AACA,SAAS,aAAa,OAAO,KAAK,YAAY,uBAAuB;AAcrE,IAAM,cAAc;AACpB,IAAM,YAAY;AAElB,IAAM,0BAA0B;AAAA,EAC9B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAKA,eAAsB,kBAAkB,KAA8B,SAA2C;AAC/G,QAAM,EAAE,wBAAwB,gBAAgB,sBAAsB,qBAAqB,IAAI,MAAM,OACnG,sBACF;AAEA,SAAO,CAAC,QAAQ,OAAO,WAAW,QAAQ,UAAU,GAAG;AACrD,UAAM,SAAS,MAAM,qBAAoC,KAAK;AAAA,MAC5D,QAAQ,QAAQ;AAAA,MAChB,WAAW,QAAQ;AAAA,MACnB,SAAS,CAAC,UAAU,UAAU;AAC5B,YAAI,CAAC,SAAS,MAAO;AACrB,cAAM,UAAU,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;AACrE,iBAAS,GAAG,OAAO,qBAAqB,OAAO,GAAG,OAAO;AAAA,MAC3D;AAAA,MACA,QAAQ,CAAC,EAAE,KAAK,OAAO,aAAa,SAAS,MAAM;AACjD,YAAI,UAAU,CAAC,GAAG,QAAQ,WAAW,CAAC;AACtC,YAAI,gBAAgB,QAAQ,iBAAiB;AAC7C,c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