@marimo-team/islands 0.20.5-dev10 → 0.20.5-dev15
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/{Combination-Du-o_hC9.js → Combination-DPrRlMyq.js} +1 -1
- package/dist/{ConnectedDataExplorerComponent-DUS-zJoR.js → ConnectedDataExplorerComponent-Bp9TusI-.js} +10 -10
- package/dist/{any-language-editor-BL9o7y0_.js → any-language-editor-BGcQxkAL.js} +19 -19
- package/dist/{architectureDiagram-VXUJARFQ-DrJeyFHq.js → architectureDiagram-VXUJARFQ-IZt4NuSd.js} +5 -5
- package/dist/{blockDiagram-VD42YOAC-BJrP6qKc.js → blockDiagram-VD42YOAC-mhFHC3Ty.js} +5 -5
- package/dist/{button-KYalaJYu.js → button-BJaX_M34.js} +8 -3
- package/dist/{c4Diagram-YG6GDRKO-Bo4gytQ5.js → c4Diagram-YG6GDRKO-BzStmvfT.js} +4 -4
- package/dist/{channel-IWLGkaBE.js → channel-CUFaIkTh.js} +1 -1
- package/dist/{check-C50jsehH.js → check-C9c-GtvX.js} +1 -1
- package/dist/{chunk-ABZYJK2D-CRwanrkd.js → chunk-ABZYJK2D-7QYXAAhe.js} +1 -1
- package/dist/{chunk-ATLVNIR6-CMMCMvOK.js → chunk-ATLVNIR6-pmHPAPSd.js} +1 -1
- package/dist/{chunk-B4BG7PRW-BNsHrGHG.js → chunk-B4BG7PRW-C9mfKT9i.js} +4 -4
- package/dist/{chunk-DI55MBZ5-DQeYbfMV.js → chunk-DI55MBZ5-IKrK49rX.js} +4 -4
- package/dist/{chunk-EXTU4WIE-CV_DQeaX.js → chunk-EXTU4WIE-BRFl4iNd.js} +1 -1
- package/dist/{chunk-JA3XYJ7Z-Cmt--e0q.js → chunk-JA3XYJ7Z-C9q_MXZQ.js} +2 -2
- package/dist/{chunk-JZLCHNYA-CkyMJnI9.js → chunk-JZLCHNYA-DVjoFib5.js} +4 -4
- package/dist/{chunk-N4CR4FBY-BJfHtJbD.js → chunk-N4CR4FBY-BYr5N5mX.js} +5 -5
- package/dist/{chunk-QN33PNHL-WOLIPUAJ.js → chunk-QN33PNHL-CXfJywHv.js} +1 -1
- package/dist/{chunk-QXUST7PY-DYuD50pU.js → chunk-QXUST7PY-YO0PM8b3.js} +5 -5
- package/dist/{chunk-S3R3BYOJ-CsnX6RKs.js → chunk-S3R3BYOJ-DgI4FlvW.js} +1 -1
- package/dist/{chunk-TZMSLE5B-B3eYTGCw.js → chunk-TZMSLE5B-DSfBOnzx.js} +1 -1
- package/dist/{classDiagram-2ON5EDUG-C7C-oefv.js → classDiagram-2ON5EDUG-CvpnTWzz.js} +10 -10
- package/dist/{classDiagram-v2-WZHVMYZB-UTw37Gg8.js → classDiagram-v2-WZHVMYZB-DEQrBHLI.js} +10 -10
- package/dist/{copy-oc-FcZzt.js → copy-DhB8Zxuz.js} +2 -2
- package/dist/{dagre-6UL2VRFP-BgsUhJrV.js → dagre-6UL2VRFP-DC-emrm5.js} +7 -7
- package/dist/{diagram-PSM6KHXK-BIUUOfKo.js → diagram-PSM6KHXK-BAgNlpL8.js} +6 -6
- package/dist/{diagram-QEK2KX5R-BFjolZQv.js → diagram-QEK2KX5R-BM7QE5WA.js} +4 -4
- package/dist/{diagram-S2PKOQOG-4jfkWoZw.js → diagram-S2PKOQOG-qs4mB1gW.js} +4 -4
- package/dist/dist-B4MxkKHf.js +8 -0
- package/dist/{dist-De9X_Des.js → dist-B9EjSb9T.js} +1 -1
- package/dist/{dist-IW_ARJ3S.js → dist-BFxYppVR.js} +4 -4
- package/dist/{dist-D7ZGWV_9.js → dist-BGZ7TWS9.js} +3 -3
- package/dist/{dist-CwtEWuFb.js → dist-BSfYc7vq.js} +2 -2
- package/dist/{dist-DMS81OrU.js → dist-BUrWeMEP.js} +1 -1
- package/dist/dist-BYghZv6b.js +5 -0
- package/dist/dist-Be-uQhz5.js +6 -0
- package/dist/{dist-Ch_JuCvc.js → dist-BpMlUdNO.js} +3 -3
- package/dist/{dist-C6z8U-ms.js → dist-Bq5eYK43.js} +2 -2
- package/dist/{dist-BFL9TlzD.js → dist-Bq9zYwJs.js} +5 -5
- package/dist/{dist-7ZF--V_D.js → dist-C4K7pumm.js} +2 -2
- package/dist/{dist-Qjf6pcqK.js → dist-CAKwXCWI.js} +2 -2
- package/dist/dist-CB_xf0ju.js +5 -0
- package/dist/{dist-BwQHkjA9.js → dist-CDHl2i1x.js} +4 -4
- package/dist/dist-CK0qFAbF.js +8 -0
- package/dist/{dist-C4XMUaob.js → dist-CPlGUbk-.js} +2 -2
- package/dist/{dist-BT6_J2eq.js → dist-CSEWGuDq.js} +7 -2
- package/dist/dist-CYEk-qrr.js +8 -0
- package/dist/{dist-CYo3w-nC.js → dist-Cl5iM8xL.js} +3 -3
- package/dist/dist-CmKoWpMk.js +5 -0
- package/dist/{dist-I8MQW60_.js → dist-CseYuPtL.js} +2 -2
- package/dist/dist-D1nf4IQl.js +5 -0
- package/dist/{dist-CsqiXw7J.js → dist-D4gcY469.js} +2 -2
- package/dist/{dist-DUxS2paD.js → dist-D5NMgbbv.js} +2 -2
- package/dist/{dist-UYm1IE5s.js → dist-DERtJN02.js} +2 -2
- package/dist/{dist-CFToYDWO.js → dist-DEj2X26M.js} +2 -2
- package/dist/{dist-BuapEdlD.js → dist-DOoqn-VL.js} +70 -67
- package/dist/{dist-BLThQiU4.js → dist-DUretbKK.js} +2 -2
- package/dist/{dist-DEFZ7dnD.js → dist-D_-CGmlh.js} +2 -2
- package/dist/dist-Df3AcKpt.js +6 -0
- package/dist/dist-DgaFHt_I.js +5 -0
- package/dist/dist-Dk10C3ui.js +5 -0
- package/dist/{dist-D0f6Yrrb.js → dist-DodLQWPg.js} +1 -1
- package/dist/{dist-B8Y11RWn.js → dist-DpeHj-vP.js} +2 -2
- package/dist/dist-DtyPVMHR.js +5 -0
- package/dist/{dist-Cb3cLT39.js → dist-HoZO6brh.js} +2 -2
- package/dist/{dist-Cqpjy6bK.js → dist-RNGn_-uD.js} +1 -1
- package/dist/{dist-BBcqvpvP.js → dist-Ux6dL_VB.js} +1 -1
- package/dist/{dist-CB6qhQ8K.js → dist-gc9KgJuA.js} +1 -1
- package/dist/{dist-ovDpXuSB.js → dist-i-ud9aCA.js} +1 -1
- package/dist/dist-ko7WnHAO.js +5 -0
- package/dist/{dist-BTQbjEKU.js → dist-lNe4i1Nm.js} +1 -1
- package/dist/dist-of7gLRFK.js +8 -0
- package/dist/{erDiagram-Q2GNP2WA-Cq5Bz5lG.js → erDiagram-Q2GNP2WA-Dh5nhgY3.js} +10 -10
- package/dist/{error-banner-D0tXnwl4.js → error-banner-CJWv_j2x.js} +2 -2
- package/dist/{esm-BxMbHo0y.js → esm-DxAOF89q.js} +29 -27
- package/dist/{flowDiagram-NV44I4VS-6WPJVFl7.js → flowDiagram-NV44I4VS-ChR1Vbmj.js} +10 -10
- package/dist/{ganttDiagram-JELNMOA3-AfDhh9CI.js → ganttDiagram-JELNMOA3-sK0z-5KM.js} +3 -3
- package/dist/{gitGraphDiagram-V2S2FVAM-BRSwuj0Q.js → gitGraphDiagram-V2S2FVAM-9S1VqQrL.js} +3 -3
- package/dist/{glide-data-editor-ByPNTNVG.js → glide-data-editor-C2dhh3XY.js} +6 -6
- package/dist/{infoDiagram-HS3SLOUP-Cmxo6jKx.js → infoDiagram-HS3SLOUP-C5A8b-2O.js} +3 -3
- package/dist/{journeyDiagram-XKPGCS4Q-CKYr8cSR.js → journeyDiagram-XKPGCS4Q-D5BIjS4N.js} +3 -3
- package/dist/{kanban-definition-3W4ZIXB7-DVvAZzQD.js → kanban-definition-3W4ZIXB7-C1vZZabj.js} +7 -7
- package/dist/{label-CV0KYhtH.js → label-kL_UbziI.js} +4 -4
- package/dist/{loader-eJCvvApN.js → loader-C6xHQhFz.js} +1 -1
- package/dist/main.js +151 -154
- package/dist/{mermaid-COOB_abB.js → mermaid-CzRLRASw.js} +41 -41
- package/dist/{mindmap-definition-VGOIOE7T-1ExmnvYy.js → mindmap-definition-VGOIOE7T-Cn9_H_5f.js} +9 -9
- package/dist/{pieDiagram-ADFJNKIX-CJlIsdsU.js → pieDiagram-ADFJNKIX-iA0mvRW9.js} +4 -4
- package/dist/{purify.es-CyOIw8ru.js → purify.es-DGenX2XH.js} +67 -67
- package/dist/{quadrantDiagram-AYHSOK5B-BU78RiaH.js → quadrantDiagram-AYHSOK5B-CAcVWXc-.js} +2 -2
- package/dist/{requirementDiagram-UZGBJVZJ-DACHtrFr.js → requirementDiagram-UZGBJVZJ-1HxQ6I5Z.js} +9 -9
- package/dist/{sankeyDiagram-TZEHDZUN-Bzg7_UWs.js → sankeyDiagram-TZEHDZUN-BVJnR4_b.js} +2 -2
- package/dist/{sequenceDiagram-WL72ISMW-agybEe9J.js → sequenceDiagram-WL72ISMW-ByirOtHb.js} +4 -4
- package/dist/{slides-component-B0yK5GXP.js → slides-component-D9AVSv2B.js} +2 -2
- package/dist/{spec-Dq_reDGM.js → spec-CXpiliig.js} +4 -4
- package/dist/{stateDiagram-FKZM4ZOC-DehQAt8g.js → stateDiagram-FKZM4ZOC-DrYNXdQr.js} +10 -10
- package/dist/{stateDiagram-v2-4FDKWEC3-8VzeREl9.js → stateDiagram-v2-4FDKWEC3-C9CFKCSr.js} +10 -10
- package/dist/style.css +1 -1
- package/dist/{timeline-definition-IT6M3QCI-CdCfdaCF.js → timeline-definition-IT6M3QCI-D8B3p7ID.js} +2 -2
- package/dist/{tooltip-CL8m4f9y.js → tooltip-CRsmtPeF.js} +3 -3
- package/dist/{types-BwnzGcE4.js → types-ChPKdlru.js} +6 -6
- package/dist/{useAsyncData-B4hMFGnF.js → useAsyncData-CHYjZCox.js} +1 -1
- package/dist/{useDeepCompareMemoize-DuPhOXzr.js → useDeepCompareMemoize-C1YH9SDF.js} +4 -4
- package/dist/{useIframeCapabilities-CAt6D2EI.js → useIframeCapabilities-Cc4UBysp.js} +1 -1
- package/dist/{useTheme-BNYQnvu-.js → useTheme-B-ZI3PUl.js} +2 -2
- package/dist/{vega-component-DouPy8AI.js → vega-component-BX_oDKB3.js} +8 -8
- package/dist/{xychartDiagram-PRI3JC2R-rEm_SIsC.js → xychartDiagram-PRI3JC2R-KuxgQuK9.js} +5 -5
- package/package.json +1 -1
- package/src/components/datasources/components.tsx +3 -6
- package/src/components/datasources/datasources.tsx +8 -21
- package/src/components/editor/controls/keyboard-shortcuts.tsx +3 -1
- package/src/components/editor/file-tree/file-explorer.tsx +48 -62
- package/src/components/editor/file-tree/file-icons.tsx +132 -0
- package/src/components/editor/file-tree/file-viewer.tsx +1 -1
- package/src/components/editor/file-tree/tree-actions.tsx +107 -0
- package/src/components/editor/file-tree/types.ts +2 -96
- package/src/components/editor/header/filename-input.tsx +4 -1
- package/src/components/pages/home-page.tsx +5 -5
- package/src/components/storage/components.tsx +0 -38
- package/src/components/storage/storage-file-viewer.tsx +1 -1
- package/src/components/storage/storage-inspector.tsx +28 -45
- package/src/core/hotkeys/__tests__/hotkeys.test.ts +64 -1
- package/src/core/hotkeys/hotkeys.ts +18 -2
- package/src/plugins/impl/FileBrowserPlugin.tsx +4 -4
- package/dist/dist-BAeGo2rp.js +0 -5
- package/dist/dist-BqwCMSEa.js +0 -5
- package/dist/dist-Bum8FwTO.js +0 -6
- package/dist/dist-C0YiOwt_.js +0 -5
- package/dist/dist-C2uPv4iU.js +0 -5
- package/dist/dist-C5hOLsJN.js +0 -8
- package/dist/dist-C9NIAKMs.js +0 -8
- package/dist/dist-CCrzTtvk.js +0 -5
- package/dist/dist-CFS9i1rS.js +0 -8
- package/dist/dist-CyHZuhPH.js +0 -5
- package/dist/dist-CzcjWdIk.js +0 -6
- package/dist/dist-DaYyUSNC.js +0 -5
- package/dist/dist-DpDcJYNh.js +0 -8
- package/dist/dist-U_BfxcPn.js +0 -5
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
2
|
import { describe, expect, it } from "vitest";
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
type Hotkey,
|
|
5
|
+
type HotkeyAction,
|
|
6
|
+
HotkeyProvider,
|
|
7
|
+
normalizeKeyString,
|
|
8
|
+
OverridingHotkeyProvider,
|
|
9
|
+
} from "../hotkeys";
|
|
4
10
|
|
|
5
11
|
/**
|
|
6
12
|
* Just a helper.
|
|
@@ -72,3 +78,60 @@ describe("HotkeyProvider platform separation", () => {
|
|
|
72
78
|
expect(linux.getHotkey("cell.format").key).toBe("Ctrl-Shift-L");
|
|
73
79
|
});
|
|
74
80
|
});
|
|
81
|
+
|
|
82
|
+
describe("normalizeKeyString", () => {
|
|
83
|
+
it("should capitalize multi-character base key names", () => {
|
|
84
|
+
expect(normalizeKeyString("Shift-enter")).toBe("Shift-Enter");
|
|
85
|
+
expect(normalizeKeyString("Cmd-enter")).toBe("Cmd-Enter");
|
|
86
|
+
expect(normalizeKeyString("Ctrl-backspace")).toBe("Ctrl-Backspace");
|
|
87
|
+
expect(normalizeKeyString("Alt-tab")).toBe("Alt-Tab");
|
|
88
|
+
expect(normalizeKeyString("Cmd-Shift-arrowUp")).toBe("Cmd-Shift-ArrowUp");
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
it("should leave already-correct key names unchanged", () => {
|
|
92
|
+
expect(normalizeKeyString("Shift-Enter")).toBe("Shift-Enter");
|
|
93
|
+
expect(normalizeKeyString("Cmd-Enter")).toBe("Cmd-Enter");
|
|
94
|
+
expect(normalizeKeyString("Mod-Shift-Enter")).toBe("Mod-Shift-Enter");
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
it("should leave single-character keys unchanged", () => {
|
|
98
|
+
expect(normalizeKeyString("Cmd-a")).toBe("Cmd-a");
|
|
99
|
+
expect(normalizeKeyString("Ctrl-Shift-z")).toBe("Ctrl-Shift-z");
|
|
100
|
+
expect(normalizeKeyString("a")).toBe("a");
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
it("should handle keys without modifiers", () => {
|
|
104
|
+
expect(normalizeKeyString("enter")).toBe("Enter");
|
|
105
|
+
expect(normalizeKeyString("Escape")).toBe("Escape");
|
|
106
|
+
expect(normalizeKeyString("F12")).toBe("F12");
|
|
107
|
+
});
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
describe("OverridingHotkeyProvider", () => {
|
|
111
|
+
it("should normalize lowercase key overrides", () => {
|
|
112
|
+
const provider = new OverridingHotkeyProvider(
|
|
113
|
+
{
|
|
114
|
+
"cell.run": "Shift-enter",
|
|
115
|
+
"cell.runAndNewBelow": "Cmd-enter",
|
|
116
|
+
},
|
|
117
|
+
{ platform: "mac" },
|
|
118
|
+
);
|
|
119
|
+
|
|
120
|
+
expect(provider.getHotkey("cell.run").key).toBe("Shift-Enter");
|
|
121
|
+
expect(provider.getHotkey("cell.runAndNewBelow").key).toBe("Cmd-Enter");
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
it("should return defaults when no override is set", () => {
|
|
125
|
+
const provider = new OverridingHotkeyProvider({}, { platform: "mac" });
|
|
126
|
+
expect(provider.getHotkey("cell.run").key).toBe("Cmd-Enter");
|
|
127
|
+
expect(provider.getHotkey("cell.runAndNewBelow").key).toBe("Shift-Enter");
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
it("should pass through correctly-cased overrides unchanged", () => {
|
|
131
|
+
const provider = new OverridingHotkeyProvider(
|
|
132
|
+
{ "cell.run": "Shift-Enter" },
|
|
133
|
+
{ platform: "mac" },
|
|
134
|
+
);
|
|
135
|
+
expect(provider.getHotkey("cell.run").key).toBe("Shift-Enter");
|
|
136
|
+
});
|
|
137
|
+
});
|
|
@@ -535,10 +535,26 @@ export class OverridingHotkeyProvider extends HotkeyProvider {
|
|
|
535
535
|
|
|
536
536
|
override getHotkey(action: HotkeyAction): ResolvedHotkey {
|
|
537
537
|
const base = super.getHotkey(action);
|
|
538
|
-
const
|
|
538
|
+
const override = this.overrides[action];
|
|
539
539
|
return {
|
|
540
540
|
name: base.name,
|
|
541
|
-
key,
|
|
541
|
+
key: override ? normalizeKeyString(override) : base.key,
|
|
542
542
|
};
|
|
543
543
|
}
|
|
544
544
|
}
|
|
545
|
+
|
|
546
|
+
const MODIFIER_RE = /^(cmd|ctrl|alt|shift|meta|mod)$/i;
|
|
547
|
+
|
|
548
|
+
/**
|
|
549
|
+
* Capitalize multi-character base key names so they match the
|
|
550
|
+
* casing that KeyboardEvent.key (and therefore CodeMirror) uses.
|
|
551
|
+
* e.g. "Shift-enter" → "Shift-Enter", "Cmd-backspace" → "Cmd-Backspace"
|
|
552
|
+
*/
|
|
553
|
+
export function normalizeKeyString(key: string): string {
|
|
554
|
+
const parts = key.split("-");
|
|
555
|
+
const last = parts[parts.length - 1];
|
|
556
|
+
if (last.length > 1 && !MODIFIER_RE.test(last)) {
|
|
557
|
+
parts[parts.length - 1] = last.charAt(0).toUpperCase() + last.slice(1);
|
|
558
|
+
}
|
|
559
|
+
return parts.join("-");
|
|
560
|
+
}
|
|
@@ -4,10 +4,10 @@ import { CornerLeftUp } from "lucide-react";
|
|
|
4
4
|
import { type JSX, useEffect, useState } from "react";
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
import {
|
|
7
|
-
FILE_TYPE_ICONS,
|
|
8
|
-
type FileType,
|
|
9
|
-
guessFileType,
|
|
10
|
-
} from "@/components/editor/file-tree/
|
|
7
|
+
FILE_ICON as FILE_TYPE_ICONS,
|
|
8
|
+
type FileIconType as FileType,
|
|
9
|
+
guessFileIconType as guessFileType,
|
|
10
|
+
} from "@/components/editor/file-tree/file-icons";
|
|
11
11
|
import { Spinner } from "@/components/icons/spinner";
|
|
12
12
|
import { Button } from "@/components/ui/button";
|
|
13
13
|
import { Checkbox } from "@/components/ui/checkbox";
|
package/dist/dist-BAeGo2rp.js
DELETED
package/dist/dist-BqwCMSEa.js
DELETED
package/dist/dist-Bum8FwTO.js
DELETED
package/dist/dist-C0YiOwt_.js
DELETED
package/dist/dist-C2uPv4iU.js
DELETED
package/dist/dist-C5hOLsJN.js
DELETED
package/dist/dist-C9NIAKMs.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import "./dist-BuapEdlD.js";
|
|
2
|
-
import "./dist-Ch_JuCvc.js";
|
|
3
|
-
import "./dist-BBcqvpvP.js";
|
|
4
|
-
import "./dist-CsqiXw7J.js";
|
|
5
|
-
import { i as jinjaLanguage, n as jinja, r as jinjaCompletionSource, t as closePercentBrace } from "./dist-I8MQW60_.js";
|
|
6
|
-
export {
|
|
7
|
-
jinja
|
|
8
|
-
};
|
package/dist/dist-CCrzTtvk.js
DELETED
package/dist/dist-CFS9i1rS.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import "./dist-BuapEdlD.js";
|
|
2
|
-
import "./dist-Ch_JuCvc.js";
|
|
3
|
-
import "./dist-BBcqvpvP.js";
|
|
4
|
-
import "./dist-CsqiXw7J.js";
|
|
5
|
-
import { i as liquidLanguage, n as liquid, r as liquidCompletionSource, t as closePercentBrace } from "./dist-BLThQiU4.js";
|
|
6
|
-
export {
|
|
7
|
-
liquid
|
|
8
|
-
};
|
package/dist/dist-CyHZuhPH.js
DELETED
package/dist/dist-CzcjWdIk.js
DELETED
package/dist/dist-DaYyUSNC.js
DELETED
package/dist/dist-DpDcJYNh.js
DELETED