@marimo-team/islands 0.19.8-dev13 → 0.19.8-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/main.js
CHANGED
|
@@ -73178,7 +73178,7 @@ Image URL: ${r.imageUrl}`)), contextToXml({
|
|
|
73178
73178
|
return Logger.warn("Failed to get version from mount config"), null;
|
|
73179
73179
|
}
|
|
73180
73180
|
}
|
|
73181
|
-
const marimoVersionAtom = atom(getVersionFromMountConfig() || "0.19.8-
|
|
73181
|
+
const marimoVersionAtom = atom(getVersionFromMountConfig() || "0.19.8-dev15"), showCodeInRunModeAtom = atom(true);
|
|
73182
73182
|
atom(null);
|
|
73183
73183
|
var import_compiler_runtime$88 = require_compiler_runtime();
|
|
73184
73184
|
function useKeydownOnElement(e, r) {
|
|
@@ -101933,6 +101933,10 @@ ${c}
|
|
|
101933
101933
|
function _temp4$1(e) {
|
|
101934
101934
|
return processOutput(e);
|
|
101935
101935
|
}
|
|
101936
|
+
const kernelStateAtom = atom({
|
|
101937
|
+
isInstantiated: false,
|
|
101938
|
+
error: null
|
|
101939
|
+
});
|
|
101936
101940
|
var VIRTUAL_FILE_REGEX = /\/@file\/([^\s"&'/]+)\.([\dA-Za-z]+)/g, VirtualFileTracker = class e {
|
|
101937
101941
|
constructor() {
|
|
101938
101942
|
__publicField(this, "virtualFiles", /* @__PURE__ */ new Map());
|
|
@@ -102026,32 +102030,32 @@ ${c}
|
|
|
102026
102030
|
}), r[12] = y, r[13] = z, r[14] = G) : G = r[14], G;
|
|
102027
102031
|
};
|
|
102028
102032
|
var import_compiler_runtime$1 = require_compiler_runtime(), VerticalLayoutRenderer = (e) => {
|
|
102029
|
-
let r = (0, import_compiler_runtime$1.c)(
|
|
102030
|
-
r[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
102031
|
-
let
|
|
102032
|
-
r[1] !== v || r[2] !==
|
|
102033
|
-
if (!
|
|
102034
|
-
let e2 =
|
|
102033
|
+
let r = (0, import_compiler_runtime$1.c)(34), { cells: c, appConfig: d, mode: f } = e, { invisible: _ } = useDelayVisibility(c.length, f), v = useAtomValue(kioskModeAtom), y = useAtomValue(kernelStateAtom), [S] = useResolvedMarimoConfig(), w = useAtomValue(showCodeInRunModeAtom), E;
|
|
102034
|
+
r[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (E = new URLSearchParams(window.location.search), r[0] = E) : E = r[0];
|
|
102035
|
+
let O = E, M;
|
|
102036
|
+
r[1] !== v || r[2] !== w ? (M = () => {
|
|
102037
|
+
if (!w) return false;
|
|
102038
|
+
let e2 = O.get(KnownQueryParams.showCode);
|
|
102035
102039
|
return e2 === null ? isStaticNotebook() || isWasm() || v : e2 === "true";
|
|
102036
|
-
}, r[1] = v, r[2] =
|
|
102037
|
-
let [
|
|
102038
|
-
r[4] !== c || r[5] !== v || r[6] !== f ? (
|
|
102040
|
+
}, r[1] = v, r[2] = w, r[3] = M) : M = r[3];
|
|
102041
|
+
let [I, z] = (0, import_react.useState)(M), G;
|
|
102042
|
+
r[4] !== c || r[5] !== v || r[6] !== f ? (G = (() => {
|
|
102039
102043
|
let e2 = c.some(_temp$1);
|
|
102040
102044
|
if (v) return true;
|
|
102041
|
-
let r2 =
|
|
102045
|
+
let r2 = O.get(KnownQueryParams.includeCode);
|
|
102042
102046
|
return f === "read" && r2 !== "false" && e2;
|
|
102043
|
-
})(), r[4] = c, r[5] = v, r[6] = f, r[7] =
|
|
102044
|
-
let
|
|
102045
|
-
r[8] !==
|
|
102047
|
+
})(), r[4] = c, r[5] = v, r[6] = f, r[7] = G) : G = r[7];
|
|
102048
|
+
let q = G, IY;
|
|
102049
|
+
r[8] !== q || r[9] !== v || r[10] !== f || r[11] !== I || r[12] !== S ? (IY = (e2) => (0, import_jsx_runtime.jsx)(VerticalCell, {
|
|
102046
102050
|
cellId: e2.id,
|
|
102047
102051
|
output: e2.output,
|
|
102048
102052
|
consoleOutputs: e2.consoleOutputs,
|
|
102049
102053
|
status: e2.status,
|
|
102050
102054
|
code: e2.code,
|
|
102051
102055
|
config: e2.config,
|
|
102052
|
-
cellOutputArea:
|
|
102056
|
+
cellOutputArea: S.display.cell_output,
|
|
102053
102057
|
stopped: e2.stopped,
|
|
102054
|
-
showCode:
|
|
102058
|
+
showCode: I && q,
|
|
102055
102059
|
errored: e2.errored,
|
|
102056
102060
|
mode: f,
|
|
102057
102061
|
runStartTimestamp: e2.runStartTimestamp,
|
|
@@ -102059,18 +102063,18 @@ ${c}
|
|
|
102059
102063
|
staleInputs: e2.staleInputs,
|
|
102060
102064
|
name: e2.name,
|
|
102061
102065
|
kiosk: v
|
|
102062
|
-
}, e2.id), r[8] =
|
|
102063
|
-
let
|
|
102064
|
-
r[14] !== d.width || r[15] !== c || r[16] !== _ || r[17] !==
|
|
102066
|
+
}, e2.id), r[8] = q, r[9] = v, r[10] = f, r[11] = I, r[12] = S, r[13] = IY) : IY = r[13];
|
|
102067
|
+
let LY = IY, RY;
|
|
102068
|
+
r[14] !== d.width || r[15] !== c || r[16] !== _ || r[17] !== y || r[18] !== LY ? (RY = () => d.width === "columns" ? (0, import_jsx_runtime.jsx)("div", {
|
|
102065
102069
|
className: "flex flex-row gap-8 w-full",
|
|
102066
102070
|
children: groupCellsByColumn(c).map((e2) => {
|
|
102067
102071
|
let [r2, c2] = e2;
|
|
102068
102072
|
return (0, import_jsx_runtime.jsx)("div", {
|
|
102069
102073
|
className: "flex-1 flex flex-col gap-2 w-(--content-width)",
|
|
102070
|
-
children: c2.map(
|
|
102074
|
+
children: c2.map(LY)
|
|
102071
102075
|
}, r2);
|
|
102072
102076
|
})
|
|
102073
|
-
}) : c.length === 0 && !_ ? (0, import_jsx_runtime.jsx)("div", {
|
|
102077
|
+
}) : c.length === 0 && !_ ? y.isInstantiated ? (0, import_jsx_runtime.jsx)("div", {
|
|
102074
102078
|
className: "flex-1 flex flex-col items-center justify-center py-8",
|
|
102075
102079
|
children: (0, import_jsx_runtime.jsxs)(Alert, {
|
|
102076
102080
|
variant: "info",
|
|
@@ -102083,35 +102087,40 @@ ${c}
|
|
|
102083
102087
|
})
|
|
102084
102088
|
]
|
|
102085
102089
|
})
|
|
102090
|
+
}) : (0, import_jsx_runtime.jsx)("div", {
|
|
102091
|
+
className: "flex-1 flex flex-col items-center justify-center py-8",
|
|
102092
|
+
children: (0, import_jsx_runtime.jsx)(LoaderCircle, {
|
|
102093
|
+
className: "w-8 h-8 animate-spin text-muted-foreground"
|
|
102094
|
+
})
|
|
102086
102095
|
}) : (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {
|
|
102087
|
-
children: c.map(
|
|
102088
|
-
}), r[14] = d.width, r[15] = c, r[16] = _, r[17] =
|
|
102089
|
-
let
|
|
102090
|
-
r[
|
|
102096
|
+
children: c.map(LY)
|
|
102097
|
+
}), r[14] = d.width, r[15] = c, r[16] = _, r[17] = y, r[18] = LY, r[19] = RY) : RY = r[19];
|
|
102098
|
+
let zY = RY, BY;
|
|
102099
|
+
r[20] !== q || r[21] !== zY || r[22] !== I ? (BY = I && q ? (0, import_jsx_runtime.jsxs)("div", {
|
|
102091
102100
|
className: "flex flex-col gap-5",
|
|
102092
102101
|
children: [
|
|
102093
102102
|
" ",
|
|
102094
|
-
|
|
102103
|
+
zY()
|
|
102095
102104
|
]
|
|
102096
|
-
}) :
|
|
102097
|
-
let BY;
|
|
102098
|
-
r[23] !== G || r[24] !== f || r[25] !== M ? (BY = f === "read" && (0, import_jsx_runtime.jsx)(ActionButtons, {
|
|
102099
|
-
canShowCode: G,
|
|
102100
|
-
showCode: M,
|
|
102101
|
-
onToggleShowCode: () => I(_temp2$1)
|
|
102102
|
-
}), r[23] = G, r[24] = f, r[25] = M, r[26] = BY) : BY = r[26];
|
|
102105
|
+
}) : zY(), r[20] = q, r[21] = zY, r[22] = I, r[23] = BY) : BY = r[23];
|
|
102103
102106
|
let VY;
|
|
102104
|
-
r[
|
|
102107
|
+
r[24] !== q || r[25] !== f || r[26] !== I ? (VY = f === "read" && (0, import_jsx_runtime.jsx)(ActionButtons, {
|
|
102108
|
+
canShowCode: q,
|
|
102109
|
+
showCode: I,
|
|
102110
|
+
onToggleShowCode: () => z(_temp2$1)
|
|
102111
|
+
}), r[24] = q, r[25] = f, r[26] = I, r[27] = VY) : VY = r[27];
|
|
102105
102112
|
let HY;
|
|
102106
|
-
|
|
102113
|
+
r[28] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (HY = (0, import_jsx_runtime.jsx)(FloatingOutline, {}), r[28] = HY) : HY = r[28];
|
|
102114
|
+
let UY;
|
|
102115
|
+
return r[29] !== d || r[30] !== _ || r[31] !== BY || r[32] !== VY ? (UY = (0, import_jsx_runtime.jsxs)(VerticalLayoutWrapper, {
|
|
102107
102116
|
invisible: _,
|
|
102108
102117
|
appConfig: d,
|
|
102109
102118
|
children: [
|
|
102110
|
-
zY,
|
|
102111
102119
|
BY,
|
|
102112
|
-
VY
|
|
102120
|
+
VY,
|
|
102121
|
+
HY
|
|
102113
102122
|
]
|
|
102114
|
-
}), r[
|
|
102123
|
+
}), r[29] = d, r[30] = _, r[31] = BY, r[32] = VY, r[33] = UY) : UY = r[33], UY;
|
|
102115
102124
|
}, ActionButtons = (e) => {
|
|
102116
102125
|
let r = (0, import_compiler_runtime$1.c)(26), { canShowCode: c, showCode: d, onToggleShowCode: f } = e, { readCode: _ } = useRequestClient(), v = _temp3, y = _temp4, S;
|
|
102117
102126
|
r[0] === _ ? S = r[1] : (S = async () => {
|
package/package.json
CHANGED
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
CodeIcon,
|
|
8
8
|
FolderDownIcon,
|
|
9
9
|
ImageIcon,
|
|
10
|
+
Loader2Icon,
|
|
10
11
|
MoreHorizontalIcon,
|
|
11
12
|
} from "lucide-react";
|
|
12
13
|
import type React from "react";
|
|
@@ -32,6 +33,7 @@ import { MarkdownLanguageAdapter } from "@/core/codemirror/language/languages/ma
|
|
|
32
33
|
import { useResolvedMarimoConfig } from "@/core/config/config";
|
|
33
34
|
import { CSSClasses, KnownQueryParams } from "@/core/constants";
|
|
34
35
|
import type { OutputMessage } from "@/core/kernel/messages";
|
|
36
|
+
import { kernelStateAtom } from "@/core/kernel/state";
|
|
35
37
|
import { showCodeInRunModeAtom } from "@/core/meta/state";
|
|
36
38
|
import { isErrorMime } from "@/core/mime";
|
|
37
39
|
import { type AppMode, kioskModeAtom } from "@/core/mode";
|
|
@@ -63,6 +65,7 @@ const VerticalLayoutRenderer: React.FC<VerticalLayoutProps> = ({
|
|
|
63
65
|
}) => {
|
|
64
66
|
const { invisible } = useDelayVisibility(cells.length, mode);
|
|
65
67
|
const kioskMode = useAtomValue(kioskModeAtom);
|
|
68
|
+
const kernelState = useAtomValue(kernelStateAtom);
|
|
66
69
|
const [userConfig] = useResolvedMarimoConfig();
|
|
67
70
|
const showCodeInRunModePreference = useAtomValue(showCodeInRunModeAtom);
|
|
68
71
|
|
|
@@ -140,6 +143,15 @@ const VerticalLayoutRenderer: React.FC<VerticalLayoutProps> = ({
|
|
|
140
143
|
}
|
|
141
144
|
|
|
142
145
|
if (cells.length === 0 && !invisible) {
|
|
146
|
+
// If kernel is not yet instantiated, show loading state
|
|
147
|
+
if (!kernelState.isInstantiated) {
|
|
148
|
+
return (
|
|
149
|
+
<div className="flex-1 flex flex-col items-center justify-center py-8">
|
|
150
|
+
<Loader2Icon className="w-8 h-8 animate-spin text-muted-foreground" />
|
|
151
|
+
</div>
|
|
152
|
+
);
|
|
153
|
+
}
|
|
154
|
+
// Kernel is ready but no cells - truly empty notebook
|
|
143
155
|
return (
|
|
144
156
|
<div className="flex-1 flex flex-col items-center justify-center py-8">
|
|
145
157
|
<Alert variant="info">
|