@marimo-team/islands 0.23.14-dev55 → 0.23.14-dev56

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.
Files changed (33) hide show
  1. package/dist/{ConnectedDataExplorerComponent-DXBx_nQg.js → ConnectedDataExplorerComponent-CU4fZJzG.js} +4 -4
  2. package/dist/assets/__vite-browser-external-BQCLNwri.js +1 -0
  3. package/dist/assets/{worker-DEDLIQQV.js → worker-DAWRHcPq.js} +2 -2
  4. package/dist/{chat-ui-DXPRhRO2.js → chat-ui-D7EyLr6c.js} +6 -6
  5. package/dist/{code-visibility-DQX0uy8x.js → code-visibility-D7wWXyyp.js} +8 -8
  6. package/dist/{formats-WsOgyW_K.js → formats-Dzx4J_z1.js} +1 -1
  7. package/dist/{glide-data-editor-7wxMGXjG.js → glide-data-editor-CjTu7ukN.js} +2 -2
  8. package/dist/{html-to-image-DOqQBSQc.js → html-to-image-hevd6UWC.js} +5 -5
  9. package/dist/{input-BSdZp5Ng.js → input-DtsN7xm-.js} +1 -1
  10. package/dist/main.js +18 -18
  11. package/dist/{mermaid-D-HYBMEV.js → mermaid-BYqXy_NE.js} +2 -2
  12. package/dist/{process-output-kGk2Jc2x.js → process-output-DOO3J9E6.js} +1 -1
  13. package/dist/{reveal-component-wJKTADmW.js → reveal-component-bWXDKgVc.js} +5 -5
  14. package/dist/{spec-CnTgI25l.js → spec-Cz-Bj1JI.js} +1 -1
  15. package/dist/{toDate-D1Z7ZXWh.js → toDate-CWNNlFEX.js} +15 -7
  16. package/dist/{useAsyncData-BMc8itk2.js → useAsyncData-KfHB8wQR.js} +1 -1
  17. package/dist/{useDeepCompareMemoize-ZwmDBRDY.js → useDeepCompareMemoize-nJMtxhm4.js} +1 -1
  18. package/dist/{useLifecycle-CxffarYV.js → useLifecycle-DegSo0lV.js} +1 -1
  19. package/dist/{useTheme-yGsGEk82.js → useTheme-6eZ3GOTS.js} +5 -2
  20. package/dist/{vega-component-BFJTyykA.js → vega-component-DzyyM9fc.js} +5 -5
  21. package/package.json +1 -1
  22. package/src/core/config/__tests__/config-schema.test.ts +17 -0
  23. package/src/core/config/config-schema.ts +1 -0
  24. package/src/core/config/config.ts +10 -0
  25. package/src/core/runtime/__tests__/runtime.test.ts +45 -0
  26. package/src/core/runtime/runtime.ts +30 -16
  27. package/src/core/websocket/__tests__/useMarimoKernelConnection.test.ts +4 -0
  28. package/src/core/websocket/__tests__/useWebSocket.test.ts +49 -0
  29. package/src/core/websocket/transports/__tests__/sse.test.ts +338 -0
  30. package/src/core/websocket/transports/sse.ts +308 -0
  31. package/src/core/websocket/useMarimoKernelConnection.tsx +39 -4
  32. package/src/core/websocket/useWebSocket.tsx +12 -2
  33. package/dist/assets/__vite-browser-external-DAm_YW43.js +0 -1
@@ -8,18 +8,18 @@ import { t as require_compiler_runtime } from "./compiler-runtime-CEbnTgxf.js";
8
8
  import { r as toast, t as copyToClipboard } from "./copy-COam1EG7.js";
9
9
  import { a as gn, c as rehypeSanitize, l as defaultSchema, s as xn, u as require_cjs, __tla as __tla_0 } from "./chunk-5FQGJX7Z-BbqSm5gU.js";
10
10
  import { a as createPopperScope, i as Root2$3, l as VisuallyHidden, n as Arrow, o as useSize, r as Content$1, t as Anchor, u as createLucideIcon } from "./dist--2Bqjvs0.js";
11
- import { a as Type, c as Calendar, i as createReducerAndAtoms, o as ToggleLeft, r as Badge, s as Hash, t as useOnMount } from "./useLifecycle-CxffarYV.js";
11
+ import { a as Type, c as Calendar, i as createReducerAndAtoms, o as ToggleLeft, r as Badge, s as Hash, t as useOnMount } from "./useLifecycle-DegSo0lV.js";
12
12
  import { t as Check } from "./check-C9OoNtR4.js";
13
13
  import { C as logNever, F as createCollection, I as X, N as usePrevious, P as useDirection, R as ChevronDown, S as assertNever, a as SelectGroup, c as SelectSeparator, i as SelectContent, l as SelectTrigger, o as SelectItem, r as Select, s as SelectLabel, t as Strings, u as SelectValue } from "./strings-Dq_j3Rxw.js";
14
- import { J as marked, X as useDebouncedCallback, _t as $f6c31cce2adf654f$export$45712eceda6fad21, q as useNonce } from "./input-BSdZp5Ng.js";
15
- import { _ as isWasm, g as Deferred, h as waitForConnectionOpen, l as getRuntimeManager, t as toDate, v as CircleQuestionMark } from "./toDate-D1Z7ZXWh.js";
14
+ import { J as marked, X as useDebouncedCallback, _t as $f6c31cce2adf654f$export$45712eceda6fad21, q as useNonce } from "./input-DtsN7xm-.js";
15
+ import { _ as isWasm, g as Deferred, h as waitForConnectionOpen, l as getRuntimeManager, t as toDate, v as CircleQuestionMark } from "./toDate-CWNNlFEX.js";
16
16
  import { t as require_react_dom } from "./react-dom-BTJzcVJ9.js";
17
17
  import { t as require_jsx_runtime } from "./jsx-runtime-DebpN0FN.js";
18
18
  import { B as union, N as number, P as object, Q as withSmartCollisionBoundary, R as string, T as boolean, Y as MAX_HEIGHT_OFFSET, Z as withFullScreenAsRoot, _t as createContextScope, at as Portal, ct as DismissableLayer, dt as useId, et as StyleNamespace, ft as Presence, ht as composeEventHandlers, it as useFocusGuards, k as literal, lt as Root$1, mt as useLayoutEffect2, nt as Combination_default, ot as FocusScope, pt as useControllableState, st as Branch, tt as hideOthers, ut as useCallbackRef, vt as Primitive, w as array, yt as dispatchDiscreteCustomEvent } from "./zod-CijjQh4u.js";
19
19
  import { i as TooltipProvider, t as Tooltip } from "./tooltip-Czds6Qr8.js";
20
20
  import { a as setDiagnostics, c as historyField, d as insertTab, f as CopyClipboardIcon, i as linter, n as forEachDiagnostic, s as history } from "./extends-9MVIxxRo.js";
21
21
  import { i as debounce_default } from "./constants-T20xxyNf.js";
22
- import { E as dequal, S as atom, _ as Provider, a as autoInstantiateAtom, f as createDeepEqualAtom, g as isIslands, n as useTheme, o as getResolvedMarimoConfig, p as store, t as resolvedThemeAtom, v as useAtom, y as useAtomValue } from "./useTheme-yGsGEk82.js";
22
+ import { E as dequal, S as atom, _ as Provider, a as autoInstantiateAtom, f as createDeepEqualAtom, g as isIslands, n as useTheme, o as getResolvedMarimoConfig, p as store, t as resolvedThemeAtom, v as useAtom, y as useAtomValue } from "./useTheme-6eZ3GOTS.js";
23
23
  import { $ as EditorView, At as Facet, B as highlightCode, Ct as Annotation, Dt as Compartment, E as getIndentUnit, H as tags, I as syntaxTree, It as StateEffect, L as unfoldAll, Lt as StateField, Mt as Prec, Nt as RangeSet, Ot as EditorSelection, Rt as Text, S as foldInside, X as parseMixed, Z as Decoration, b as foldAll, bt as showPanel, ct as gutter, et as GutterMarker, f as StreamLanguage, ft as hoverTooltip, gt as placeholder, kt as EditorState, l as LanguageDescription, pt as keymap, tt as ViewPlugin, u as LanguageSupport, w as foldNodeProp, xt as showTooltip, z as classHighlighter, zt as Transaction } from "./dist-U4F-tbMs.js";
