@marimo-team/islands 0.23.6-dev7 → 0.23.6-dev9
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-Dfs7A8dK.js → chat-ui-Cyca6aKX.js} +2 -2
- package/dist/{code-visibility-DUSmneu7.js → code-visibility-B0kwrVA6.js} +2 -2
- package/dist/{html-to-image-DWbpEGa_.js → html-to-image-6VI69paz.js} +16 -17
- package/dist/main.js +5 -5
- package/dist/{process-output-CeXMg9XF.js → process-output-SkNR_Omd.js} +1 -1
- package/dist/{reveal-component-BURUyIS3.js → reveal-component-DlCLweHo.js} +2 -2
- package/package.json +1 -1
- package/src/core/cells/__tests__/apply-transaction.test.ts +193 -27
- package/src/core/cells/__tests__/document-changes.test.ts +14 -0
- package/src/core/cells/document-changes.ts +17 -14
|
@@ -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-TGGAUEWp.js";
|
|
9
|
-
import { C as AccordionContent, D as ChatBubbleIcon, En as Trash2, Ft as jotaiJsonStorage, G as cellErrorsAtom, Ht as allTablesAtom, It as variablesAtom, Kt as getRequestClient, Lt as PluralWord, Nn as Info, Ot as moveToEndOfEditor, P as base64ToDataURL, Rn as CircleX, S as Accordion, T as AccordionTrigger, Tn as Wrench, Tt as createVariableInfoElement, Ut as dataSourceConnectionsAtom, V as renderHTML, Wt as getTableType, Xt as singleFacet, Y as notebookAtom, _ as Boosts, _n as atomWithStorage, b as AIContextProvider, c as Popover, d as PopoverTrigger, f as isOutputEmpty, h as DatasourceContextProvider, jn as LoaderCircle, n as MarkdownRenderer, on as CellOutputId, s as Spinner, t as toPng, tn as ZodLocalStorage, u as PopoverContent, v as Sections, vt as displayCellName, w as AccordionItem, x as AIContextRegistry, y as contextToXml, yn as Anchor2 } from "./html-to-image-
|
|
9
|
+
import { C as AccordionContent, D as ChatBubbleIcon, En as Trash2, Ft as jotaiJsonStorage, G as cellErrorsAtom, Ht as allTablesAtom, It as variablesAtom, Kt as getRequestClient, Lt as PluralWord, Nn as Info, Ot as moveToEndOfEditor, P as base64ToDataURL, Rn as CircleX, S as Accordion, T as AccordionTrigger, Tn as Wrench, Tt as createVariableInfoElement, Ut as dataSourceConnectionsAtom, V as renderHTML, Wt as getTableType, Xt as singleFacet, Y as notebookAtom, _ as Boosts, _n as atomWithStorage, b as AIContextProvider, c as Popover, d as PopoverTrigger, f as isOutputEmpty, h as DatasourceContextProvider, jn as LoaderCircle, n as MarkdownRenderer, on as CellOutputId, s as Spinner, t as toPng, tn as ZodLocalStorage, u as PopoverContent, v as Sections, vt as displayCellName, w as AccordionItem, x as AIContextRegistry, y as contextToXml, yn as Anchor2 } from "./html-to-image-6VI69paz.js";
|
|
10
10
|
import "./chunk-5FQGJX7Z-CO1e63h_.js";
|
|
11
11
|
import { u as createLucideIcon } from "./dist-ESg7xyoD.js";
|
|
12
12
|
import { F as X, S as logNever, t as Strings } from "./strings-B_FOH6eV.js";
|
|
13
13
|
import { a as NumberField, b as DropdownMenuTrigger, d as DropdownMenuContent, p as DropdownMenuItem, r as Input, u as DropdownMenu } from "./input-Drx1pguW.js";
|
|
14
14
|
import { g as CircleQuestionMark } from "./toDate-yqOcZ_tY.js";
|
|
15
|
-
import { a as MarimoIncomingMessageEvent, d as File$1, n as blobToString, t as processOutput, u as deserializeBlob } from "./process-output-
|
|
15
|
+
import { a as MarimoIncomingMessageEvent, d as File$1, n as blobToString, t as processOutput, u as deserializeBlob } from "./process-output-SkNR_Omd.js";
|
|
16
16
|
import "./react-dom-BWRJ_g_k.js";
|
|
17
17
|
import { t as require_jsx_runtime } from "./jsx-runtime-COBk7ree.js";
|
|
18
18
|
import { 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-BxdsqRPd.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-TGGAUEWp.js";
|
|
9
|
-
import { $ as useCellActions, $t as getTracebackInfo, A as ChevronRightIcon, An as Minus, Bn as Braces, C as AccordionContent, En as Trash2, Ft as jotaiJsonStorage, Hn as import_lib, I as base64ToUint8Array, Jt as useRequestClient, Kt as getRequestClient, Lt as PluralWord, M as PinLeftIcon, Mt as useChromeActions, N as PinRightIcon, O as CheckIcon, Pn as FileText, Pt as adaptForLocalStorage, Qt as extractAllTracebackInfo, R as extractBase64FromDataURL, Rn as CircleX, S as Accordion, St as Checkbox, T as AccordionTrigger, Tn as Wrench, V as renderHTML, Vn as esm_default, Y as notebookAtom, Zt as elementContainsMarimoCellFile, _n as atomWithStorage, _t as getCellDomProps, at as AnsiUp, bn as Close$1, c as Popover, cn as SCRATCH_CELL_ID, ct as kioskModeAtom, d as PopoverTrigger, dt as outputIsLoading, et as useCellIds, g as getDatasourceContext, gt as DATA_CELL_ID, hn as jsonToTSV, ht as sanitizeHtml, j as DotFilledIcon, jn as LoaderCircle, kn as NotebookPen, kt as goToCellLine, l as PopoverClose$1, lt as useInstallAllowed, m as useExpandedOutput, mn as jsonToMarkdown, n as MarkdownRenderer, nn as filenameAtom, on as CellOutputId, pn as jsonParseWithSpecialChar, q as getCellEditorView, s as Spinner, sn as HTMLCellId, t as toPng, tt as useCellNames, u as PopoverContent, ut as viewStateAtom, vt as displayCellName, w as AccordionItem, 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 Minus, Bn as Braces, C as AccordionContent, En as Trash2, Ft as jotaiJsonStorage, Hn as import_lib, I as base64ToUint8Array, Jt as useRequestClient, Kt as getRequestClient, Lt as PluralWord, M as PinLeftIcon, Mt as useChromeActions, N as PinRightIcon, O as CheckIcon, Pn as FileText, Pt as adaptForLocalStorage, Qt as extractAllTracebackInfo, R as extractBase64FromDataURL, Rn as CircleX, S as Accordion, St as Checkbox, T as AccordionTrigger, Tn as Wrench, V as renderHTML, Vn as esm_default, Y as notebookAtom, Zt as elementContainsMarimoCellFile, _n as atomWithStorage, _t as getCellDomProps, at as AnsiUp, bn as Close$1, c as Popover, cn as SCRATCH_CELL_ID, ct as kioskModeAtom, d as PopoverTrigger, dt as outputIsLoading, et as useCellIds, g as getDatasourceContext, gt as DATA_CELL_ID, hn as jsonToTSV, ht as sanitizeHtml, j as DotFilledIcon, jn as LoaderCircle, kn as NotebookPen, kt as goToCellLine, l as PopoverClose$1, lt as useInstallAllowed, m as useExpandedOutput, mn as jsonToMarkdown, n as MarkdownRenderer, nn as filenameAtom, on as CellOutputId, pn as jsonParseWithSpecialChar, q as getCellEditorView, s as Spinner, sn as HTMLCellId, t as toPng, tt as useCellNames, u as PopoverContent, ut as viewStateAtom, vt as displayCellName, w as AccordionItem, z as isDataURLString, zt as DATA_TYPE_ICON, __tla as __tla_0 } from "./html-to-image-6VI69paz.js";
|
|
10
10
|
import { o as useSize, u as createLucideIcon } from "./dist-ESg7xyoD.js";
|
|
11
11
|
import { i as createReducerAndAtoms, r as Badge } from "./useLifecycle-smVfjLNI.js";
|
|
12
12
|
import { a as ListFilter, i as Table$1, o as ChartPie, t as $896ba0a80a8f4d36$export$85fd5fdf27bacc79 } from "./useDateFormatter-B3mCQMP3.js";
|
|
@@ -25391,7 +25391,7 @@ ${_}`,
|
|
|
25391
25391
|
return Logger.warn("Failed to get version from mount config"), null;
|
|
25392
25392
|
}
|
|
25393
25393
|
}
|
|
25394
|
-
marimoVersionAtom = atom(getVersionFromMountConfig() || "0.23.6-
|
|
25394
|
+
marimoVersionAtom = atom(getVersionFromMountConfig() || "0.23.6-dev9");
|
|
25395
25395
|
showCodeInRunModeAtom = atom(true);
|
|
25396
25396
|
atom(null);
|
|
25397
25397
|
var import_compiler_runtime = require_compiler_runtime();
|
|
@@ -24889,11 +24889,16 @@ ${n.sqlString}
|
|
|
24889
24889
|
}
|
|
24890
24890
|
function columnChanges(e, t) {
|
|
24891
24891
|
let n = columnIndexMap(e), r = columnIndexMap(t), i = [];
|
|
24892
|
-
for (let [e2,
|
|
24893
|
-
|
|
24894
|
-
|
|
24895
|
-
|
|
24896
|
-
|
|
24892
|
+
for (let [e2, a] of r) if (n.get(e2) !== a) {
|
|
24893
|
+
let n2 = getCell(e2, t);
|
|
24894
|
+
i.push({
|
|
24895
|
+
type: "set-config",
|
|
24896
|
+
cellId: e2,
|
|
24897
|
+
column: a,
|
|
24898
|
+
disabled: (n2 == null ? void 0 : n2.config.disabled) ?? false,
|
|
24899
|
+
hideCode: (n2 == null ? void 0 : n2.config.hide_code) ?? false
|
|
24900
|
+
});
|
|
24901
|
+
}
|
|
24897
24902
|
return i.push({
|
|
24898
24903
|
type: "reorder-cells",
|
|
24899
24904
|
cellIds: t.cellIds.inOrderIds
|
|
@@ -24947,22 +24952,16 @@ ${n.sqlString}
|
|
|
24947
24952
|
] : [];
|
|
24948
24953
|
}
|
|
24949
24954
|
case "updateCellConfig": {
|
|
24950
|
-
let { cellId: e2
|
|
24951
|
-
return [
|
|
24955
|
+
let { cellId: e2 } = n.payload, r = getCell(e2, t);
|
|
24956
|
+
return r ? [
|
|
24952
24957
|
{
|
|
24953
24958
|
type: "set-config",
|
|
24954
24959
|
cellId: e2,
|
|
24955
|
-
|
|
24956
|
-
|
|
24957
|
-
|
|
24958
|
-
...t2.disabled != null && {
|
|
24959
|
-
disabled: t2.disabled
|
|
24960
|
-
},
|
|
24961
|
-
...t2.column != null && {
|
|
24962
|
-
column: t2.column
|
|
24963
|
-
}
|
|
24960
|
+
column: r.config.column ?? null,
|
|
24961
|
+
disabled: r.config.disabled ?? false,
|
|
24962
|
+
hideCode: r.config.hide_code ?? false
|
|
24964
24963
|
}
|
|
24965
|
-
];
|
|
24964
|
+
] : [];
|
|
24966
24965
|
}
|
|
24967
24966
|
case "dropOverNewColumn":
|
|
24968
24967
|
case "moveColumn":
|
package/dist/main.js
CHANGED
|
@@ -22,18 +22,18 @@ 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-TGGAUEWp.js";
|
|
25
|
-
import { $ as useCellActions, At as DeferredRequestRegistry, B as safeExtractSetUIElementMessageBuffers, Bn as Braces, Bt as getDataTypeColor, C as AccordionContent, Cn as Root2$1, Ct as customPythonLanguageSupport, Dn as Table2, Dt as Paths, E as BorderAllIcon, En as Trash2, Et as PathBuilder, F as base64ToDataView, Fn as Eye, 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 Layers, Nn as Info, Nt as repl, On as PaintRoller, Pn as FileText, Q as reducer, Rt as PluralWords, S as Accordion, Sn as Item$1, St as Checkbox, T as AccordionTrigger, 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 atomWithStorage, a as useLastFocusedCellId, an as parseInitialValue, 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 atomWithReducer, i as useCellFocusActions, in as parseDataset, jn as LoaderCircle, jt as generateUUID, k as ChevronDownIcon, ln as UIElementId, mt as headingToIdentifier, nt as createCell, o as maybeAddAltairImport, ot as getInitialAppMode, p as useExpandedConsoleOutput, pn as jsonParseWithSpecialChar, pt as isErrorMime, qt as requestClientAtom, r as LazyAnyLanguageCodeMirror, rn as parseAttrValue, s as Spinner, sn as HTMLCellId, st as initialModeAtom, un as findCellId, vn as selectAtom, w as AccordionItem, wn as Trigger2, wt as MarkdownLanguageAdapter, xn as Content2, 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, At as DeferredRequestRegistry, B as safeExtractSetUIElementMessageBuffers, Bn as Braces, Bt as getDataTypeColor, C as AccordionContent, Cn as Root2$1, Ct as customPythonLanguageSupport, Dn as Table2, Dt as Paths, E as BorderAllIcon, En as Trash2, Et as PathBuilder, F as base64ToDataView, Fn as Eye, 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 Layers, Nn as Info, Nt as repl, On as PaintRoller, Pn as FileText, Q as reducer, Rt as PluralWords, S as Accordion, Sn as Item$1, St as Checkbox, T as AccordionTrigger, 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 atomWithStorage, a as useLastFocusedCellId, an as parseInitialValue, 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 atomWithReducer, i as useCellFocusActions, in as parseDataset, jn as LoaderCircle, jt as generateUUID, k as ChevronDownIcon, ln as UIElementId, mt as headingToIdentifier, nt as createCell, o as maybeAddAltairImport, ot as getInitialAppMode, p as useExpandedConsoleOutput, pn as jsonParseWithSpecialChar, pt as isErrorMime, qt as requestClientAtom, r as LazyAnyLanguageCodeMirror, rn as parseAttrValue, s as Spinner, sn as HTMLCellId, st as initialModeAtom, un as findCellId, vn as selectAtom, w as AccordionItem, wn as Trigger2, wt as MarkdownLanguageAdapter, xn as Content2, xt as normalizeName, yt as getValidName, zn as CircleAlert, zt as DATA_TYPE_ICON, __tla as __tla_0 } from "./html-to-image-6VI69paz.js";
|
|
26
26
|
import { __tla as __tla_1 } from "./chunk-5FQGJX7Z-CO1e63h_.js";
|
|
27
27
|
import { o as useSize, s as Root$3, u as createLucideIcon } from "./dist-ESg7xyoD.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-BKWq0wn2.js";
|
|
29
|
-
import { $ as getPageIndexForRow, A as contextAwarePanelType, At as GripHorizontal, B as TableHead, Bt as ChevronsDownUp, C as useInternalStateWithSync, Ct as RenderTextWithLinks, D as PANEL_TYPES, Dt as getStaticVirtualFiles, E as ContextAwarePanelItem, Et as EmotionCacheProvider, F as Fill, Ft as Download, G as inferFieldTypes, H as TableRow, Ht as ArrowDownWideNarrow, I as Provider$1, It as Code, J as ColumnChartSpecModel, K as renderCellValue, L as Table, Lt as ChevronsUpDown, M as SlotNames, Mt as EyeOff, N as slotsController, O as contextAwarePanelOpen, Ot as isStaticNotebook, P as Toggle, Pt as Ellipsis, Q as filtersToFilterGroup, R as TableBody, Rt as ChevronsRight, S as prettifyRowCount, St as useOverflowDetection, T as ComboboxItem, Tt as HtmlOutput, U as NAMELESS_COLUMN_PREFIX, V as TableHeader, Vt as ChevronLeft, W as generateColumns, X as useIntersectionObserver, Y as DelayMount, Z as usePrevious$1, _ as downloadBlob, _t as TabsTrigger, at as toFieldTypes, b as Filenames, bt as ChartLoadingState, c as Slide, ct as CommandEmpty, d as JsonOutput, dt as CommandList, et as loadTableAndRawData, f as OutputArea, ft as CommandSeparator, g as ADD_PRINTING_CLASS, gt as TabsList, h as InstallPackageButton, ht as TabsContent, it as TOO_MANY_ROWS, j as isCellAwareAtom, jt as Funnel, k as contextAwarePanelOwner, kt as TextWrap, l as RadioGroup, lt as CommandInput, m as DataTable, mt as Tabs, n as marimoVersionAtom, nt as INDEX_COLUMN_NAME, o as SLIDE_TYPE_OPTIONS_BY_VALUE, ot as getMimeValues, p as OutputRenderer, pt as Maps, q as ColumnChartContext, r as showCodeInRunModeAtom, rt as SELECT_COLUMN_ID, st as Command, t as useNotebookCodeAvailable, tt as loadTableData, u as RadioGroupItem, ut as CommandItem, v as downloadByURL, vt as ChartErrorState, w as Combobox, wt as Kbd, x as prettifyRowColumnCount, xt as LazyVegaEmbed, y as downloadHTMLAsImage, yt as ChartInfoState, z as TableCell, zt as ChevronsLeft, __tla as __tla_2 } from "./code-visibility-
|
|
29
|
+
import { $ as getPageIndexForRow, A as contextAwarePanelType, At as GripHorizontal, B as TableHead, Bt as ChevronsDownUp, C as useInternalStateWithSync, Ct as RenderTextWithLinks, D as PANEL_TYPES, Dt as getStaticVirtualFiles, E as ContextAwarePanelItem, Et as EmotionCacheProvider, F as Fill, Ft as Download, G as inferFieldTypes, H as TableRow, Ht as ArrowDownWideNarrow, I as Provider$1, It as Code, J as ColumnChartSpecModel, K as renderCellValue, L as Table, Lt as ChevronsUpDown, M as SlotNames, Mt as EyeOff, N as slotsController, O as contextAwarePanelOpen, Ot as isStaticNotebook, P as Toggle, Pt as Ellipsis, Q as filtersToFilterGroup, R as TableBody, Rt as ChevronsRight, S as prettifyRowCount, St as useOverflowDetection, T as ComboboxItem, Tt as HtmlOutput, U as NAMELESS_COLUMN_PREFIX, V as TableHeader, Vt as ChevronLeft, W as generateColumns, X as useIntersectionObserver, Y as DelayMount, Z as usePrevious$1, _ as downloadBlob, _t as TabsTrigger, at as toFieldTypes, b as Filenames, bt as ChartLoadingState, c as Slide, ct as CommandEmpty, d as JsonOutput, dt as CommandList, et as loadTableAndRawData, f as OutputArea, ft as CommandSeparator, g as ADD_PRINTING_CLASS, gt as TabsList, h as InstallPackageButton, ht as TabsContent, it as TOO_MANY_ROWS, j as isCellAwareAtom, jt as Funnel, k as contextAwarePanelOwner, kt as TextWrap, l as RadioGroup, lt as CommandInput, m as DataTable, mt as Tabs, n as marimoVersionAtom, nt as INDEX_COLUMN_NAME, o as SLIDE_TYPE_OPTIONS_BY_VALUE, ot as getMimeValues, p as OutputRenderer, pt as Maps, q as ColumnChartContext, r as showCodeInRunModeAtom, rt as SELECT_COLUMN_ID, st as Command, t as useNotebookCodeAvailable, tt as loadTableData, u as RadioGroupItem, ut as CommandItem, v as downloadByURL, vt as ChartErrorState, w as Combobox, wt as Kbd, x as prettifyRowColumnCount, xt as LazyVegaEmbed, y as downloadHTMLAsImage, yt as ChartInfoState, z as TableCell, zt as ChevronsLeft, __tla as __tla_2 } from "./code-visibility-B0kwrVA6.js";
|
|
30
30
|
import { c as Calendar, i as createReducerAndAtoms, n as useOnUnmount, o as ToggleLeft, t as useOnMount } from "./useLifecycle-smVfjLNI.js";
|
|
31
31
|
import { n as $fb18d541ea1ad717$export$ad991b66133851cf, r as $5a387cc49350e6db$export$722debc0e56fea39, t as $896ba0a80a8f4d36$export$85fd5fdf27bacc79 } from "./useDateFormatter-B3mCQMP3.js";
|
|
32
32
|
import { t as Check } from "./check-CFM2mVDr.js";
|
|
33
33
|
import { A as Trigger$1, C as $a916eb452884faea$export$b7a616150fdb9f44, D as $b5e257d569688ac6$export$535bd6ca7f90a273, 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, f as selectStyles, 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, w as $488c6ddbf4ef74c2$export$cc77c4ff7e8673c5, x as assertNever } from "./strings-B_FOH6eV.js";
|
|
34
34
|
import { $ as $e5be200c675c3b3a$export$aca958c65c314e6c, A as $d2b4bc8c273e7be6$export$24d547caef80ccd1, At as $c87311424ea30a05$export$fedb369cb70207f1, B as $64fa3d84918910a7$export$c62b8e45d58ddad9, Bt as $431fbd86ca7dc216$export$f21a1ffae260145a, C as $a049562f99e7db0e$export$eb2fcfdbd7ba97d4, Ct as $8ae05eaa5c114e9c$export$7f54fc3180508a52, D as $ee014567cb39d3f0$export$ff05c3ac10437e03, Dt as $c87311424ea30a05$export$78551043582a6a98, E as $ee014567cb39d3f0$export$f551688fc98f2e09, Et as $c87311424ea30a05$export$6446a186d09e379e, F as $64fa3d84918910a7$export$2881499e37b75b9a, Ft as $d4ee10de306f2510$export$b4f377a2b6254582, H as $64fa3d84918910a7$export$ef03459518577ad4, Ht as $bdb11010cef70236$export$b4cc09c592e8fdb8, I as $64fa3d84918910a7$export$29f1550f4b0d4415, It as $d4ee10de306f2510$export$cd4e5573fbe2b576, J as $d2e8511e6f209edf$export$e908e06f4b8e3402, K as useDebounceControlledState, L as $64fa3d84918910a7$export$4d86445c2cf5e3, Lt as $d4ee10de306f2510$export$e58f029f0fbfdb29, M as $01b77f81d0f07f68$export$75b6ee27786ba447, Mt as $65484d02dcb7eb3e$export$457c3d6518dd4c6f, N as $01b77f81d0f07f68$export$b04be29aa201d4f5, Nt as $3ef42575df84b30b$export$9d1611c77c2fe928, O as $514c0188e459b4c0$export$5f1af8db9871e1d6, Ot as $c87311424ea30a05$export$9ac100e40613ea10, P as $f39a9eba43920ace$export$b5d7cc18bb8d2b59, Pt as $d4ee10de306f2510$export$4282f70798064fe0, Q as $e5be200c675c3b3a$export$a763b9476acd3eb, R as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8, Rt as $f4e2df6bd15f8569$export$98658e8c59125e6a, S as $3985021b0ad6602f$export$f5b8910cec6cf069, St as $e9faafb641e167db$export$90fc3a17d93f704c, T as $d3e0e05bdfcf66bd$export$c24727297075ec6a, Tt as $313b98861ee5dd6c$export$d6875122194c7b44, U as $64fa3d84918910a7$export$fabf2dc03a41866e, Ut as $bdb11010cef70236$export$f680877a34711e37, V as $64fa3d84918910a7$export$df3a06d6289f983e, Vt as $ff5963eb1fccf552$export$e08e3b67e392101e, Wt as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c, X as $e93e671b31057976$export$b8473d3665f3a75a, Y as $2baaea4c71418dea$export$294aa081a6c6f55d, Z as $e5be200c675c3b3a$export$75ee7c75d68f5b0e, _t as $9446cca9a3875146$export$7d15b64cf5a3a4c4, a as NumberField, at as $6c7bd7858deea686$export$cd11ab140839f11d, b as DropdownMenuTrigger, bt as $b4b717babfbb907b$export$bebd5a1431fec25d, c as prettyNumber, ct as $6db58dc88e78b024$export$2f817fcdc4b89ae0, d as DropdownMenuContent, dt as $9ab94262bd0047c7$export$420e68273165f4ec, et as $e5be200c675c3b3a$export$dad6ae84456c676a, f as DropdownMenuGroup, fn as Circle, ft as $3ad3f6e1647bc98d$export$80f3e147d781571c, g as DropdownMenuSeparator, gt as $ae1eeba8b9eafd08$export$5165eccb35aaadb5, ht as _class_private_field_init, i as OnBlurredInput, it as $701a24aa0da5b062$export$ea18c227d4417cc3, j as $d2b4bc8c273e7be6$export$353f5b6fc5456de1, jt as $7215afc6de606d6b$export$de79e2c695e052f3, k as $514c0188e459b4c0$export$9afb8bc826b033ea, kt as $c87311424ea30a05$export$a11b0059900ceec8, l as prettyScientificNumber, lt as $5b160d28a433310d$export$c17fa47878dc55b6, m as DropdownMenuLabel, mt as $f6c31cce2adf654f$export$45712eceda6fad21, n as DebouncedNumberInput, nt as $319e236875307eab$export$a9b970dcc4ae71a9, ot as $fca6afa0e843324b$export$87b761675e8eaa10, p as DropdownMenuItem, pn as ChevronRight, pt as $507fabe10e71c6fb$export$630ff653c5ada6a9, q as useDebouncedCallback, r as Input, rt as $f7dceffc5ad7768b$export$4e328f61c538687f, st as $fca6afa0e843324b$export$f12b703ca79dfbb1, t as DebouncedInput, tt as $e5be200c675c3b3a$export$fc1a364ae1f3ff10, u as DropdownMenu, ut as $6179b936705e76d3$export$ae780daf29e6d456, vt as $458b0a5536c1a7cf$export$40bfa8c7b0832715, w as $a049562f99e7db0e$export$f9c6924e160136d1, wt as $df56164dff5785e2$export$4338b53315abf666, x as $3985021b0ad6602f$export$37fb8590cf2c088c, xt as $99facab73266f662$export$5add1d006293d136, yt as $b4b717babfbb907b$export$4c063cf1350e6fed, z as $64fa3d84918910a7$export$c245e6201fed2f75, zt as $431fbd86ca7dc216$export$b204af158042fbac } from "./input-Drx1pguW.js";
|
|
35
35
|
import { c as asRemoteURL, f as require_cuid2, g as CircleQuestionMark, h as isWasm, m as Deferred, u as appendQueryParams } from "./toDate-yqOcZ_tY.js";
|
|
36
|
-
import { a as MarimoIncomingMessageEvent, c as MarimoValueUpdateEvent, d 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-
|
|
36
|
+
import { a as MarimoIncomingMessageEvent, c as MarimoValueUpdateEvent, d 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-SkNR_Omd.js";
|
|
37
37
|
import { i as Pencil, n as Trash, r as Plus, t as BulkEdit } from "./types-DBtDeUKD.js";
|
|
38
38
|
import { t as require_react_dom } from "./react-dom-BWRJ_g_k.js";
|
|
39
39
|
import { t as require_jsx_runtime } from "./jsx-runtime-COBk7ree.js";
|
|
@@ -13655,7 +13655,7 @@ Defaulting to \`null\`.`;
|
|
|
13655
13655
|
};
|
|
13656
13656
|
}
|
|
13657
13657
|
};
|
|
13658
|
-
var LazyChatbot = import_react.lazy(() => import("./chat-ui-
|
|
13658
|
+
var LazyChatbot = import_react.lazy(() => import("./chat-ui-Cyca6aKX.js").then((e) => ({
|
|
13659
13659
|
default: e.Chatbot
|
|
13660
13660
|
}))), messageSchema = array(object({
|
|
13661
13661
|
id: string(),
|
|
@@ -44649,7 +44649,7 @@ ${c}
|
|
|
44649
44649
|
if (l && l !== "slide") return l;
|
|
44650
44650
|
if (c == null ? void 0 : c.has(e)) return "skip";
|
|
44651
44651
|
}
|
|
44652
|
-
var LazySlidesComponent = import_react.lazy(() => import("./reveal-component-
|
|
44652
|
+
var LazySlidesComponent = import_react.lazy(() => import("./reveal-component-DlCLweHo.js"));
|
|
44653
44653
|
const SlidesLayoutPlugin = {
|
|
44654
44654
|
type: "slides",
|
|
44655
44655
|
name: "Slides",
|
|
@@ -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-6VI69paz.js";
|
|
4
4
|
import { u as createLucideIcon } from "./dist-ESg7xyoD.js";
|
|
5
5
|
import { t as Strings } from "./strings-B_FOH6eV.js";
|
|
6
6
|
import { t as require_jsx_runtime } from "./jsx-runtime-COBk7ree.js";
|
|
@@ -6,9 +6,9 @@ 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-CA5pI2YF.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 "./html-to-image-
|
|
9
|
+
import "./html-to-image-6VI69paz.js";
|
|
10
10
|
import "./chunk-5FQGJX7Z-CO1e63h_.js";
|
|
11
|
-
import { It as Code, Mt as EyeOff, Nt as Expand, a as DEFAULT_SLIDE_TYPE, c as Slide, i as DEFAULT_DECK_TRANSITION, s as SlideSidebar, t as useNotebookCodeAvailable } from "./code-visibility-
|
|
11
|
+
import { It as Code, Mt as EyeOff, Nt as Expand, a as DEFAULT_SLIDE_TYPE, c as Slide, i as DEFAULT_DECK_TRANSITION, s as SlideSidebar, t as useNotebookCodeAvailable } from "./code-visibility-B0kwrVA6.js";
|
|
12
12
|
import "./input-Drx1pguW.js";
|
|
13
13
|
import "./toDate-yqOcZ_tY.js";
|
|
14
14
|
import "./react-dom-BWRJ_g_k.js";
|
package/package.json
CHANGED
|
@@ -469,10 +469,34 @@ describe("applyTransactionChanges column rebuild", () => {
|
|
|
469
469
|
const [a, b, c, d] = state.cellIds.inOrderIds;
|
|
470
470
|
apply([
|
|
471
471
|
{ type: "reorder-cells", cellIds: [a, b, c, d] },
|
|
472
|
-
{
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
472
|
+
{
|
|
473
|
+
type: "set-config",
|
|
474
|
+
cellId: a,
|
|
475
|
+
column: 0,
|
|
476
|
+
disabled: false,
|
|
477
|
+
hideCode: false,
|
|
478
|
+
},
|
|
479
|
+
{
|
|
480
|
+
type: "set-config",
|
|
481
|
+
cellId: b,
|
|
482
|
+
column: 1,
|
|
483
|
+
disabled: false,
|
|
484
|
+
hideCode: false,
|
|
485
|
+
},
|
|
486
|
+
{
|
|
487
|
+
type: "set-config",
|
|
488
|
+
cellId: c,
|
|
489
|
+
column: 0,
|
|
490
|
+
disabled: false,
|
|
491
|
+
hideCode: false,
|
|
492
|
+
},
|
|
493
|
+
{
|
|
494
|
+
type: "set-config",
|
|
495
|
+
cellId: d,
|
|
496
|
+
column: 1,
|
|
497
|
+
disabled: false,
|
|
498
|
+
hideCode: false,
|
|
499
|
+
},
|
|
476
500
|
]);
|
|
477
501
|
// a and c in col0; b and d in col1. Order within each column follows
|
|
478
502
|
// the reorder-cells order.
|
|
@@ -487,7 +511,15 @@ describe("applyTransactionChanges column rebuild", () => {
|
|
|
487
511
|
it("set-config without reorder-cells moves the cell to the new column", () => {
|
|
488
512
|
setup("a", "b", "c");
|
|
489
513
|
const [, b] = state.cellIds.inOrderIds;
|
|
490
|
-
apply([
|
|
514
|
+
apply([
|
|
515
|
+
{
|
|
516
|
+
type: "set-config",
|
|
517
|
+
cellId: b,
|
|
518
|
+
column: 1,
|
|
519
|
+
disabled: false,
|
|
520
|
+
hideCode: false,
|
|
521
|
+
},
|
|
522
|
+
]);
|
|
491
523
|
// Without reorder-cells, the flat order comes from the current tree.
|
|
492
524
|
// b gets explicit col=1; a and c stay with default null → follow the
|
|
493
525
|
// previous cell's column (a → col0 because prev=0; c → col1 because
|
|
@@ -503,7 +535,15 @@ describe("applyTransactionChanges column rebuild", () => {
|
|
|
503
535
|
it("no column change: set-config only touching other fields does not repartition", () => {
|
|
504
536
|
setup("a", "b", "c");
|
|
505
537
|
const [, b] = state.cellIds.inOrderIds;
|
|
506
|
-
apply([
|
|
538
|
+
apply([
|
|
539
|
+
{
|
|
540
|
+
type: "set-config",
|
|
541
|
+
cellId: b,
|
|
542
|
+
column: null,
|
|
543
|
+
disabled: false,
|
|
544
|
+
hideCode: true,
|
|
545
|
+
},
|
|
546
|
+
]);
|
|
507
547
|
// All three cells remain in a single column. No rebuild triggered.
|
|
508
548
|
expect(prettyColumns(state)).toMatchInlineSnapshot(`
|
|
509
549
|
"
|
|
@@ -525,8 +565,20 @@ describe("applyTransactionChanges column rebuild", () => {
|
|
|
525
565
|
const [a, b] = state.cellIds.inOrderIds;
|
|
526
566
|
apply([
|
|
527
567
|
{ type: "reorder-cells", cellIds: [a, b] },
|
|
528
|
-
{
|
|
529
|
-
|
|
568
|
+
{
|
|
569
|
+
type: "set-config",
|
|
570
|
+
cellId: a,
|
|
571
|
+
column: 0,
|
|
572
|
+
disabled: false,
|
|
573
|
+
hideCode: false,
|
|
574
|
+
},
|
|
575
|
+
{
|
|
576
|
+
type: "set-config",
|
|
577
|
+
cellId: b,
|
|
578
|
+
column: 1,
|
|
579
|
+
disabled: false,
|
|
580
|
+
hideCode: false,
|
|
581
|
+
},
|
|
530
582
|
]);
|
|
531
583
|
expect(prettyColumns(state)).toMatchInlineSnapshot(`
|
|
532
584
|
"
|
|
@@ -550,8 +602,20 @@ describe("applyTransactionChanges column rebuild", () => {
|
|
|
550
602
|
const [a, b, c, d] = state.cellIds.inOrderIds;
|
|
551
603
|
apply([
|
|
552
604
|
{ type: "reorder-cells", cellIds: [a, b, c, d] },
|
|
553
|
-
{
|
|
554
|
-
|
|
605
|
+
{
|
|
606
|
+
type: "set-config",
|
|
607
|
+
cellId: a,
|
|
608
|
+
column: 0,
|
|
609
|
+
disabled: false,
|
|
610
|
+
hideCode: false,
|
|
611
|
+
},
|
|
612
|
+
{
|
|
613
|
+
type: "set-config",
|
|
614
|
+
cellId: c,
|
|
615
|
+
column: 1,
|
|
616
|
+
disabled: false,
|
|
617
|
+
hideCode: false,
|
|
618
|
+
},
|
|
555
619
|
]);
|
|
556
620
|
expect(prettyColumns(state)).toMatchInlineSnapshot(`
|
|
557
621
|
"
|
|
@@ -562,8 +626,20 @@ describe("applyTransactionChanges column rebuild", () => {
|
|
|
562
626
|
// Now merge everything back to col 0.
|
|
563
627
|
apply([
|
|
564
628
|
{ type: "reorder-cells", cellIds: [a, b, c, d] },
|
|
565
|
-
{
|
|
566
|
-
|
|
629
|
+
{
|
|
630
|
+
type: "set-config",
|
|
631
|
+
cellId: c,
|
|
632
|
+
column: 0,
|
|
633
|
+
disabled: false,
|
|
634
|
+
hideCode: false,
|
|
635
|
+
},
|
|
636
|
+
{
|
|
637
|
+
type: "set-config",
|
|
638
|
+
cellId: d,
|
|
639
|
+
column: 0,
|
|
640
|
+
disabled: false,
|
|
641
|
+
hideCode: false,
|
|
642
|
+
},
|
|
567
643
|
]);
|
|
568
644
|
expect(prettyColumns(state)).toMatchInlineSnapshot(`
|
|
569
645
|
"
|
|
@@ -609,8 +685,20 @@ describe("applyTransactionChanges column rebuild", () => {
|
|
|
609
685
|
{ type: "reorder-cells", cellIds: [a, b, c] },
|
|
610
686
|
{ type: "set-code", cellId: a, code: "x = 1" },
|
|
611
687
|
{ type: "set-name", cellId: b, name: "middle" },
|
|
612
|
-
{
|
|
613
|
-
|
|
688
|
+
{
|
|
689
|
+
type: "set-config",
|
|
690
|
+
cellId: a,
|
|
691
|
+
column: 0,
|
|
692
|
+
disabled: false,
|
|
693
|
+
hideCode: false,
|
|
694
|
+
},
|
|
695
|
+
{
|
|
696
|
+
type: "set-config",
|
|
697
|
+
cellId: b,
|
|
698
|
+
column: 1,
|
|
699
|
+
disabled: false,
|
|
700
|
+
hideCode: false,
|
|
701
|
+
},
|
|
614
702
|
]);
|
|
615
703
|
expect(prettyColumns(state)).toMatchInlineSnapshot(`
|
|
616
704
|
"
|
|
@@ -658,8 +746,20 @@ describe("applyTransactionChanges column rebuild", () => {
|
|
|
658
746
|
// Split into two columns. Only a and c are anchors.
|
|
659
747
|
apply([
|
|
660
748
|
{ type: "reorder-cells", cellIds: [a, b, c, d] },
|
|
661
|
-
{
|
|
662
|
-
|
|
749
|
+
{
|
|
750
|
+
type: "set-config",
|
|
751
|
+
cellId: a,
|
|
752
|
+
column: 0,
|
|
753
|
+
disabled: false,
|
|
754
|
+
hideCode: false,
|
|
755
|
+
},
|
|
756
|
+
{
|
|
757
|
+
type: "set-config",
|
|
758
|
+
cellId: c,
|
|
759
|
+
column: 1,
|
|
760
|
+
disabled: false,
|
|
761
|
+
hideCode: false,
|
|
762
|
+
},
|
|
663
763
|
]);
|
|
664
764
|
expect(prettyColumns(state)).toMatchInlineSnapshot(`
|
|
665
765
|
"
|
|
@@ -670,7 +770,13 @@ describe("applyTransactionChanges column rebuild", () => {
|
|
|
670
770
|
// Move the c anchor to col 0. d has no explicit column so it follows c.
|
|
671
771
|
apply([
|
|
672
772
|
{ type: "reorder-cells", cellIds: [a, b, c, d] },
|
|
673
|
-
{
|
|
773
|
+
{
|
|
774
|
+
type: "set-config",
|
|
775
|
+
cellId: c,
|
|
776
|
+
column: 0,
|
|
777
|
+
disabled: false,
|
|
778
|
+
hideCode: false,
|
|
779
|
+
},
|
|
674
780
|
]);
|
|
675
781
|
expect(prettyColumns(state)).toMatchInlineSnapshot(`
|
|
676
782
|
"
|
|
@@ -686,9 +792,27 @@ describe("applyTransactionChanges column rebuild", () => {
|
|
|
686
792
|
const [a, b, c, d] = state.cellIds.inOrderIds;
|
|
687
793
|
apply([
|
|
688
794
|
{ type: "reorder-cells", cellIds: [a, b, c, d] },
|
|
689
|
-
{
|
|
690
|
-
|
|
691
|
-
|
|
795
|
+
{
|
|
796
|
+
type: "set-config",
|
|
797
|
+
cellId: a,
|
|
798
|
+
column: 0,
|
|
799
|
+
disabled: false,
|
|
800
|
+
hideCode: false,
|
|
801
|
+
},
|
|
802
|
+
{
|
|
803
|
+
type: "set-config",
|
|
804
|
+
cellId: c,
|
|
805
|
+
column: 1,
|
|
806
|
+
disabled: false,
|
|
807
|
+
hideCode: false,
|
|
808
|
+
},
|
|
809
|
+
{
|
|
810
|
+
type: "set-config",
|
|
811
|
+
cellId: d,
|
|
812
|
+
column: 1,
|
|
813
|
+
disabled: false,
|
|
814
|
+
hideCode: false,
|
|
815
|
+
},
|
|
692
816
|
]);
|
|
693
817
|
expect(prettyColumns(state)).toMatchInlineSnapshot(`
|
|
694
818
|
"
|
|
@@ -700,7 +824,13 @@ describe("applyTransactionChanges column rebuild", () => {
|
|
|
700
824
|
// does NOT follow c.
|
|
701
825
|
apply([
|
|
702
826
|
{ type: "reorder-cells", cellIds: [a, b, c, d] },
|
|
703
|
-
{
|
|
827
|
+
{
|
|
828
|
+
type: "set-config",
|
|
829
|
+
cellId: c,
|
|
830
|
+
column: 0,
|
|
831
|
+
disabled: false,
|
|
832
|
+
hideCode: false,
|
|
833
|
+
},
|
|
704
834
|
]);
|
|
705
835
|
expect(prettyColumns(state)).toMatchInlineSnapshot(`
|
|
706
836
|
"
|
|
@@ -719,8 +849,20 @@ describe("applyTransactionChanges column rebuild", () => {
|
|
|
719
849
|
const [a, b, c, d] = state.cellIds.inOrderIds;
|
|
720
850
|
apply([
|
|
721
851
|
// set-config appears FIRST in the transaction.
|
|
722
|
-
{
|
|
723
|
-
|
|
852
|
+
{
|
|
853
|
+
type: "set-config",
|
|
854
|
+
cellId: a,
|
|
855
|
+
column: 0,
|
|
856
|
+
disabled: false,
|
|
857
|
+
hideCode: false,
|
|
858
|
+
},
|
|
859
|
+
{
|
|
860
|
+
type: "set-config",
|
|
861
|
+
cellId: c,
|
|
862
|
+
column: 1,
|
|
863
|
+
disabled: false,
|
|
864
|
+
hideCode: false,
|
|
865
|
+
},
|
|
724
866
|
// reorder-cells comes afterwards.
|
|
725
867
|
{ type: "reorder-cells", cellIds: [a, b, c, d] },
|
|
726
868
|
]);
|
|
@@ -741,9 +883,21 @@ describe("applyTransactionChanges column rebuild", () => {
|
|
|
741
883
|
setup("a", "b", "c", "d");
|
|
742
884
|
const [a, b, c, d] = state.cellIds.inOrderIds;
|
|
743
885
|
apply([
|
|
744
|
-
{
|
|
886
|
+
{
|
|
887
|
+
type: "set-config",
|
|
888
|
+
cellId: a,
|
|
889
|
+
column: 0,
|
|
890
|
+
disabled: false,
|
|
891
|
+
hideCode: false,
|
|
892
|
+
},
|
|
745
893
|
{ type: "set-code", cellId: a, code: "x = 1" },
|
|
746
|
-
{
|
|
894
|
+
{
|
|
895
|
+
type: "set-config",
|
|
896
|
+
cellId: c,
|
|
897
|
+
column: 1,
|
|
898
|
+
disabled: false,
|
|
899
|
+
hideCode: false,
|
|
900
|
+
},
|
|
747
901
|
{ type: "reorder-cells", cellIds: [a, b, c, d] },
|
|
748
902
|
{ type: "set-name", cellId: d, name: "last" },
|
|
749
903
|
]);
|
|
@@ -769,8 +923,20 @@ describe("applyTransactionChanges column rebuild", () => {
|
|
|
769
923
|
const [a, b, c, d] = state.cellIds.inOrderIds;
|
|
770
924
|
apply([
|
|
771
925
|
{ type: "reorder-cells", cellIds: [a, b, c, d] },
|
|
772
|
-
{
|
|
773
|
-
|
|
926
|
+
{
|
|
927
|
+
type: "set-config",
|
|
928
|
+
cellId: a,
|
|
929
|
+
column: 0,
|
|
930
|
+
disabled: false,
|
|
931
|
+
hideCode: false,
|
|
932
|
+
},
|
|
933
|
+
{
|
|
934
|
+
type: "set-config",
|
|
935
|
+
cellId: c,
|
|
936
|
+
column: 1,
|
|
937
|
+
disabled: false,
|
|
938
|
+
hideCode: false,
|
|
939
|
+
},
|
|
774
940
|
]);
|
|
775
941
|
expect(prettyColumns(state)).toMatchInlineSnapshot(`
|
|
776
942
|
"
|
|
@@ -203,6 +203,8 @@ describe("toDocumentChanges", () => {
|
|
|
203
203
|
[
|
|
204
204
|
{
|
|
205
205
|
"cellId": "0",
|
|
206
|
+
"column": null,
|
|
207
|
+
"disabled": false,
|
|
206
208
|
"hideCode": true,
|
|
207
209
|
"type": "set-config",
|
|
208
210
|
},
|
|
@@ -246,6 +248,8 @@ describe("toDocumentChanges", () => {
|
|
|
246
248
|
{
|
|
247
249
|
"cellId": "1",
|
|
248
250
|
"column": 1,
|
|
251
|
+
"disabled": false,
|
|
252
|
+
"hideCode": false,
|
|
249
253
|
"type": "set-config",
|
|
250
254
|
},
|
|
251
255
|
{
|
|
@@ -273,11 +277,15 @@ describe("toDocumentChanges", () => {
|
|
|
273
277
|
{
|
|
274
278
|
"cellId": "1",
|
|
275
279
|
"column": 1,
|
|
280
|
+
"disabled": false,
|
|
281
|
+
"hideCode": false,
|
|
276
282
|
"type": "set-config",
|
|
277
283
|
},
|
|
278
284
|
{
|
|
279
285
|
"cellId": "2",
|
|
280
286
|
"column": 1,
|
|
287
|
+
"disabled": false,
|
|
288
|
+
"hideCode": false,
|
|
281
289
|
"type": "set-config",
|
|
282
290
|
},
|
|
283
291
|
{
|
|
@@ -310,11 +318,15 @@ describe("toDocumentChanges", () => {
|
|
|
310
318
|
{
|
|
311
319
|
"cellId": "1",
|
|
312
320
|
"column": 0,
|
|
321
|
+
"disabled": false,
|
|
322
|
+
"hideCode": false,
|
|
313
323
|
"type": "set-config",
|
|
314
324
|
},
|
|
315
325
|
{
|
|
316
326
|
"cellId": "2",
|
|
317
327
|
"column": 0,
|
|
328
|
+
"disabled": false,
|
|
329
|
+
"hideCode": false,
|
|
318
330
|
"type": "set-config",
|
|
319
331
|
},
|
|
320
332
|
{
|
|
@@ -358,6 +370,8 @@ describe("toDocumentChanges", () => {
|
|
|
358
370
|
{
|
|
359
371
|
"cellId": "1",
|
|
360
372
|
"column": 1,
|
|
373
|
+
"disabled": false,
|
|
374
|
+
"hideCode": false,
|
|
361
375
|
"type": "set-config",
|
|
362
376
|
},
|
|
363
377
|
{
|
|
@@ -156,10 +156,13 @@ function columnChanges(
|
|
|
156
156
|
for (const [cellId, newCol] of newColumns) {
|
|
157
157
|
const prevCol = prevColumns.get(cellId);
|
|
158
158
|
if (prevCol !== newCol) {
|
|
159
|
+
const cell = getCell(cellId, newState);
|
|
159
160
|
changes.push({
|
|
160
161
|
type: "set-config",
|
|
161
162
|
cellId: cellId,
|
|
162
163
|
column: newCol,
|
|
164
|
+
disabled: cell?.config.disabled ?? false,
|
|
165
|
+
hideCode: cell?.config.hide_code ?? false,
|
|
163
166
|
});
|
|
164
167
|
}
|
|
165
168
|
}
|
|
@@ -257,18 +260,21 @@ export function toDocumentChanges(
|
|
|
257
260
|
}
|
|
258
261
|
|
|
259
262
|
// updateCellConfig → set-config
|
|
260
|
-
//
|
|
261
|
-
//
|
|
262
|
-
// (from the action payload, not the full cell config).
|
|
263
|
+
// SetConfig is full-replacement: emit the cell's complete config from
|
|
264
|
+
// newState (which already merged the action's partial payload).
|
|
263
265
|
case "updateCellConfig": {
|
|
264
|
-
const { cellId
|
|
266
|
+
const { cellId } = action.payload;
|
|
267
|
+
const cell = getCell(cellId, newState);
|
|
268
|
+
if (!cell) {
|
|
269
|
+
return [];
|
|
270
|
+
}
|
|
265
271
|
return [
|
|
266
272
|
{
|
|
267
273
|
type: "set-config",
|
|
268
274
|
cellId: cellId,
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
275
|
+
column: cell.config.column ?? null,
|
|
276
|
+
disabled: cell.config.disabled ?? false,
|
|
277
|
+
hideCode: cell.config.hide_code ?? false,
|
|
272
278
|
},
|
|
273
279
|
];
|
|
274
280
|
}
|
|
@@ -538,18 +544,15 @@ export function fromDocumentChanges(
|
|
|
538
544
|
break;
|
|
539
545
|
|
|
540
546
|
// set-config → updateCellConfig
|
|
541
|
-
// Maps the change's camelCase hideCode back to CellConfig's snake_case
|
|
542
|
-
// hide_code. Only includes fields that are non-null (null means
|
|
543
|
-
// "not specified" on the wire, not "clear the value").
|
|
544
547
|
case "set-config":
|
|
545
548
|
actions.push({
|
|
546
549
|
type: "updateCellConfig",
|
|
547
550
|
payload: {
|
|
548
551
|
cellId: change.cellId,
|
|
549
552
|
config: {
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
+
column: change.column,
|
|
554
|
+
disabled: change.disabled,
|
|
555
|
+
hide_code: change.hideCode,
|
|
553
556
|
},
|
|
554
557
|
},
|
|
555
558
|
});
|
|
@@ -650,7 +653,7 @@ export function applyTransactionChanges(
|
|
|
650
653
|
) {
|
|
651
654
|
continue;
|
|
652
655
|
}
|
|
653
|
-
if (change.type === "set-config"
|
|
656
|
+
if (change.type === "set-config") {
|
|
654
657
|
hasColumnChange = true;
|
|
655
658
|
}
|
|
656
659
|
if (change.type === "create-cell" && change.config?.column != null) {
|