@marimo-team/islands 0.23.11-dev29 → 0.23.11-dev30
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/{ConnectedDataExplorerComponent-BnPKA-xR.js → ConnectedDataExplorerComponent-WqG-xX4l.js} +13 -13
- package/dist/{ErrorBoundary-DpbaKVv7.js → ErrorBoundary-BNx_OSVo.js} +2 -2
- package/dist/{any-language-editor-CAgFD4Kd.js → any-language-editor-rPSlOll9.js} +5 -5
- package/dist/{button-C5K9fIPF.js → button-vQhauTmO.js} +20 -0
- package/dist/{capabilities-BceAxrAW.js → capabilities-BEHzIS99.js} +1 -1
- package/dist/{chat-ui-m1SnDPdw.js → chat-ui-k2kqhCv5.js} +16 -16
- package/dist/{check-BCaJeT-J.js → check-nrzHDi45.js} +1 -1
- package/dist/{code-visibility-BtAh8-ga.js → code-visibility-CnZ5SJV5.js} +21 -21
- package/dist/{copy-UqRYxiOg.js → copy-UhDed7D4.js} +2 -2
- package/dist/{dist-Dk6PV_d3.js → dist-DYGLrbYQ.js} +2 -2
- package/dist/{error-banner-CJXYJ6Sb.js → error-banner-BHAkVFc2.js} +2 -2
- package/dist/{esm-BaH2eg5-.js → esm-Bqu9AE2K.js} +1 -1
- package/dist/{extends-D_hDsj6R.js → extends-9Yl5BEcg.js} +4 -4
- package/dist/{formats-BOYEeoL_.js → formats-BV4bOfMI.js} +3 -3
- package/dist/{glide-data-editor-A_l7_PQZ.js → glide-data-editor-BDTq6YUb.js} +9 -9
- package/dist/{html-to-image-BJbLjZyG.js → html-to-image-C86pQALH.js} +15 -15
- package/dist/{input-Cn-SZdXY.js → input-AKkGXdyV.js} +6 -6
- package/dist/{label-CC4ytI1X.js → label-E3ZJXHu8.js} +2 -2
- package/dist/{loader-BWLPpjKK.js → loader-YPuQvn1Y.js} +1 -1
- package/dist/main.js +32 -32
- package/dist/{mermaid-Br973nIL.js → mermaid-QFAR9YgY.js} +5 -5
- package/dist/{process-output-Dw_ngzH2.js → process-output-nNw4OpSj.js} +3 -3
- package/dist/{reveal-component-CiJIhe23.js → reveal-component-O3jTcQna.js} +10 -10
- package/dist/{spec-f8-xgaui.js → spec-B45_YCNI.js} +4 -4
- package/dist/{strings-J57tzLr3.js → strings-Cq2s9_EQ.js} +4 -4
- package/dist/{swiper-component-B2t5sN1q.js → swiper-component-BNa_4kh2.js} +2 -2
- package/dist/{toDate-B4-pUFYh.js → toDate-Do1xRzAo.js} +3 -3
- package/dist/{tooltip-DpcyNkQ2.js → tooltip-Bz3OAwrU.js} +3 -3
- package/dist/{types-ChtMFmZ2.js → types-D8gEGs4R.js} +1 -1
- package/dist/{useAsyncData-B3PfqrwD.js → useAsyncData-CL3o2p4i.js} +1 -1
- package/dist/{useDateFormatter-QB-3MpYr.js → useDateFormatter-BC6iSz9g.js} +2 -2
- package/dist/{useDeepCompareMemoize-YInAvJP3.js → useDeepCompareMemoize-BPx2MuOK.js} +1 -1
- package/dist/{useIframeCapabilities-C4JTXTIh.js → useIframeCapabilities-C6Ta3EyP.js} +1 -1
- package/dist/{useLifecycle-B3NOEiY5.js → useLifecycle-C3Ec71q0.js} +3 -3
- package/dist/{useTheme-BPeFKs1Q.js → useTheme-ZhT6uIu3.js} +2 -2
- package/dist/{vega-component-CMicMpWX.js → vega-component-C3AWYGAL.js} +10 -10
- package/dist/{zod-aLSua2NL.js → zod-DXqkaI_w.js} +1 -1
- package/package.json +1 -1
- package/src/components/editor/actions/useNotebookActions.tsx +27 -4
- package/src/components/editor/actions/useSetCodeVisibility.ts +57 -0
- package/src/core/edit-app.tsx +14 -0
- package/src/core/hotkeys/hotkeys.ts +20 -0
- package/src/components/editor/actions/useHideAllMarkdownCode.ts +0 -53
|
@@ -370,6 +370,26 @@ const DEFAULT_HOT_KEY = {
|
|
|
370
370
|
group: "Other",
|
|
371
371
|
key: "Mod-j",
|
|
372
372
|
},
|
|
373
|
+
"global.showAllCode": {
|
|
374
|
+
name: "Show all code",
|
|
375
|
+
group: "Editing",
|
|
376
|
+
key: NOT_SET,
|
|
377
|
+
},
|
|
378
|
+
"global.hideAllCode": {
|
|
379
|
+
name: "Hide all code",
|
|
380
|
+
group: "Editing",
|
|
381
|
+
key: NOT_SET,
|
|
382
|
+
},
|
|
383
|
+
"global.showAllMarkdownCode": {
|
|
384
|
+
name: "Show all markdown code",
|
|
385
|
+
group: "Editing",
|
|
386
|
+
key: NOT_SET,
|
|
387
|
+
},
|
|
388
|
+
"global.hideAllMarkdownCode": {
|
|
389
|
+
name: "Hide all markdown code",
|
|
390
|
+
group: "Editing",
|
|
391
|
+
key: NOT_SET,
|
|
392
|
+
},
|
|
373
393
|
"global.collapseAllSections": {
|
|
374
394
|
name: "Collapse all sections",
|
|
375
395
|
group: "Editing",
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
|
-
|
|
3
|
-
import { useCallback } from "react"; /* Copyright 2026 Marimo. All rights reserved. */
|
|
4
|
-
import { getNotebook, useCellActions } from "@/core/cells/cells";
|
|
5
|
-
import type { CellId } from "@/core/cells/ids";
|
|
6
|
-
import { MarkdownLanguageAdapter } from "@/core/codemirror/language/languages/markdown";
|
|
7
|
-
import { useRequestClient } from "@/core/network/requests";
|
|
8
|
-
import type { CellConfig } from "@/core/network/types";
|
|
9
|
-
import { Objects } from "@/utils/objects";
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Hook to hide all markdown code cells
|
|
13
|
-
*/
|
|
14
|
-
export const useHideAllMarkdownCode = () => {
|
|
15
|
-
const { updateCellConfig } = useCellActions();
|
|
16
|
-
const { saveCellConfig } = useRequestClient();
|
|
17
|
-
|
|
18
|
-
return useCallback(async () => {
|
|
19
|
-
const markdownAdapter = new MarkdownLanguageAdapter();
|
|
20
|
-
const notebook = getNotebook();
|
|
21
|
-
const cellIds = notebook.cellIds.inOrderIds;
|
|
22
|
-
|
|
23
|
-
const newConfigs: Record<CellId, Partial<CellConfig>> = {};
|
|
24
|
-
|
|
25
|
-
// Find all markdown cells that aren't already hidden
|
|
26
|
-
for (const cellId of cellIds) {
|
|
27
|
-
if (notebook.cellData[cellId] === undefined) {
|
|
28
|
-
continue;
|
|
29
|
-
}
|
|
30
|
-
const { code, config } = notebook.cellData[cellId];
|
|
31
|
-
if (config.hide_code) {
|
|
32
|
-
continue;
|
|
33
|
-
}
|
|
34
|
-
if (markdownAdapter.isSupported(code)) {
|
|
35
|
-
newConfigs[cellId] = { hide_code: true };
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
const entries = Objects.entries(newConfigs);
|
|
40
|
-
|
|
41
|
-
if (entries.length === 0) {
|
|
42
|
-
return;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
// Save to backend
|
|
46
|
-
await saveCellConfig({ configs: newConfigs });
|
|
47
|
-
|
|
48
|
-
// Update on frontend
|
|
49
|
-
for (const [cellId, config] of entries) {
|
|
50
|
-
updateCellConfig({ cellId, config });
|
|
51
|
-
}
|
|
52
|
-
}, [updateCellConfig]);
|
|
53
|
-
};
|