24
24
  import { t as invariant } from "./invariant-wRzNXIsJ.js";
25
25
  import { a as arrayMove, i as arrayInsertMany, l as clamp, n as arrayDelete, r as arrayInsert } from "./arrays-sEtDRoG4.js";
@@ -32,7 +32,7 @@ import { a as markdown, s as markdownLanguage } from "./dist-Dv_Y15yk.js";
32
32
  import { a as parser, i as pythonLanguage, n as localCompletionSource, r as python, t as globalCompletion } from "./dist-C_Y3oV3C.js";
33
33
  import { n as stexMath } from "./stex-BIsgBmK4.js";
34
34
  import { t as purify } from "./purify.es-H92eMd9-.js";
35
- import { t as useAsyncData } from "./useAsyncData-BMc8itk2.js";
35
+ import { t as useAsyncData } from "./useAsyncData-KfHB8wQR.js";
36
36
  let reducer$1, getRequestClient, ChevronDownIcon, Trigger2, Paths, isDataURLString, FileText, getFeatureFlag, Accordion, atomWithStorage, isInternalCellName, BorderAllIcon, Content2$1, MarkdownLanguageAdapter, AccordionTrigger, Close$1, customPythonLanguageSupport, base64ToDataURL, NotebookPen, generateUUID, hasRunAnyCellAtom, CircleX, PluralWords, renderHTML, ExternalLink, SQLParser, base64ToDataView, Minus, useChromeActions, getCellNames, esm_default, require_client, createActions$1, CircleAlert, DATA_TYPE_ICON, base64ToUint8Array, LoaderCircle, adaptForLocalStorage, DotFilledIcon, Trash2, moveToEndOfEditor, PinLeftIcon, Table2, goToCellLine, ChatBubbleIcon, Item, createVariableInfoElement, PinRightIcon, PaintRoller, DeferredRequestRegistry, numColumnsAtom, convertStatsName, dataViewToBase64, Layers, jotaiJsonStorage, AIContextRegistry, atomWithReducer, getValidName, AccordionItem, Anchor2, Checkbox, getMarimoExportContext, Database, MarkdownParser, safeExtractSetUIElementMessageBuffers, Eye, repl, hasTrustedExportContext, Columns2, PluralWord, notebookAtom, dataSourceConnectionsAtom, hasOnlyOneCellAtom, import_lib$1, allTablesAtom, notebookOutline, getTableType, getDatasourceContext, findCellId, headingToIdentifier, useCellFocusActions, extractAllTracebackInfo, parseHtmlContent, contextToXml, jsonParseWithSpecialChar, getCellDomProps, Popover, ZodLocalStorage, initialModeAtom, PopoverTrigger, parseDataset, viewStateAtom, requestClientAtom, useCellActions, isOutputEmpty, parseInitialValue, outputIsLoading, formatDatasourceContextForCell, UIElementId, isTracebackMime, DatasourceContextProvider, SCRATCH_CELL_ID, isMarimoErrorsMime, LazyAnyLanguageCodeMirror, elementContainsMarimoCellFile, ansiToPlainText, ChevronRightIcon, Wrench, toggleBreakpoint, CheckIcon, Root2$2, PathBuilder, PopoverClose, filenameAtom, kioskModeAtom, useExpandedOutput, HTMLCellId, isErrorMime, Spinner, isUninstantiated, useCellNames, useLastFocusedCellId, getTracebackInfo, AnsiUp, useExpandedConsoleOutput, CellOutputId, outputIsStale, getCellEditorView, Braces, getDataTypeColor, MarkdownRenderer, singleFacet, createCell, maybeAddAltairImport, NotebookScopedLocalStorage, getInitialAppMode, toPng$1, useRequestClient, useCellIds, PopoverContent, parseAttrValue, useInstallAllowed, Boosts, OBJECT_ID_ATTR, sanitizeHtml, AccordionContent, selectAtom, normalizeName, AIContextProvider, jsonToMarkdown, displayCellName, Sections, RANDOM_ID_ATTR, DATA_CELL_ID, extractBase64FromDataURL, Info, variablesAtom;
