@marimo-team/islands 0.22.5-dev9 → 0.22.6-dev1

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 (32) hide show
  1. package/dist/{ConnectedDataExplorerComponent-mLj6D01z.js → ConnectedDataExplorerComponent-D08JKcQg.js} +1 -1
  2. package/dist/{chat-ui-X5KPeHrU.js → chat-ui-BXYRQ5MH.js} +3 -3
  3. package/dist/main.js +212 -131
  4. package/dist/{mermaid-B93TKi2g.js → mermaid-BZ2YHhbi.js} +1 -1
  5. package/dist/{process-output-C0tmJosY.js → process-output-D_uZ0o1x.js} +2097 -2090
  6. package/dist/style.css +1 -1
  7. package/dist/{toDate-D1_ZulwM.js → toDate-D0QaHNwR.js} +8 -7
  8. package/dist/{useAsyncData-C9ez7Ilo.js → useAsyncData-BG3ULuDU.js} +1 -1
  9. package/dist/{useDeepCompareMemoize-BvvMxigY.js → useDeepCompareMemoize-CkSq3l3_.js} +1 -1
  10. package/dist/{vega-component-Bzzut3-P.js → vega-component-z4WGXPkf.js} +3 -3
  11. package/package.json +2 -2
  12. package/src/components/data-table/__tests__/columns.test.tsx +92 -13
  13. package/src/components/data-table/column-header.tsx +81 -56
  14. package/src/components/data-table/columns.tsx +25 -32
  15. package/src/components/data-table/data-table.tsx +8 -1
  16. package/src/components/data-table/renderers.tsx +19 -6
  17. package/src/components/data-table/types.ts +4 -0
  18. package/src/components/editor/Output.tsx +1 -1
  19. package/src/components/editor/__tests__/Output.test.tsx +36 -1
  20. package/src/core/cells/__tests__/cells.test.ts +41 -0
  21. package/src/core/cells/__tests__/collapseConsoleOutputs.test.ts +38 -0
  22. package/src/core/cells/cells.ts +1 -1
  23. package/src/core/cells/collapseConsoleOutputs.tsx +3 -0
  24. package/src/core/cells/document-changes.ts +12 -0
  25. package/src/core/runtime/__tests__/runtime.test.ts +138 -2
  26. package/src/core/runtime/runtime.ts +25 -5
  27. package/src/core/saving/file-state.ts +16 -0
  28. package/src/hooks/useAsyncData.ts +1 -1
  29. package/src/mount.tsx +17 -1
  30. package/src/plugins/impl/DataTablePlugin.tsx +1 -1
  31. package/src/plugins/impl/plotly/__tests__/selection.test.ts +22 -0
  32. package/src/plugins/impl/plotly/selection.ts +1 -0
