@marimo-team/islands 0.23.10-dev3 → 0.23.10-dev5
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/{chat-ui-C1tL1pML.js → chat-ui-1rLrACXD.js} +2 -2
- package/dist/{code-visibility-DfnO0DcH.js → code-visibility-Dek9JNl9.js} +2 -2
- package/dist/{html-to-image-CNa5ok96.js → html-to-image-CnBdHeLh.js} +3 -3
- package/dist/main.js +5 -5
- package/dist/{process-output-DKr4f1di.js → process-output-vFgqkyUT.js} +1 -1
- package/dist/{reveal-component-UdMnCK5U.js → reveal-component-C8AmnVfj.js} +2 -2
- package/package.json +1 -1
- package/src/components/editor/cell/cell-context-menu.tsx +15 -2
- package/src/core/cells/__tests__/__snapshots__/cells.test.ts.snap +0 -28
- package/src/core/cells/__tests__/cell.test.ts +29 -2
- package/src/core/cells/cell.ts +5 -1
- package/src/core/codemirror/go-to-definition/commands.ts +4 -3
|
@@ -6,13 +6,13 @@ import { _ as Logger, c as Objects, g as cn, l as useEventListener, t as Button
|
|
|
6
6
|
import { t as require_react } from "./react-DA-nE2FX.js";
|
|
7
7
|
import { t as require_compiler_runtime } from "./compiler-runtime-CEbnTgxf.js";
|
|
8
8
|
import { r as toast } from "./copy-BuQpJEzp.js";
|
|
9
|
-
import { An as LoaderCircle, C as AccordionContent, D as ChatBubbleIcon, Fn as ExternalLink, Ft as jotaiJsonStorage, G as cellErrorsAtom, Ht as allTablesAtom, It as variablesAtom, Kt as getRequestClient, Lt as PluralWord, Mn as Info, Nn as FileText, Ot as moveToEndOfEditor, P as base64ToDataURL, Rn as CircleX, S as Accordion, T as AccordionTrigger, Tn as Trash2, Tt as createVariableInfoElement, Ut as dataSourceConnectionsAtom, V as renderHTML, Wt as getTableType, Xt as singleFacet, Y as notebookAtom, _ as Boosts, b as AIContextProvider, c as Popover, d as PopoverTrigger, f as isOutputEmpty, gn as atomWithStorage, h as DatasourceContextProvider, jt as generateUUID, n as Spinner, on as CellOutputId, r as MarkdownRenderer, t as toPng, tn as ZodLocalStorage, u as PopoverContent, v as Sections, vn as Anchor2, vt as displayCellName, w as AccordionItem, wn as Wrench, x as AIContextRegistry, y as contextToXml } from "./html-to-image-
|
|
9
|
+
import { An as LoaderCircle, C as AccordionContent, D as ChatBubbleIcon, Fn as ExternalLink, Ft as jotaiJsonStorage, G as cellErrorsAtom, Ht as allTablesAtom, It as variablesAtom, Kt as getRequestClient, Lt as PluralWord, Mn as Info, Nn as FileText, Ot as moveToEndOfEditor, P as base64ToDataURL, Rn as CircleX, S as Accordion, T as AccordionTrigger, Tn as Trash2, Tt as createVariableInfoElement, Ut as dataSourceConnectionsAtom, V as renderHTML, Wt as getTableType, Xt as singleFacet, Y as notebookAtom, _ as Boosts, b as AIContextProvider, c as Popover, d as PopoverTrigger, f as isOutputEmpty, gn as atomWithStorage, h as DatasourceContextProvider, jt as generateUUID, n as Spinner, on as CellOutputId, r as MarkdownRenderer, t as toPng, tn as ZodLocalStorage, u as PopoverContent, v as Sections, vn as Anchor2, vt as displayCellName, w as AccordionItem, wn as Wrench, x as AIContextRegistry, y as contextToXml } from "./html-to-image-CnBdHeLh.js";
|
|
10
10
|
import "./chunk-5FQGJX7Z-BNjes6Yx.js";
|
|
11
11
|
import { u as createLucideIcon } from "./dist-C1BYNeCR.js";
|
|
12
12
|
import { F as X, L as ChevronDown, S as logNever, t as Strings } from "./strings-Bu3vlb6W.js";
|
|
13
13
|
import { a as NumberField, b as DropdownMenuTrigger, d as DropdownMenuContent, p as DropdownMenuItem, r as Input, u as DropdownMenu } from "./input-_2sjvfne.js";
|
|
14
14
|
import { p as isUrl, v as CircleQuestionMark } from "./toDate-x-WRDCH7.js";
|
|
15
|
-
import { a as MarimoIncomingMessageEvent, d as Square, f as File$1, n as blobToString, t as processOutput, u as deserializeBlob } from "./process-output-
|
|
15
|
+
import { a as MarimoIncomingMessageEvent, d as Square, f as File$1, n as blobToString, t as processOutput, u as deserializeBlob } from "./process-output-vFgqkyUT.js";
|
|
16
16
|
import "./react-dom-BTJzcVJ9.js";
|
|
17
17
|
import { t as require_jsx_runtime } from "./jsx-runtime-DebpN0FN.js";
|
|
18
18
|
import { A as looseObject, B as union, C as any, D as discriminatedUnion, E as custom, H as safeParseAsync, I as record, L as strictObject, M as never, N as number, O as lazy, P as object$1, R as string, S as _null, T as boolean, V as unknown, W as toJSONSchema, b as _enum, k as literal, w as array$1, x as _instanceof } from "./zod-CoBiJ5v4.js";
|
|
@@ -6,7 +6,7 @@ import { _ as Logger, c as Objects, g as cn, h as Events, m as useComposedRefs,
|
|
|
6
6
|
import { t as require_react } from "./react-DA-nE2FX.js";
|
|
7
7
|
import { t as require_compiler_runtime } from "./compiler-runtime-CEbnTgxf.js";
|
|
8
8
|
import { n as Copy, r as toast, t as copyToClipboard } from "./copy-BuQpJEzp.js";
|
|
9
|
-
import { $ as useCellActions, $t as getTracebackInfo, A as ChevronRightIcon, An as LoaderCircle, Bn as Braces, C as AccordionContent, Fn as ExternalLink, Ft as jotaiJsonStorage, Hn as import_lib, I as base64ToUint8Array, Jt as useRequestClient, Kt as getRequestClient, Lt as PluralWord, M as PinLeftIcon, Mn as Info, Mt as useChromeActions, N as PinRightIcon, Nn as FileText, O as CheckIcon, On as NotebookPen, Pt as adaptForLocalStorage, Qt as extractAllTracebackInfo, R as extractBase64FromDataURL, Rn as CircleX, S as Accordion, St as Checkbox, T as AccordionTrigger, Tn as Trash2, V as renderHTML, Vn as esm_default, Y as notebookAtom, Zt as elementContainsMarimoCellFile, _t as getCellDomProps, at as AnsiUp, c as Popover, cn as SCRATCH_CELL_ID, ct as kioskModeAtom, d as PopoverTrigger, dt as outputIsLoading, et as useCellIds, g as getDatasourceContext, gn as atomWithStorage, gt as DATA_CELL_ID, ht as sanitizeHtml, j as DotFilledIcon, kn as Minus, kt as goToCellLine, l as PopoverClose, lt as useInstallAllowed, m as useExpandedOutput, mn as jsonToMarkdown, n as Spinner, nn as filenameAtom, on as CellOutputId, pn as jsonParseWithSpecialChar, q as getCellEditorView, r as MarkdownRenderer, sn as HTMLCellId, t as toPng, tt as useCellNames, u as PopoverContent, ut as viewStateAtom, vt as displayCellName, w as AccordionItem, wn as Wrench, yn as Close$1, z as isDataURLString, zt as DATA_TYPE_ICON, __tla as __tla_0 } from "./html-to-image-
|
|
9
|
+
import { $ as useCellActions, $t as getTracebackInfo, A as ChevronRightIcon, An as LoaderCircle, Bn as Braces, C as AccordionContent, Fn as ExternalLink, Ft as jotaiJsonStorage, Hn as import_lib, I as base64ToUint8Array, Jt as useRequestClient, Kt as getRequestClient, Lt as PluralWord, M as PinLeftIcon, Mn as Info, Mt as useChromeActions, N as PinRightIcon, Nn as FileText, O as CheckIcon, On as NotebookPen, Pt as adaptForLocalStorage, Qt as extractAllTracebackInfo, R as extractBase64FromDataURL, Rn as CircleX, S as Accordion, St as Checkbox, T as AccordionTrigger, Tn as Trash2, V as renderHTML, Vn as esm_default, Y as notebookAtom, Zt as elementContainsMarimoCellFile, _t as getCellDomProps, at as AnsiUp, c as Popover, cn as SCRATCH_CELL_ID, ct as kioskModeAtom, d as PopoverTrigger, dt as outputIsLoading, et as useCellIds, g as getDatasourceContext, gn as atomWithStorage, gt as DATA_CELL_ID, ht as sanitizeHtml, j as DotFilledIcon, kn as Minus, kt as goToCellLine, l as PopoverClose, lt as useInstallAllowed, m as useExpandedOutput, mn as jsonToMarkdown, n as Spinner, nn as filenameAtom, on as CellOutputId, pn as jsonParseWithSpecialChar, q as getCellEditorView, r as MarkdownRenderer, sn as HTMLCellId, t as toPng, tt as useCellNames, u as PopoverContent, ut as viewStateAtom, vt as displayCellName, w as AccordionItem, wn as Wrench, yn as Close$1, z as isDataURLString, zt as DATA_TYPE_ICON, __tla as __tla_0 } from "./html-to-image-CnBdHeLh.js";
|
|
10
10
|
import { o as useSize, u as createLucideIcon } from "./dist-C1BYNeCR.js";
|
|
11
11
|
import { c as Calendar, i as createReducerAndAtoms, r as Badge } from "./useLifecycle-BBO9PIph.js";
|
|
12
12
|
import { a as ListFilter, i as Table$1, n as $fb18d541ea1ad717$export$ad991b66133851cf, o as ChartPie, r as $5a387cc49350e6db$export$722debc0e56fea39, t as $896ba0a80a8f4d36$export$85fd5fdf27bacc79 } from "./useDateFormatter-BA4FCquG.js";
|
|
@@ -35120,7 +35120,7 @@ ${d}`,
|
|
|
35120
35120
|
return Logger.warn("Failed to get version from mount config"), null;
|
|
35121
35121
|
}
|
|
35122
35122
|
}
|
|
35123
|
-
marimoVersionAtom = atom(getVersionFromMountConfig() || "0.23.10-
|
|
35123
|
+
marimoVersionAtom = atom(getVersionFromMountConfig() || "0.23.10-dev5");
|
|
35124
35124
|
showCodeInRunModeAtom = atom(true);
|
|
35125
35125
|
atom(null);
|
|
35126
35126
|
var import_compiler_runtime = require_compiler_runtime();
|
|
@@ -19838,8 +19838,8 @@ ${n.sqlString}
|
|
|
19838
19838
|
"ClassDefinition"
|
|
19839
19839
|
]);
|
|
19840
19840
|
function goToPosition(e, t) {
|
|
19841
|
-
|
|
19842
|
-
e.dispatch({
|
|
19841
|
+
requestAnimationFrame(() => {
|
|
19842
|
+
e.focus(), e.dispatch({
|
|
19843
19843
|
selection: {
|
|
19844
19844
|
anchor: t,
|
|
19845
19845
|
head: t
|
|
@@ -24998,7 +24998,7 @@ ${n.sqlString}
|
|
|
24998
24998
|
default:
|
|
24999
24999
|
logNever(t.status);
|
|
25000
25000
|
}
|
|
25001
|
-
n.output = t.output ?? n.output, n.staleInputs = t.stale_inputs ?? n.staleInputs, n.status = t.status ?? n.status, n.serialization = t.serialization;
|
|
25001
|
+
n.output = t.output ?? n.output, n.staleInputs = t.stale_inputs ?? n.staleInputs, n.status = t.status ?? n.status, t.serialization !== void 0 && (n.serialization = t.serialization);
|
|
25002
25002
|
let r = false;
|
|
25003
25003
|
t.output != null && t.output.mimetype === "application/vnd.marimo+error" && ((n.status === "queued" || n.status === "running") && (n.status = "idle"), invariant(Array.isArray(t.output.data), "Expected error output data to be an array"), t.output.data.some((e2) => e2.type === "interruption") ? (n.interrupted = true, r = true) : t.output.data.some((e2) => e2.type.includes("ancestor")) ? n.stopped = true : n.errored = true);
|
|
25004
25004
|
let i = e.consoleOutputs;
|
package/dist/main.js
CHANGED
|
@@ -22,17 +22,17 @@ import { _ as Logger, c as Objects, g as cn, h as Events, i as NOT_SET, l as use
|
|
|
22
22
|
import { t as require_react } from "./react-DA-nE2FX.js";
|
|
23
23
|
import { t as require_compiler_runtime } from "./compiler-runtime-CEbnTgxf.js";
|
|
24
24
|
import { n as Copy, r as toast, t as copyToClipboard } from "./copy-BuQpJEzp.js";
|
|
25
|
-
import { $ as useCellActions, An as LoaderCircle, At as DeferredRequestRegistry, B as safeExtractSetUIElementMessageBuffers, Bn as Braces, Bt as getDataTypeColor, C as AccordionContent, Cn as Trigger2, Ct as customPythonLanguageSupport, Dn as PaintRoller, Dt as Paths, E as BorderAllIcon, En as Table2, Et as PathBuilder, F as base64ToDataView, Ft as jotaiJsonStorage, Gt as convertStatsName, H as getMarimoExportContext, In as Database, J as getCellNames, Jt as useRequestClient, K as createActions, Kt as getRequestClient, L as dataViewToBase64, Ln as Columns2, Mn as Info, Nn as FileText, Nt as repl, Pn as Eye, Q as reducer, Rt as PluralWords, S as Accordion, Sn as Root2$1, St as Checkbox, T as AccordionTrigger, Tn as Trash2, U as hasTrustedExportContext, V as renderHTML, Vt as require_client, W as hasRunAnyCellAtom, X as notebookOutline, Y as notebookAtom, Yt as isUninstantiated, Z as numColumnsAtom, _n as selectAtom, a as useCellFocusActions, an as parseInitialValue, bn as Content2, bt as isInternalCellName, ct as kioskModeAtom, dn as OBJECT_ID_ATTR, dt as outputIsLoading, en as NotebookScopedLocalStorage, et as useCellIds, f as isOutputEmpty, fn as RANDOM_ID_ATTR, ft as outputIsStale, gn as atomWithStorage, hn as atomWithReducer, i as LazyAnyLanguageCodeMirror, in as parseDataset, jn as Layers, jt as generateUUID, k as ChevronDownIcon, ln as UIElementId, mt as headingToIdentifier, n as Spinner, nt as createCell, o as useLastFocusedCellId, ot as getInitialAppMode, p as useExpandedConsoleOutput, pn as jsonParseWithSpecialChar, pt as isErrorMime, qt as requestClientAtom, rn as parseAttrValue, s as maybeAddAltairImport, sn as HTMLCellId, st as initialModeAtom, un as findCellId, w as AccordionItem, wt as MarkdownLanguageAdapter, xn as Item$1, xt as normalizeName, yt as getValidName, zn as CircleAlert, zt as DATA_TYPE_ICON, __tla as __tla_0 } from "./html-to-image-
|
|
25
|
+
import { $ as useCellActions, An as LoaderCircle, At as DeferredRequestRegistry, B as safeExtractSetUIElementMessageBuffers, Bn as Braces, Bt as getDataTypeColor, C as AccordionContent, Cn as Trigger2, Ct as customPythonLanguageSupport, Dn as PaintRoller, Dt as Paths, E as BorderAllIcon, En as Table2, Et as PathBuilder, F as base64ToDataView, Ft as jotaiJsonStorage, Gt as convertStatsName, H as getMarimoExportContext, In as Database, J as getCellNames, Jt as useRequestClient, K as createActions, Kt as getRequestClient, L as dataViewToBase64, Ln as Columns2, Mn as Info, Nn as FileText, Nt as repl, Pn as Eye, Q as reducer, Rt as PluralWords, S as Accordion, Sn as Root2$1, St as Checkbox, T as AccordionTrigger, Tn as Trash2, U as hasTrustedExportContext, V as renderHTML, Vt as require_client, W as hasRunAnyCellAtom, X as notebookOutline, Y as notebookAtom, Yt as isUninstantiated, Z as numColumnsAtom, _n as selectAtom, a as useCellFocusActions, an as parseInitialValue, bn as Content2, bt as isInternalCellName, ct as kioskModeAtom, dn as OBJECT_ID_ATTR, dt as outputIsLoading, en as NotebookScopedLocalStorage, et as useCellIds, f as isOutputEmpty, fn as RANDOM_ID_ATTR, ft as outputIsStale, gn as atomWithStorage, hn as atomWithReducer, i as LazyAnyLanguageCodeMirror, in as parseDataset, jn as Layers, jt as generateUUID, k as ChevronDownIcon, ln as UIElementId, mt as headingToIdentifier, n as Spinner, nt as createCell, o as useLastFocusedCellId, ot as getInitialAppMode, p as useExpandedConsoleOutput, pn as jsonParseWithSpecialChar, pt as isErrorMime, qt as requestClientAtom, rn as parseAttrValue, s as maybeAddAltairImport, sn as HTMLCellId, st as initialModeAtom, un as findCellId, w as AccordionItem, wt as MarkdownLanguageAdapter, xn as Item$1, xt as normalizeName, yt as getValidName, zn as CircleAlert, zt as DATA_TYPE_ICON, __tla as __tla_0 } from "./html-to-image-CnBdHeLh.js";
|
|
26
26
|
import { __tla as __tla_1 } from "./chunk-5FQGJX7Z-BNjes6Yx.js";
|
|
27
27
|
import { o as useSize, s as Root$2, u as createLucideIcon } from "./dist-C1BYNeCR.js";
|
|
28
28
|
import { A as SquareFunction, C as DEFAULT_COLOR_SCHEME, D as SCALE_TYPE_DESCRIPTIONS, E as EMPTY_VALUE$1, O as TIME_UNIT_DESCRIPTIONS, S as DEFAULT_AGGREGATION, T as DEFAULT_TIME_UNIT, _ as AGGREGATION_TYPE_DESCRIPTIONS, a as AGGREGATION_FNS$1, b as COLOR_SCHEMES, c as COLOR_BY_FIELDS, d as NONE_VALUE, f as SELECTABLE_DATA_TYPES, g as TIME_UNITS, h as STRING_AGGREGATION_FNS, i as convertDataTypeToSelectable, j as ChartColumn, k as escapeFieldName, l as COMBINED_TIME_UNITS, m as SORT_TYPES, n as createSpecWithoutData, o as BIN_AGGREGATION, p as SINGLE_TIME_UNITS, r as isFieldSet, s as CHART_TYPES, t as augmentSpecWithData, u as ChartType, v as AGGREGATION_TYPE_ICON, w as DEFAULT_MAX_BINS_FACET, x as COUNT_FIELD, y as CHART_TYPE_ICON } from "./spec-B96zNUEA.js";
|
|
29
|
-
import { $ as TableBody, $t as ChevronLeft, A as ComboboxItem, At as ChartErrorState, B as contextAwarePanelOpen, Bt as $fae977aafc393c5c$export$6b862160d295c8e, C as prettifyRowColumnCount, Ct as dateToLocalISODate, D as DatePicker, Dt as TabsContent, E as useInternalStateWithSync, Et as Tabs, F as CommandList, Ft as RenderTextWithLinks, G as slotsController, H as contextAwarePanelType, Ht as GripHorizontal, I as CommandSeparator, It as Kbd, Jt as Code, K as Toggle, Kt as Ellipsis, L as smartMatch, Lt as HtmlOutput, M as CommandEmpty, Mt as ChartLoadingState, N as CommandInput, Nt as LazyVegaEmbed, O as DateRangePicker, Ot as TabsList, P as CommandItem, Pt as useOverflowDetection, Q as Table, Qt as ChevronsDownUp, R as ContextAwarePanelItem, Rt as EmotionCacheProvider, S as downloadSizeLimitAtom, St as Maps, T as getColumnCountForDisplay, Tt as dateToLocalISOTime, U as isCellAwareAtom, Ut as Funnel, V as contextAwarePanelOwner, Vt as TextWrap, W as SlotNames, Wt as EyeOff, X as Fill, Xt as ChevronsRight, Yt as ChevronsUpDown, Z as Provider$1, Zt as ChevronsLeft, _ as downloadBlob, _t as SELECT_COLUMN_ID, at as generateColumns, b as Progress, bt as getMimeValues, c as Slide, ct as ColumnChartContext, d as JsonOutput, dt as useIntersectionObserver, en as ArrowDownWideNarrow, et as TableCell, f as OutputArea, ft as usePrevious$1, g as ADD_PRINTING_CLASS, gt as INDEX_COLUMN_NAME, h as InstallPackageButton, ht as loadTableData, it as NAMELESS_COLUMN_PREFIX, j as Command, jt as ChartInfoState, k as Combobox, kt as TabsTrigger, l as RadioGroup, lt as ColumnChartSpecModel, m as DataTable, mt as loadTableAndRawData, n as marimoVersionAtom, nt as TableHeader, o as SLIDE_TYPE_OPTIONS_BY_VALUE, ot as inferFieldTypes, p as OutputRenderer, pt as getPageIndexForRow, qt as Download, r as showCodeInRunModeAtom, rt as TableRow, st as renderCellValue, t as useNotebookCodeAvailable, tt as TableHead, u as RadioGroupItem, ut as DelayMount, v as downloadByURL, vt as TOO_MANY_ROWS, w as prettifyRowCount, wt as dateToLocalISODateTime, x as Filenames, xt as isNullishFilter, y as downloadHTMLAsImage, yt as toFieldTypes, z as PANEL_TYPES, zt as $fae977aafc393c5c$export$588937bcd60ade55, __tla as __tla_2 } from "./code-visibility-
|
|
29
|
+
import { $ as TableBody, $t as ChevronLeft, A as ComboboxItem, At as ChartErrorState, B as contextAwarePanelOpen, Bt as $fae977aafc393c5c$export$6b862160d295c8e, C as prettifyRowColumnCount, Ct as dateToLocalISODate, D as DatePicker, Dt as TabsContent, E as useInternalStateWithSync, Et as Tabs, F as CommandList, Ft as RenderTextWithLinks, G as slotsController, H as contextAwarePanelType, Ht as GripHorizontal, I as CommandSeparator, It as Kbd, Jt as Code, K as Toggle, Kt as Ellipsis, L as smartMatch, Lt as HtmlOutput, M as CommandEmpty, Mt as ChartLoadingState, N as CommandInput, Nt as LazyVegaEmbed, O as DateRangePicker, Ot as TabsList, P as CommandItem, Pt as useOverflowDetection, Q as Table, Qt as ChevronsDownUp, R as ContextAwarePanelItem, Rt as EmotionCacheProvider, S as downloadSizeLimitAtom, St as Maps, T as getColumnCountForDisplay, Tt as dateToLocalISOTime, U as isCellAwareAtom, Ut as Funnel, V as contextAwarePanelOwner, Vt as TextWrap, W as SlotNames, Wt as EyeOff, X as Fill, Xt as ChevronsRight, Yt as ChevronsUpDown, Z as Provider$1, Zt as ChevronsLeft, _ as downloadBlob, _t as SELECT_COLUMN_ID, at as generateColumns, b as Progress, bt as getMimeValues, c as Slide, ct as ColumnChartContext, d as JsonOutput, dt as useIntersectionObserver, en as ArrowDownWideNarrow, et as TableCell, f as OutputArea, ft as usePrevious$1, g as ADD_PRINTING_CLASS, gt as INDEX_COLUMN_NAME, h as InstallPackageButton, ht as loadTableData, it as NAMELESS_COLUMN_PREFIX, j as Command, jt as ChartInfoState, k as Combobox, kt as TabsTrigger, l as RadioGroup, lt as ColumnChartSpecModel, m as DataTable, mt as loadTableAndRawData, n as marimoVersionAtom, nt as TableHeader, o as SLIDE_TYPE_OPTIONS_BY_VALUE, ot as inferFieldTypes, p as OutputRenderer, pt as getPageIndexForRow, qt as Download, r as showCodeInRunModeAtom, rt as TableRow, st as renderCellValue, t as useNotebookCodeAvailable, tt as TableHead, u as RadioGroupItem, ut as DelayMount, v as downloadByURL, vt as TOO_MANY_ROWS, w as prettifyRowCount, wt as dateToLocalISODateTime, x as Filenames, xt as isNullishFilter, y as downloadHTMLAsImage, yt as toFieldTypes, z as PANEL_TYPES, zt as $fae977aafc393c5c$export$588937bcd60ade55, __tla as __tla_2 } from "./code-visibility-Dek9JNl9.js";
|
|
30
30
|
import { c as Calendar, i as createReducerAndAtoms, n as useOnUnmount, o as ToggleLeft, t as useOnMount } from "./useLifecycle-BBO9PIph.js";
|
|
31
31
|
import { t as Check } from "./check-DTbrK0zt.js";
|
|
32
32
|
import { A as Trigger$1, C as $a916eb452884faea$export$b7a616150fdb9f44, E as $18f2051aff69b9bf$export$a54013f0d02a8f82, F as X, L as ChevronDown, M as usePrevious$2, N as useDirection, P as createCollection, S as logNever, T as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7, a as SelectGroup, c as SelectSeparator, d as NativeSelect, i as SelectContent, j as clamp$2, k as Icon, l as SelectTrigger, n as capitalize, o as SelectItem, r as Select, s as SelectLabel, t as Strings, u as SelectValue, x as assertNever } from "./strings-Bu3vlb6W.js";
|
|
33
33
|
import { I as $64fa3d84918910a7$export$29f1550f4b0d4415, K as useDebounceControlledState, L as $64fa3d84918910a7$export$4d86445c2cf5e3, Mt as $65484d02dcb7eb3e$export$457c3d6518dd4c6f, Nt as $3ef42575df84b30b$export$9d1611c77c2fe928, V as $64fa3d84918910a7$export$df3a06d6289f983e, Vt as $ff5963eb1fccf552$export$e08e3b67e392101e, a as NumberField, b as DropdownMenuTrigger, c as prettyNumber, d as DropdownMenuContent, f as DropdownMenuGroup, fn as Circle, g as DropdownMenuSeparator, i as OnBlurredInput, it as $701a24aa0da5b062$export$ea18c227d4417cc3, l as prettyScientificNumber, m as DropdownMenuLabel, n as DebouncedNumberInput, p as DropdownMenuItem, pn as ChevronRight, q as useDebouncedCallback, r as Input, rt as $f7dceffc5ad7768b$export$4e328f61c538687f, t as DebouncedInput, u as DropdownMenu, ut as $6179b936705e76d3$export$ae780daf29e6d456, vt as $458b0a5536c1a7cf$export$40bfa8c7b0832715 } from "./input-_2sjvfne.js";
|
|
34
34
|
import { _ as isWasm, c as asRemoteURL, d as isStaticNotebook, f as appendQueryParams, g as Deferred, m as require_cuid2, u as getStaticVirtualFiles, v as CircleQuestionMark } from "./toDate-x-WRDCH7.js";
|
|
35
|
-
import { a as MarimoIncomingMessageEvent, c as MarimoValueUpdateEvent, d as Square, f as File, i as PythonIcon, l as createInputEvent, n as blobToString, o as MarimoValueInputEvent, r as filesToBase64, s as MarimoValueReadyEvent, t as processOutput, u as deserializeBlob } from "./process-output-
|
|
35
|
+
import { a as MarimoIncomingMessageEvent, c as MarimoValueUpdateEvent, d as Square, f as File, i as PythonIcon, l as createInputEvent, n as blobToString, o as MarimoValueInputEvent, r as filesToBase64, s as MarimoValueReadyEvent, t as processOutput, u as deserializeBlob } from "./process-output-vFgqkyUT.js";
|
|
36
36
|
import { n as Trash, r as Pencil, t as BulkEdit } from "./types-CVvp1fKr.js";
|
|
37
37
|
import { n as require_prop_types, r as Plus, t as ErrorBoundary } from "./ErrorBoundary-rULOrC_p.js";
|
|
38
38
|
import { t as require_react_dom } from "./react-dom-BTJzcVJ9.js";
|
|
@@ -5590,7 +5590,7 @@ let __tla = Promise.all([
|
|
|
5590
5590
|
};
|
|
5591
5591
|
}
|
|
5592
5592
|
};
|
|
5593
|
-
var LazyChatbot = import_react.lazy(() => import("./chat-ui-
|
|
5593
|
+
var LazyChatbot = import_react.lazy(() => import("./chat-ui-1rLrACXD.js").then((e) => ({
|
|
5594
5594
|
default: e.Chatbot
|
|
5595
5595
|
}))), messageSchema = array(object({
|
|
5596
5596
|
id: string(),
|
|
@@ -36116,7 +36116,7 @@ ${c}
|
|
|
36116
36116
|
if (l && l !== "slide") return l;
|
|
36117
36117
|
if (c == null ? void 0 : c.has(e)) return "skip";
|
|
36118
36118
|
}
|
|
36119
|
-
var LazySlidesComponent = import_react.lazy(() => import("./reveal-component-
|
|
36119
|
+
var LazySlidesComponent = import_react.lazy(() => import("./reveal-component-C8AmnVfj.js"));
|
|
36120
36120
|
const SlidesLayoutRenderer = ({ layout: e, setLayout: r, cells: c, mode: l }) => {
|
|
36121
36121
|
var _a3;
|
|
36122
36122
|
let u = useAtomValue(kioskModeAtom), d = l === "read" || u, f = useAtomValue(numColumnsAtom) > 1, [p, m] = (0, import_react.useState)(null), { slideCells: h, skippedIds: g, noOutputIds: _, slideTypes: v, startCellIndex: y } = (0, import_react.useMemo)(() => computeSlideCellsInfo(c, e), [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { s as __toESM } from "./chunk-BNovOVIE.js";
|
|
2
2
|
import { t as require_compiler_runtime } from "./compiler-runtime-CEbnTgxf.js";
|
|
3
|
-
import { it as parseHtmlContent, rt as ansiToPlainText } from "./html-to-image-
|
|
3
|
+
import { it as parseHtmlContent, rt as ansiToPlainText } from "./html-to-image-CnBdHeLh.js";
|
|
4
4
|
import { u as createLucideIcon } from "./dist-C1BYNeCR.js";
|
|
5
5
|
import { t as Strings } from "./strings-Bu3vlb6W.js";
|
|
6
6
|
import { t as require_jsx_runtime } from "./jsx-runtime-DebpN0FN.js";
|
|
@@ -6,10 +6,10 @@ import { s as __toESM } from "./chunk-BNovOVIE.js";
|
|
|
6
6
|
import { _ as Logger, g as cn, h as Events, l as useEventListener, t as Button } from "./button-C5K9fIPF.js";
|
|
7
7
|
import { t as require_react } from "./react-DA-nE2FX.js";
|
|
8
8
|
import { t as require_compiler_runtime } from "./compiler-runtime-CEbnTgxf.js";
|
|
9
|
-
import { ct as kioskModeAtom } from "./html-to-image-
|
|
9
|
+
import { ct as kioskModeAtom } from "./html-to-image-CnBdHeLh.js";
|
|
10
10
|
import "./chunk-5FQGJX7Z-BNjes6Yx.js";
|
|
11
11
|
import { u as createLucideIcon } from "./dist-C1BYNeCR.js";
|
|
12
|
-
import { Gt as Expand, J as PanelGroup, Jt as Code, Wt as EyeOff, Y as PanelResizeHandle, a as DEFAULT_SLIDE_TYPE, c as Slide, i as DEFAULT_DECK_TRANSITION, q as Panel, s as SlideSidebar, t as useNotebookCodeAvailable } from "./code-visibility-
|
|
12
|
+
import { Gt as Expand, J as PanelGroup, Jt as Code, Wt as EyeOff, Y as PanelResizeHandle, a as DEFAULT_SLIDE_TYPE, c as Slide, i as DEFAULT_DECK_TRANSITION, q as Panel, s as SlideSidebar, t as useNotebookCodeAvailable } from "./code-visibility-Dek9JNl9.js";
|
|
13
13
|
import { q as useDebouncedCallback } from "./input-_2sjvfne.js";
|
|
14
14
|
import "./toDate-x-WRDCH7.js";
|
|
15
15
|
import "./react-dom-BTJzcVJ9.js";
|
package/package.json
CHANGED
|
@@ -61,6 +61,7 @@ export const CellActionsContextMenu = ({
|
|
|
61
61
|
});
|
|
62
62
|
const [imageRightClicked, setImageRightClicked] =
|
|
63
63
|
React.useState<HTMLImageElement>();
|
|
64
|
+
const suppressCloseAutoFocus = React.useRef(false);
|
|
64
65
|
|
|
65
66
|
const DEFAULT_CONTEXT_MENU_ITEMS: ActionButton[] = [
|
|
66
67
|
{
|
|
@@ -166,7 +167,10 @@ export const CellActionsContextMenu = ({
|
|
|
166
167
|
handle: () => {
|
|
167
168
|
const editorView = getEditorView();
|
|
168
169
|
if (editorView) {
|
|
169
|
-
|
|
170
|
+
// Only suppress focus restoration when we actually navigated;
|
|
171
|
+
// otherwise let Radix return focus to the trigger cell.
|
|
172
|
+
suppressCloseAutoFocus.current =
|
|
173
|
+
goToDefinitionAtCursorPosition(editorView);
|
|
170
174
|
}
|
|
171
175
|
},
|
|
172
176
|
},
|
|
@@ -194,7 +198,16 @@ export const CellActionsContextMenu = ({
|
|
|
194
198
|
>
|
|
195
199
|
{children}
|
|
196
200
|
</ContextMenuTrigger>
|
|
197
|
-
<ContextMenuContent
|
|
201
|
+
<ContextMenuContent
|
|
202
|
+
className="w-[300px]"
|
|
203
|
+
scrollable={true}
|
|
204
|
+
onCloseAutoFocus={(evt) => {
|
|
205
|
+
if (suppressCloseAutoFocus.current) {
|
|
206
|
+
evt.preventDefault();
|
|
207
|
+
suppressCloseAutoFocus.current = false;
|
|
208
|
+
}
|
|
209
|
+
}}
|
|
210
|
+
>
|
|
198
211
|
{visibleActions.map((group, i) => (
|
|
199
212
|
<Fragment key={i}>
|
|
200
213
|
{group.map((action) => {
|
|
@@ -80,7 +80,6 @@ exports[`cell reducer > can initialize stdin 3`] = `
|
|
|
80
80
|
"output": null,
|
|
81
81
|
"runElapsedTimeMs": null,
|
|
82
82
|
"runStartTimestamp": null,
|
|
83
|
-
"serialization": undefined,
|
|
84
83
|
"serializedEditorState": null,
|
|
85
84
|
"staleInputs": false,
|
|
86
85
|
"status": "queued",
|
|
@@ -110,7 +109,6 @@ exports[`cell reducer > can initialize stdin 4`] = `
|
|
|
110
109
|
"output": null,
|
|
111
110
|
"runElapsedTimeMs": null,
|
|
112
111
|
"runStartTimestamp": 20,
|
|
113
|
-
"serialization": undefined,
|
|
114
112
|
"serializedEditorState": null,
|
|
115
113
|
"staleInputs": false,
|
|
116
114
|
"status": "running",
|
|
@@ -147,7 +145,6 @@ exports[`cell reducer > can initialize stdin 5`] = `
|
|
|
147
145
|
"output": null,
|
|
148
146
|
"runElapsedTimeMs": null,
|
|
149
147
|
"runStartTimestamp": 20,
|
|
150
|
-
"serialization": undefined,
|
|
151
148
|
"serializedEditorState": null,
|
|
152
149
|
"staleInputs": false,
|
|
153
150
|
"status": "running",
|
|
@@ -184,7 +181,6 @@ exports[`cell reducer > can initialize stdin 6`] = `
|
|
|
184
181
|
"output": null,
|
|
185
182
|
"runElapsedTimeMs": null,
|
|
186
183
|
"runStartTimestamp": 20,
|
|
187
|
-
"serialization": undefined,
|
|
188
184
|
"serializedEditorState": null,
|
|
189
185
|
"staleInputs": false,
|
|
190
186
|
"status": "running",
|
|
@@ -227,7 +223,6 @@ exports[`cell reducer > can initialize stdin 7`] = `
|
|
|
227
223
|
"output": null,
|
|
228
224
|
"runElapsedTimeMs": null,
|
|
229
225
|
"runStartTimestamp": 20,
|
|
230
|
-
"serialization": undefined,
|
|
231
226
|
"serializedEditorState": null,
|
|
232
227
|
"staleInputs": false,
|
|
233
228
|
"status": "running",
|
|
@@ -271,7 +266,6 @@ exports[`cell reducer > can initialize stdin 8`] = `
|
|
|
271
266
|
"output": null,
|
|
272
267
|
"runElapsedTimeMs": null,
|
|
273
268
|
"runStartTimestamp": 20,
|
|
274
|
-
"serialization": undefined,
|
|
275
269
|
"serializedEditorState": null,
|
|
276
270
|
"staleInputs": false,
|
|
277
271
|
"status": "running",
|
|
@@ -321,7 +315,6 @@ exports[`cell reducer > can initialize stdin 9`] = `
|
|
|
321
315
|
"output": null,
|
|
322
316
|
"runElapsedTimeMs": null,
|
|
323
317
|
"runStartTimestamp": 20,
|
|
324
|
-
"serialization": undefined,
|
|
325
318
|
"serializedEditorState": null,
|
|
326
319
|
"staleInputs": false,
|
|
327
320
|
"status": "running",
|
|
@@ -387,7 +380,6 @@ exports[`cell reducer > can receive console when the cell is idle and will clear
|
|
|
387
380
|
"output": null,
|
|
388
381
|
"runElapsedTimeMs": null,
|
|
389
382
|
"runStartTimestamp": null,
|
|
390
|
-
"serialization": undefined,
|
|
391
383
|
"serializedEditorState": null,
|
|
392
384
|
"staleInputs": false,
|
|
393
385
|
"status": "queued",
|
|
@@ -424,7 +416,6 @@ exports[`cell reducer > can receive console when the cell is idle and will clear
|
|
|
424
416
|
"output": null,
|
|
425
417
|
"runElapsedTimeMs": null,
|
|
426
418
|
"runStartTimestamp": null,
|
|
427
|
-
"serialization": undefined,
|
|
428
419
|
"serializedEditorState": null,
|
|
429
420
|
"staleInputs": false,
|
|
430
421
|
"status": "queued",
|
|
@@ -454,7 +445,6 @@ exports[`cell reducer > can receive console when the cell is idle and will clear
|
|
|
454
445
|
"output": null,
|
|
455
446
|
"runElapsedTimeMs": null,
|
|
456
447
|
"runStartTimestamp": 20,
|
|
457
|
-
"serialization": undefined,
|
|
458
448
|
"serializedEditorState": null,
|
|
459
449
|
"staleInputs": false,
|
|
460
450
|
"status": "running",
|
|
@@ -491,7 +481,6 @@ exports[`cell reducer > can receive console when the cell is idle and will clear
|
|
|
491
481
|
"output": null,
|
|
492
482
|
"runElapsedTimeMs": 2000,
|
|
493
483
|
"runStartTimestamp": null,
|
|
494
|
-
"serialization": undefined,
|
|
495
484
|
"serializedEditorState": null,
|
|
496
485
|
"staleInputs": false,
|
|
497
486
|
"status": "idle",
|
|
@@ -521,7 +510,6 @@ exports[`cell reducer > can run a stale cell 1`] = `
|
|
|
521
510
|
"output": null,
|
|
522
511
|
"runElapsedTimeMs": null,
|
|
523
512
|
"runStartTimestamp": null,
|
|
524
|
-
"serialization": undefined,
|
|
525
513
|
"serializedEditorState": null,
|
|
526
514
|
"staleInputs": false,
|
|
527
515
|
"status": "queued",
|
|
@@ -551,7 +539,6 @@ exports[`cell reducer > can run a stale cell 2`] = `
|
|
|
551
539
|
"output": null,
|
|
552
540
|
"runElapsedTimeMs": null,
|
|
553
541
|
"runStartTimestamp": null,
|
|
554
|
-
"serialization": undefined,
|
|
555
542
|
"serializedEditorState": null,
|
|
556
543
|
"staleInputs": true,
|
|
557
544
|
"status": "queued",
|
|
@@ -581,7 +568,6 @@ exports[`cell reducer > can run a stopped cell 1`] = `
|
|
|
581
568
|
"output": null,
|
|
582
569
|
"runElapsedTimeMs": null,
|
|
583
570
|
"runStartTimestamp": null,
|
|
584
|
-
"serialization": undefined,
|
|
585
571
|
"serializedEditorState": null,
|
|
586
572
|
"staleInputs": false,
|
|
587
573
|
"status": "queued",
|
|
@@ -611,7 +597,6 @@ exports[`cell reducer > can run a stopped cell 2`] = `
|
|
|
611
597
|
"output": null,
|
|
612
598
|
"runElapsedTimeMs": null,
|
|
613
599
|
"runStartTimestamp": null,
|
|
614
|
-
"serialization": undefined,
|
|
615
600
|
"serializedEditorState": null,
|
|
616
601
|
"staleInputs": false,
|
|
617
602
|
"status": "idle",
|
|
@@ -652,7 +637,6 @@ exports[`cell reducer > can run a stopped cell 3`] = `
|
|
|
652
637
|
},
|
|
653
638
|
"runElapsedTimeMs": null,
|
|
654
639
|
"runStartTimestamp": null,
|
|
655
|
-
"serialization": undefined,
|
|
656
640
|
"serializedEditorState": null,
|
|
657
641
|
"staleInputs": false,
|
|
658
642
|
"status": "idle",
|
|
@@ -693,7 +677,6 @@ exports[`cell reducer > can run a stopped cell 4`] = `
|
|
|
693
677
|
},
|
|
694
678
|
"runElapsedTimeMs": null,
|
|
695
679
|
"runStartTimestamp": null,
|
|
696
|
-
"serialization": undefined,
|
|
697
680
|
"serializedEditorState": null,
|
|
698
681
|
"staleInputs": false,
|
|
699
682
|
"status": "queued",
|
|
@@ -723,7 +706,6 @@ exports[`cell reducer > can run a stopped cell 5`] = `
|
|
|
723
706
|
"output": null,
|
|
724
707
|
"runElapsedTimeMs": null,
|
|
725
708
|
"runStartTimestamp": 40,
|
|
726
|
-
"serialization": undefined,
|
|
727
709
|
"serializedEditorState": null,
|
|
728
710
|
"staleInputs": false,
|
|
729
711
|
"status": "running",
|
|
@@ -840,7 +822,6 @@ exports[`cell reducer > can run cell and receive cell messages 4`] = `
|
|
|
840
822
|
"output": null,
|
|
841
823
|
"runElapsedTimeMs": null,
|
|
842
824
|
"runStartTimestamp": null,
|
|
843
|
-
"serialization": undefined,
|
|
844
825
|
"serializedEditorState": null,
|
|
845
826
|
"staleInputs": false,
|
|
846
827
|
"status": "queued",
|
|
@@ -870,7 +851,6 @@ exports[`cell reducer > can run cell and receive cell messages 5`] = `
|
|
|
870
851
|
"output": null,
|
|
871
852
|
"runElapsedTimeMs": null,
|
|
872
853
|
"runStartTimestamp": 20,
|
|
873
|
-
"serialization": undefined,
|
|
874
854
|
"serializedEditorState": null,
|
|
875
855
|
"staleInputs": false,
|
|
876
856
|
"status": "running",
|
|
@@ -907,7 +887,6 @@ exports[`cell reducer > can run cell and receive cell messages 6`] = `
|
|
|
907
887
|
"output": null,
|
|
908
888
|
"runElapsedTimeMs": null,
|
|
909
889
|
"runStartTimestamp": 20,
|
|
910
|
-
"serialization": undefined,
|
|
911
890
|
"serializedEditorState": null,
|
|
912
891
|
"staleInputs": false,
|
|
913
892
|
"status": "running",
|
|
@@ -949,7 +928,6 @@ exports[`cell reducer > can run cell and receive cell messages 7`] = `
|
|
|
949
928
|
},
|
|
950
929
|
"runElapsedTimeMs": 13000,
|
|
951
930
|
"runStartTimestamp": null,
|
|
952
|
-
"serialization": undefined,
|
|
953
931
|
"serializedEditorState": null,
|
|
954
932
|
"staleInputs": false,
|
|
955
933
|
"status": "idle",
|
|
@@ -992,7 +970,6 @@ import numpy",
|
|
|
992
970
|
},
|
|
993
971
|
"runElapsedTimeMs": 13000,
|
|
994
972
|
"runStartTimestamp": null,
|
|
995
|
-
"serialization": undefined,
|
|
996
973
|
"serializedEditorState": null,
|
|
997
974
|
"staleInputs": false,
|
|
998
975
|
"status": "idle",
|
|
@@ -1034,7 +1011,6 @@ exports[`cell reducer > can run cell and receive cell messages 9`] = `
|
|
|
1034
1011
|
},
|
|
1035
1012
|
"runElapsedTimeMs": 13000,
|
|
1036
1013
|
"runStartTimestamp": null,
|
|
1037
|
-
"serialization": undefined,
|
|
1038
1014
|
"serializedEditorState": null,
|
|
1039
1015
|
"staleInputs": false,
|
|
1040
1016
|
"status": "idle",
|
|
@@ -1077,7 +1053,6 @@ import numpy",
|
|
|
1077
1053
|
},
|
|
1078
1054
|
"runElapsedTimeMs": 13000,
|
|
1079
1055
|
"runStartTimestamp": null,
|
|
1080
|
-
"serialization": undefined,
|
|
1081
1056
|
"serializedEditorState": null,
|
|
1082
1057
|
"staleInputs": false,
|
|
1083
1058
|
"status": "idle",
|
|
@@ -1127,7 +1102,6 @@ import numpy",
|
|
|
1127
1102
|
},
|
|
1128
1103
|
"runElapsedTimeMs": 11000,
|
|
1129
1104
|
"runStartTimestamp": null,
|
|
1130
|
-
"serialization": undefined,
|
|
1131
1105
|
"serializedEditorState": null,
|
|
1132
1106
|
"staleInputs": false,
|
|
1133
1107
|
"status": "idle",
|
|
@@ -1175,7 +1149,6 @@ import numpy",
|
|
|
1175
1149
|
},
|
|
1176
1150
|
"runElapsedTimeMs": 11000,
|
|
1177
1151
|
"runStartTimestamp": null,
|
|
1178
|
-
"serialization": undefined,
|
|
1179
1152
|
"serializedEditorState": null,
|
|
1180
1153
|
"staleInputs": false,
|
|
1181
1154
|
"status": "idle",
|
|
@@ -1303,7 +1276,6 @@ exports[`cell reducer > errors reset status to idle 4`] = `
|
|
|
1303
1276
|
},
|
|
1304
1277
|
"runElapsedTimeMs": null,
|
|
1305
1278
|
"runStartTimestamp": null,
|
|
1306
|
-
"serialization": undefined,
|
|
1307
1279
|
"serializedEditorState": null,
|
|
1308
1280
|
"staleInputs": false,
|
|
1309
1281
|
"status": "idle",
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
2
|
import { describe, expect, it } from "vitest";
|
|
3
|
-
import type { OutputMessage } from "@/core/kernel/messages";
|
|
3
|
+
import type { CellMessage, OutputMessage } from "@/core/kernel/messages";
|
|
4
4
|
import type { RuntimeState } from "@/core/network/types";
|
|
5
5
|
import type { Seconds } from "@/utils/time";
|
|
6
|
-
import { outputIsLoading, outputIsStale } from "../cell";
|
|
6
|
+
import { outputIsLoading, outputIsStale, transitionCell } from "../cell";
|
|
7
|
+
import { createCellRuntimeState } from "../types";
|
|
7
8
|
|
|
8
9
|
const STATUSES: RuntimeState[] = [
|
|
9
10
|
"queued",
|
|
@@ -191,3 +192,29 @@ describe("outputIsStale", () => {
|
|
|
191
192
|
expect(outputIsStale(cell, edited)).toBe(false);
|
|
192
193
|
});
|
|
193
194
|
});
|
|
195
|
+
|
|
196
|
+
describe("transitionCell serialization", () => {
|
|
197
|
+
function cellMessage(serialization?: string | null): CellMessage {
|
|
198
|
+
return {
|
|
199
|
+
cell_id: "cell-1",
|
|
200
|
+
...(serialization === undefined ? {} : { serialization }),
|
|
201
|
+
} as CellMessage;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
it("leaves the hint unchanged when serialization is omitted", () => {
|
|
205
|
+
const cell = createCellRuntimeState({ serialization: "Valid" });
|
|
206
|
+
expect(transitionCell(cell, cellMessage()).serialization).toBe("Valid");
|
|
207
|
+
});
|
|
208
|
+
|
|
209
|
+
it("clears the hint when serialization is null", () => {
|
|
210
|
+
const cell = createCellRuntimeState({ serialization: "Valid" });
|
|
211
|
+
expect(transitionCell(cell, cellMessage(null)).serialization).toBeNull();
|
|
212
|
+
});
|
|
213
|
+
|
|
214
|
+
it("sets the hint when serialization is a string", () => {
|
|
215
|
+
const cell = createCellRuntimeState();
|
|
216
|
+
expect(transitionCell(cell, cellMessage("Valid")).serialization).toBe(
|
|
217
|
+
"Valid",
|
|
218
|
+
);
|
|
219
|
+
});
|
|
220
|
+
});
|
package/src/core/cells/cell.ts
CHANGED
|
@@ -73,7 +73,11 @@ export function transitionCell(
|
|
|
73
73
|
nextCell.output = message.output ?? nextCell.output;
|
|
74
74
|
nextCell.staleInputs = message.stale_inputs ?? nextCell.staleInputs;
|
|
75
75
|
nextCell.status = message.status ?? nextCell.status;
|
|
76
|
-
|
|
76
|
+
// Tri-state partial update: an omitted field (undefined) leaves the hint
|
|
77
|
+
// unchanged; null explicitly clears it; a string sets it.
|
|
78
|
+
if (message.serialization !== undefined) {
|
|
79
|
+
nextCell.serialization = message.serialization;
|
|
80
|
+
}
|
|
77
81
|
|
|
78
82
|
let didInterruptFromThisMessage = false;
|
|
79
83
|
|
|
@@ -28,10 +28,11 @@ interface VariableDeclaration {
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
function goToPosition(view: EditorView, from: number): void {
|
|
31
|
-
|
|
32
|
-
//
|
|
33
|
-
//
|
|
31
|
+
// Focus on the next frame: a synchronous focus is a no-op while a Radix
|
|
32
|
+
// context menu still owns focus, and codemirror would otherwise add a
|
|
33
|
+
// cursor from the pointer click.
|
|
34
34
|
requestAnimationFrame(() => {
|
|
35
|
+
view.focus();
|
|
35
36
|
view.dispatch({
|
|
36
37
|
selection: {
|
|
37
38
|
anchor: from,
|