37
37
  let __tla = Promise.all([
38
38
  (() => {
@@ -14,7 +14,7 @@ import { t as require_react_dom } from "./react-dom-BTJzcVJ9.js";
14
14
  import { t as require_jsx_runtime } from "./jsx-runtime-DebpN0FN.js";
15
15
  import { Q as withSmartCollisionBoundary, Y as MAX_HEIGHT_OFFSET, Z as withFullScreenAsRoot, _t as createContextScope, at as Portal, ct as DismissableLayer, dt as useId, et as StyleNamespace, ft as Presence, ht as composeEventHandlers, it as useFocusGuards, nt as Combination_default, ot as FocusScope, pt as useControllableState, tt as hideOthers, ut as useCallbackRef, vt as Primitive, yt as dispatchDiscreteCustomEvent } from "./zod-CijjQh4u.js";
16
16
  import { i as debounce_default } from "./constants-T20xxyNf.js";
17
- import { D as useEvent_default } from "./useTheme-yGsGEk82.js";
17
+ import { D as useEvent_default } from "./useTheme-6eZ3GOTS.js";
18
18
  import { t as memoizeLastValue } from "./once-DPuqGUeo.js";
19
19
  var ChevronRight = createLucideIcon("chevron-right", [["path", {
20
20
  d: "m9 18 6-6-6-6",
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-COam1EG7.js";
25
- import { $ as reducer, $t as getRequestClient, A as ChevronDownIcon, An as Trigger2, At as Paths, Bn as FileText, C as Accordion, Cn as atomWithStorage, Ct as isInternalCellName, D as BorderAllIcon, Dn as Content2, Dt as MarkdownLanguageAdapter, E as AccordionTrigger, Et as customPythonLanguageSupport, Ft as generateUUID, G as hasRunAnyCellAtom, Gt as PluralWords, H as renderHTML, Ht as SQLParser, I as base64ToDataView, J as getCellNames, Jt as require_client, K as createActions, Kn as CircleAlert, Kt as DATA_TYPE_ICON, Ln as LoaderCircle, Mn as Trash2, Nn as Table2, On as Item$1, Pn as PaintRoller, Pt as DeferredRequestRegistry, Q as numColumnsAtom, Qt as convertStatsName, R as dataViewToBase64, Rn as Layers, Rt as jotaiJsonStorage, Sn as atomWithReducer, St as getValidName, T as AccordionItem, Tt as Checkbox, U as getMarimoExportContext, Un as Database, Ut as MarkdownParser, V as safeExtractSetUIElementMessageBuffers, Vn as Eye, Vt as repl, W as hasTrustedExportContext, Wn as Columns2, X as notebookAtom, Y as hasOnlyOneCellAtom, Z as notebookOutline, _n as findCellId, _t as headingToIdentifier, a as useCellFocusActions, bn as jsonParseWithSpecialChar, ct as initialModeAtom, dn as parseDataset, en as requestClientAtom, et as useCellActions, f as isOutputEmpty, fn as parseInitialValue, ft as outputIsLoading, gn as UIElementId, i as LazyAnyLanguageCodeMirror, kn as Root2$1, kt as PathBuilder, lt as kioskModeAtom, mn as HTMLCellId, mt as isErrorMime, n as Spinner, nn as isUninstantiated, o as useLastFocusedCellId, p as useExpandedConsoleOutput, pt as outputIsStale, qn as Braces, rt as createCell, s as maybeAddAltairImport, sn as NotebookScopedLocalStorage, st as getInitialAppMode, tn as useRequestClient, tt as useCellIds, un as parseAttrValue, vn as OBJECT_ID_ATTR, w as AccordionContent, wn as selectAtom, wt as normalizeName, yn as RANDOM_ID_ATTR, zn as Info, __tla as __tla_0 } from "./html-to-image-DOqQBSQc.js";
25
+ import { $ as reducer, $t as getRequestClient, A as ChevronDownIcon, An as Trigger2, At as Paths, Bn as FileText, C as Accordion, Cn as atomWithStorage, Ct as isInternalCellName, D as BorderAllIcon, Dn as Content2, Dt as MarkdownLanguageAdapter, E as AccordionTrigger, Et as customPythonLanguageSupport, Ft as generateUUID, G as hasRunAnyCellAtom, Gt as PluralWords, H as renderHTML, Ht as SQLParser, I as base64ToDataView, J as getCellNames, Jt as require_client, K as createActions, Kn as CircleAlert, Kt as DATA_TYPE_ICON, Ln as LoaderCircle, Mn as Trash2, Nn as Table2, On as Item$1, Pn as PaintRoller, Pt as DeferredRequestRegistry, Q as numColumnsAtom, Qt as convertStatsName, R as dataViewToBase64, Rn as Layers, Rt as jotaiJsonStorage, Sn as atomWithReducer, St as getValidName, T as AccordionItem, Tt as Checkbox, U as getMarimoExportContext, Un as Database, Ut as MarkdownParser, V as safeExtractSetUIElementMessageBuffers, Vn as Eye, Vt as repl, W as hasTrustedExportContext, Wn as Columns2, X as notebookAtom, Y as hasOnlyOneCellAtom, Z as notebookOutline, _n as findCellId, _t as headingToIdentifier, a as useCellFocusActions, bn as jsonParseWithSpecialChar, ct as initialModeAtom, dn as parseDataset, en as requestClientAtom, et as useCellActions, f as isOutputEmpty, fn as parseInitialValue, ft as outputIsLoading, gn as UIElementId, i as LazyAnyLanguageCodeMirror, kn as Root2$1, kt as PathBuilder, lt as kioskModeAtom, mn as HTMLCellId, mt as isErrorMime, n as Spinner, nn as isUninstantiated, o as useLastFocusedCellId, p as useExpandedConsoleOutput, pt as outputIsStale, qn as Braces, rt as createCell, s as maybeAddAltairImport, sn as NotebookScopedLocalStorage, st as getInitialAppMode, tn as useRequestClient, tt as useCellIds, un as parseAttrValue, vn as OBJECT_ID_ATTR, w as AccordionContent, wn as selectAtom, wt as normalizeName, yn as RANDOM_ID_ATTR, zn as Info, __tla as __tla_0 } from "./html-to-image-hevd6UWC.js";
26
26
  import { __tla as __tla_1 } from "./chunk-5FQGJX7Z-BbqSm5gU.js";
27
27
  import { o as useSize, s as Root$1, u as createLucideIcon } from "./dist--2Bqjvs0.js";
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-CnTgI25l.js";
29
- import { $ as PANEL_TYPES, $t as HtmlOutput, A as prettifyRowCount, At as INDEX_COLUMN_NAME, B as CompactChipRow, Bt as dateToLocalISODateTime, C as downloadSizeLimitAtom, Ct as ColumnChartSpecModel, D as ErrorState, Dt as getPageIndexForRow, E as EmptyState, Et as usePrevious$1, F as ContextMenuItem, Ft as hasFunctionProperty, G as Command, Gt as TabsTrigger, H as DateRangePicker, Ht as Tabs, I as ContextMenuSeparator, It as isRecord, J as CommandItem, Jt as ChartLoadingState, K as CommandEmpty, Kt as ChartErrorState, L as ContextMenuTrigger, Lt as isNullishFilter, M as getUserColumnVisibilityCounts, Mt as TOO_MANY_ROWS, N as ContextMenu, Nt as toFieldTypes, O as LoadingState, Ot as loadTableAndRawData, P as ContextMenuContent, Pt as getMimeValues, Q as ContextAwarePanelItem, Qt as Kbd, R as useInternalStateWithSync, Rt as Maps, S as Filenames, St as ColumnChartContext, T as ColumnPreviewContainer, Tt as useIntersectionObserver, U as Combobox, Ut as TabsContent, V as DatePicker, Vt as dateToLocalISOTime, W as ComboboxItem, Wt as TabsList, X as CommandSeparator, Xt as useOverflowDetection, Y as CommandList, Yt as LazyVegaEmbed, Z as smartMatch, Zt as RenderTextWithLinks, _ as ADD_PRINTING_CLASS, _t as TableRow, an as Funnel, at as slotsController, b as downloadHTMLAsImage, bt as inferFieldTypes, c as Slide, cn as Ellipsis, d as RadioGroupItem, dn as ChevronsUpDown, dt as Provider$1, en as EmotionCacheProvider, et as contextAwarePanelOpen, f as JsonOutput, fn as ChevronsRight, ft as Table, g as InstallPackageButton, gn as ArrowDownWideNarrow, gt as TableHeader, h as DataTable, hn as ChevronLeft, ht as TableHead, in as GripHorizontal, it as SlotNames, j as getColumnCountForDisplay, jt as SELECT_COLUMN_ID, k as prettifyRowColumnCount, kt as loadTableData, l as Switch, ln as Download, m as OutputRenderer, mn as ChevronsDownUp, mt as TableCell, n as marimoVersionAtom, nn as $fae977aafc393c5c$export$6b862160d295c8e, nt as contextAwarePanelType, o as SLIDE_TYPE_OPTIONS_BY_VALUE, on as EyeOff, ot as Toggle, p as OutputArea, pn as ChevronsLeft, pt as TableBody, q as CommandInput, qt as ChartInfoState, r as showCodeInRunModeAtom, rn as TextWrap, rt as isCellAwareAtom, t as useNotebookCodeAvailable, tn as $fae977aafc393c5c$export$588937bcd60ade55, tt as contextAwarePanelOwner, u as RadioGroup, un as Code, ut as Fill, v as downloadBlob, vt as NAMELESS_COLUMN_PREFIX, w as ColumnName, wt as DelayMount, x as Progress, xt as renderCellValue, y as downloadByURL, yt as generateColumns, z as useSelectList, zt as dateToLocalISODate, __tla as __tla_2 } from "./code-visibility-DQX0uy8x.js";
30
- import { c as Calendar, i as createReducerAndAtoms, n as useOnUnmount, o as ToggleLeft, t as useOnMount } from "./useLifecycle-CxffarYV.js";
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-Cz-Bj1JI.js";
29
+ import { $ as PANEL_TYPES, $t as HtmlOutput, A as prettifyRowCount, At as INDEX_COLUMN_NAME, B as CompactChipRow, Bt as dateToLocalISODateTime, C as downloadSizeLimitAtom, Ct as ColumnChartSpecModel, D as ErrorState, Dt as getPageIndexForRow, E as EmptyState, Et as usePrevious$1, F as ContextMenuItem, Ft as hasFunctionProperty, G as Command, Gt as TabsTrigger, H as DateRangePicker, Ht as Tabs, I as ContextMenuSeparator, It as isRecord, J as CommandItem, Jt as ChartLoadingState, K as CommandEmpty, Kt as ChartErrorState, L as ContextMenuTrigger, Lt as isNullishFilter, M as getUserColumnVisibilityCounts, Mt as TOO_MANY_ROWS, N as ContextMenu, Nt as toFieldTypes, O as LoadingState, Ot as loadTableAndRawData, P as ContextMenuContent, Pt as getMimeValues, Q as ContextAwarePanelItem, Qt as Kbd, R as useInternalStateWithSync, Rt as Maps, S as Filenames, St as ColumnChartContext, T as ColumnPreviewContainer, Tt as useIntersectionObserver, U as Combobox, Ut as TabsContent, V as DatePicker, Vt as dateToLocalISOTime, W as ComboboxItem, Wt as TabsList, X as CommandSeparator, Xt as useOverflowDetection, Y as CommandList, Yt as LazyVegaEmbed, Z as smartMatch, Zt as RenderTextWithLinks, _ as ADD_PRINTING_CLASS, _t as TableRow, an as Funnel, at as slotsController, b as downloadHTMLAsImage, bt as inferFieldTypes, c as Slide, cn as Ellipsis, d as RadioGroupItem, dn as ChevronsUpDown, dt as Provider$1, en as EmotionCacheProvider, et as contextAwarePanelOpen, f as JsonOutput, fn as ChevronsRight, ft as Table, g as InstallPackageButton, gn as ArrowDownWideNarrow, gt as TableHeader, h as DataTable, hn as ChevronLeft, ht as TableHead, in as GripHorizontal, it as SlotNames, j as getColumnCountForDisplay, jt as SELECT_COLUMN_ID, k as prettifyRowColumnCount, kt as loadTableData, l as Switch, ln as Download, m as OutputRenderer, mn as ChevronsDownUp, mt as TableCell, n as marimoVersionAtom, nn as $fae977aafc393c5c$export$6b862160d295c8e, nt as contextAwarePanelType, o as SLIDE_TYPE_OPTIONS_BY_VALUE, on as EyeOff, ot as Toggle, p as OutputArea, pn as ChevronsLeft, pt as TableBody, q as CommandInput, qt as ChartInfoState, r as showCodeInRunModeAtom, rn as TextWrap, rt as isCellAwareAtom, t as useNotebookCodeAvailable, tn as $fae977aafc393c5c$export$588937bcd60ade55, tt as contextAwarePanelOwner, u as RadioGroup, un as Code, ut as Fill, v as downloadBlob, vt as NAMELESS_COLUMN_PREFIX, w as ColumnName, wt as DelayMount, x as Progress, xt as renderCellValue, y as downloadByURL, yt as generateColumns, z as useSelectList, zt as dateToLocalISODate, __tla as __tla_2 } from "./code-visibility-D7wWXyyp.js";
30
+ import { c as Calendar, i as createReducerAndAtoms, n as useOnUnmount, o as ToggleLeft, t as useOnMount } from "./useLifecycle-DegSo0lV.js";
31
31
  import { t as Check } from "./check-C9OoNtR4.js";
32
32
  import { A as Icon, C as logNever, D as $18f2051aff69b9bf$export$a54013f0d02a8f82, E as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7, F as createCollection, I as X, M as clamp$2, N as usePrevious$2, P as useDirection, R as ChevronDown, S as assertNever, a as SelectGroup, c as SelectSeparator, d as NativeSelect, i as SelectContent, j as Trigger$1, l as SelectTrigger, n as capitalize, o as SelectItem, r as Select, s as SelectLabel, t as Strings, u as SelectValue, w as $a916eb452884faea$export$b7a616150fdb9f44 } from "./strings-Dq_j3Rxw.js";
33
- import { B as $64fa3d84918910a7$export$4d86445c2cf5e3, C as DropdownMenuTrigger, Ft as $65484d02dcb7eb3e$export$457c3d6518dd4c6f, It as $3ef42575df84b30b$export$9d1611c77c2fe928, W as $64fa3d84918910a7$export$df3a06d6289f983e, Wt as $ff5963eb1fccf552$export$e08e3b67e392101e, X as useDebouncedCallback, Y as useDebounceControlledState, a as NumberField, d as roundToFractionDigits, f as DropdownMenu, g as DropdownMenuLabel, gn as ChevronRight, h as DropdownMenuItem, hn as Circle, i as OnBlurredInput, l as prettyNumber, m as DropdownMenuGroup, n as DebouncedNumberInput, o as maxFractionDigitsForSteps, ot as $f7dceffc5ad7768b$export$4e328f61c538687f, p as DropdownMenuContent, pt as $6179b936705e76d3$export$ae780daf29e6d456, r as Input, st as $701a24aa0da5b062$export$ea18c227d4417cc3, t as DebouncedInput, u as prettyScientificNumber, v as DropdownMenuSeparator, xt as $458b0a5536c1a7cf$export$40bfa8c7b0832715, y as DropdownMenuShortcut, z as $64fa3d84918910a7$export$29f1550f4b0d4415 } from "./input-BSdZp5Ng.js";
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-D1Z7ZXWh.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-kGk2Jc2x.js";
33
+ import { B as $64fa3d84918910a7$export$4d86445c2cf5e3, C as DropdownMenuTrigger, Ft as $65484d02dcb7eb3e$export$457c3d6518dd4c6f, It as $3ef42575df84b30b$export$9d1611c77c2fe928, W as $64fa3d84918910a7$export$df3a06d6289f983e, Wt as $ff5963eb1fccf552$export$e08e3b67e392101e, X as useDebouncedCallback, Y as useDebounceControlledState, a as NumberField, d as roundToFractionDigits, f as DropdownMenu, g as DropdownMenuLabel, gn as ChevronRight, h as DropdownMenuItem, hn as Circle, i as OnBlurredInput, l as prettyNumber, m as DropdownMenuGroup, n as DebouncedNumberInput, o as maxFractionDigitsForSteps, ot as $f7dceffc5ad7768b$export$4e328f61c538687f, p as DropdownMenuContent, pt as $6179b936705e76d3$export$ae780daf29e6d456, r as Input, st as $701a24aa0da5b062$export$ea18c227d4417cc3, t as DebouncedInput, u as prettyScientificNumber, v as DropdownMenuSeparator, xt as $458b0a5536c1a7cf$export$40bfa8c7b0832715, y as DropdownMenuShortcut, z as $64fa3d84918910a7$export$29f1550f4b0d4415 } from "./input-DtsN7xm-.js";
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-CWNNlFEX.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-DOO3J9E6.js";
36
36
  import { n as Trash, r as Pencil, t as BulkEdit } from "./types-C2Ir191_.js";
37
37
  import { n as require_prop_types, r as Plus, t as ErrorBoundary } from "./ErrorBoundary-DE6tzZf-.js";
38
38
  import { t as require_react_dom } from "./react-dom-BTJzcVJ9.js";
@@ -45,7 +45,7 @@ import { f as CopyClipboardIcon } from "./extends-9MVIxxRo.js";
45
45
  import { a as get_default } from "./hasIn-Deg7jl_j.js";
46
46
  import { n as _baseSet_default, t as pick_default } from "./pick-D1Qo8s2C.js";
47
47
  import { i as debounce_default, r as KnownQueryParams, t as CSSClasses } from "./constants-T20xxyNf.js";
48
- import { D as useEvent_default, E as dequal, S as atom, _ as Provider, a as autoInstantiateAtom, d as AppConfigSchema, g as isIslands, l as useResolvedMarimoConfig, n as useTheme, p as store, s as localeAtom, v as useAtom, y as useAtomValue } from "./useTheme-yGsGEk82.js";
48
+ import { D as useEvent_default, E as dequal, S as atom, _ as Provider, a as autoInstantiateAtom, d as AppConfigSchema, g as isIslands, l as useResolvedMarimoConfig, n as useTheme, p as store, s as localeAtom, v as useAtom, y as useAtomValue } from "./useTheme-6eZ3GOTS.js";
49
49
  import { $ as EditorView, F as syntaxHighlighting, H as tags, a as HighlightStyle, g as defaultHighlightStyle } from "./dist-U4F-tbMs.js";
50
50
  import { t as invariant } from "./invariant-wRzNXIsJ.js";
51
51
  import { c as uniqueBy, l as clamp, o as arrayShallowEquals, t as Arrays } from "./arrays-sEtDRoG4.js";
@@ -59,13 +59,13 @@ import "./dist-M9Vag9Y0.js";
59
59
  import { r as python } from "./dist-C_Y3oV3C.js";
60
60
  import { n as minimalSetup, t as esm_default } from "./esm-M837UxV5.js";
61
61
  import "./purify.es-H92eMd9-.js";
62
- import { i as AlertTitle, n as Alert, r as AlertDescription } from "./formats-WsOgyW_K.js";
62
+ import { i as AlertTitle, n as Alert, r as AlertDescription } from "./formats-Dzx4J_z1.js";
63
63
  import "./vega-loader.browser-CZ-J8Py3.js";
64
64
  import { a as getContainerWidth, n as vegaLoadData, o as getVegaFieldTypes, s as tooltipHandler } from "./loader-Boph2xIS.js";
65
65
  import "./defaultLocale-u-3osm0P.js";
66
66
  import "./defaultLocale-BoHTsDG6.js";
67
- import { t as useAsyncData } from "./useAsyncData-BMc8itk2.js";
68
- import { t as useDeepCompareMemoize } from "./useDeepCompareMemoize-ZwmDBRDY.js";
67
+ import { t as useAsyncData } from "./useAsyncData-KfHB8wQR.js";
68
+ import { t as useDeepCompareMemoize } from "./useDeepCompareMemoize-nJMtxhm4.js";
69
69
  import "./dist-CIYBwstr.js";
70
70
  import "./dist-abid3KgM.js";
71
71
  import "./dist-A2846XWO.js";
@@ -8594,7 +8594,7 @@ let __tla = Promise.all([
8594
8594
  };
8595
8595
  }
8596
8596
  };
8597
- var LazyChatbot = import_react.lazy(() => import("./chat-ui-DXPRhRO2.js").then((e) => ({
8597
+ var LazyChatbot = import_react.lazy(() => import("./chat-ui-D7EyLr6c.js").then((e) => ({
8598
8598
  default: e.Chatbot
8599
8599
  }))), messageSchema = array(object({
8600
8600
  id: string(),
@@ -8743,7 +8743,7 @@ let __tla = Promise.all([
8743
8743
  "time",
8744
8744
  "unknown"
8745
8745
  ];
8746
- var import_compiler_runtime$76 = require_compiler_runtime(), LazyDataEditor = import_react.lazy(() => import("./glide-data-editor-7wxMGXjG.js").then(async (m) => {
8746
+ var import_compiler_runtime$76 = require_compiler_runtime(), LazyDataEditor = import_react.lazy(() => import("./glide-data-editor-CjTu7ukN.js").then(async (m) => {
8747
8747
  await m.__tla;
8748
8748
  return m;
8749
8749
  }));
@@ -16611,7 +16611,7 @@ ${c}
16611
16611
  fullWidth: m,
16612
16612
  children: T
16613
16613
  }), r[20] = m, r[21] = g, r[22] = c, r[23] = T, r[24] = E) : E = r[24], E;
16614
- }, LazyDataExplorerComponent = import_react.lazy(() => import("./ConnectedDataExplorerComponent-DXBx_nQg.js"));
16614
+ }, LazyDataExplorerComponent = import_react.lazy(() => import("./ConnectedDataExplorerComponent-CU4fZJzG.js"));
16615
16615
  const DataExplorerPlugin = createPlugin("marimo-data-explorer").withData(object({
16616
16616
  label: string().nullish(),
16617
16617
  data: string()
@@ -27959,7 +27959,7 @@ ${c}
27959
27959
  return true;
27960
27960
  }
27961
27961
  }
27962
- var LazyVegaComponent = import_react.lazy(() => import("./vega-component-BFJTyykA.js")), VegaPlugin = class {
27962
+ var LazyVegaComponent = import_react.lazy(() => import("./vega-component-DzyyM9fc.js")), VegaPlugin = class {
27963
27963
  constructor() {
27964
27964
  __publicField(this, "tagName", "marimo-vega");
27965
27965
  __publicField(this, "validator", object({
@@ -28289,7 +28289,7 @@ ${c}
28289
28289
  themeVariables: e.data.theme_variables
28290
28290
  });
28291
28291
  }
28292
- }, LazyMermaid = (0, import_react.lazy)(() => import("./mermaid-D-HYBMEV.js").then(async (m) => {
28292
+ }, LazyMermaid = (0, import_react.lazy)(() => import("./mermaid-BYqXy_NE.js").then(async (m) => {
28293
28293
  await m.__tla;
28294
28294
  return m;
28295
28295
  })), import_compiler_runtime$22 = require_compiler_runtime();
@@ -37732,7 +37732,7 @@ ${c}
37732
37732
  function _temp2$2(e) {
37733
37733
  e.target === e.currentTarget && e.key === "Enter" && (e.preventDefault(), e.stopPropagation(), e.currentTarget.click());
37734
37734
  }
37735
- var LazySlidesComponent = import_react.lazy(() => import("./reveal-component-wJKTADmW.js"));
37735
+ var LazySlidesComponent = import_react.lazy(() => import("./reveal-component-bWXDKgVc.js"));
37736
37736
  const SlidesLayoutRenderer = ({ layout: e, setLayout: r, cells: c, mode: l }) => {
37737
37737
  var _a3;
37738
37738
  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), [
@@ -39736,7 +39736,7 @@ ${c}
39736
39736
  });
39737
39737
  }
39738
39738
  const getMarimoVersion = () => store.get(marimoVersionAtom);
39739
- var worker_default = "/assets/worker-DEDLIQQV.js", DefaultWorkerFactory = class {
39739
+ var worker_default = "/assets/worker-DAWRHcPq.js", DefaultWorkerFactory = class {
39740
39740
  constructor(e = {}) {
39741
39741
  this.url = e.workerUrl || this.getDefaultWorkerUrl(), this.name = e.workerName || getMarimoVersion();
39742
39742
  }
@@ -7,9 +7,9 @@ import { t as require_jsx_runtime } from "./jsx-runtime-DebpN0FN.js";
7
7
  import "./zod-CijjQh4u.js";
8
8
  import { n as ErrorBanner } from "./error-banner-DFPfz_Qf.js";
9
9
  import { t as isEmpty_default } from "./isEmpty-CJJMn-QP.js";
10
- import { n as useTheme } from "./useTheme-yGsGEk82.js";
10
+ import { n as useTheme } from "./useTheme-6eZ3GOTS.js";
11
11
  import { t as purify } from "./purify.es-H92eMd9-.js";
12
- import { t as useAsyncData } from "./useAsyncData-BMc8itk2.js";
12
+ import { t as useAsyncData } from "./useAsyncData-KfHB8wQR.js";
13
13
  import { a as decodeEntities, f as isDetailedError, g as utils_default, h as removeDirectives, i as cleanAndMerge, o as encodeEntities } from "./chunk-S3R3BYOJ-oAe3dEbO.js";
14
14
  import { a as setLogLevel, i as log, r as __name, t as select_default } from "./src-Bf2iLOlr.js";
15
15
  import { t as package_default } from "./chunk-DR5Q36YT-BflwErH1.js";
@@ -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 { at as parseHtmlContent, it as ansiToPlainText } from "./html-to-image-DOqQBSQc.js";
3
+ import { at as parseHtmlContent, it as ansiToPlainText } from "./html-to-image-hevd6UWC.js";
4
4
  import { u as createLucideIcon } from "./dist--2Bqjvs0.js";
5
5
  import { t as Strings } from "./strings-Dq_j3Rxw.js";
6
6
  import { t as require_jsx_runtime } from "./jsx-runtime-DebpN0FN.js";
@@ -6,17 +6,17 @@ 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-BacYv-bE.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 { lt as kioskModeAtom, pt as outputIsStale } from "./html-to-image-DOqQBSQc.js";
9
+ import { lt as kioskModeAtom, pt as outputIsStale } from "./html-to-image-hevd6UWC.js";
10
10
  import "./chunk-5FQGJX7Z-BbqSm5gU.js";
11
11
  import { u as createLucideIcon } from "./dist--2Bqjvs0.js";
12
- import { a as DEFAULT_SLIDE_TYPE, c as Slide, ct as PanelGroup, i as DEFAULT_DECK_TRANSITION, lt as PanelResizeHandle, on as EyeOff, s as SlideSidebar, sn as Expand, st as Panel, t as useNotebookCodeAvailable, un as Code } from "./code-visibility-DQX0uy8x.js";
13
- import { X as useDebouncedCallback } from "./input-BSdZp5Ng.js";
14
- import "./toDate-D1Z7ZXWh.js";
12
+ import { a as DEFAULT_SLIDE_TYPE, c as Slide, ct as PanelGroup, i as DEFAULT_DECK_TRANSITION, lt as PanelResizeHandle, on as EyeOff, s as SlideSidebar, sn as Expand, st as Panel, t as useNotebookCodeAvailable, un as Code } from "./code-visibility-D7wWXyyp.js";
13
+ import { X as useDebouncedCallback } from "./input-DtsN7xm-.js";
14
+ import "./toDate-CWNNlFEX.js";
15
15
  import "./react-dom-BTJzcVJ9.js";
16
16
  import { t as require_jsx_runtime } from "./jsx-runtime-DebpN0FN.js";
17
17
  import { X as useFullScreenElement } from "./zod-CijjQh4u.js";
18
18
  import { t as Tooltip } from "./tooltip-Czds6Qr8.js";
19
- import { D as useEvent_default, g as isIslands, y as useAtomValue } from "./useTheme-yGsGEk82.js";
19
+ import { D as useEvent_default, g as isIslands, y as useAtomValue } from "./useTheme-6eZ3GOTS.js";
20
20
  import "./dist-U4F-tbMs.js";
21
21
  import "./main-Tj_-QTyF.js";
22
22
  import "./dist-Dv_Y15yk.js";
@@ -1,5 +1,5 @@
1
1
  import { u as createLucideIcon } from "./dist--2Bqjvs0.js";
2
- import { s as Hash } from "./useLifecycle-CxffarYV.js";
2
+ import { s as Hash } from "./useLifecycle-DegSo0lV.js";
3
3
  import { i as Table, o as ChartPie } from "./useDateFormatter-CMnRuVmN.js";
4
4
  import { C as logNever } from "./strings-Dq_j3Rxw.js";
5
5
  var AlignCenterVertical = createLucideIcon("align-center-vertical", [
@@ -6,7 +6,7 @@ import { _ as Logger } from "./button-BacYv-bE.js";
6
6
  import { t as require_compiler_runtime } from "./compiler-runtime-CEbnTgxf.js";
7
7
  import { u as createLucideIcon } from "./dist--2Bqjvs0.js";
8
8
  import { r as KnownQueryParams } from "./constants-T20xxyNf.js";
9
- import { S as atom, g as isIslands, h as waitFor, p as store } from "./useTheme-yGsGEk82.js";
9
+ import { S as atom, g as isIslands, h as waitFor, p as store } from "./useTheme-6eZ3GOTS.js";
10
10
  import { t as invariant } from "./invariant-wRzNXIsJ.js";
11
11
  var CircleQuestionMark = createLucideIcon("circle-question-mark", [
12
12
  ["circle", {
@@ -529,17 +529,25 @@ var RuntimeManager = class {
529
529
  });
530
530
  return !this.isSameOrigin && this.config.authToken && x.searchParams.set(KnownQueryParams.accessToken, this.config.authToken), asWsUrl(x.toString());
531
531
  }
532
- getWsURL(e) {
532
+ getSessionSearchParams(e) {
533
533
  let b = new URL(this.config.url), x = new URLSearchParams(b.search);
534
534
  return new URLSearchParams(window.location.search).forEach((e2, b2) => {
535
535
  x.has(b2) || x.set(b2, e2);
536
- }), x.set(KnownQueryParams.sessionId, e), this.formatWsURL("/ws", x);
536
+ }), x.set(KnownQueryParams.sessionId, e), x;
537
+ }
538
+ getWsURL(e) {
539
+ return this.formatWsURL("/ws", this.getSessionSearchParams(e));
540
+ }
541
+ getSseURL(e) {
542
+ let b = this.formatHttpURL({
543
+ path: "/sse",
544
+ searchParams: this.getSessionSearchParams(e),
545
+ restrictToKnownQueryParams: false
546
+ });
547
+ return b.searchParams.delete(KnownQueryParams.accessToken), b;
537
548
  }
538
549
  getWsSyncURL(e) {
539
- let b = new URL(this.config.url), x = new URLSearchParams(b.search);
540
- return new URLSearchParams(window.location.search).forEach((e2, b2) => {
541
- x.has(b2) || x.set(b2, e2);
542
- }), x.set(KnownQueryParams.sessionId, e), this.formatWsURL("/ws_sync", x);
550
+ return this.formatWsURL("/ws_sync", this.getSessionSearchParams(e));
543
551
  }
544
552
  getTerminalWsURL() {
545
553
  return this.formatWsURL("/terminal/ws");
@@ -1,7 +1,7 @@
1
1
  import { s as __toESM } from "./chunk-BNovOVIE.js";
2
2
  import { t as require_react } from "./react-DA-nE2FX.js";
3
3
  import { t as require_compiler_runtime } from "./compiler-runtime-CEbnTgxf.js";
4
- import { D as useEvent_default } from "./useTheme-yGsGEk82.js";
4
+ import { D as useEvent_default } from "./useTheme-6eZ3GOTS.js";
5
5
  import { t as invariant } from "./invariant-wRzNXIsJ.js";
6
6
  var import_compiler_runtime = require_compiler_runtime(), import_react = /* @__PURE__ */ __toESM(require_react(), 1), Result = {
7
7
  error(e, s) {
@@ -1,6 +1,6 @@
1
1
  import { s as __toESM } from "./chunk-BNovOVIE.js";
2
2
  import { t as require_react } from "./react-DA-nE2FX.js";
3
- import { E as dequal } from "./useTheme-yGsGEk82.js";
3
+ import { E as dequal } from "./useTheme-6eZ3GOTS.js";
4
4
  var import_react = /* @__PURE__ */ __toESM(require_react(), 1);
5
5
  function useDeepCompareMemoize(e) {
6
6
  let i = import_react.useRef(e);
@@ -4,7 +4,7 @@ import { t as require_react } from "./react-DA-nE2FX.js";
4
4
  import { t as require_compiler_runtime } from "./compiler-runtime-CEbnTgxf.js";
5
5
  import { u as createLucideIcon } from "./dist--2Bqjvs0.js";
6
6
  import { t as require_jsx_runtime } from "./jsx-runtime-DebpN0FN.js";
7
- import { S as atom, b as useSetAtom } from "./useTheme-yGsGEk82.js";
7
+ import { S as atom, b as useSetAtom } from "./useTheme-6eZ3GOTS.js";
8
8
  var Calendar = createLucideIcon("calendar", [
9
9
  ["path", {
10
10
  d: "M8 2v4",
@@ -637,7 +637,10 @@ const UserConfigSchema = looseObject({
637
637
  markdown: boolean().optional(),
638
638
  rtc: boolean().optional()
639
639
  }).prefault(() => ({})),
640
- server: looseObject({ disable_file_downloads: boolean().optional() }).prefault(() => ({})),
640
+ server: looseObject({
641
+ disable_file_downloads: boolean().optional(),
642
+ transport: _enum(["websocket", "sse"]).optional()
643
+ }).prefault(() => ({})),
641
644
  diagnostics: looseObject({
642
645
  enabled: boolean().optional(),
643
646
  sql_linter: boolean().optional()
@@ -701,7 +704,7 @@ const userConfigAtom = atom(defaultUserConfig()), configOverridesAtom = atom({})
701
704
  let A = e(configOverridesAtom);
702
705
  return merge_default({}, e(userConfigAtom), A);
703
706
  }), autoInstantiateAtom = atom((e) => e(resolvedMarimoConfigAtom).runtime.auto_instantiate), hotkeyOverridesAtom = atom((e) => e(resolvedMarimoConfigAtom).keymap.overrides ?? {}), platformAtom = atom(resolvePlatform());
704
- atom((e) => new OverridingHotkeyProvider(e(hotkeyOverridesAtom), { platform: e(platformAtom) })), atom((e) => e(resolvedMarimoConfigAtom).save), atom((e) => e(resolvedMarimoConfigAtom).ai), atom((e) => e(resolvedMarimoConfigAtom).completion), atom((e) => e(resolvedMarimoConfigAtom).keymap.preset);
707
+ atom((e) => new OverridingHotkeyProvider(e(hotkeyOverridesAtom), { platform: e(platformAtom) })), atom((e) => e(resolvedMarimoConfigAtom).save), atom((e) => e(resolvedMarimoConfigAtom).server.transport === "sse" ? "sse" : "websocket"), atom((e) => e(resolvedMarimoConfigAtom).ai), atom((e) => e(resolvedMarimoConfigAtom).completion), atom((e) => e(resolvedMarimoConfigAtom).keymap.preset);
705
708
  function useResolvedMarimoConfig() {
706
709
  let e = (0, import_compiler_runtime$1.c)(3), A = useAtomValue(resolvedMarimoConfigAtom), j = useSetAtom(userConfigAtom), M;
707
710
  return e[0] !== A || e[1] !== j ? (M = [A, j], e[0] = A, e[1] = j, e[2] = M) : M = e[2], M;
@@ -2,23 +2,23 @@ import { s as __toESM } from "./chunk-BNovOVIE.js";
2
2
  import { _ as Logger, c as Objects, g as cn, h as Events } from "./button-BacYv-bE.js";
3
3
  import { t as require_react } from "./react-DA-nE2FX.js";
4
4
  import { t as require_compiler_runtime } from "./compiler-runtime-CEbnTgxf.js";
5
- import { c as asRemoteURL, v as CircleQuestionMark } from "./toDate-D1Z7ZXWh.js";
5
+ import { c as asRemoteURL, v as CircleQuestionMark } from "./toDate-CWNNlFEX.js";
6
6
  import "./react-dom-BTJzcVJ9.js";
7
7
  import { t as require_jsx_runtime } from "./jsx-runtime-DebpN0FN.js";
8
8
  import "./zod-CijjQh4u.js";
9
9
  import { n as ErrorBanner } from "./error-banner-DFPfz_Qf.js";
10
10
  import { t as Tooltip } from "./tooltip-Czds6Qr8.js";
11
11
  import { i as debounce_default } from "./constants-T20xxyNf.js";
12
- import { D as useEvent_default, n as useTheme } from "./useTheme-yGsGEk82.js";
12
+ import { D as useEvent_default, n as useTheme } from "./useTheme-6eZ3GOTS.js";
13
13
  import { s as uniq } from "./arrays-sEtDRoG4.js";
14
- import { a as isValid, i as AlertTitle, n as Alert, t as arrow } from "./formats-WsOgyW_K.js";
14
+ import { a as isValid, i as AlertTitle, n as Alert, t as arrow } from "./formats-Dzx4J_z1.js";
15
15
  import { n as formats } from "./vega-loader.browser-CZ-J8Py3.js";
16
16
  import { a as getContainerWidth, n as vegaLoadData, s as tooltipHandler } from "./loader-Boph2xIS.js";
17
17
  import { t as j } from "./react-vega-B0sAlDTL.js";
18
18
  import "./defaultLocale-u-3osm0P.js";
19
19
  import "./defaultLocale-BoHTsDG6.js";
20
- import { t as useAsyncData } from "./useAsyncData-BMc8itk2.js";
21
- import { t as useDeepCompareMemoize } from "./useDeepCompareMemoize-ZwmDBRDY.js";
20
+ import { t as useAsyncData } from "./useAsyncData-KfHB8wQR.js";
21
+ import { t as useDeepCompareMemoize } from "./useDeepCompareMemoize-nJMtxhm4.js";
22
22
  import { t as Semaphore } from "./semaphore-CNDGTzkX.js";
23
23
  var import_compiler_runtime = require_compiler_runtime(), import_react = /* @__PURE__ */ __toESM(require_react(), 1);
24
24
  function fixRelativeUrl(e) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marimo-team/islands",
3
- "version": "0.23.14-dev55",
3
+ "version": "0.23.14-dev56",
4
4
  "main": "dist/main.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",
@@ -4,6 +4,7 @@ import { createStore } from "jotai";
4
4
  import { expect, test } from "vitest";
5
5
  import {
6
6
  configOverridesAtom,
7
+ connectionTransportTypeAtom,
7
8
  resolvedMarimoConfigAtom,
8
9
  userConfigAtom,
9
10
  } from "../config";
@@ -296,3 +297,19 @@ test("resolvedMarimoConfigAtom overrides correctly and does not mutate the origi
296
297
  formatting: { line_length: 79 },
297
298
  });
298
299
  });
300
+
301
+ test("connectionTransportTypeAtom defaults to websocket", () => {
302
+ const store = createStore();
303
+ store.set(userConfigAtom, defaultUserConfig());
304
+ expect(store.get(connectionTransportTypeAtom)).toBe("websocket");
305
+ });
306
+
307
+ test("connectionTransportTypeAtom reads server.transport", () => {
308
+ const store = createStore();
309
+ const config = defaultUserConfig();
310
+ store.set(userConfigAtom, {
311
+ ...config,
312
+ server: { ...config.server, transport: "sse" },
313
+ });
314
+ expect(store.get(connectionTransportTypeAtom)).toBe("sse");
315
+ });
@@ -203,6 +203,7 @@ export const UserConfigSchema = z
203
203
  server: z
204
204
  .looseObject({
205
205
  disable_file_downloads: z.boolean().optional(),
206
+ transport: z.enum(["websocket", "sse"]).optional(),
206
207
  })
207
208
  .prefault(() => ({})),
208
209
  diagnostics: z
@@ -44,6 +44,16 @@ export const autoSaveConfigAtom = atom((get) => {
44
44
  return get(resolvedMarimoConfigAtom).save;
45
45
  });
46
46
 
47
+ /**
48
+ * The transport used to stream kernel messages from the server.
49
+ * Experimental; configured via `server.transport`.
50
+ */
51
+ export const connectionTransportTypeAtom = atom<"websocket" | "sse">((get) => {
52
+ return get(resolvedMarimoConfigAtom).server.transport === "sse"
53
+ ? "sse"
54
+ : "websocket";
55
+ });
56
+
47
57
  export const aiAtom = atom((get) => {
48
58
  return get(resolvedMarimoConfigAtom).ai;
49
59
  });
@@ -154,6 +154,51 @@ describe("RuntimeManager", () => {
154
154
  });
155
155
  });
156
156
 
157
+ describe("getSseURL", () => {
158
+ it("should return an http(s) URL with the session ID", () => {
159
+ const runtime = new RuntimeManager(mockConfig);
160
+ const url = runtime.getSseURL("1234" as SessionId);
161
+
162
+ expect(url.protocol).toBe("https:");
163
+ expect(url.pathname).toBe("/sse");
164
+ expect(url.searchParams.get("session_id")).toBe("1234");
165
+ });
166
+
167
+ it("should never put the auth token in the URL, even cross-origin", () => {
168
+ // SSE requests can send headers, so auth travels in the
169
+ // Authorization header; a token in the URL would leak into
170
+ // proxy and server logs.
171
+ const runtime = new RuntimeManager(
172
+ {
173
+ url: "https://sandbox.example.com",
174
+ lazy: true,
175
+ authToken: "my-secret-token",
176
+ },
177
+ true,
178
+ );
179
+ const url = runtime.getSseURL("s_123" as SessionId);
180
+
181
+ expect(url.searchParams.get("access_token")).toBeNull();
182
+ expect(url.toString()).not.toContain("my-secret-token");
183
+ });
184
+
185
+ it("should strip an access_token forwarded from the page URL", () => {
186
+ // The page URL can briefly carry access_token before auth cleanup
187
+ // removes it; it must not be forwarded to /sse.
188
+ const original = window.location.href;
189
+ window.history.pushState({}, "", "/?access_token=page-token&foo=bar");
190
+ try {
191
+ const runtime = new RuntimeManager(mockConfig);
192
+ const url = runtime.getSseURL("s_123" as SessionId);
193
+
194
+ expect(url.searchParams.get("access_token")).toBeNull();
195
+ expect(url.searchParams.get("foo")).toBe("bar");
196
+ } finally {
197
+ window.history.pushState({}, "", original);
198
+ }
199
+ });
200
+ });
201
+
157
202
  describe("getWsSyncURL", () => {
158
203
  it("should return WebSocket Sync URL", () => {
159
204
  const runtime = new RuntimeManager(mockConfig);
@@ -107,9 +107,10 @@ export class RuntimeManager {
107
107
  }
108
108
 
109
109
  /**
110
- * The WebSocket URL of the runtime.
110
+ * Search params for a session connection: the base URL's params, merged
111
+ * with the current page's, plus the session id.
111
112
  */
112
- getWsURL(sessionId: SessionId): URL {
113
+ private getSessionSearchParams(sessionId: SessionId): URLSearchParams {
113
114
  const baseUrl = new URL(this.config.url);
114
115
  const searchParams = new URLSearchParams(baseUrl.search);
115
116
 
@@ -123,27 +124,40 @@ export class RuntimeManager {
123
124
  });
124
125
 
125
126
  searchParams.set(KnownQueryParams.sessionId, sessionId);
126
- return this.formatWsURL("/ws", searchParams);
127
+ return searchParams;
127
128
  }
128
129
 
129
130
  /**
130
- * The WebSocket Sync URL of the runtime, for real-time updates.
131
+ * The WebSocket URL of the runtime.
131
132
  */
132
- getWsSyncURL(sessionId: SessionId): URL {
133
- const baseUrl = new URL(this.config.url);
134
- const searchParams = new URLSearchParams(baseUrl.search);
133
+ getWsURL(sessionId: SessionId): URL {
134
+ return this.formatWsURL("/ws", this.getSessionSearchParams(sessionId));
135
+ }
135
136
 
136
- // Merge in current page's query parameters
137
- const currentParams = new URLSearchParams(window.location.search);
138
- currentParams.forEach((value, key) => {
139
- // Don't override base URL params
140
- if (!searchParams.has(key)) {
141
- searchParams.set(key, value);
142
- }
137
+ /**
138
+ * The SSE URL of the runtime; the http(s) alternative to `getWsURL`
139
+ * when `server.transport` is `"sse"`. Unlike WebSockets, SSE requests
140
+ * can send headers, so auth travels in the Authorization header
141
+ * (see `headers()`) instead of the URL.
142
+ */
143
+ getSseURL(sessionId: SessionId): URL {
144
+ const url = this.formatHttpURL({
145
+ path: "/sse",
146
+ searchParams: this.getSessionSearchParams(sessionId),
147
+ restrictToKnownQueryParams: false,
143
148
  });
149
+ // The page URL can still carry access_token (merged in from the
150
+ // current page's params, before auth cleanup strips it); never
151
+ // forward it — a token in the URL leaks into proxy/server logs.
152
+ url.searchParams.delete(KnownQueryParams.accessToken);
153
+ return url;
154
+ }
144
155
 
145
- searchParams.set(KnownQueryParams.sessionId, sessionId);
146
- return this.formatWsURL("/ws_sync", searchParams);
156
+ /**
157
+ * The WebSocket Sync URL of the runtime, for real-time updates.
158
+ */
159
+ getWsSyncURL(sessionId: SessionId): URL {
160
+ return this.formatWsURL("/ws_sync", this.getSessionSearchParams(sessionId));
147
161
  }
148
162
 
149
163
  /**
@@ -36,6 +36,10 @@ describe("classifyCloseEvent", () => {
36
36
  "MARIMO_NO_SESSION_ID",
37
37
  "MARIMO_NO_SESSION",
38
38
  "MARIMO_SHUTDOWN",
39
+ // Delivered as in-band close events by the SSE transport; must be
40
+ // terminal or a rejected client would reconnect forever.
41
+ "MARIMO_UNAUTHORIZED",
42
+ "MARIMO_KIOSK_NOT_ALLOWED",
39
43
  ])("%s → terminal with KERNEL_DISCONNECTED, closes transport", (reason) => {
40
44
  const decision = classify(reason);
41
45
  expect(decision.kind).toBe("terminal");
@@ -0,0 +1,49 @@
1
+ /* Copyright 2026 Marimo. All rights reserved. */
2
+
3
+ import { afterEach, describe, expect, it, vi } from "vitest";
4
+ import { BasicTransport } from "../transports/basic";
5
+ import { SseTransport } from "../transports/sse";
6
+ import { WsTransport } from "../transports/ws";
7
+ import { createConnectionTransport } from "../useWebSocket";
8
+
9
+ vi.mock("../../wasm/utils", () => ({
10
+ isWasm: () => false,
11
+ }));
12
+
13
+ describe("createConnectionTransport", () => {
14
+ afterEach(() => {
15
+ vi.restoreAllMocks();
16
+ });
17
+
18
+ const options = {
19
+ url: () => "http://localhost/ws",
20
+ headers: () => ({}),
21
+ };
22
+
23
+ it("uses BasicTransport for static notebooks", () => {
24
+ const transport = createConnectionTransport({
25
+ ...options,
26
+ static: true,
27
+ transportType: "websocket",
28
+ });
29
+ expect(transport).toBeInstanceOf(BasicTransport);
30
+ });
31
+
32
+ it("uses WsTransport by default", () => {
33
+ const transport = createConnectionTransport({
34
+ ...options,
35
+ static: false,
36
+ transportType: "websocket",
37
+ });
38
+ expect(transport).toBeInstanceOf(WsTransport);
39
+ });
40
+
41
+ it("uses SseTransport when the transport type is sse", () => {
42
+ const transport = createConnectionTransport({
43
+ ...options,
44
+ static: false,
45
+ transportType: "sse",
46
+ });
47
+ expect(transport).toBeInstanceOf(SseTransport);
48
+ });
49
+ });