package/dist/main.js CHANGED
@@ -21,7 +21,7 @@ import { a as __toCommonJS, n as __esmMin, r as __export, s as __toESM, t as __c
21
21
  import { t as require_react } from "./react-Bs6Z0kvn.js";
22
22
  import { t as require_compiler_runtime } from "./compiler-runtime-B_OLMU9S.js";
23
23
  import { n as Copy, r as toast, t as copyToClipboard } from "./copy-BRF7ryOP.js";
24
- import { $ as createActions, A as MarimoIncomingMessageEvent, An as Table2, At as Paths, B as DotFilledIcon, Bn as Columns2, Bt as PluralWord, Cn as Close$1, Ct as isInternalCellName, D as AccordionContent, Dn as Trigger2, Dt as MarkdownLanguageAdapter, E as Accordion, En as Root2$4, Et as customPythonLanguageSupport, F as BorderAllIcon, Fn as Info, Ft as useChromeActions, G as base64ToDataView, Gn as import_lib, H as PinRightIcon, Hn as CircleAlert, Ht as DATA_TYPE_ICON, In as File, It as repl, J as extractBase64FromDataURL, Jt as convertStatsName, K as base64ToUint8Array, L as CheckIcon, Ln as FileText, Lt as adaptForLocalStorage, M as MarimoValueReadyEvent, Mn as NotebookPen, Mt as goToCellLine, N as MarimoValueUpdateEvent, Nn as LoaderCircle, Nt as DeferredRequestRegistry, O as AccordionItem, On as Wrench, P as createInputEvent, Pn as Layers, Pt as generateUUID, Qt as isUninstantiated, R as ChevronDownIcon, Rn as Eye, Rt as jotaiJsonStorage, St as getValidName, Tn as Item$1, Tt as Checkbox, U as deserializeBlob, Un as Braces, Ut as getDataTypeColor, V as PinLeftIcon, Vn as CircleX, Vt as PluralWords, Wn as esm_default$1, Wt as require_client, X as safeExtractSetUIElementMessageBuffers, Xt as requestClientAtom, Y as isDataURLString, Yt as getRequestClient, Z as renderHTML, Zt as useRequestClient, _ as useExpandedConsoleOutput, _n as jsonToMarkdown, _t as headingToIdentifier, a as toPng, an as filenameAtom, at as useCellActions, b as getDatasourceContext, bn as atomWithStorage, bt as getCellDomProps, c as useCellFocusActions, cn as parseInitialValue, ct as createCell, d as Spinner, dn as SCRATCH_CELL_ID, dt as initialModeAtom, en as elementContainsMarimoCellFile, et as getCellEditorView, f as Popover$1, fn as UIElementId, ft as kioskModeAtom, g as isOutputEmpty, gn as jsonParseWithSpecialChar, gt as isErrorMime, h as PopoverTrigger, hn as RANDOM_ID_ATTR, ht as outputIsStale, i as PythonIcon, it as reducer, j as MarimoValueInputEvent, jn as PaintRoller, k as AccordionTrigger, kn as Trash2, kt as PathBuilder, l as useLastFocusedCellId, ln as CellOutputId, lt as AnsiUp, m as PopoverContent, mn as OBJECT_ID_ATTR, mt as outputIsLoading, n as blobToString, nn as getTracebackInfo, nt as notebookAtom, o as MarkdownRenderer, on as parseAttrValue, ot as useCellIds, p as PopoverClose$1, pn as findCellId, pt as viewStateAtom, q as dataViewToBase64, r as filesToBase64, rn as NotebookScopedLocalStorage, rt as notebookOutline, s as LazyAnyLanguageCodeMirror, sn as parseDataset, st as useCellNames, t as processOutput, tn as extractAllTracebackInfo, tt as getCellNames, u as maybeAddAltairImport, un as HTMLCellId, ut as getInitialAppMode, v as useExpandedOutput, vn as jsonToTSV, vt as sanitizeHtml, wn as Content2$1, wt as normalizeName, xn as selectAtom, xt as displayCellName, yn as atomWithReducer, yt as DATA_CELL_ID, z as ChevronRightIcon, zn as Database, __tla as __tla_0 } from "./process-output-C0tmJosY.js";
24
+ import { $ as createActions, A as MarimoIncomingMessageEvent, An as Table2, At as Paths, B as DotFilledIcon, Bn as Columns2, Bt as PluralWord, Cn as Close$1, Ct as isInternalCellName, D as AccordionContent, Dn as Trigger2, Dt as MarkdownLanguageAdapter, E as Accordion, En as Root2$4, Et as customPythonLanguageSupport, F as BorderAllIcon, Fn as Info, Ft as useChromeActions, G as base64ToDataView, Gn as import_lib, H as PinRightIcon, Hn as CircleAlert, Ht as DATA_TYPE_ICON, In as File, It as repl, J as extractBase64FromDataURL, Jt as convertStatsName, K as base64ToUint8Array, L as CheckIcon, Ln as FileText, Lt as adaptForLocalStorage, M as MarimoValueReadyEvent, Mn as NotebookPen, Mt as goToCellLine, N as MarimoValueUpdateEvent, Nn as LoaderCircle, Nt as DeferredRequestRegistry, O as AccordionItem, On as Wrench, P as createInputEvent, Pn as Layers, Pt as generateUUID, Qt as isUninstantiated, R as ChevronDownIcon, Rn as Eye, Rt as jotaiJsonStorage, St as getValidName, Tn as Item$1, Tt as Checkbox, U as deserializeBlob, Un as Braces, Ut as getDataTypeColor, V as PinLeftIcon, Vn as CircleX, Vt as PluralWords, Wn as esm_default$1, Wt as require_client, X as safeExtractSetUIElementMessageBuffers, Xt as requestClientAtom, Y as isDataURLString, Yt as getRequestClient, Z as renderHTML, Zt as useRequestClient, _ as useExpandedConsoleOutput, _n as jsonToMarkdown, _t as headingToIdentifier, a as toPng, an as filenameAtom, at as useCellActions, b as getDatasourceContext, bn as atomWithStorage, bt as getCellDomProps, c as useCellFocusActions, cn as parseInitialValue, ct as createCell, d as Spinner, dn as SCRATCH_CELL_ID, dt as initialModeAtom, en as elementContainsMarimoCellFile, et as getCellEditorView, f as Popover$1, fn as UIElementId, ft as kioskModeAtom, g as isOutputEmpty, gn as jsonParseWithSpecialChar, gt as isErrorMime, h as PopoverTrigger, hn as RANDOM_ID_ATTR, ht as outputIsStale, i as PythonIcon, it as reducer, j as MarimoValueInputEvent, jn as PaintRoller, k as AccordionTrigger, kn as Trash2, kt as PathBuilder, l as useLastFocusedCellId, ln as CellOutputId, lt as AnsiUp, m as PopoverContent, mn as OBJECT_ID_ATTR, mt as outputIsLoading, n as blobToString, nn as getTracebackInfo, nt as notebookAtom, o as MarkdownRenderer, on as parseAttrValue, ot as useCellIds, p as PopoverClose$1, pn as findCellId, pt as viewStateAtom, q as dataViewToBase64, r as filesToBase64, rn as NotebookScopedLocalStorage, rt as notebookOutline, s as LazyAnyLanguageCodeMirror, sn as parseDataset, st as useCellNames, t as processOutput, tn as extractAllTracebackInfo, tt as getCellNames, u as maybeAddAltairImport, un as HTMLCellId, ut as getInitialAppMode, v as useExpandedOutput, vn as jsonToTSV, vt as sanitizeHtml, wn as Content2$1, wt as normalizeName, xn as selectAtom, xt as displayCellName, yn as atomWithReducer, yt as DATA_CELL_ID, z as ChevronRightIcon, zn as Database, __tla as __tla_0 } from "./process-output-D_uZ0o1x.js";
25
25
  import { __tla as __tla_1 } from "./chunk-5FQGJX7Z-C428iZBW.js";
26
26
  import { o as useSize, s as Root$4, u as createLucideIcon } from "./dist-D56NKWim.js";
27
27
  import { A as $896ba0a80a8f4d36$export$85fd5fdf27bacc79, C as DEFAULT_COLOR_SCHEME, D as SCALE_TYPE_DESCRIPTIONS, E as EMPTY_VALUE$1, F as ListFilter, I as ChartPie, L as ChartColumn, M as $5a387cc49350e6db$export$722debc0e56fea39, N as Table$1, O as TIME_UNIT_DESCRIPTIONS, P as SquareFunction, 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 $fb18d541ea1ad717$export$ad991b66133851cf, 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-ByDEU1T3.js";
@@ -29,7 +29,7 @@ import { c as Calendar, i as createReducerAndAtoms, n as useOnUnmount, o as Togg
29
29
  import { t as Check } from "./check-Cex3x9fD.js";
30
30
  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$3, N as usePrevious$1, O as $b5e257d569688ac6$export$535bd6ca7f90a273, P as useDirection, R as ChevronDown, S as assertNever, T as $488c6ddbf4ef74c2$export$cc77c4ff7e8673c5, _ as menuControlVariants, a as SelectContent, b as menuSeparatorVariants, c as SelectLabel, d as SelectValue, f as NativeSelect, g as menuControlCheckVariants, h as menuContentCommon, i as Select, j as Trigger$3, l as SelectSeparator, m as MENU_ITEM_DISABLED, n as Strings, o as SelectGroup, p as selectStyles, r as capitalize, s as SelectItem, t as Label, u as SelectTrigger, v as menuItemVariants, w as $a916eb452884faea$export$b7a616150fdb9f44, x as menuSubTriggerVariants, y as menuLabelVariants } from "./label-CIR53v8V.js";
31
31
  import { $ as $e5be200c675c3b3a$export$aca958c65c314e6c, $t as Portal, 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, G as marked, Gt as Anchor2, 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, Jt as Content2$2, K as useDebounceControlledState, Kt as Arrow2, 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, Qt as Label$2, 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, Xt as Item2$2, Y as $2baaea4c71418dea$export$294aa081a6c6f55d, Yt as Group$1, Z as $e5be200c675c3b3a$export$75ee7c75d68f5b0e, Zt as ItemIndicator, _ as DropdownMenuSub, _t as $9446cca9a3875146$export$7d15b64cf5a3a4c4, a as NumberField, an as SubContent, at as $6c7bd7858deea686$export$cd11ab140839f11d, b as DropdownMenuTrigger, bt as $b4b717babfbb907b$export$bebd5a1431fec25d, c as prettyNumber, cn as Item$2, ct as $6db58dc88e78b024$export$2f817fcdc4b89ae0, d as DropdownMenuContent, dn as Search, dt as $9ab94262bd0047c7$export$420e68273165f4ec, en as RadioGroup$2, et as $e5be200c675c3b3a$export$dad6ae84456c676a, f as DropdownMenuGroup, fn as Circle, ft as $3ad3f6e1647bc98d$export$80f3e147d781571c, g as DropdownMenuSeparator, gt as $ae1eeba8b9eafd08$export$5165eccb35aaadb5, h as DropdownMenuPortal, ht as _class_private_field_init, i as OnBlurredInput, in as Sub, 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, ln as Root$5, lt as $5b160d28a433310d$export$c17fa47878dc55b6, m as DropdownMenuLabel, mt as $f6c31cce2adf654f$export$45712eceda6fad21, n as DebouncedNumberInput, nn as Root3, nt as $319e236875307eab$export$a9b970dcc4ae71a9, o as maxFractionalDigits, on as SubTrigger, ot as $fca6afa0e843324b$export$87b761675e8eaa10, p as DropdownMenuItem, pn as ChevronRight, pt as $507fabe10e71c6fb$export$630ff653c5ada6a9, q as useDebouncedCallback, qt as CheckboxItem, r as Input, rn as Separator, rt as $f7dceffc5ad7768b$export$4e328f61c538687f, s as prettyEngineeringNumber, sn as createMenuScope, st as $fca6afa0e843324b$export$f12b703ca79dfbb1, t as DebouncedInput, tn as RadioItem, tt as $e5be200c675c3b3a$export$fc1a364ae1f3ff10, u as DropdownMenu, un as createRovingFocusGroupScope, ut as $6179b936705e76d3$export$ae780daf29e6d456, v as DropdownMenuSubContent, 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, y as DropdownMenuSubTrigger, yt as $b4b717babfbb907b$export$4c063cf1350e6fed, z as $64fa3d84918910a7$export$c245e6201fed2f75, zt as $431fbd86ca7dc216$export$b204af158042fbac } from "./input-SSWXiS6n.js";
32
- import { a as millisecondsInMinute, c as asRemoteURL, d as isUrl, f as require_cuid2, g as CircleQuestionMark, h as isWasm, i as millisecondsInHour, m as Deferred, n as constructFrom, o as millisecondsInSecond, r as millisecondsInDay, s as millisecondsInWeek, t as toDate, u as appendQueryParams } from "./toDate-D1_ZulwM.js";
32
+ import { a as millisecondsInMinute, c as asRemoteURL, d as isUrl, f as require_cuid2, g as CircleQuestionMark, h as isWasm, i as millisecondsInHour, m as Deferred, n as constructFrom, o as millisecondsInSecond, r as millisecondsInDay, s as millisecondsInWeek, t as toDate, u as appendQueryParams } from "./toDate-D0QaHNwR.js";
33
33
  import { a as Plus, i as Trash, n as ErrorBoundary, o as Pencil, r as require_prop_types, t as BulkEdit } from "./types-D4-TD_m0.js";
34
34
  import { n as clsx_default } from "./clsx-yW_RAw0K.js";
35
35
  import { _ as Functions, c as Objects, g as Logger, h as Events, i as NOT_SET, l as useEventListener, m as useComposedRefs, n as buttonVariants, o as isPlatformMac, p as composeRefs, r as cva, t as Button, u as Slot$1, v as throwNotImplemented, y as cn } from "./button-DNlNlZY_.js";
@@ -56,12 +56,12 @@ import "./dist-Ci0CXEFt.js";
56
56
  import "./dist-DJ9F1eHs.js";
57
57
  import { a as parser, r as python } from "./dist-DAfcmt-d.js";
58
58
  import "./purify.es-hTCfRGdl.js";
59
- import { a as AlertTitle, i as AlertDescription, n as arrow, o as isValid, r as Alert, t as useDeepCompareMemoize } from "./useDeepCompareMemoize-BvvMxigY.js";
59
+ import { a as AlertTitle, i as AlertDescription, n as arrow, o as isValid, r as Alert, t as useDeepCompareMemoize } from "./useDeepCompareMemoize-CkSq3l3_.js";
60
60
  import { n as memoize$1, t as isPropValid } from "./emotion-is-prop-valid.esm-CJVjyntJ.js";
61
61
  import { n as formats } from "./vega-loader.browser-DqEcFOPD.js";
62
62
  import { a as getContainerWidth, n as vegaLoadData, o as getVegaFieldTypes, r as createBatchedLoader, s as tooltipHandler, t as parseCsvData } from "./loader-Bd1kgLn7.js";
63
63
  import { t as useIframeCapabilities } from "./useIframeCapabilities-CqhrVue6.js";
64
- import { t as useAsyncData } from "./useAsyncData-C9ez7Ilo.js";
64
+ import { t as useAsyncData } from "./useAsyncData-BG3ULuDU.js";
65
65
  import "./defaultLocale-qS7DaAmi.js";
66
66
  import "./defaultLocale-Bxoo2-30.js";
67
67
  import "./dist-CcMfr7jD.js";
@@ -28187,53 +28187,68 @@ Database schema: ${c}`), (_a4 = r2.aiFix) == null ? void 0 : _a4.setAiCompletion
28187
28187
  }
28188
28188
  }
28189
28189
  var TOP_K_ROWS = 30;
28190
- const DataTableColumnHeader = ({ column: e, header: r, justify: c, className: d, calculateTopKRows: f, table: h }) => {
28190
+ const DataTableColumnHeader = ({ column: e, header: r, subheader: c, className: d, calculateTopKRows: f, table: h }) => {
28191
28191
  let [_, v] = (0, import_react.useState)(false), { locale: y } = $18f2051aff69b9bf$export$43bb16f9c6d9e3f7();
28192
28192
  if (!r) return null;
28193
- if (!e.getCanSort() && !e.getCanFilter()) return (0, import_jsx_runtime.jsx)("div", {
28193
+ if (!e.getCanSort() && !e.getCanFilter()) return (0, import_jsx_runtime.jsxs)("div", {
28194
28194
  className: cn(d),
28195
- children: r
28195
+ children: [
28196
+ r,
28197
+ c
28198
+ ]
28196
28199
  });
28197
- let S = e.getFilterValue() !== void 0, w = !e.getIsSorted() && !S;
28200
+ let S = e.getFilterValue() !== void 0;
28198
28201
  return (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
28199
28202
  children: [
28200
- (0, import_jsx_runtime.jsxs)(DropdownMenu, {
28201
- modal: false,
28203
+ (0, import_jsx_runtime.jsxs)("div", {
28204
+ className: cn("group flex flex-col my-1 w-full select-none", d),
28202
28205
  children: [
28203
- (0, import_jsx_runtime.jsx)(DropdownMenuTrigger, {
28204
- asChild: true,
28205
- children: (0, import_jsx_runtime.jsxs)("div", {
28206
- className: cn("group flex items-center my-1 space-between w-full select-none gap-2 border hover:border-border border-transparent hover:bg-(--slate-3) data-[state=open]:bg-(--slate-3) data-[state=open]:border-border rounded px-1 -mx-1", c === "right" && "flex-row-reverse", d),
28207
- "data-testid": "data-table-sort-button",
28208
- children: [
28209
- (0, import_jsx_runtime.jsx)("span", {
28210
- className: "flex-1",
28211
- children: r
28212
- }),
28213
- (0, import_jsx_runtime.jsx)("span", {
28214
- className: cn("h-5 py-1 px-1", w && "invisible group-hover:visible data-[state=open]:visible"),
28215
- children: renderSortFilterIcon(e)
28216
- })
28217
- ]
28218
- })
28219
- }),
28220
- (0, import_jsx_runtime.jsxs)(DropdownMenuContent, {
28221
- align: "start",
28206
+ (0, import_jsx_runtime.jsxs)("div", {
28207
+ className: "flex items-center gap-1",
28222
28208
  children: [
28223
- renderDataType(e),
28224
- renderSorts(e, h),
28225
- renderCopyColumn(e),
28226
- renderColumnPinning(e),
28227
- renderColumnWrapping(e),
28228
- renderFormatOptions(e, y),
28229
- (0, import_jsx_runtime.jsx)(DropdownMenuSeparator, {}),
28230
- renderMenuItemFilter(e),
28231
- renderFilterByValues(e, v),
28232
- S && (0, import_jsx_runtime.jsx)(ClearFilterMenuItem, {
28209
+ (0, import_jsx_runtime.jsx)("span", {
28210
+ children: r
28211
+ }),
28212
+ e.getCanSort() && (0, import_jsx_runtime.jsx)(SortButton, {
28233
28213
  column: e
28214
+ }),
28215
+ (0, import_jsx_runtime.jsxs)(DropdownMenu, {
28216
+ modal: false,
28217
+ children: [
28218
+ (0, import_jsx_runtime.jsx)(DropdownMenuTrigger, {
28219
+ asChild: true,
28220
+ children: (0, import_jsx_runtime.jsx)("button", {
28221
+ type: "button",
28222
+ className: "inline-flex items-center justify-center h-5 w-5 rounded hover:bg-(--slate-4) text-muted-foreground opacity-0 group-hover:opacity-100 focus:opacity-100 group-focus-within:opacity-100 data-[state=open]:opacity-100 data-[state=open]:text-accent-foreground",
28223
+ "aria-label": "Column options",
28224
+ "data-testid": "data-table-column-menu-button",
28225
+ children: (0, import_jsx_runtime.jsx)(Ellipsis, {
28226
+ className: "h-3.5 w-3.5"
28227
+ })
28228
+ })
28229
+ }),
28230
+ (0, import_jsx_runtime.jsxs)(DropdownMenuContent, {
28231
+ align: "start",
28232
+ children: [
28233
+ renderDataType(e),
28234
+ renderSorts(e, h),
28235
+ renderCopyColumn(e),
28236
+ renderColumnPinning(e),
28237
+ renderColumnWrapping(e),
28238
+ renderFormatOptions(e, y),
28239
+ (0, import_jsx_runtime.jsx)(DropdownMenuSeparator, {}),
28240
+ renderMenuItemFilter(e),
28241
+ renderFilterByValues(e, v),
28242
+ S && (0, import_jsx_runtime.jsx)(ClearFilterMenuItem, {
28243
+ column: e
28244
+ })
28245
+ ]
28246
+ })
28247
+ ]
28234
28248
  })
28235
28249
  ]
28236
- })
28250
+ }),
28251
+ c
28237
28252
  ]
28238
28253
  }),
28239
28254
  _ && (0, import_jsx_runtime.jsx)(PopoverFilterByValues, {
@@ -28244,6 +28259,19 @@ Database schema: ${c}`), (_a4 = r2.aiFix) == null ? void 0 : _a4.setAiCompletion
28244
28259
  ]
