@marimo-team/islands 0.15.1-dev35 → 0.15.1-dev37
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-RxCCVECc.js → ConnectedDataExplorerComponent-sZjAxlFR.js} +2 -2
- package/dist/{ImageComparisonComponent-CbqPmmhU.js → ImageComparisonComponent-zj3l8Rkn.js} +1 -1
- package/dist/{_baseUniq-CgfGPvnl.js → _baseUniq-Bwhom4Yj.js} +1 -1
- package/dist/{any-language-editor-BgMY86YB.js → any-language-editor-C505APdP.js} +1 -1
- package/dist/{architectureDiagram-KFL7JDKH-Dn_BdxA7.js → architectureDiagram-KFL7JDKH-B4sOJakH.js} +4 -4
- package/dist/{blockDiagram-ZYB65J3Q-7jNB_h6t.js → blockDiagram-ZYB65J3Q-CGKmsTjj.js} +5 -5
- package/dist/{c4Diagram-AAMF2YG6-B7A1PjhU.js → c4Diagram-AAMF2YG6-DjKNOD7H.js} +2 -2
- package/dist/{channel-DVg8oUnS.js → channel-jybTmR_w.js} +1 -1
- package/dist/{chunk-ANTBXLJU-7sCEM24v.js → chunk-ANTBXLJU-D2EW55i9.js} +1 -1
- package/dist/{chunk-FHKO5MBM-DOhNpM4T.js → chunk-FHKO5MBM-Co50zOMz.js} +1 -1
- package/dist/{chunk-GLLZNHP4-BUhlvD-d.js → chunk-GLLZNHP4-B_taDc-e.js} +1 -1
- package/dist/{chunk-JBRWN2VN-BPO2taiA.js → chunk-JBRWN2VN-DXVMgMIR.js} +4 -4
- package/dist/{chunk-LXBSTHXV-lBg26u-b.js → chunk-LXBSTHXV-Bl1kpPyW.js} +3 -3
- package/dist/{chunk-NRVI72HA-BSSAPgpW.js → chunk-NRVI72HA-DsfzBSuC.js} +1 -1
- package/dist/{chunk-OMD6QJNC-V5t1G_0g.js → chunk-OMD6QJNC-DFwE1lqy.js} +1 -1
- package/dist/{chunk-WVR4S24B-Cnx4rDrU.js → chunk-WVR4S24B-DhJsxFqR.js} +1 -1
- package/dist/{classDiagram-v2-QTMF73CY-B5guQcG1.js → classDiagram-3BZAVTQC-CerkrRao.js} +2 -2
- package/dist/{classDiagram-3BZAVTQC-B5guQcG1.js → classDiagram-v2-QTMF73CY-CerkrRao.js} +2 -2
- package/dist/{clone-Cl9eDrzl.js → clone-B8sd-ea0.js} +1 -1
- package/dist/{dagre-2BBEFEWP-CfmFO3Qd.js → dagre-2BBEFEWP-Bnnx_gCi.js} +6 -6
- package/dist/{data-grid-overlay-editor-QG9_nVh7.js → data-grid-overlay-editor-HIb_Zyam.js} +2 -2
- package/dist/{diagram-4IRLE6MV-CuV-B0R8.js → diagram-4IRLE6MV-C8SlNSDm.js} +5 -5
- package/dist/{diagram-GUPCWM2R-Ca29dLUR.js → diagram-GUPCWM2R-DiC8Dp2v.js} +3 -3
- package/dist/{diagram-RP2FKANI-xBkgeIGa.js → diagram-RP2FKANI-6FkdCebf.js} +3 -3
- package/dist/{erDiagram-HZWUO2LU-CF0tfU3Q.js → erDiagram-HZWUO2LU-CGwpVyJ6.js} +4 -4
- package/dist/{flowDiagram-THRYKUMA-B4Sxk4oi.js → flowDiagram-THRYKUMA-CTtIeEF1.js} +5 -5
- package/dist/{ganttDiagram-WV7ZQ7D5-DdUd9279.js → ganttDiagram-WV7ZQ7D5-C4czDpsX.js} +4 -4
- package/dist/{gitGraphDiagram-OJR772UL-D3hxQkbw.js → gitGraphDiagram-OJR772UL-Ds-YHIay.js} +4 -4
- package/dist/{glide-data-editor-BXjpaoHZ.js → glide-data-editor-Doytu1RZ.js} +3 -3
- package/dist/{graph-DCDi_ysi.js → graph-DKegM7x4.js} +3 -3
- package/dist/{index-BMTxMgQB.js → index-B9i9c65j.js} +1 -1
- package/dist/{index-Dwgv989Z.js → index-BloEnizu.js} +1 -1
- package/dist/{index-CNNXf9lW.js → index-CuHR1hKA.js} +1 -1
- package/dist/{index-vNYAPeoC.js → index-D3Xg7lxM.js} +3 -3
- package/dist/{index-B7hDmiP4.js → index-lz3uoKbl.js} +1 -1
- package/dist/{infoDiagram-6WOFNB3A-BSbazQOL.js → infoDiagram-6WOFNB3A-KfiKRn0m.js} +2 -2
- package/dist/{journeyDiagram-FFXJYRFH-2cuhiGb0.js → journeyDiagram-FFXJYRFH-CbXbRFcR.js} +3 -3
- package/dist/{kanban-definition-KOZQBZVT-Cqn6j0kG.js → kanban-definition-KOZQBZVT-C8x6U1-i.js} +2 -2
- package/dist/{layout-3vlRm8WR.js → layout-Ux4YHZl9.js} +4 -4
- package/dist/{linear-dQhcTAFi.js → linear-DgEFYNPG.js} +1 -1
- package/dist/{main-D01Ip2nU.js → main-Ba_D9mBk.js} +18 -18
- package/dist/main.js +1 -1
- package/dist/{mermaid-B34jBB1t.js → mermaid-31wfGVj7.js} +29 -29
- package/dist/{min-ChovFCvo.js → min-B0eHy8w_.js} +2 -2
- package/dist/{mindmap-definition-LNHGMQRG-B_b6ouIO.js → mindmap-definition-LNHGMQRG-cxaFXUE3.js} +2 -2
- package/dist/{number-overlay-editor-C0lwpdBl.js → number-overlay-editor-5pzhKRNT.js} +2 -2
- package/dist/{pieDiagram-DBDJKBY4-CiJhL-Bp.js → pieDiagram-DBDJKBY4-DL4THmAM.js} +3 -3
- package/dist/{quadrantDiagram-YPSRARAO-DRGAvgCF.js → quadrantDiagram-YPSRARAO-wDlJOlhf.js} +2 -2
- package/dist/{react-plotly-D0HBdZgs.js → react-plotly-9tN6KiA0.js} +1 -1
- package/dist/{requirementDiagram-EGVEC5DT-ZKFrZ0Y2.js → requirementDiagram-EGVEC5DT-BT8qPtoc.js} +3 -3
- package/dist/{sankeyDiagram-HRAUVNP4-Dxcn5E_Y.js → sankeyDiagram-HRAUVNP4-CHnQQOIb.js} +1 -1
- package/dist/{sequenceDiagram-WFGC7UMF-gmrJ2qGC.js → sequenceDiagram-WFGC7UMF-zu_r3Jmh.js} +3 -3
- package/dist/{slides-component-DhTsoaXU.js → slides-component-BJTiClRo.js} +1 -1
- package/dist/{stateDiagram-UUKSUZ4H-1u4AtB0M.js → stateDiagram-UUKSUZ4H-CMygQUEj.js} +4 -4
- package/dist/{stateDiagram-v2-EYPG3UTE-B127JP0Q.js → stateDiagram-v2-EYPG3UTE-BKU-bKRe.js} +2 -2
- package/dist/style.css +1 -1
- package/dist/{time-xz50ixjw.js → time-DIgCwTPW.js} +2 -2
- package/dist/{timeline-definition-3HZDQTIS-DCfRQsBD.js → timeline-definition-3HZDQTIS-pUzFxFZ5.js} +1 -1
- package/dist/{treemap-75Q7IDZK-Czj_vjx6.js → treemap-75Q7IDZK-Ign8SYM9.js} +5 -5
- package/dist/{vega-component-DBZQFLUs.js → vega-component-DVvmJHrM.js} +2 -2
- package/dist/{xychartDiagram-FDP5SA34-B3r0R2eO.js → xychartDiagram-FDP5SA34-D7qqqxUJ.js} +2 -2
- package/package.json +1 -1
- package/src/components/editor/Cell.tsx +16 -17
- package/src/components/editor/navigation/navigation.ts +7 -7
- package/src/components/editor/navigation/state.ts +34 -2
- package/src/core/islands/islands.css +0 -9
- package/src/core/islands/main.ts +9 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { R as P, r as ln, o as W, q as j, C as A, u as D, v as fn } from "./timer-BYwnU4DF.js";
|
|
2
|
-
import { c as on, a as hn } from "./linear-
|
|
2
|
+
import { c as on, a as hn } from "./linear-DgEFYNPG.js";
|
|
3
3
|
import { i as bn } from "./init-DxzjmxYy.js";
|
|
4
|
-
import { a5 as gn, a6 as d, a7 as v, a8 as k, a9 as x, aa as F, ab as yn, ac as L, ad as S, ae as R, af as pn, ag as B, ah as K, ai as X, aj as Z, ak as $, al as E, am as mn, an as wn, ao as Mn, ap as dn, aq as vn, ar as kn, as as xn } from "./main-
|
|
4
|
+
import { a5 as gn, a6 as d, a7 as v, a8 as k, a9 as x, aa as F, ab as yn, ac as L, ad as S, ae as R, af as pn, ag as B, ah as K, ai as X, aj as Z, ak as $, al as E, am as mn, an as wn, ao as Mn, ap as dn, aq as vn, ar as kn, as as xn } from "./main-Ba_D9mBk.js";
|
|
5
5
|
function Wn(n, t) {
|
|
6
6
|
let i;
|
|
7
7
|
if (t === void 0)
|
package/dist/{timeline-definition-3HZDQTIS-DCfRQsBD.js → timeline-definition-3HZDQTIS-pUzFxFZ5.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as s, c as xt, l as E, d as j, V as kt, W as vt, X as _t, Y as bt, D as wt, $ as St, z as Et } from "./mermaid-
|
|
1
|
+
import { _ as s, c as xt, l as E, d as j, V as kt, W as vt, X as _t, Y as bt, D as wt, $ as St, z as Et } from "./mermaid-31wfGVj7.js";
|
|
2
2
|
import { d as nt } from "./arc-BXrety1g.js";
|
|
3
3
|
var Q = function() {
|
|
4
4
|
var n = /* @__PURE__ */ s(function(x, r, a, c) {
|
|
@@ -2,11 +2,11 @@ var __defProp = Object.defineProperty;
|
|
|
2
2
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
3
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
4
|
var _a2, _b, _c2, _d2, _e, _f2, _g, _h2, _i2, _j, _k, _l2, _m2, _n2, _o2, _p2, _q;
|
|
5
|
-
import { e6 as Kl, bZ as Vl, aw as Ma, b2 as Hl, F as _t, aZ as Wl, az as Q, bv as jl, bw as zl, y as ql, A as Ni, z as Da, ax as Qs, e7 as Fa, aV as Yl, bb as Ga, e8 as Ua, aX as Xl, bd as wi, ay as Jl, e9 as Zl, br as Ql, ea as eu, a_ as Ie, D as vt, aC as _i, be as tu, eb as H, ec as Re } from "./main-
|
|
6
|
-
import { g as ei, d as bt, k as nu, v as W, l as Ba, m as ru, n as su, a as Ka, c as x, i as qe, r as ae, f as ke, o as z } from "./_baseUniq-
|
|
7
|
-
import { m as k, f as Lt, h as I, e as ti, l as Ot, d as iu } from "./min-
|
|
8
|
-
import { ad as P } from "./mermaid-
|
|
9
|
-
import { c as te } from "./clone-
|
|
5
|
+
import { e6 as Kl, bZ as Vl, aw as Ma, b2 as Hl, F as _t, aZ as Wl, az as Q, bv as jl, bw as zl, y as ql, A as Ni, z as Da, ax as Qs, e7 as Fa, aV as Yl, bb as Ga, e8 as Ua, aX as Xl, bd as wi, ay as Jl, e9 as Zl, br as Ql, ea as eu, a_ as Ie, D as vt, aC as _i, be as tu, eb as H, ec as Re } from "./main-Ba_D9mBk.js";
|
|
6
|
+
import { g as ei, d as bt, k as nu, v as W, l as Ba, m as ru, n as su, a as Ka, c as x, i as qe, r as ae, f as ke, o as z } from "./_baseUniq-Bwhom4Yj.js";
|
|
7
|
+
import { m as k, f as Lt, h as I, e as ti, l as Ot, d as iu } from "./min-B0eHy8w_.js";
|
|
8
|
+
import { ad as P } from "./mermaid-31wfGVj7.js";
|
|
9
|
+
import { c as te } from "./clone-B8sd-ea0.js";
|
|
10
10
|
var au = Object.prototype, ou = au.hasOwnProperty, Ee = Kl(function(n, e) {
|
|
11
11
|
if (Vl(e) || Ma(e)) {
|
|
12
12
|
Hl(e, _t(e), n);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Q as I, S as H, c as K, T as z, U as R, V as G, j as d, E as W, W as $, G as k, X as j, Y as M, Z as U, L as x, _ as O, $ as B, a0 as Q, a1 as Y, a2 as q, a3 as X, a4 as J } from "./main-
|
|
2
|
-
import { M as m, V as ee } from "./index-
|
|
1
|
+
import { Q as I, S as H, c as K, T as z, U as R, V as G, j as d, E as W, W as $, G as k, X as j, Y as M, Z as U, L as x, _ as O, $ as B, a0 as Q, a1 as Y, a2 as q, a3 as X, a4 as J } from "./main-Ba_D9mBk.js";
|
|
2
|
+
import { M as m, V as ee } from "./index-D3Xg7lxM.js";
|
|
3
3
|
function te(e) {
|
|
4
4
|
return e.data && "url" in e.data && (e.data.url = I(e.data.url).href), e;
|
|
5
5
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i2, _j;
|
|
2
|
-
import { _ as a, s as ei, g as si, t as Lt, q as ni, a as ai, b as oi, l as Et, K as ri, e as hi, z as li, G as xt, F as It, H as ci, M as ui, i as gi, ac as xi } from "./mermaid-
|
|
2
|
+
import { _ as a, s as ei, g as si, t as Lt, q as ni, a as ai, b as oi, l as Et, K as ri, e as hi, z as li, G as xt, F as It, H as ci, M as ui, i as gi, ac as xi } from "./mermaid-31wfGVj7.js";
|
|
3
3
|
import { i as di } from "./init-DxzjmxYy.js";
|
|
4
4
|
import { o as fi } from "./ordinal-CYN5qNoq.js";
|
|
5
5
|
import { r as pi } from "./range-DdOGybNB.js";
|
|
6
|
-
import { l as Tt } from "./linear-
|
|
6
|
+
import { l as Tt } from "./linear-DgEFYNPG.js";
|
|
7
7
|
import { l as Dt } from "./timer-BYwnU4DF.js";
|
|
8
8
|
function ht() {
|
|
9
9
|
var t = fi().unknown(void 0), i = t.domain, e = t.range, s = 0, n = 1, d, g, m = false, S = 0, D = 0, v = 0.5;
|
package/package.json
CHANGED
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
import { closeCompletion, completionStatus } from "@codemirror/autocomplete";
|
|
3
3
|
import type { EditorView } from "@codemirror/view";
|
|
4
4
|
import clsx from "clsx";
|
|
5
|
-
import {
|
|
6
|
-
import { ScopeProvider } from "jotai-scope";
|
|
5
|
+
import { useAtomValue, useSetAtom } from "jotai";
|
|
7
6
|
import {
|
|
8
7
|
HelpCircleIcon,
|
|
9
8
|
MoreHorizontalIcon,
|
|
@@ -78,7 +77,10 @@ import { useRunCell } from "./cell/useRunCells";
|
|
|
78
77
|
import { HideCodeButton } from "./code/readonly-python-code";
|
|
79
78
|
import { cellDomProps } from "./common";
|
|
80
79
|
import { useCellNavigationProps } from "./navigation/navigation";
|
|
81
|
-
import {
|
|
80
|
+
import {
|
|
81
|
+
useTemporarilyShownCode,
|
|
82
|
+
useTemporarilyShownCodeActions,
|
|
83
|
+
} from "./navigation/state";
|
|
82
84
|
import { OutputArea } from "./Output";
|
|
83
85
|
import { ConsoleOutput } from "./output/ConsoleOutput";
|
|
84
86
|
import { CellDragHandle, SortableCell } from "./SortableCell";
|
|
@@ -157,9 +159,8 @@ function useCellHiddenLogic({
|
|
|
157
159
|
editorView: React.RefObject<EditorView | null>;
|
|
158
160
|
editorViewParentRef: React.RefObject<HTMLDivElement | null>;
|
|
159
161
|
}) {
|
|
160
|
-
const
|
|
161
|
-
|
|
162
|
-
);
|
|
162
|
+
const temporarilyVisible = useTemporarilyShownCode(cellId);
|
|
163
|
+
const temporarilyShownCodeActions = useTemporarilyShownCodeActions();
|
|
163
164
|
const isUntouched = useAtomValue(
|
|
164
165
|
useMemo(() => createUntouchedCellAtom(cellId), [cellId]),
|
|
165
166
|
);
|
|
@@ -179,7 +180,7 @@ function useCellHiddenLogic({
|
|
|
179
180
|
|
|
180
181
|
// Default to true
|
|
181
182
|
const focus = opts?.focus ?? true;
|
|
182
|
-
|
|
183
|
+
temporarilyShownCodeActions.add(cellId);
|
|
183
184
|
|
|
184
185
|
if (focus) {
|
|
185
186
|
editorView.current?.focus();
|
|
@@ -297,16 +298,14 @@ const CellComponent = (props: CellProps) => {
|
|
|
297
298
|
|
|
298
299
|
if (mode === "edit") {
|
|
299
300
|
return (
|
|
300
|
-
<
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
/>
|
|
309
|
-
</ScopeProvider>
|
|
301
|
+
<EditableCellComponent
|
|
302
|
+
{...props}
|
|
303
|
+
cellId={cellId}
|
|
304
|
+
editorView={editorView}
|
|
305
|
+
setEditorView={(ev) => {
|
|
306
|
+
editorView.current = ev;
|
|
307
|
+
}}
|
|
308
|
+
/>
|
|
310
309
|
);
|
|
311
310
|
}
|
|
312
311
|
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
useCellSelectionActions,
|
|
34
34
|
useIsCellSelected,
|
|
35
35
|
} from "./selection";
|
|
36
|
-
import {
|
|
36
|
+
import { useTemporarilyShownCodeActions } from "./state";
|
|
37
37
|
import { handleVimKeybinding } from "./vim-bindings";
|
|
38
38
|
|
|
39
39
|
interface HotkeyHandler {
|
|
@@ -85,7 +85,7 @@ function addSingleHandler(handler: HotkeyHandler["bulkHandle"]): HotkeyHandler {
|
|
|
85
85
|
function useCellFocusProps(cellId: CellId) {
|
|
86
86
|
const focusActions = useCellFocusActions();
|
|
87
87
|
const actions = useCellActions();
|
|
88
|
-
const
|
|
88
|
+
const temporarilyShownCodeActions = useTemporarilyShownCodeActions();
|
|
89
89
|
|
|
90
90
|
// This occurs at the cell level and descedants.
|
|
91
91
|
const { focusWithinProps } = useFocusWithin({
|
|
@@ -95,7 +95,7 @@ function useCellFocusProps(cellId: CellId) {
|
|
|
95
95
|
},
|
|
96
96
|
onBlurWithin: () => {
|
|
97
97
|
// On blur, hide the code if it was temporarily shown.
|
|
98
|
-
|
|
98
|
+
temporarilyShownCodeActions.remove(cellId);
|
|
99
99
|
actions.markTouched({ cellId });
|
|
100
100
|
focusActions.blurCell();
|
|
101
101
|
},
|
|
@@ -132,7 +132,7 @@ export function useCellNavigationProps(
|
|
|
132
132
|
const setAiCompletionCell = useSetAtom(aiCompletionCellAtom);
|
|
133
133
|
const actions = useCellActions();
|
|
134
134
|
const store = useStore();
|
|
135
|
-
const
|
|
135
|
+
const temporarilyShownCodeActions = useTemporarilyShownCodeActions();
|
|
136
136
|
const runCells = useRunCells();
|
|
137
137
|
const keymapPreset = useAtomValue(keymapPresetAtom);
|
|
138
138
|
const { copyCells, pasteAtCell } = useCellClipboard();
|
|
@@ -275,7 +275,7 @@ export function useCellNavigationProps(
|
|
|
275
275
|
},
|
|
276
276
|
// Enter will focus the cell editor.
|
|
277
277
|
Enter: () => {
|
|
278
|
-
|
|
278
|
+
temporarilyShownCodeActions.add(cellId);
|
|
279
279
|
focusCellEditor(store, cellId);
|
|
280
280
|
selectionActions.clear();
|
|
281
281
|
return true;
|
|
@@ -608,7 +608,7 @@ export function useCellEditorNavigationProps(
|
|
|
608
608
|
cellId: CellId,
|
|
609
609
|
editorView: React.RefObject<EditorView | null>,
|
|
610
610
|
) {
|
|
611
|
-
const
|
|
611
|
+
const temporarilyShownCodeActions = useTemporarilyShownCodeActions();
|
|
612
612
|
const keymapPreset = useAtomValue(keymapPresetAtom);
|
|
613
613
|
const hotkeys = useAtomValue(hotkeysAtom);
|
|
614
614
|
|
|
@@ -618,7 +618,7 @@ export function useCellEditorNavigationProps(
|
|
|
618
618
|
}, [hotkeys]);
|
|
619
619
|
|
|
620
620
|
const exitToCommandMode = () => {
|
|
621
|
-
|
|
621
|
+
temporarilyShownCodeActions.remove(cellId);
|
|
622
622
|
focusCell(cellId);
|
|
623
623
|
};
|
|
624
624
|
|
|
@@ -1,5 +1,37 @@
|
|
|
1
1
|
/* Copyright 2024 Marimo. All rights reserved. */
|
|
2
2
|
|
|
3
|
-
import { atom } from "jotai";
|
|
3
|
+
import { atom, useAtomValue } from "jotai";
|
|
4
|
+
import { useMemo } from "react";
|
|
5
|
+
import type { CellId } from "@/core/cells/ids";
|
|
6
|
+
import { createReducerAndAtoms } from "@/utils/createReducer";
|
|
4
7
|
|
|
5
|
-
|
|
8
|
+
type TemporarilyShownCodeState = Set<CellId>;
|
|
9
|
+
|
|
10
|
+
// This previously used jotai-scope, but unfortunately this bug creates unnecessary work:
|
|
11
|
+
// https://github.com/jotaijs/jotai-scope/issues/25
|
|
12
|
+
|
|
13
|
+
const {
|
|
14
|
+
valueAtom: temporarilyShownCodeAtom,
|
|
15
|
+
useActions: useTemporarilyShownCodeActions,
|
|
16
|
+
} = createReducerAndAtoms(() => new Set<CellId>(), {
|
|
17
|
+
add: (state: TemporarilyShownCodeState, cellId: CellId) => {
|
|
18
|
+
const newState = new Set(state);
|
|
19
|
+
newState.add(cellId);
|
|
20
|
+
return newState;
|
|
21
|
+
},
|
|
22
|
+
remove: (state: TemporarilyShownCodeState, cellId: CellId) => {
|
|
23
|
+
const newState = new Set(state);
|
|
24
|
+
newState.delete(cellId);
|
|
25
|
+
return newState;
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
const createTemporarilyShownCodeAtom = (cellId: CellId) =>
|
|
30
|
+
atom((get) => get(temporarilyShownCodeAtom).has(cellId));
|
|
31
|
+
|
|
32
|
+
export function useTemporarilyShownCode(cellId: CellId) {
|
|
33
|
+
const atom = useMemo(() => createTemporarilyShownCodeAtom(cellId), [cellId]);
|
|
34
|
+
return useAtomValue(atom);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export { temporarilyShownCodeAtom, useTemporarilyShownCodeActions };
|
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
@import url("../../css/common.css");
|
|
2
|
-
@import url("../../css/globals.css");
|
|
3
|
-
@import url("../../css/codehilite.css");
|
|
4
|
-
@import url("../../css/katex.min.css");
|
|
5
|
-
@import url("../../css/md.css");
|
|
6
|
-
@import url("../../css/admonition.css");
|
|
7
|
-
@import url("../../css/md-tooltip.css");
|
|
8
|
-
@import url("../../css/table.css");
|
|
9
|
-
|
|
10
1
|
@reference "../../css/globals.css";
|
|
11
2
|
|
|
12
3
|
.marimo {
|
package/src/core/islands/main.ts
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
/* Copyright 2024 Marimo. All rights reserved. */
|
|
2
2
|
import "./islands.css";
|
|
3
|
+
import "../../css/common.css";
|
|
4
|
+
import "../../css/globals.css";
|
|
5
|
+
import "../../css/codehilite.css";
|
|
6
|
+
import "../../css/katex.min.css";
|
|
7
|
+
import "../../css/md.css";
|
|
8
|
+
import "../../css/admonition.css";
|
|
9
|
+
import "../../css/md-tooltip.css";
|
|
10
|
+
import "../../css/table.css";
|
|
11
|
+
|
|
3
12
|
import "iconify-icon";
|
|
4
13
|
|
|
5
14
|
import { toast } from "@/components/ui/use-toast";
|