@marimo-team/frontend 0.14.18-dev46 → 0.14.18-dev48
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/assets/{ConnectedDataExplorerComponent-HIf65dHU.js → ConnectedDataExplorerComponent-DYTZw6fj.js} +1 -1
- package/dist/assets/{ImageComparisonComponent-D5_ZeyHj.js → ImageComparisonComponent-BAA_ijuq.js} +1 -1
- package/dist/assets/{VegaLite-Bok-sjfh.js → VegaLite-ClUb-74L.js} +1 -1
- package/dist/assets/{_baseEach-DP0Vk5cM.js → _baseEach-3O5Pzq2d.js} +1 -1
- package/dist/assets/_baseMap-DG_WUib9.js +1 -0
- package/dist/assets/{_baseUniq-eozUAmg_.js → _baseUniq-BXDKAuGS.js} +1 -1
- package/dist/assets/{_createAggregator-ChEFQPgY.js → _createAggregator-BIg6TnU4.js} +1 -1
- package/dist/assets/{any-language-editor-mA2rZvQd.js → any-language-editor-DFx4-Rvw.js} +1 -1
- package/dist/assets/{architectureDiagram-SUXI7LT5-2ZF3trHj.js → architectureDiagram-SUXI7LT5-D81RoqPk.js} +1 -1
- package/dist/assets/{blockDiagram-6J76NXCF-D7rOHuYy.js → blockDiagram-6J76NXCF-3niFsoFZ.js} +1 -1
- package/dist/assets/{c4Diagram-6F6E4RAY-BrgSUv-g.js → c4Diagram-6F6E4RAY-CFI6lih0.js} +1 -1
- package/dist/assets/channel-K-9loUb_.js +1 -0
- package/dist/assets/{chunk-353BL4L5-Dts_QVbM.js → chunk-353BL4L5-C3wPIha_.js} +1 -1
- package/dist/assets/{chunk-67H74DCK-BMUo_Ttp.js → chunk-67H74DCK-B5azje5L.js} +1 -1
- package/dist/assets/{chunk-AACKK3MU-BFJcIrrf.js → chunk-AACKK3MU-DSI22zXx.js} +1 -1
- package/dist/assets/{chunk-BFAMUDN2-DASBJWoB.js → chunk-BFAMUDN2-tuWdobTk.js} +1 -1
- package/dist/assets/{chunk-E2GYISFI-CaSGRzQf.js → chunk-E2GYISFI-i4TQCXIy.js} +1 -1
- package/dist/assets/{chunk-OW32GOEJ-BSjpZvcs.js → chunk-OW32GOEJ-DOaWtR4N.js} +1 -1
- package/dist/assets/{chunk-SKB7J2MH-0Ry0z6Th.js → chunk-SKB7J2MH-SgMaVi_f.js} +1 -1
- package/dist/assets/{chunk-SZ463SBG-Cm24_gCb.js → chunk-SZ463SBG-BPCllzKw.js} +1 -1
- package/dist/assets/{circle-play-BlxhvJeB.js → circle-play-D53fEWtA.js} +1 -1
- package/dist/assets/classDiagram-M3E45YP4-Bc9VfZy3.js +1 -0
- package/dist/assets/classDiagram-v2-YAWTLIQI-Bc9VfZy3.js +1 -0
- package/dist/assets/clone-DaATSQka.js +1 -0
- package/dist/assets/{compile-2k6_RDYp.js → compile-CHlxx7_2.js} +1 -1
- package/dist/assets/{dagre-JOIXM2OF-BKljv4zX.js → dagre-JOIXM2OF-DwqsAdzJ.js} +1 -1
- package/dist/assets/{data-grid-overlay-editor-DAJdB67r.js → data-grid-overlay-editor-BkxJm21l.js} +1 -1
- package/dist/assets/{diagram-5UYTHUR4-BBMC6iux.js → diagram-5UYTHUR4-BVgXxq4M.js} +1 -1
- package/dist/assets/{diagram-VMROVX33-BNo2Ak5P.js → diagram-VMROVX33-BCL8392t.js} +1 -1
- package/dist/assets/{diagram-ZTM2IBQH-CwaLcQSz.js → diagram-ZTM2IBQH-4J4J1CIV.js} +1 -1
- package/dist/assets/{edit-page-E53vwQlN.js → edit-page-NB5wrRh2.js} +37 -37
- package/dist/assets/{erDiagram-3M52JZNH-DZYaqmPt.js → erDiagram-3M52JZNH-jshUEIJ1.js} +1 -1
- package/dist/assets/{flowDiagram-KYDEHFYC-DoGcNBeL.js → flowDiagram-KYDEHFYC-CyYg3H8Y.js} +1 -1
- package/dist/assets/{ganttDiagram-EK5VF46D-BKMQb80Q.js → ganttDiagram-EK5VF46D-C23Ft8I7.js} +1 -1
- package/dist/assets/{gitGraphDiagram-GW3U2K7C-C1UyborH.js → gitGraphDiagram-GW3U2K7C-DiUoj4Ew.js} +1 -1
- package/dist/assets/{glide-data-editor-BnK6aFTb.js → glide-data-editor-yni-i7DD.js} +4 -4
- package/dist/assets/{graph-BCs1UMSM.js → graph-C7JpWu09.js} +1 -1
- package/dist/assets/{home-page-O70ucO82.js → home-page-NDnghZWs.js} +1 -1
- package/dist/assets/{index-qOjnRRCX.js → index--KGGFrne.js} +1 -1
- package/dist/assets/{index-CBm8as3X.js → index-4OqJ2B3D.js} +1 -1
- package/dist/assets/{index-BM8D-4Rc.js → index-B0RXd23s.js} +1 -1
- package/dist/assets/{index-B5rbfMeq.js → index-B31n32p9.js} +1 -1
- package/dist/assets/{index-CXAPPtAy.js → index-BOUSUTRn.js} +1 -1
- package/dist/assets/{index-i_2XD6qo.js → index-BQIb1OIL.js} +1 -1
- package/dist/assets/{index-CZL_GKnU.js → index-BlatNvpa.js} +1 -1
- package/dist/assets/{index-BBv5Z4wg.js → index-BuLzGTRa.js} +14 -14
- package/dist/assets/{index-CBA9xWFT.js → index-Bv-FgWDT.js} +1 -1
- package/dist/assets/{index-xGvTfkfH.js → index-C-824auT.js} +1 -1
- package/dist/assets/{index-DQRErQri.js → index-CCVnyt35.js} +1 -1
- package/dist/assets/{index-Cv_Pealg.js → index-CMwLiUwF.js} +1 -1
- package/dist/assets/{index-q2TTmuN4.js → index-CjurcK2b.js} +1 -1
- package/dist/assets/{index-CL-kXFne.js → index-DUWmhAdb.js} +1 -1
- package/dist/assets/{index-DIhz-Qgm.js → index-Dhv3kMmj.js} +1 -1
- package/dist/assets/{index-VPsj7ERu.js → index-Dtg-n9fy.js} +1 -1
- package/dist/assets/{index-DWt2FfX1.js → index-RFe4ipJ2.js} +1 -1
- package/dist/assets/{index-CUVw2DvX.js → index-TnI59iGP.js} +1 -1
- package/dist/assets/{index-CKv-cjdG.js → index-afRA5Gf-.js} +1 -1
- package/dist/assets/{index-CNOzuys1.js → index-gxc0pSjP.js} +1 -1
- package/dist/assets/infoDiagram-LHK5PUON-CU950EiG.js +2 -0
- package/dist/assets/{journeyDiagram-EWQZEKCU-CyAcCWEZ.js → journeyDiagram-EWQZEKCU-D6atx6Lv.js} +1 -1
- package/dist/assets/{kanban-definition-ZSS6B67P-D4k35yUR.js → kanban-definition-ZSS6B67P-BTifj_eJ.js} +1 -1
- package/dist/assets/{layout-B9xn2s0w.js → layout-C7UvAKPj.js} +1 -1
- package/dist/assets/{linear-BQCi22BP.js → linear-BZ8OzEjq.js} +1 -1
- package/dist/assets/{links-BalMIx5Q.js → links-Bi_UYtYJ.js} +1 -1
- package/dist/assets/{mermaid-cJZwTbZ9.js → mermaid-Ay3yhf1K.js} +4 -4
- package/dist/assets/{min-r-SnuZKs.js → min-Dp3C_LUW.js} +1 -1
- package/dist/assets/{mindmap-definition-6CBA2TL7-CJBuZpoV.js → mindmap-definition-6CBA2TL7-UHMw9HRG.js} +1 -1
- package/dist/assets/{number-overlay-editor-EDWkEw0K.js → number-overlay-editor-Cv-0anBf.js} +1 -1
- package/dist/assets/{pieDiagram-NIOCPIFQ-BYKEuFGo.js → pieDiagram-NIOCPIFQ-B3CqYKDU.js} +1 -1
- package/dist/assets/{quadrantDiagram-2OG54O6I-C5h1Xbzf.js → quadrantDiagram-2OG54O6I-kwhcJ1uQ.js} +1 -1
- package/dist/assets/{react-plotly-CvPRiBgt.js → react-plotly-Nf9wyHE6.js} +1 -1
- package/dist/assets/{requirementDiagram-QOLK2EJ7-DvKVj1EO.js → requirementDiagram-QOLK2EJ7-C_ChBtkQ.js} +1 -1
- package/dist/assets/{run-page-BqqgSYzg.js → run-page-CSqmt13E.js} +1 -1
- package/dist/assets/{sankeyDiagram-4UZDY2LN-xSv-WiNT.js → sankeyDiagram-4UZDY2LN-qvwFYofP.js} +1 -1
- package/dist/assets/{sequenceDiagram-SKLFT4DO-BtBPNNJk.js → sequenceDiagram-SKLFT4DO-BzqFOwY5.js} +1 -1
- package/dist/assets/{slides-component-Dgit4xEF.js → slides-component-Cer6VYZ9.js} +1 -1
- package/dist/assets/{sortBy-CLDsehYj.js → sortBy-vM-dsQOy.js} +1 -1
- package/dist/assets/{stateDiagram-MI5ZYTHO-DTc6KyCz.js → stateDiagram-MI5ZYTHO-Qsx1ctcw.js} +1 -1
- package/dist/assets/stateDiagram-v2-5AN5P6BG-nnL6lLPg.js +1 -0
- package/dist/assets/{storage-eh4YNdL5.js → storage-CgbU7fX_.js} +3 -3
- package/dist/assets/{terminal-IPenAc9i.js → terminal-D9I-qKBb.js} +1 -1
- package/dist/assets/{time-wnDEhx9l.js → time-B6gEjtOF.js} +1 -1
- package/dist/assets/{timeline-definition-MYPXXCX6-DUXjpczw.js → timeline-definition-MYPXXCX6-CDn-7Ziv.js} +1 -1
- package/dist/assets/{tracing-zCygBoB-.js → tracing-BlsNYoEA.js} +2 -2
- package/dist/assets/{trash-CzWPnakJ.js → trash-DN3yrUwY.js} +1 -1
- package/dist/assets/{treemap-75Q7IDZK-C7SvBlQy.js → treemap-75Q7IDZK-BU7RneXW.js} +1 -1
- package/dist/assets/{vega-component-DMv_9d-8.js → vega-component-B88TrcEz.js} +1 -1
- package/dist/assets/{xychartDiagram-H2YORKM3-BZIguX2J.js → xychartDiagram-H2YORKM3-0c94DCtR.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/src/components/ai/ai-provider-icon.tsx +2 -0
- package/src/components/editor/navigation/__tests__/navigation.test.ts +109 -32
- package/src/components/editor/navigation/navigation.ts +12 -10
- package/src/core/ai/ids/ids.ts +1 -0
- package/src/core/hotkeys/hotkeys.ts +8 -0
- package/dist/assets/_baseMap-DIl28WvO.js +0 -1
- package/dist/assets/channel-DLEpMWNY.js +0 -1
- package/dist/assets/classDiagram-M3E45YP4-B7IlFHTT.js +0 -1
- package/dist/assets/classDiagram-v2-YAWTLIQI-B7IlFHTT.js +0 -1
- package/dist/assets/clone-D8gzUlmC.js +0 -1
- package/dist/assets/infoDiagram-LHK5PUON-b-0aEtzy.js +0 -2
- package/dist/assets/stateDiagram-v2-5AN5P6BG-BBRvUdQr.js +0 -1
|
@@ -5,7 +5,7 @@ import type { EditorView } from "@codemirror/view";
|
|
|
5
5
|
import { act, renderHook } from "@testing-library/react";
|
|
6
6
|
import { Provider } from "jotai";
|
|
7
7
|
import React, { createRef } from "react";
|
|
8
|
-
import { beforeEach, describe, expect, it, vi } from "vitest";
|
|
8
|
+
import { afterAll, beforeEach, describe, expect, it, vi } from "vitest";
|
|
9
9
|
import { Mocks } from "@/__mocks__/common";
|
|
10
10
|
import { MockNotebook } from "@/__mocks__/notebook";
|
|
11
11
|
import { MockRequestClient } from "@/__mocks__/requests";
|
|
@@ -64,6 +64,10 @@ const mockUseCellClipboard = vi.mocked(
|
|
|
64
64
|
await import("../clipboard"),
|
|
65
65
|
).useCellClipboard;
|
|
66
66
|
|
|
67
|
+
afterAll(() => {
|
|
68
|
+
vi.resetAllMocks();
|
|
69
|
+
});
|
|
70
|
+
|
|
67
71
|
import { defaultUserConfig } from "@/core/config/config-schema";
|
|
68
72
|
import { MultiColumn } from "@/utils/id-tree";
|
|
69
73
|
import { focusCell, focusCellEditor } from "../focus-utils";
|
|
@@ -1580,12 +1584,22 @@ describe("useCellNavigationProps", () => {
|
|
|
1580
1584
|
});
|
|
1581
1585
|
});
|
|
1582
1586
|
|
|
1587
|
+
// Mock isPlatformWindows for testing
|
|
1588
|
+
const mockIsPlatformWindows = vi.hoisted(() => vi.fn());
|
|
1589
|
+
vi.mock("@/core/hotkeys/shortcuts", async (importOriginal) => ({
|
|
1590
|
+
...(await importOriginal()),
|
|
1591
|
+
isPlatformWindows: mockIsPlatformWindows,
|
|
1592
|
+
}));
|
|
1593
|
+
|
|
1583
1594
|
describe("useCellEditorNavigationProps", () => {
|
|
1584
1595
|
beforeEach(() => {
|
|
1585
1596
|
vi.clearAllMocks();
|
|
1586
1597
|
|
|
1587
1598
|
// Reset config overrides
|
|
1588
1599
|
store.set(configOverridesAtom, {});
|
|
1600
|
+
|
|
1601
|
+
// Reset platform mock to default (non-Windows)
|
|
1602
|
+
mockIsPlatformWindows.mockReturnValue(false);
|
|
1589
1603
|
});
|
|
1590
1604
|
|
|
1591
1605
|
describe("keyboard shortcuts", () => {
|
|
@@ -1692,52 +1706,115 @@ describe("useCellEditorNavigationProps", () => {
|
|
|
1692
1706
|
});
|
|
1693
1707
|
});
|
|
1694
1708
|
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
);
|
|
1709
|
+
describe("non-Windows platforms", () => {
|
|
1710
|
+
beforeEach(() => {
|
|
1711
|
+
mockIsPlatformWindows.mockReturnValue(false);
|
|
1712
|
+
});
|
|
1700
1713
|
|
|
1701
|
-
|
|
1714
|
+
it("should focus cell when Ctrl+Escape is pressed in vim mode", () => {
|
|
1715
|
+
const mockEditorView = { current: null };
|
|
1716
|
+
const { result } = renderWithProvider(() =>
|
|
1717
|
+
useCellEditorNavigationProps(mockCellId, mockEditorView),
|
|
1718
|
+
);
|
|
1702
1719
|
|
|
1703
|
-
|
|
1704
|
-
|
|
1720
|
+
const mockEvent = Mocks.keyboardEvent({ key: "Escape", ctrlKey: true });
|
|
1721
|
+
|
|
1722
|
+
act(() => {
|
|
1723
|
+
result.current.onKeyDown?.(mockEvent);
|
|
1724
|
+
});
|
|
1725
|
+
|
|
1726
|
+
expect(focusCell).toHaveBeenCalledWith(mockCellId);
|
|
1727
|
+
expect(mockEvent.continuePropagation).not.toHaveBeenCalled();
|
|
1705
1728
|
});
|
|
1706
1729
|
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1730
|
+
it("should focus cell when Cmd+Escape (metaKey) is pressed in vim mode", () => {
|
|
1731
|
+
const mockEditorView = { current: null };
|
|
1732
|
+
const { result } = renderWithProvider(() =>
|
|
1733
|
+
useCellEditorNavigationProps(mockCellId, mockEditorView),
|
|
1734
|
+
);
|
|
1710
1735
|
|
|
1711
|
-
|
|
1712
|
-
const mockEditorView = { current: null };
|
|
1713
|
-
const { result } = renderWithProvider(() =>
|
|
1714
|
-
useCellEditorNavigationProps(mockCellId, mockEditorView),
|
|
1715
|
-
);
|
|
1736
|
+
const mockEvent = Mocks.keyboardEvent({ key: "Escape", metaKey: true });
|
|
1716
1737
|
|
|
1717
|
-
|
|
1738
|
+
act(() => {
|
|
1739
|
+
result.current.onKeyDown?.(mockEvent);
|
|
1740
|
+
});
|
|
1718
1741
|
|
|
1719
|
-
|
|
1720
|
-
|
|
1742
|
+
expect(focusCell).toHaveBeenCalledWith(mockCellId);
|
|
1743
|
+
expect(mockEvent.continuePropagation).not.toHaveBeenCalled();
|
|
1721
1744
|
});
|
|
1722
1745
|
|
|
1723
|
-
|
|
1724
|
-
|
|
1746
|
+
it("should focus cell when Escape (without Ctrl) is pressed in vim mode", () => {
|
|
1747
|
+
const mockEditorView = { current: null };
|
|
1748
|
+
const { result } = renderWithProvider(() =>
|
|
1749
|
+
useCellEditorNavigationProps(mockCellId, mockEditorView),
|
|
1750
|
+
);
|
|
1751
|
+
|
|
1752
|
+
const mockEvent = Mocks.keyboardEvent({ key: "Escape" });
|
|
1753
|
+
|
|
1754
|
+
act(() => {
|
|
1755
|
+
result.current.onKeyDown?.(mockEvent);
|
|
1756
|
+
});
|
|
1757
|
+
|
|
1758
|
+
expect(focusCell).toHaveBeenCalledWith(mockCellId);
|
|
1759
|
+
expect(mockEvent.continuePropagation).not.toHaveBeenCalled();
|
|
1760
|
+
});
|
|
1725
1761
|
});
|
|
1726
1762
|
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
);
|
|
1763
|
+
describe("Windows platform", () => {
|
|
1764
|
+
beforeEach(() => {
|
|
1765
|
+
mockIsPlatformWindows.mockReturnValue(true);
|
|
1766
|
+
});
|
|
1732
1767
|
|
|
1733
|
-
|
|
1768
|
+
it("should focus cell when Shift+Escape is pressed in vim mode on Windows", () => {
|
|
1769
|
+
const mockEditorView = { current: null };
|
|
1770
|
+
const { result } = renderWithProvider(() =>
|
|
1771
|
+
useCellEditorNavigationProps(mockCellId, mockEditorView),
|
|
1772
|
+
);
|
|
1734
1773
|
|
|
1735
|
-
|
|
1736
|
-
|
|
1774
|
+
const mockEvent = Mocks.keyboardEvent({
|
|
1775
|
+
key: "Escape",
|
|
1776
|
+
shiftKey: true,
|
|
1777
|
+
});
|
|
1778
|
+
|
|
1779
|
+
act(() => {
|
|
1780
|
+
result.current.onKeyDown?.(mockEvent);
|
|
1781
|
+
});
|
|
1782
|
+
|
|
1783
|
+
expect(focusCell).toHaveBeenCalledWith(mockCellId);
|
|
1784
|
+
expect(mockEvent.continuePropagation).not.toHaveBeenCalled();
|
|
1737
1785
|
});
|
|
1738
1786
|
|
|
1739
|
-
|
|
1740
|
-
|
|
1787
|
+
it("should focus cell when Ctrl+Escape is pressed in vim mode on Windows", () => {
|
|
1788
|
+
const mockEditorView = { current: null };
|
|
1789
|
+
const { result } = renderWithProvider(() =>
|
|
1790
|
+
useCellEditorNavigationProps(mockCellId, mockEditorView),
|
|
1791
|
+
);
|
|
1792
|
+
|
|
1793
|
+
const mockEvent = Mocks.keyboardEvent({ key: "Escape", ctrlKey: true });
|
|
1794
|
+
|
|
1795
|
+
act(() => {
|
|
1796
|
+
result.current.onKeyDown?.(mockEvent);
|
|
1797
|
+
});
|
|
1798
|
+
|
|
1799
|
+
expect(focusCell).toHaveBeenCalledWith(mockCellId);
|
|
1800
|
+
expect(mockEvent.continuePropagation).not.toHaveBeenCalled();
|
|
1801
|
+
});
|
|
1802
|
+
|
|
1803
|
+
it("should focus cell when Escape (without Shift) is pressed in vim mode on Windows", () => {
|
|
1804
|
+
const mockEditorView = { current: null };
|
|
1805
|
+
const { result } = renderWithProvider(() =>
|
|
1806
|
+
useCellEditorNavigationProps(mockCellId, mockEditorView),
|
|
1807
|
+
);
|
|
1808
|
+
|
|
1809
|
+
const mockEvent = Mocks.keyboardEvent({ key: "Escape" });
|
|
1810
|
+
|
|
1811
|
+
act(() => {
|
|
1812
|
+
result.current.onKeyDown?.(mockEvent);
|
|
1813
|
+
});
|
|
1814
|
+
|
|
1815
|
+
expect(focusCell).toHaveBeenCalledWith(mockCellId);
|
|
1816
|
+
expect(mockEvent.continuePropagation).not.toHaveBeenCalled();
|
|
1817
|
+
});
|
|
1741
1818
|
});
|
|
1742
1819
|
});
|
|
1743
1820
|
});
|
|
@@ -4,6 +4,7 @@ import { closeCompletion, completionStatus } from "@codemirror/autocomplete";
|
|
|
4
4
|
import { EditorSelection } from "@codemirror/state";
|
|
5
5
|
import type { EditorView } from "@codemirror/view";
|
|
6
6
|
import { useAtomValue, useSetAtom, useStore } from "jotai";
|
|
7
|
+
import { useMemo } from "react";
|
|
7
8
|
import { mergeProps, useFocusWithin, useKeyboard } from "react-aria";
|
|
8
9
|
import { aiCompletionCellAtom } from "@/core/ai/state";
|
|
9
10
|
import { cellIdsAtom, notebookAtom, useCellActions } from "@/core/cells/cells";
|
|
@@ -609,6 +610,12 @@ export function useCellEditorNavigationProps(
|
|
|
609
610
|
) {
|
|
610
611
|
const setTemporarilyShownCode = useSetAtom(temporarilyShownCodeAtom);
|
|
611
612
|
const keymapPreset = useAtomValue(keymapPresetAtom);
|
|
613
|
+
const hotkeys = useAtomValue(hotkeysAtom);
|
|
614
|
+
|
|
615
|
+
const vimCommandModeShortcut = useMemo(() => {
|
|
616
|
+
const shortcut = hotkeys.getHotkey("command.vimEnterCommandMode");
|
|
617
|
+
return parseShortcut(shortcut.key);
|
|
618
|
+
}, [hotkeys]);
|
|
612
619
|
|
|
613
620
|
const exitToCommandMode = () => {
|
|
614
621
|
setTemporarilyShownCode(false);
|
|
@@ -648,18 +655,13 @@ export function useCellEditorNavigationProps(
|
|
|
648
655
|
|
|
649
656
|
const { keyboardProps } = useKeyboard({
|
|
650
657
|
onKeyDown: (evt) => {
|
|
651
|
-
// For vim mode,
|
|
652
|
-
if (keymapPreset === "vim") {
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
}
|
|
656
|
-
} else {
|
|
658
|
+
// For vim mode, use configurable shortcut
|
|
659
|
+
if (keymapPreset === "vim" && vimCommandModeShortcut(evt)) {
|
|
660
|
+
handleEscape();
|
|
661
|
+
} else if (evt.key === "Escape") {
|
|
657
662
|
// For non-vim mode, regular Escape exits to command mode
|
|
658
|
-
|
|
659
|
-
handleEscape();
|
|
660
|
-
}
|
|
663
|
+
handleEscape();
|
|
661
664
|
}
|
|
662
|
-
|
|
663
665
|
evt.continuePropagation();
|
|
664
666
|
},
|
|
665
667
|
});
|
package/src/core/ai/ids/ids.ts
CHANGED
|
@@ -388,6 +388,14 @@ const DEFAULT_HOT_KEY = {
|
|
|
388
388
|
},
|
|
389
389
|
|
|
390
390
|
// Command mode (edit a cell, not the editor)
|
|
391
|
+
"command.vimEnterCommandMode": {
|
|
392
|
+
name: "Enter command mode (vim)",
|
|
393
|
+
group: "Command",
|
|
394
|
+
key: {
|
|
395
|
+
main: "Mod-Escape",
|
|
396
|
+
windows: "Shift-Escape",
|
|
397
|
+
},
|
|
398
|
+
},
|
|
391
399
|
"command.createCellBefore": {
|
|
392
400
|
name: "Create a cell before current cell",
|
|
393
401
|
group: "Command",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as m}from"./_baseEach-DP0Vk5cM.js";import{x as s}from"./index-BBv5Z4wg.js";function e(r,o){var a=-1,t=s(r)?Array(r.length):[];return m(r,function(n,f,i){t[++a]=o(n,f,i)}),t}export{e as b};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{U as s,C as o}from"./mermaid-cJZwTbZ9.js";const n=(a,r)=>s.lang.round(o.parse(a)[r]);export{n as c};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as a,c as s,a as t,C as o}from"./chunk-SZ463SBG-Cm24_gCb.js";import{_ as e}from"./mermaid-cJZwTbZ9.js";import"./transform-B8bpuzxV.js";import"./chunk-E2GYISFI-CaSGRzQf.js";import"./chunk-BFAMUDN2-DASBJWoB.js";import"./chunk-SKB7J2MH-0Ry0z6Th.js";import"./index-BBv5Z4wg.js";import"./step-BwsUM5iJ.js";import"./timer-BwIYMJWC.js";var i={parser:t,get db(){return new o},renderer:s,styles:a,init:e(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{i as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as a,c as s,a as t,C as o}from"./chunk-SZ463SBG-Cm24_gCb.js";import{_ as e}from"./mermaid-cJZwTbZ9.js";import"./transform-B8bpuzxV.js";import"./chunk-E2GYISFI-CaSGRzQf.js";import"./chunk-BFAMUDN2-DASBJWoB.js";import"./chunk-SKB7J2MH-0Ry0z6Th.js";import"./index-BBv5Z4wg.js";import"./step-BwsUM5iJ.js";import"./timer-BwIYMJWC.js";var i={parser:t,get db(){return new o},renderer:s,styles:a,init:e(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{i as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as n}from"./_baseUniq-eozUAmg_.js";function o(r){return n(r,4)}export{o as c};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{_ as a,l as i,I as s,d as p,K as n}from"./mermaid-cJZwTbZ9.js";import{p as m}from"./treemap-75Q7IDZK-C7SvBlQy.js";import"./index-BBv5Z4wg.js";import"./transform-B8bpuzxV.js";import"./timer-BwIYMJWC.js";import"./step-BwsUM5iJ.js";import"./_baseEach-DP0Vk5cM.js";import"./_baseUniq-eozUAmg_.js";import"./min-r-SnuZKs.js";import"./_baseMap-DIl28WvO.js";import"./clone-D8gzUlmC.js";import"./_createAggregator-ChEFQPgY.js";var d={parse:a(async r=>{const t=await m("info",r);i.debug(t)},"parse")},g={version:n.version+""},v={parser:d,db:{getVersion:a(()=>g.version,"getVersion")},renderer:{draw:a((r,t,o)=>{i.debug(`rendering info diagram
|
|
2
|
-
`+r);const e=s(t);p(e,100,400,!0),e.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${o}`)},"draw")}};export{v as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as t,b as a,a as e,S as o}from"./chunk-OW32GOEJ-BSjpZvcs.js";import{_ as s}from"./mermaid-cJZwTbZ9.js";import"./transform-B8bpuzxV.js";import"./chunk-BFAMUDN2-DASBJWoB.js";import"./chunk-SKB7J2MH-0Ry0z6Th.js";import"./index-BBv5Z4wg.js";import"./step-BwsUM5iJ.js";import"./timer-BwIYMJWC.js";var i={parser:e,get db(){return new o(2)},renderer:a,styles:t,init:s(r=>{r.state||(r.state={}),r.state.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{i as diagram};
|