28245
28260
  });
28246
28261
  };
28262
+ var SortButton = ({ column: e }) => {
28263
+ let r = e.getIsSorted();
28264
+ return (0, import_jsx_runtime.jsx)("button", {
28265
+ type: "button",
28266
+ onClick: (c) => {
28267
+ c.stopPropagation(), r ? r === "asc" ? e.toggleSorting(true, true) : e.clearSorting() : e.toggleSorting(false, true);
28268
+ },
28269
+ className: cn("inline-flex items-center justify-center h-5 w-5 rounded hover:bg-(--slate-4)", r ? "text-accent-foreground" : "text-muted-foreground opacity-0 group-hover:opacity-100 focus:opacity-100 group-focus-within:opacity-100"),
28270
+ "aria-label": r === "asc" ? "Sorted ascending, click to sort descending" : r === "desc" ? "Sorted descending, click to clear sort" : "Sort column ascending",
28271
+ "data-testid": "data-table-sort-button",
28272
+ children: renderSortFilterIcon(e)
28273
+ });
28274
+ };
28247
28275
  function renderMenuItemFilter(e) {
28248
28276
  var _a3;
28249
28277
  if (!e.getCanFilter()) return null;
@@ -30301,30 +30329,24 @@ Database schema: ${c}`), (_a4 = r2.aiFix) == null ? void 0 : _a4.setAiCompletion
30301
30329
  ]
30302
30330
  })
30303
30331
  ]
30304
- }) : null, O2 = M(e2), I2 = (0, import_jsx_runtime.jsxs)("div", {
30305
- className: cn("flex flex-col", O2 === "center" && "items-center", O2 === "right" && "items-end"),
30306
- children: [
30307
- (0, import_jsx_runtime.jsx)("span", {
30308
- className: cn("font-bold", S2 && "underline decoration-dotted"),
30309
- children: e2 === "" ? " " : e2
30310
- }),
30311
- E2
30312
- ]
30313
- }), z2 = (0, import_jsx_runtime.jsx)(DataTableColumnHeader, {
30332
+ }) : null, O2 = (0, import_jsx_runtime.jsx)("span", {
30333
+ className: cn("font-bold", S2 && "underline decoration-dotted"),
30334
+ children: e2 === "" ? " " : e2
30335
+ }), M2 = (0, import_jsx_runtime.jsx)(DataTableColumnHeader, {
30314
30336
  header: S2 ? (0, import_jsx_runtime.jsx)(Tooltip, {
30315
30337
  content: S2,
30316
30338
  delayDuration: 300,
30317
- children: I2
30318
- }) : I2,
30339
+ children: O2
30340
+ }) : O2,
30341
+ subheader: E2,
30319
30342
  column: r2,
30320
- justify: O2,
30321
30343
  calculateTopKRows: y,
30322
30344
  table: c3
30323
30345
  });
30324
- return w.has(e2) ? z2 : (0, import_jsx_runtime.jsxs)("div", {
30325
- className: cn("flex flex-col h-full pt-0.5 pb-3 justify-between items-start", O2 === "center" && "items-center", O2 === "right" && "items-end"),
30346
+ return w.has(e2) ? M2 : (0, import_jsx_runtime.jsxs)("div", {
30347
+ className: cn("flex flex-col h-full pt-0.5 pb-3 justify-between items-start"),
30326
30348
  children: [
30327
- z2,
30349
+ M2,
30328
30350
  (0, import_jsx_runtime.jsx)(TableColumnSummary, {
30329
30351
  columnId: e2
30330
30352
  })
@@ -30342,7 +30364,13 @@ Database schema: ${c}`), (_a4 = r2.aiFix) == null ? void 0 : _a4.setAiCompletion
30342
30364
  renderValue: d2,
30343
30365
  getValue: f2,
30344
30366
  selectCell: v2,
30345
- cellStyles: getCellStyleClass(y2, S2, O2, E2, I2 === "number" || I2 === "integer")
30367
+ cellStyles: getCellStyleClass({
30368
+ justify: y2,
30369
+ wrapped: S2,
30370
+ canSelectCell: O2,
30371
+ isSelected: E2,
30372
+ isNumeric: I2 === "number" || I2 === "integer"
30373
+ })
30346
30374
  });
30347
30375
  return w.has(e2) ? (0, import_jsx_runtime.jsx)("b", {
30348
30376
  children: z2
@@ -30443,7 +30471,7 @@ Database schema: ${c}`), (_a4 = r2.aiFix) == null ? void 0 : _a4.setAiCompletion
30443
30471
  return;
30444
30472
  }
30445
30473
  }
30446
- function getCellStyleClass(e, r, c, d, f) {
30474
+ function getCellStyleClass({ justify: e = "left", wrapped: r, canSelectCell: c, isSelected: d, isNumeric: f = false }) {
30447
30475
  return cn(c && "cursor-pointer", d && "relative before:absolute before:inset-0 before:bg-(--blue-3) before:rounded before:-z-10 before:mx-[-4px] before:my-[-2px]", "w-full", "text-left", "truncate", f && "tabular-nums", e === "center" && "text-center", e === "right" && "text-right", r && "whitespace-pre-wrap min-w-[200px] break-words");
30448
30476
  }
30449
30477
  function renderAny(e) {
@@ -33856,7 +33884,7 @@ Database schema: ${c}`), (_a4 = r2.aiFix) == null ? void 0 : _a4.setAiCompletion
33856
33884
  let c = (r2) => r2.map((r3) => r3.headers.map((r4) => {
33857
33885
  let { className: c2, style: d } = getPinningStyles(r4.column);
33858
33886
  return (0, import_jsx_runtime.jsx)(TableHead, {
33859
- className: cn("h-auto min-h-10 whitespace-pre align-top", c2),
33887
+ className: cn("h-auto min-h-10 whitespace-pre align-top border-r border-r-border/75", c2),
33860
33888
  style: d,
33861
33889
  ref: (c3) => {
33862
33890
  columnSizingHandler({
@@ -33874,7 +33902,12 @@ Database schema: ${c}`), (_a4 = r2.aiFix) == null ? void 0 : _a4.setAiCompletion
33874
33902
  children: [
33875
33903
  c(e.getLeftHeaderGroups()),
33876
33904
  c(e.getCenterHeaderGroups()),
33877
- c(e.getRightHeaderGroups())
33905
+ c(e.getRightHeaderGroups()),
33906
+ e.getAllColumns().length <= 4 && (0, import_jsx_runtime.jsx)("th", {
33907
+ className: "w-full border-0",
33908
+ "aria-hidden": "true",
33909
+ role: "presentation"
33910
+ })
33878
33911
  ]
33879
33912
  })
33880
33913
  });
@@ -33918,7 +33951,7 @@ Database schema: ${c}`), (_a4 = r2.aiFix) == null ? void 0 : _a4.setAiCompletion
33918
33951
  tabIndex: 0,
33919
33952
  ...getCellDomProps(e3.id),
33920
33953
  key: e3.id,
33921
- className: cn("whitespace-pre truncate max-w-[300px] outline-hidden", e3.column.getColumnWrapping && ((_d3 = (_c3 = e3.column).getColumnWrapping) == null ? void 0 : _d3.call(_c3)) === "wrap" && "whitespace-pre-wrap min-w-[200px]", "px-1.5 py-[0.18rem]", r2),
33954
+ className: cn("whitespace-pre truncate max-w-[300px] outline-hidden border-r border-r-border/75", e3.column.getColumnWrapping && ((_d3 = (_c3 = e3.column).getColumnWrapping) == null ? void 0 : _d3.call(_c3)) === "wrap" && "whitespace-pre-wrap min-w-[200px]", "px-1.5 py-[0.18rem]", r2),
33922
33955
  style: d2,
33923
33956
  title: f2,
33924
33957
  onMouseDown: (r3) => E(r3, e3),
@@ -33939,23 +33972,28 @@ Database schema: ${c}`), (_a4 = r2.aiFix) == null ? void 0 : _a4.setAiCompletion
33939
33972
  }
33940
33973
  }, e9 = e.getState().cellHoverTemplate || null, t9 = (e2) => {
33941
33974
  var _a3;
33942
- let r2 = c ? (d == null ? void 0 : d(e2.original, e2.index)) ?? e2.index : void 0, h2 = c && f === r2, _2;
33943
- return e9 && (_2 = Z7(e9, ((_a3 = e2.getVisibleCells) == null ? void 0 : _a3.call(e2)) ?? [
33975
+ let h2 = c ? (d == null ? void 0 : d(e2.original, e2.index)) ?? e2.index : void 0, _2 = c && f === h2, v2;
33976
+ return e9 && (v2 = Z7(e9, ((_a3 = e2.getVisibleCells) == null ? void 0 : _a3.call(e2)) ?? [
33944
33977
  ...e2.getLeftVisibleCells(),
33945
33978
  ...e2.getCenterVisibleCells(),
33946
33979
  ...e2.getRightVisibleCells()
33947
33980
  ])), (0, import_jsx_runtime.jsxs)(TableRow, {
33948
33981
  "data-state": e2.getIsSelected() && "selected",
33949
- title: _2,
33950
- className: cn("border-t h-6", c && "cursor-pointer", h2 && "bg-(--blue-3) hover:bg-(--blue-3) data-[state=selected]:bg-(--blue-4)"),
33982
+ title: v2,
33983
+ className: cn("border-t h-6", c && "cursor-pointer", _2 && "bg-(--blue-3) hover:bg-(--blue-3) data-[state=selected]:bg-(--blue-4)"),
33951
33984
  onClick: () => $7(e2),
33952
33985
  children: [
33953
33986
  Q7(e2.getLeftVisibleCells()),
33954
33987
  Q7(e2.getCenterVisibleCells()),
33955
- Q7(e2.getRightVisibleCells())
33988
+ Q7(e2.getRightVisibleCells()),
33989
+ r.length <= 4 && (0, import_jsx_runtime.jsx)("td", {
33990
+ className: "border-0",
33991
+ "aria-hidden": "true",
33992
+ role: "presentation"
33993
+ })
33956
33994
  ]
33957
33995
  }, e2.id);
33958
- };
33996
+ }, n9 = r.length <= 4, r9 = r.length + (n9 ? 1 : 0);
33959
33997
  return (0, import_jsx_runtime.jsx)(DataTableContextMenu, {
33960
33998
  tableBody: (0, import_jsx_runtime.jsx)(TableBody, {
33961
33999
  onKeyDown: I,
@@ -33964,13 +34002,13 @@ Database schema: ${c}`), (_a4 = r2.aiFix) == null ? void 0 : _a4.setAiCompletion
33964
34002
  var _a3, _b3;
33965
34003
  if (_.length === 0) return (0, import_jsx_runtime.jsx)(TableRow, {
33966
34004
  children: (0, import_jsx_runtime.jsx)(TableCell, {
33967
- colSpan: r.length,
34005
+ colSpan: r9,
33968
34006
  className: "h-24 text-center",
33969
34007
  children: "No results."
33970
34008
  })
33971
34009
  });
33972
34010
  if (h) {
33973
- let e2 = w.getVirtualItems(), c2 = w.getTotalSize();
34011
+ let e2 = w.getVirtualItems(), r2 = w.getTotalSize();
33974
34012
  return (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
33975
34013
  children: [
33976
34014
  ((_a3 = e2[0]) == null ? void 0 : _a3.start) > 0 && (0, import_jsx_runtime.jsx)("tr", {
@@ -33979,17 +34017,17 @@ Database schema: ${c}`), (_a4 = r2.aiFix) == null ? void 0 : _a4.setAiCompletion
33979
34017
  height: e2[0].start
33980
34018
  },
33981
34019
  children: (0, import_jsx_runtime.jsx)("td", {
33982
- colSpan: r.length
34020
+ colSpan: r9
33983
34021
  })
33984
34022
  }),
33985
34023
  e2.map((e3) => t9(_[e3.index])),
33986
34024
  e2.length > 0 && (0, import_jsx_runtime.jsx)("tr", {
33987
34025
  "data-virtual-spacer": "",
33988
34026
  style: {
33989
- height: c2 - (((_b3 = e2.at(-1)) == null ? void 0 : _b3.end) ?? c2)
34027
+ height: r2 - (((_b3 = e2.at(-1)) == null ? void 0 : _b3.end) ?? r2)
33990
34028
  },
33991
34029
  children: (0, import_jsx_runtime.jsx)("td", {
33992
- colSpan: r.length
34030
+ colSpan: r9
33993
34031
  })
33994
34032
  })
33995
34033
  ]
@@ -34961,7 +34999,7 @@ Database schema: ${c}`), (_a4 = r2.aiFix) == null ? void 0 : _a4.setAiCompletion
34961
34999
  downloadAs: Q7
34962
35000
  }),
34963
35001
  (0, import_jsx_runtime.jsxs)(Table, {
34964
- className: "relative",
35002
+ className: cn("relative", d.length <= 4 ? "w-auto" : "w-full"),
34965
35003
  ref: M9,
34966
35004
  children: [
34967
35005
  C9 && (0, import_jsx_runtime.jsx)("thead", {
@@ -35624,7 +35662,7 @@ ${E}`,
35624
35662
  MimeBundleOutputRenderer.displayName = "MimeBundleOutputRenderer";
35625
35663
  const OutputArea = import_react.memo((e) => {
35626
35664
  let r = (0, import_compiler_runtime$94.c)(17), { output: c, cellId: d, stale: f, loading: h, allowExpand: _, forceExpand: v, className: y } = e;
35627
- if (c === null || c.channel === "output" && c.data === "") return null;
35665
+ if (c == null || c.channel === "output" && c.data === "") return null;
35628
35666
  let S = f ? "This output is stale" : void 0, w = _ ? ExpandableOutput : Div, E;
35629
35667
  r[0] === d ? E = r[1] : (E = CellOutputId.create(d), r[0] = d, r[1] = E);
35630
35668
  let O = f && "marimo-output-stale", M = h && "marimo-output-loading", I;
@@ -37087,7 +37125,7 @@ ${E}`,
37087
37125
  };
37088
37126
  }
37089
37127
  };
37090
- var LazyChatbot = import_react.lazy(() => import("./chat-ui-X5KPeHrU.js").then((e) => ({
37128
+ var LazyChatbot = import_react.lazy(() => import("./chat-ui-BXYRQ5MH.js").then((e) => ({
37091
37129
  default: e.Chatbot
37092
37130
  }))), messageSchema = array(object({
37093
37131
  id: string(),
@@ -46187,7 +46225,7 @@ ${c}
46187
46225
  }, b9 = [
46188
46226
  v9
46189
46227
  ], r[65] = v9, r[66] = y9, r[67] = b9), (0, import_react.useEffect)(y9, b9), c9) {
46190
- let c2 = e.totalRows !== "too_many" && e.totalRows > 0 ? e.totalRows : e.pageSize, d2;
46228
+ let c2 = e.totalRows !== "too_many" && e.totalRows > 0 ? Math.min(e.totalRows, e.pageSize) : e.pageSize, d2;
46191
46229
  return r[68] === c2 ? d2 = r[69] : (d2 = (0, import_jsx_runtime.jsx)(DelayMount, {
46192
46230
  milliseconds: 200,
46193
46231
  children: (0, import_jsx_runtime.jsx)(LoadingTable, {
@@ -47364,7 +47402,7 @@ ${c}
47364
47402
  fullWidth: v,
47365
47403
  children: z
47366
47404
  }), r[19] = v, r[20] = y, r[21] = c, r[22] = z, r[23] = G) : G = r[23], G;
47367
- }, LazyDataExplorerComponent = import_react.lazy(() => import("./ConnectedDataExplorerComponent-mLj6D01z.js"));
47405
+ }, LazyDataExplorerComponent = import_react.lazy(() => import("./ConnectedDataExplorerComponent-D08JKcQg.js"));
47368
47406
  const DataExplorerPlugin = createPlugin("marimo-data-explorer").withData(object({
47369
47407
  label: string().nullish(),
47370
47408
  data: string()
@@ -57311,7 +57349,7 @@ ${c}
57311
57349
  function shouldHandleClickSelection(e) {
57312
57350
  return e.some((e2) => {
57313
57351
  let r = getTraceSource(e2).type;
57314
- return r === "bar" || r === "heatmap" || r === "histogram" || isLinePoint(e2);
57352
+ return r === "bar" || r === "heatmap" || r === "histogram" || r === "waterfall" || isLinePoint(e2);
57315
57353
  });
57316
57354
  }
57317
57355
  function extractIndices(e) {
@@ -58573,7 +58611,7 @@ ${c}
58573
58611
  return true;
58574
58612
  }
58575
58613
  }
58576
- var LazyVegaComponent = import_react.lazy(() => import("./vega-component-Bzzut3-P.js")), VegaPlugin = class {
58614
+ var LazyVegaComponent = import_react.lazy(() => import("./vega-component-z4WGXPkf.js")), VegaPlugin = class {
58577
58615
  constructor() {
58578
58616
  __publicField(this, "tagName", "marimo-vega");
58579
58617
  __publicField(this, "validator", object({
@@ -58896,7 +58934,7 @@ ${c}
58896
58934
  diagram: e.data.diagram
58897
58935
  });
58898
58936
  }
58899
- }, LazyMermaid = (0, import_react.lazy)(() => import("./mermaid-B93TKi2g.js").then(async (m2) => {
58937
+ }, LazyMermaid = (0, import_react.lazy)(() => import("./mermaid-BZ2YHhbi.js").then(async (m2) => {
58900
58938
  await m2.__tla;
58901
58939
  return m2;
58902
58940
  })), import_compiler_runtime$18 = require_compiler_runtime();
@@ -60581,17 +60619,7 @@ ${c}
60581
60619
  Object.defineProperty(e, "__esModule", {
60582
60620
  value: true
60583
60621
  }), e.PathError = e.TokenData = void 0, e.match = w;
60584
- var r = "/", c = (e2) => e2, d = /^[$_\p{ID_Start}]$/u, f = /^[$\u200c\u200d\p{ID_Continue}]$/u, h = {
60585
- "{": "{",
60586
- "}": "}",
60587
- "(": "(",
60588
- ")": ")",
60589
- "[": "[",
60590
- "]": "]",
60591
- "+": "+",
60592
- "?": "?",
60593
- "!": "!"
60594
- };
60622
+ var r = "/", c = (e2) => e2, d = /^[$_\p{ID_Start}]$/u, f = /^[$\u200c\u200d\p{ID_Continue}]$/u, h = "{}()[]+?!";
60595
60623
  function _(e2) {
60596
60624
  return e2.replace(/[.+*?^${}()[\]|/\\]/g, "\\$&");
60597
60625
  }
@@ -60619,8 +60647,8 @@ ${c}
60619
60647
  while (f.test(S2[E2]));
60620
60648
  else if (S2[E2] === '"') {
60621
60649
  let c2 = E2;
60622
- for (; E2++ < S2.length; ) {
60623
- if (S2[E2] === '"') {
60650
+ for (; E2 < S2.length; ) {
60651
+ if (S2[++E2] === '"') {
60624
60652
  E2++, c2 = 0;
60625
60653
  break;
60626
60654
  }
@@ -60632,26 +60660,26 @@ ${c}
60632
60660
  return r3;
60633
60661
  }
60634
60662
  for (; E2 < S2.length; ) {
60635
- let e3 = S2[E2], r3 = h[e3];
60636
- r3 ? w2.push({
60637
- type: r3,
60638
- index: E2++,
60663
+ let e3 = S2[E2++];
60664
+ h.includes(e3) ? w2.push({
60665
+ type: e3,
60666
+ index: E2,
60639
60667
  value: e3
60640
60668
  }) : e3 === "\\" ? w2.push({
60641
60669
  type: "escape",
60642
- index: E2++,
60670
+ index: E2,
60643
60671
  value: S2[E2++]
60644
60672
  }) : e3 === ":" ? w2.push({
60645
60673
  type: "param",
60646
- index: E2++,
60674
+ index: E2,
60647
60675
  value: M2()
60648
60676
  }) : e3 === "*" ? w2.push({
60649
60677
  type: "wildcard",
60650
- index: E2++,
60678
+ index: E2,
60651
60679
  value: M2()
60652
60680
  }) : w2.push({
60653
60681
  type: "char",
60654
- index: E2++,
60682
+ index: E2,
60655
60683
  value: e3
60656
60684
  });
60657
60685
  }
@@ -60712,46 +60740,99 @@ ${c}
60712
60740
  };
60713
60741
  }
60714
60742
  function E(e2, c2 = {}) {
60715
- let { delimiter: d2 = r, end: f2 = true, sensitive: h2 = false, trailing: v2 = true } = c2, y2 = [], w2 = h2 ? "" : "i", E2 = [];
60716
- for (let r2 of O(e2, [])) {
60717
- let e3 = typeof r2 == "object" ? r2 : S(r2, c2);
60718
- for (let r3 of M(e3.tokens, 0, [])) E2.push(I(r3, d2, y2, e3.originalPath));
60719
- }
60720
- let z2 = `^(?:${E2.join("|")})`;
60721
- return v2 && (z2 += `(?:${_(d2)}$)?`), z2 += f2 ? "$" : `(?=${_(d2)}|$)`, {
60722
- regexp: new RegExp(z2, w2),
60723
- keys: y2
60743
+ let { delimiter: d2 = r, end: f2 = true, sensitive: h2 = false, trailing: v2 = true } = c2, w2 = new M("^"), E2 = [
60744
+ e2
60745
+ ], G2 = 0;
60746
+ for (; E2.length; ) {
60747
+ let e3 = E2.shift();
60748
+ if (Array.isArray(e3)) {
60749
+ E2.push(...e3);
60750
+ continue;
60751
+ }
60752
+ let r2 = typeof e3 == "object" ? e3 : S(e3, c2);
60753
+ I(r2.tokens, 0, [], (e4) => {
60754
+ if (G2++ >= 256) throw new y("Too many path combinations", r2.originalPath);
60755
+ let c3 = w2;
60756
+ for (let f3 of z(e4, d2, r2.originalPath)) c3 = c3.add(f3.source, f3.key);
60757
+ c3.add("");
60758
+ });
60759
+ }
60760
+ let q = [], Z7 = O(w2, q);
60761
+ return v2 && (Z7 += "(?:" + _(d2) + "$)?"), Z7 += f2 ? "$" : "(?=" + _(d2) + "|$)", {
60762
+ regexp: new RegExp(Z7, h2 ? "" : "i"),
60763
+ keys: q
60724
60764
  };
60725
60765
  }
60726
60766
  function O(e2, r2) {
60727
- if (Array.isArray(e2)) for (let c2 of e2) O(c2, r2);
60728
- else r2.push(e2);
60729
- return r2;
60730
- }
60731
- function* M(e2, r2, c2) {
60732
- if (r2 === e2.length) return yield c2;
60733
- let d2 = e2[r2];
60734
- if (d2.type === "group") for (let f2 of M(d2.tokens, 0, c2.slice())) yield* M(e2, r2 + 1, f2);
60735
- else c2.push(d2);
60736
- yield* M(e2, r2 + 1, c2);
60767
+ e2.key && r2.push(e2.key);
60768
+ let c2 = Object.keys(e2.children), d2 = c2.map((c3) => O(e2.children[c3], r2)).join("|");
60769
+ return e2.source + (c2.length < 2 ? d2 : `(?:${d2})`);
60737
60770
  }
60771
+ var M = class e2 {
60772
+ constructor(e3, r2) {
60773
+ this.source = e3, this.key = r2, this.children = /* @__PURE__ */ Object.create(null);
60774
+ }
60775
+ add(r2, c2) {
60776
+ var d2;
60777
+ let f2 = r2 + ":" + (c2 ? c2.name : "");
60778
+ return (d2 = this.children)[f2] || (d2[f2] = new e2(r2, c2));
60779
+ }
60780
+ };
60738
60781
  function I(e2, r2, c2, d2) {
60739
- let f2 = "", h2 = "", v2 = true;
60740
- for (let S2 of e2) {
60741
- if (S2.type === "text") {
60742
- f2 += _(S2.value), h2 += S2.value, v2 || (v2 = S2.value.includes(r2));
60782
+ for (; r2 < e2.length; ) {
60783
+ let f2 = e2[r2++];
60784
+ if (f2.type === "group") {
60785
+ I(f2.tokens, 0, c2.slice(), (c3) => I(e2, r2, c3, d2));
60786
+ continue;
60787
+ }
60788
+ c2.push(f2);
60789
+ }
60790
+ d2(c2);
60791
+ }
60792
+ function z(e2, r2, c2) {
60793
+ let d2 = [], f2 = "", h2 = "", v2 = 0, S2 = 0, w2 = 0;
60794
+ function E2(c3, d3) {
60795
+ for (; c3 < e2.length; ) {
60796
+ let f3 = e2[c3++];
60797
+ if (f3.type === d3) return true;
60798
+ if (f3.type === "text" && f3.value.includes(r2)) break;
60799
+ }
60800
+ return false;
60801
+ }
60802
+ function O2(r3) {
60803
+ let c3 = "";
60804
+ for (; r3 < e2.length; ) {
60805
+ let d3 = e2[r3++];
60806
+ if (d3.type !== "text") break;
60807
+ c3 += d3.value;
60808
+ }
60809
+ return c3;
60810
+ }
60811
+ for (; w2 < e2.length; ) {
60812
+ let M2 = e2[w2++];
60813
+ if (M2.type === "text") {
60814
+ d2.push({
60815
+ source: _(M2.value)
60816
+ }), f2 += M2.value, v2 === 2 && (h2 += M2.value), M2.value.includes(r2) && (S2 = 0);
60743
60817
  continue;
60744
60818
  }
60745
- if (S2.type === "param" || S2.type === "wildcard") {
60746
- if (!v2 && !h2) throw new y(`Missing text before "${S2.name}" ${S2.type}`, d2);
60747
- S2.type === "param" ? f2 += `(${z(r2, v2 ? "" : h2)}+)` : f2 += "([\\s\\S]+)", c2.push(S2), h2 = "", v2 = false;
60819
+ if (M2.type === "param" || M2.type === "wildcard") {
60820
+ if (v2 && !f2) throw new y(`Missing text before "${M2.name}" ${M2.type}`, c2);
60821
+ M2.type === "param" ? (d2.push({
60822
+ source: S2 ? `(${G(r2, f2)}+?)` : E2(w2, "wildcard") ? `(${G(r2, O2(w2))}+?)` : `(${G(r2, "")}+?)`,
60823
+ key: M2
60824
+ }), S2 |= v2 = 1) : (d2.push({
60825
+ source: S2 & 2 ? `(${G(f2, "")}+?)` : S2 & 1 ? `(${G(h2, "")}+?)` : h2 ? `(${G(h2, "")}+?|${G(r2, "")}+?)` : "([^]+?)",
60826
+ key: M2
60827
+ }), h2 = "", S2 |= v2 = 2), f2 = "";
60748
60828
  continue;
60749
60829
  }
60830
+ throw TypeError(`Unknown token type: ${M2.type}`);
60750
60831
  }
60751
- return f2;
60832
+ return d2;
60752
60833
  }
60753
- function z(e2, r2) {
60754
- return r2.length < 2 ? e2.length < 2 ? `[^${_(e2 + r2)}]` : `(?:(?!${_(e2)})[^${_(r2)}])` : e2.length < 2 ? `(?:(?!${_(r2)})[^${_(e2)}])` : `(?:(?!${_(r2)}|${_(e2)})[\\s\\S])`;
60834
+ function G(e2, r2) {
60835
+ return r2.length > e2.length ? G(r2, e2) : (e2 === r2 && (r2 = ""), r2.length > 1 ? `(?:(?!${_(e2)}|${_(r2)})[^])` : e2.length > 1 ? `(?:(?!${_(e2)})[^${_(r2)}])` : `[^${_(e2 + r2)}]`);
60755
60836
  }
60756
60837
  }))(), TinyRouter = class {
60757
60838
  constructor(e) {
@@ -65552,7 +65633,7 @@ ${c}
65552
65633
  return Logger.warn("Failed to get version from mount config"), null;
65553
65634
  }
65554
65635
  }
65555
- const marimoVersionAtom = atom(getVersionFromMountConfig() || "0.22.5-dev9"), showCodeInRunModeAtom = atom(true);
65636
+ const marimoVersionAtom = atom(getVersionFromMountConfig() || "0.22.6-dev1"), showCodeInRunModeAtom = atom(true);
65556
65637
  atom(null);
65557
65638
  var VIRTUAL_FILE_REGEX = /\/@file\/([^\s"&'/]+)\.([\dA-Za-z]+)/g, VirtualFileTracker = class e {
65558
65639
  constructor() {
@@ -9,7 +9,7 @@ import { n as ErrorBanner } from "./error-banner-DexD-5js.js";
9
9
  import { t as isEmpty_default } from "./isEmpty-B7FX9wKt.js";
10
10
  import { n as useTheme } from "./useTheme-CxjbgkRc.js";
11
11
  import { t as purify } from "./purify.es-hTCfRGdl.js";
12
- import { t as useAsyncData } from "./useAsyncData-C9ez7Ilo.js";
12
+ import { t as useAsyncData } from "./useAsyncData-BG3ULuDU.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-B0UOFJwq.js";
14
14
  import { a as setLogLevel, i as log, r as __name, t as select_default } from "./src-DbP20yFZ.js";
15
15
  import { t as package_default } from "./chunk-DR5Q36YT-C40cYcy5.js";