@marimo-team/islands 0.18.2 → 0.18.4

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 (43) hide show
  1. package/dist/{constants-DWBOe162.js → constants-D_G8vnDk.js} +5 -4
  2. package/dist/{formats-7RSCCoSI.js → formats-Bi_tbdwB.js} +21 -22
  3. package/dist/{glide-data-editor-D-Ia_Jsv.js → glide-data-editor-DXF8E-QD.js} +2 -2
  4. package/dist/main.js +280 -148
  5. package/dist/style.css +1 -1
  6. package/dist/{types-Dunk85GC.js → types-DclGb0Yh.js} +1 -1
  7. package/dist/{vega-component-kU4hFYYJ.js → vega-component-BFcH2SqR.js} +8 -8
  8. package/package.json +1 -1
  9. package/src/components/app-config/user-config-form.tsx +14 -1
  10. package/src/components/data-table/context-menu.tsx +7 -3
  11. package/src/components/data-table/filter-pills.tsx +2 -1
  12. package/src/components/data-table/filters.ts +11 -2
  13. package/src/components/editor/cell/CreateCellButton.tsx +5 -3
  14. package/src/components/editor/cell/collapse.tsx +2 -2
  15. package/src/components/editor/chrome/components/contribute-snippet-button.tsx +22 -103
  16. package/src/components/editor/controls/duplicate-shortcut-banner.tsx +50 -0
  17. package/src/components/editor/controls/keyboard-shortcuts.tsx +25 -2
  18. package/src/components/editor/notebook-banner.tsx +1 -1
  19. package/src/components/editor/notebook-cell.tsx +4 -3
  20. package/src/components/editor/output/__tests__/ansi-reduce.test.ts +6 -6
  21. package/src/components/editor/renderers/vertical-layout/vertical-layout.tsx +3 -3
  22. package/src/components/pages/home-page.tsx +6 -0
  23. package/src/components/scratchpad/scratchpad.tsx +2 -1
  24. package/src/core/constants.ts +10 -0
  25. package/src/core/layout/useTogglePresenting.ts +69 -25
  26. package/src/core/state/__mocks__/mocks.ts +1 -0
  27. package/src/hooks/__tests__/useDuplicateShortcuts.test.ts +449 -0
  28. package/src/hooks/useDuplicateShortcuts.ts +145 -0
  29. package/src/plugins/impl/NumberPlugin.tsx +1 -1
  30. package/src/plugins/impl/__tests__/NumberPlugin.test.tsx +1 -1
  31. package/src/plugins/impl/anywidget/AnyWidgetPlugin.tsx +67 -47
  32. package/src/plugins/impl/anywidget/__tests__/AnyWidgetPlugin.test.tsx +2 -57
  33. package/src/plugins/impl/anywidget/__tests__/model.test.ts +23 -19
  34. package/src/plugins/impl/anywidget/model.ts +68 -41
  35. package/src/plugins/impl/data-frames/utils/__tests__/operators.test.ts +2 -0
  36. package/src/plugins/impl/data-frames/utils/operators.ts +1 -0
  37. package/src/plugins/impl/vega/vega.css +5 -0
  38. package/src/plugins/layout/NavigationMenuPlugin.tsx +24 -22
  39. package/src/plugins/layout/StatPlugin.tsx +43 -23
  40. package/src/utils/__tests__/data-views.test.ts +495 -13
  41. package/src/utils/__tests__/json-parser.test.ts +1 -1
  42. package/src/utils/data-views.ts +134 -16
  43. package/src/utils/json/base64.ts +8 -0
package/dist/main.js CHANGED
@@ -10,8 +10,8 @@ import { C as useLayoutEffect2, D as dispatchDiscreteCustomEvent, E as Primitive
10
10
  import { A as Badge, B as ListFilter, C as DEFAULT_COLOR_SCHEME, D as SCALE_TYPE_DESCRIPTIONS, E as EMPTY_VALUE$1, F as $5a387cc49350e6db$export$722debc0e56fea39, H as ChartPie, I as Type, L as ToggleLeft, M as startCase_default, N as $896ba0a80a8f4d36$export$85fd5fdf27bacc79, O as TIME_UNIT_DESCRIPTIONS, P as $fb18d541ea1ad717$export$ad991b66133851cf, R as Table$1, S as DEFAULT_AGGREGATION, T as DEFAULT_TIME_UNIT, U as ChartColumn, V as Hash, W as Calendar, _ 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 createReducerAndAtoms, 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, z as SquareFunction } from "./spec-D9VXxBJM.js";
11
11
  import { t as Check } from "./check-IicTB7sO.js";
12
12
  import { A as logNever, B as ChevronDown, C as useDirection, D as useOnUnmount, E as useOnMount, F as $18f2051aff69b9bf$export$a54013f0d02a8f82, I as $b5e257d569688ac6$export$535bd6ca7f90a273, M as $a916eb452884faea$export$b7a616150fdb9f44, O as usePrevious, P as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7, R as X, S as Trigger$5, T as clamp$2, _ as menuItemVariants, a as SelectGroup, b as menuSubTriggerVariants, c as SelectSeparator, d as NativeSelect, f as selectStyles, h as menuControlCheckVariants, i as SelectContent, k as assertNever, l as SelectTrigger, m as menuContentCommon, n as Primitive, o as SelectItem, p as MENU_ITEM_DISABLED, r as Select, s as SelectLabel, t as Label, u as SelectValue, v as menuLabelVariants, w as createCollection, x as Icon, y as menuSeparatorVariants } from "./label-BtLFsS7L.js";
13
- import { $ as $514c0188e459b4c0$export$9afb8bc826b033ea, $t as $65484d02dcb7eb3e$export$457c3d6518dd4c6f, A as Item2$2, At as $6db58dc88e78b024$export$2f817fcdc4b89ae0, B as SubTrigger, Bt as $458b0a5536c1a7cf$export$40bfa8c7b0832715, C as DropdownMenuSubTrigger, Ct as $e5be200c675c3b3a$export$fc1a364ae1f3ff10, D as CheckboxItem, Dt as $6c7bd7858deea686$export$cd11ab140839f11d, E as Arrow2, Et as $701a24aa0da5b062$export$ea18c227d4417cc3, F as RadioItem, Ft as $507fabe10e71c6fb$export$630ff653c5ada6a9, G as $3985021b0ad6602f$export$37fb8590cf2c088c, Gt as $df56164dff5785e2$export$4338b53315abf666, H as Item$2, Ht as $b4b717babfbb907b$export$bebd5a1431fec25d, I as Root3, It as $f6c31cce2adf654f$export$45712eceda6fad21, J as $a049562f99e7db0e$export$f9c6924e160136d1, Jt as $c87311424ea30a05$export$78551043582a6a98, K as $3985021b0ad6602f$export$f5b8910cec6cf069, Kt as $313b98861ee5dd6c$export$d6875122194c7b44, L as Separator, Lt as _class_private_field_init, M as Label$2, Mt as $6179b936705e76d3$export$ae780daf29e6d456, N as Portal$2, Nt as $9ab94262bd0047c7$export$420e68273165f4ec, O as Content2$3, Ot as $fca6afa0e843324b$export$87b761675e8eaa10, P as RadioGroup$2, Pt as $3ad3f6e1647bc98d$export$80f3e147d781571c, Q as $514c0188e459b4c0$export$5f1af8db9871e1d6, Qt as $7215afc6de606d6b$export$de79e2c695e052f3, R as Sub, Rt as $ae1eeba8b9eafd08$export$5165eccb35aaadb5, S as DropdownMenuSubContent, St as $e5be200c675c3b3a$export$dad6ae84456c676a, T as Anchor2, Tt as $f7dceffc5ad7768b$export$4e328f61c538687f, U as Root$6, Ut as $99facab73266f662$export$5add1d006293d136, V as createMenuScope, Vt as $b4b717babfbb907b$export$4c063cf1350e6fed, W as createRovingFocusGroupScope, Wt as $e9faafb641e167db$export$90fc3a17d93f704c, X as $ee014567cb39d3f0$export$f551688fc98f2e09, Xt as $c87311424ea30a05$export$a11b0059900ceec8, Y as $d3e0e05bdfcf66bd$export$c24727297075ec6a, Yt as $c87311424ea30a05$export$9ac100e40613ea10, Z as $ee014567cb39d3f0$export$ff05c3ac10437e03, Zt as $c87311424ea30a05$export$fedb369cb70207f1, _ as DropdownMenuItem, _n as ChevronRight, _t as $2baaea4c71418dea$export$294aa081a6c6f55d, a as Input, an as $431fbd86ca7dc216$export$b204af158042fbac, at as $64fa3d84918910a7$export$2881499e37b75b9a, b as DropdownMenuSeparator, bt as $e5be200c675c3b3a$export$a763b9476acd3eb, c as maxFractionalDigits, cn as $bdb11010cef70236$export$b4cc09c592e8fdb8, ct as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8, d as prettyScientificNumber, dn as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c, dt as $64fa3d84918910a7$export$ef03459518577ad4, en as $3ef42575df84b30b$export$9d1611c77c2fe928, et as $d2b4bc8c273e7be6$export$24d547caef80ccd1, f as useDebounceControlledState, fn as Trash, ft as $64fa3d84918910a7$export$fabf2dc03a41866e, g as DropdownMenuGroup, gn as Circle, gt as $d2e8511e6f209edf$export$e908e06f4b8e3402, h as DropdownMenuContent, hn as Pencil, ht as capitalize_default, i as DebouncedNumberInput, in as $f4e2df6bd15f8569$export$98658e8c59125e6a, it as $f39a9eba43920ace$export$b5d7cc18bb8d2b59, j as ItemIndicator, jt as $5b160d28a433310d$export$c17fa47878dc55b6, k as Group$1, kt as $fca6afa0e843324b$export$f12b703ca79dfbb1, l as prettyEngineeringNumber, ln as $bdb11010cef70236$export$f680877a34711e37, lt as $64fa3d84918910a7$export$c245e6201fed2f75, m as DropdownMenu, mn as Plus, mt as marked, n as ErrorBoundary, nn as $d4ee10de306f2510$export$cd4e5573fbe2b576, nt as $01b77f81d0f07f68$export$75b6ee27786ba447, o as OnBlurredInput, on as $431fbd86ca7dc216$export$f21a1ffae260145a, ot as $64fa3d84918910a7$export$29f1550f4b0d4415, p as useDebouncedCallback, pn as Search, pt as useNonce, q as $a049562f99e7db0e$export$eb2fcfdbd7ba97d4, qt as $c87311424ea30a05$export$6446a186d09e379e, r as DebouncedInput, rn as $d4ee10de306f2510$export$e58f029f0fbfdb29, rt as $01b77f81d0f07f68$export$b04be29aa201d4f5, s as NumberField, sn as $ff5963eb1fccf552$export$e08e3b67e392101e, st as $64fa3d84918910a7$export$4d86445c2cf5e3, t as BulkEdit, tn as $d4ee10de306f2510$export$4282f70798064fe0, tt as $d2b4bc8c273e7be6$export$353f5b6fc5456de1, u as prettyNumber, un as $8ae05eaa5c114e9c$export$7f54fc3180508a52, ut as $64fa3d84918910a7$export$c62b8e45d58ddad9, v as DropdownMenuLabel, vt as $e93e671b31057976$export$b8473d3665f3a75a, w as DropdownMenuTrigger, wt as $319e236875307eab$export$a9b970dcc4ae71a9, x as DropdownMenuSub, xt as $e5be200c675c3b3a$export$aca958c65c314e6c, y as DropdownMenuPortal, yt as $e5be200c675c3b3a$export$75ee7c75d68f5b0e, z as SubContent, zt as $9446cca9a3875146$export$7d15b64cf5a3a4c4 } from "./types-Dunk85GC.js";
14
- import { C as CircleQuestionMark, S as isWasm, _ as appendQueryParams, a as AlertDescription, b as isStaticNotebook, c as toDate, d as millisecondsInHour, f as millisecondsInMinute, g as getRuntimeManager, h as asRemoteURL, i as Alert, l as constructFrom, m as millisecondsInWeek, n as useDeepCompareMemoize, o as AlertTitle, p as millisecondsInSecond, r as dequal, s as isValid, t as arrow, u as millisecondsInDay, v as isUrl, x as Deferred, y as require_cuid2 } from "./formats-7RSCCoSI.js";
13
+ import { $ as $514c0188e459b4c0$export$9afb8bc826b033ea, $t as $65484d02dcb7eb3e$export$457c3d6518dd4c6f, A as Item2$2, At as $6db58dc88e78b024$export$2f817fcdc4b89ae0, B as SubTrigger, Bt as $458b0a5536c1a7cf$export$40bfa8c7b0832715, C as DropdownMenuSubTrigger, Ct as $e5be200c675c3b3a$export$fc1a364ae1f3ff10, D as CheckboxItem, Dt as $6c7bd7858deea686$export$cd11ab140839f11d, E as Arrow2, Et as $701a24aa0da5b062$export$ea18c227d4417cc3, F as RadioItem, Ft as $507fabe10e71c6fb$export$630ff653c5ada6a9, G as $3985021b0ad6602f$export$37fb8590cf2c088c, Gt as $df56164dff5785e2$export$4338b53315abf666, H as Item$2, Ht as $b4b717babfbb907b$export$bebd5a1431fec25d, I as Root3, It as $f6c31cce2adf654f$export$45712eceda6fad21, J as $a049562f99e7db0e$export$f9c6924e160136d1, Jt as $c87311424ea30a05$export$78551043582a6a98, K as $3985021b0ad6602f$export$f5b8910cec6cf069, Kt as $313b98861ee5dd6c$export$d6875122194c7b44, L as Separator, Lt as _class_private_field_init, M as Label$2, Mt as $6179b936705e76d3$export$ae780daf29e6d456, N as Portal$2, Nt as $9ab94262bd0047c7$export$420e68273165f4ec, O as Content2$3, Ot as $fca6afa0e843324b$export$87b761675e8eaa10, P as RadioGroup$2, Pt as $3ad3f6e1647bc98d$export$80f3e147d781571c, Q as $514c0188e459b4c0$export$5f1af8db9871e1d6, Qt as $7215afc6de606d6b$export$de79e2c695e052f3, R as Sub, Rt as $ae1eeba8b9eafd08$export$5165eccb35aaadb5, S as DropdownMenuSubContent, St as $e5be200c675c3b3a$export$dad6ae84456c676a, T as Anchor2, Tt as $f7dceffc5ad7768b$export$4e328f61c538687f, U as Root$6, Ut as $99facab73266f662$export$5add1d006293d136, V as createMenuScope, Vt as $b4b717babfbb907b$export$4c063cf1350e6fed, W as createRovingFocusGroupScope, Wt as $e9faafb641e167db$export$90fc3a17d93f704c, X as $ee014567cb39d3f0$export$f551688fc98f2e09, Xt as $c87311424ea30a05$export$a11b0059900ceec8, Y as $d3e0e05bdfcf66bd$export$c24727297075ec6a, Yt as $c87311424ea30a05$export$9ac100e40613ea10, Z as $ee014567cb39d3f0$export$ff05c3ac10437e03, Zt as $c87311424ea30a05$export$fedb369cb70207f1, _ as DropdownMenuItem, _n as ChevronRight, _t as $2baaea4c71418dea$export$294aa081a6c6f55d, a as Input, an as $431fbd86ca7dc216$export$b204af158042fbac, at as $64fa3d84918910a7$export$2881499e37b75b9a, b as DropdownMenuSeparator, bt as $e5be200c675c3b3a$export$a763b9476acd3eb, c as maxFractionalDigits, cn as $bdb11010cef70236$export$b4cc09c592e8fdb8, ct as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8, d as prettyScientificNumber, dn as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c, dt as $64fa3d84918910a7$export$ef03459518577ad4, en as $3ef42575df84b30b$export$9d1611c77c2fe928, et as $d2b4bc8c273e7be6$export$24d547caef80ccd1, f as useDebounceControlledState, fn as Trash, ft as $64fa3d84918910a7$export$fabf2dc03a41866e, g as DropdownMenuGroup, gn as Circle, gt as $d2e8511e6f209edf$export$e908e06f4b8e3402, h as DropdownMenuContent, hn as Pencil, ht as capitalize_default, i as DebouncedNumberInput, in as $f4e2df6bd15f8569$export$98658e8c59125e6a, it as $f39a9eba43920ace$export$b5d7cc18bb8d2b59, j as ItemIndicator, jt as $5b160d28a433310d$export$c17fa47878dc55b6, k as Group$1, kt as $fca6afa0e843324b$export$f12b703ca79dfbb1, l as prettyEngineeringNumber, ln as $bdb11010cef70236$export$f680877a34711e37, lt as $64fa3d84918910a7$export$c245e6201fed2f75, m as DropdownMenu, mn as Plus, mt as marked, n as ErrorBoundary, nn as $d4ee10de306f2510$export$cd4e5573fbe2b576, nt as $01b77f81d0f07f68$export$75b6ee27786ba447, o as OnBlurredInput, on as $431fbd86ca7dc216$export$f21a1ffae260145a, ot as $64fa3d84918910a7$export$29f1550f4b0d4415, p as useDebouncedCallback, pn as Search, pt as useNonce, q as $a049562f99e7db0e$export$eb2fcfdbd7ba97d4, qt as $c87311424ea30a05$export$6446a186d09e379e, r as DebouncedInput, rn as $d4ee10de306f2510$export$e58f029f0fbfdb29, rt as $01b77f81d0f07f68$export$b04be29aa201d4f5, s as NumberField, sn as $ff5963eb1fccf552$export$e08e3b67e392101e, st as $64fa3d84918910a7$export$4d86445c2cf5e3, t as BulkEdit, tn as $d4ee10de306f2510$export$4282f70798064fe0, tt as $d2b4bc8c273e7be6$export$353f5b6fc5456de1, u as prettyNumber, un as $8ae05eaa5c114e9c$export$7f54fc3180508a52, ut as $64fa3d84918910a7$export$c62b8e45d58ddad9, v as DropdownMenuLabel, vt as $e93e671b31057976$export$b8473d3665f3a75a, w as DropdownMenuTrigger, wt as $319e236875307eab$export$a9b970dcc4ae71a9, x as DropdownMenuSub, xt as $e5be200c675c3b3a$export$aca958c65c314e6c, y as DropdownMenuPortal, yt as $e5be200c675c3b3a$export$75ee7c75d68f5b0e, z as SubContent, zt as $9446cca9a3875146$export$7d15b64cf5a3a4c4 } from "./types-DclGb0Yh.js";
14
+ import { S as CircleQuestionMark, _ as isUrl, a as AlertTitle, b as Deferred, c as constructFrom, d as millisecondsInMinute, f as millisecondsInSecond, g as appendQueryParams, h as getRuntimeManager, i as AlertDescription, l as millisecondsInDay, m as asRemoteURL, n as useDeepCompareMemoize, o as isValid, p as millisecondsInWeek, r as Alert, s as toDate, t as arrow, u as millisecondsInHour, v as require_cuid2, x as isWasm, y as isStaticNotebook } from "./formats-Bi_tbdwB.js";
15
15
  import { n as clsx_default } from "./clsx-D2KVTYnW.js";
16
16
  import { a as cva, c as useComposedRefs, l as Events, n as buttonVariants, o as useEventListener, r as Slot$1, s as composeRefs, t as Button, u as cn } from "./button-XnD6ylpt.js";
17
17
  import { c as Functions, i as parseShortcut, l as throwNotImplemented, o as Objects, r as isPlatformMac, s as Logger, t as NOT_SET } from "./hotkeys-CwkyZ6ZF.js";
@@ -38,7 +38,7 @@ import "./_baseSlice-D44oUJcJ.js";
38
38
  import "./_hasUnicode-nuTfNJRy.js";
39
39
  import "./_arrayReduce-BdxKZ32o.js";
40
40
  import "./now-BA1FgVte.js";
41
- import { n as KnownQueryParams, r as debounce_default } from "./constants-DWBOe162.js";
41
+ import { i as debounce_default, r as KnownQueryParams, t as CSSClasses } from "./constants-D_G8vnDk.js";
42
42
  import { a as tooltipHandler, n as vegaLoadData, r as createBatchedLoader, t as parseCsvData } from "./loader-ZngagiXO.js";
43
43
  import { A as looseObject, B as union, C as any, D as discriminatedUnion, E as custom, F as optional, G as parse$3, H as safeParseAsync, I as record, J as prettifyError, K as parseAsync, L as strictObject, M as never, N as number$2, O as lazy$4, P as object$1, R as string$2, S as _null, T as boolean$2, U as ZodError$1, V as unknown, W as toJSONSchema, _ as ZodString$1, a as ZodIssueCode$1, b as _enum, c as ZodBoolean$1, d as ZodDiscriminatedUnion$1, f as ZodEnum$1, g as ZodOptional$1, h as ZodObject$1, i as string$3, j as nan, k as literal, l as ZodDate$1, m as ZodNumber$1, n as date, o as ZodAny$1, p as ZodLiteral$1, q as $ZodError, r as number$3, s as ZodArray$1, t as zod_default, u as ZodDefault$1, v as ZodType$1, w as array$2, x as _instanceof, y as ZodUnion$1, z as tuple } from "./zod-Bvx56F8M.js";
44
44
  import { t as invariant } from "./invariant-Ctm_8TNZ.js";
@@ -39479,29 +39479,32 @@ ${JSON.stringify(e2, null, 4)}`);
39479
39479
  }
39480
39480
  }, NavMenuComponent = (e) => {
39481
39481
  let r = (0, import_compiler_runtime$137.c)(13), { items: c, orientation: l } = e, d = _temp$36, f = _temp2$26, h = _temp3$17, g;
39482
- r[0] === l ? g = r[1] : (g = (e2) => "items" in e2 ? l === "horizontal" ? (0, import_jsx_runtime.jsxs)(NavigationMenuItem, {
39483
- children: [
39484
- (0, import_jsx_runtime.jsx)(NavigationMenuTrigger, {
39485
- children: renderHTML({
39486
- html: e2.label
39487
- })
39488
- }),
39489
- (0, import_jsx_runtime.jsx)(NavigationMenuContent, {
39490
- children: (0, import_jsx_runtime.jsx)(NavigationMenuList, {
39491
- children: (0, import_jsx_runtime.jsx)("ul", {
39492
- className: "grid w-[400px] gap-3 p-4 md:w-[500px] md:grid-cols-2 lg:w-[600px] ",
39493
- children: e2.items.map((e3) => (0, import_jsx_runtime.jsx)(ListItem, {
39494
- label: e3.label,
39495
- href: h(e3.href),
39496
- target: f(e3.href),
39497
- children: e3.description && renderHTML({
39498
- html: e3.description
39499
- })
39500
- }, e3.label))
39482
+ r[0] === l ? g = r[1] : (g = (e2) => "items" in e2 ? l === "horizontal" ? (0, import_jsx_runtime.jsx)(NavigationMenu, {
39483
+ orientation: "horizontal",
39484
+ children: (0, import_jsx_runtime.jsx)(NavigationMenuList, {
39485
+ children: (0, import_jsx_runtime.jsxs)(NavigationMenuItem, {
39486
+ children: [
39487
+ (0, import_jsx_runtime.jsx)(NavigationMenuTrigger, {
39488
+ children: renderHTML({
39489
+ html: e2.label
39490
+ })
39491
+ }),
39492
+ (0, import_jsx_runtime.jsx)(NavigationMenuContent, {
39493
+ children: (0, import_jsx_runtime.jsx)("ul", {
39494
+ className: "grid w-[400px] gap-3 p-4 md:w-[500px] md:grid-cols-2 lg:w-[600px] ",
39495
+ children: e2.items.map((e3) => (0, import_jsx_runtime.jsx)(ListItem, {
39496
+ label: e3.label,
39497
+ href: h(e3.href),
39498
+ target: f(e3.href),
39499
+ children: e3.description && renderHTML({
39500
+ html: e3.description
39501
+ })
39502
+ }, e3.label))
39503
+ })
39501
39504
  })
39502
- })
39505
+ ]
39503
39506
  })
39504
- ]
39507
+ })
39505
39508
  }, e2.label) : (0, import_jsx_runtime.jsxs)(NavigationMenuItem, {
39506
39509
  children: [
39507
39510
  (0, import_jsx_runtime.jsx)("div", {
@@ -49756,6 +49759,9 @@ To suppress this warning, you need to explicitly provide the \`palette.${r}Chann
49756
49759
  function typedAtob(e) {
49757
49760
  return window.atob(e);
49758
49761
  }
49762
+ function typedBtoa(e) {
49763
+ return window.btoa(e);
49764
+ }
49759
49765
  function isDataURLString(e) {
49760
49766
  return e.startsWith("data:") && e.includes(";base64,");
49761
49767
  }
@@ -49765,12 +49771,75 @@ To suppress this warning, you need to explicitly provide the \`palette.${r}Chann
49765
49771
  function byteStringToBinary(e) {
49766
49772
  return Uint8Array.from(e, (e2) => e2.charCodeAt(0));
49767
49773
  }
49774
+ function binaryToByteString(e) {
49775
+ let r = "";
49776
+ for (let c of e) r += String.fromCharCode(c);
49777
+ return r;
49778
+ }
49768
49779
  function safeExtractSetUIElementMessageBuffers(e) {
49769
49780
  return (e.buffers ?? []).map((e2) => {
49770
49781
  let r = byteStringToBinary(typedAtob(e2));
49771
49782
  return new DataView(r.buffer);
49772
49783
  });
49773
49784
  }
49785
+ function dataViewToBase64(e) {
49786
+ return typedBtoa(binaryToByteString(new Uint8Array(e.buffer, e.byteOffset, e.byteLength)));
49787
+ }
49788
+ function findDataViewPaths(e, r = []) {
49789
+ let c = [];
49790
+ if (e instanceof DataView) c.push(r);
49791
+ else if (Array.isArray(e)) for (let l = 0; l < e.length; l++) c.push(...findDataViewPaths(e[l], [
49792
+ ...r,
49793
+ l
49794
+ ]));
49795
+ else if (typeof e == "object" && e) for (let [l, d] of Object.entries(e)) c.push(...findDataViewPaths(d, [
49796
+ ...r,
49797
+ l
49798
+ ]));
49799
+ return c;
49800
+ }
49801
+ function serializeBuffersToBase64(e) {
49802
+ let r = findDataViewPaths(e);
49803
+ if (r.length === 0) return {
49804
+ state: e,
49805
+ buffers: [],
49806
+ bufferPaths: []
49807
+ };
49808
+ let c = structuredClone(e), l = [], d = [];
49809
+ for (let f of r) {
49810
+ let r2 = get_default(e, f);
49811
+ if (r2 instanceof DataView) {
49812
+ let e2 = dataViewToBase64(r2);
49813
+ l.push(e2), d.push(f), set_default(c, f, e2);
49814
+ }
49815
+ }
49816
+ return {
49817
+ state: c,
49818
+ buffers: l,
49819
+ bufferPaths: d
49820
+ };
49821
+ }
49822
+ function isWireFormat(e) {
49823
+ return typeof e == "object" && !!e && "state" in e && "bufferPaths" in e && "buffers" in e;
49824
+ }
49825
+ function decodeFromWire(e) {
49826
+ let { state: r, bufferPaths: c, buffers: l } = e;
49827
+ if (!c || c.length === 0) return r;
49828
+ l && invariant(l.length === c.length, "Buffers and buffer paths not the same length");
49829
+ let d = structuredClone(r);
49830
+ for (let [e2, r2] of c.entries()) {
49831
+ let c2 = l == null ? void 0 : l[e2];
49832
+ if (c2 == null) {
49833
+ Logger.warn("[anywidget] Could not find buffer at path", r2);
49834
+ continue;
49835
+ }
49836
+ if (typeof c2 == "string") {
49837
+ let e3 = byteStringToBinary(typedAtob(c2));
49838
+ set_default(d, r2, new DataView(e3.buffer));
49839
+ } else set_default(d, r2, c2);
49840
+ }
49841
+ return d;
49842
+ }
49774
49843
  const MODEL_MANAGER = new class {
49775
49844
  constructor(e = 1e4) {
49776
49845
  __publicField(this, "models", /* @__PURE__ */ new Map());
@@ -49805,7 +49874,12 @@ To suppress this warning, you need to explicitly provide the \`palette.${r}Chann
49805
49874
  var _a2;
49806
49875
  (_a2 = this.listeners[this.ANY_CHANGE_EVENT]) == null ? void 0 : _a2.forEach((e) => e());
49807
49876
  }, 0));
49808
- this.data = e, this.onChange = r, this.sendToWidget = c, this.dirtyFields = new Set(l);
49877
+ this.data = e, this.onChange = r, this.sendToWidget = c, this.dirtyFields = new Map([
49878
+ ...l
49879
+ ].map((e2) => [
49880
+ e2,
49881
+ this.data[e2]
49882
+ ]));
49809
49883
  }
49810
49884
  off(e, r) {
49811
49885
  var _a2;
@@ -49820,9 +49894,13 @@ To suppress this warning, you need to explicitly provide the \`palette.${r}Chann
49820
49894
  (_a2 = this.listeners[e]) == null ? void 0 : _a2.delete(r);
49821
49895
  }
49822
49896
  send(e, r, c) {
49823
- c && Logger.warn("buffers not supported in marimo anywidget.send"), this.sendToWidget({
49824
- content: e,
49825
- buffers: c
49897
+ let { state: l, bufferPaths: d, buffers: f } = serializeBuffersToBase64(e);
49898
+ this.sendToWidget({
49899
+ content: {
49900
+ state: l,
49901
+ bufferPaths: d
49902
+ },
49903
+ buffers: f
49826
49904
  }).then(r);
49827
49905
  }
49828
49906
  get(e) {
@@ -49832,19 +49910,17 @@ To suppress this warning, you need to explicitly provide the \`palette.${r}Chann
49832
49910
  this.data = {
49833
49911
  ...this.data,
49834
49912
  [e]: r
49835
- }, this.dirtyFields.add(e), this.emit(`change:${e}`, r), this.emitAnyChange();
49913
+ }, this.dirtyFields.set(e, r), this.emit(`change:${e}`, r), this.emitAnyChange();
49836
49914
  }
49837
49915
  save_changes() {
49838
49916
  if (this.dirtyFields.size === 0) return;
49839
- let e = {};
49840
- this.dirtyFields.forEach((r) => {
49841
- e[r] = this.data[r];
49842
- }), this.onChange(e);
49917
+ let e = Object.fromEntries(this.dirtyFields.entries());
49918
+ this.dirtyFields.clear(), this.onChange(e);
49843
49919
  }
49844
49920
  updateAndEmitDiffs(e) {
49845
- Object.keys(e).forEach((r) => {
49921
+ e != null && Object.keys(e).forEach((r) => {
49846
49922
  let c = r;
49847
- dequal(this.data[c], e[c]) || this.set(c, e[c]);
49923
+ this.data[c] !== e[c] && this.set(c, e[c]);
49848
49924
  });
49849
49925
  }
49850
49926
  receiveCustomMessage(e, r = []) {
@@ -49854,13 +49930,26 @@ To suppress this warning, you need to explicitly provide the \`palette.${r}Chann
49854
49930
  let e2 = c.data;
49855
49931
  switch (e2.method) {
49856
49932
  case "update":
49857
- this.updateAndEmitDiffs(e2.state);
49933
+ this.updateAndEmitDiffs(decodeFromWire({
49934
+ state: e2.state,
49935
+ bufferPaths: e2.buffer_paths ?? [],
49936
+ buffers: r
49937
+ }));
49858
49938
  break;
49859
49939
  case "custom":
49860
49940
  (_a2 = this.listeners["msg:custom"]) == null ? void 0 : _a2.forEach((c2) => c2(e2.content, r));
49861
49941
  break;
49862
49942
  case "open":
49863
- this.updateAndEmitDiffs(e2.state);
49943
+ this.updateAndEmitDiffs(decodeFromWire({
49944
+ state: e2.state,
49945
+ bufferPaths: e2.buffer_paths ?? [],
49946
+ buffers: r
49947
+ }));
49948
+ break;
49949
+ case "echo_update":
49950
+ break;
49951
+ default:
49952
+ Logger.error("[anywidget] Unknown message method", e2.method);
49864
49953
  break;
49865
49954
  }
49866
49955
  } else Logger.error("Failed to parse message", c.error), Logger.error("Message", e);
@@ -49901,34 +49990,40 @@ To suppress this warning, you need to explicitly provide the \`palette.${r}Chann
49901
49990
  const AnyWidgetPlugin = createPlugin("marimo-anywidget").withData(object$1({
49902
49991
  jsUrl: string$2(),
49903
49992
  jsHash: string$2(),
49904
- css: string$2().nullish(),
49905
- bufferPaths: array$2(array$2(union([
49906
- string$2(),
49907
- number$2()
49908
- ]))).nullish(),
49909
- initialValue: object$1({}).passthrough()
49993
+ css: string$2().nullish()
49910
49994
  })).withFunctions({
49911
49995
  send_to_widget: rpc.input(object$1({
49912
- content: any()
49996
+ content: unknown(),
49997
+ buffers: array$2(string$2().transform((e) => e))
49913
49998
  })).output(_null().optional())
49914
49999
  }).renderer((e) => (0, import_jsx_runtime.jsx)(AnyWidgetSlot, {
49915
50000
  ...e
49916
50001
  }));
49917
50002
  var AnyWidgetSlot = (e) => {
49918
50003
  var _a2;
49919
- let { css: r, jsUrl: c, jsHash: l, bufferPaths: d } = e.data, f = (0, import_react.useMemo)(() => resolveInitialValue(e.value, d ?? []), [
49920
- e.value,
49921
- d
49922
- ]), { data: h, error: g, refetch: v } = useAsyncData(async () => await import(asRemoteURL(c).toString()).then(async (m2) => {
50004
+ let { css: r, jsUrl: c, jsHash: l } = e.data, d = (0, import_react.useMemo)(() => {
50005
+ var _a3;
50006
+ if (isWireFormat(e.value)) {
50007
+ let r2 = decodeFromWire(e.value);
50008
+ return Logger.debug("AnyWidget decoded wire format:", {
50009
+ bufferPaths: e.value.bufferPaths,
50010
+ buffersCount: (_a3 = e.value.buffers) == null ? void 0 : _a3.length,
50011
+ decodedKeys: Object.keys(r2)
50012
+ }), r2;
50013
+ }
50014
+ return Logger.warn("AnyWidget value is not wire format:", e.value), e.value;
50015
+ }, [
50016
+ e.value
50017
+ ]), { data: f, error: h, refetch: g } = useAsyncData(async () => await import(asRemoteURL(c).toString()).then(async (m2) => {
49923
50018
  await m2.__tla;
49924
50019
  return m2;
49925
50020
  }), [
49926
50021
  l
49927
- ]), y = !!g;
49928
- if ((0, import_react.useEffect)(() => {
49929
- y && c && v();
50022
+ ]), v = !!h;
50023
+ (0, import_react.useEffect)(() => {
50024
+ v && c && g();
49930
50025
  }, [
49931
- y,
50026
+ v,
49932
50027
  c
49933
50028
  ]), (0, import_react.useEffect)(() => {
49934
50029
  let c2 = e.host.shadowRoot;
@@ -49952,18 +50047,21 @@ To suppress this warning, you need to explicitly provide the \`palette.${r}Chann
49952
50047
  }, [
49953
50048
  r,
49954
50049
  e.host
49955
- ]), g) return (0, import_jsx_runtime.jsx)(ErrorBanner, {
49956
- error: g
50050
+ ]);
50051
+ let y = useEvent_default((r2) => e.setValue(serializeBuffersToBase64(r2)));
50052
+ if (h) return (0, import_jsx_runtime.jsx)(ErrorBanner, {
50053
+ error: h
49957
50054
  });
49958
- if (!h) return null;
49959
- if (!isAnyWidgetModule(h)) return (0, import_jsx_runtime.jsx)(ErrorBanner, {
50055
+ if (!f) return null;
50056
+ if (!isAnyWidgetModule(f)) return (0, import_jsx_runtime.jsx)(ErrorBanner, {
49960
50057
  error: Error(`Module at ${c} does not appear to be a valid anywidget`)
49961
50058
  });
49962
50059
  let b = ((_a2 = e.host.closest("[random-id]")) == null ? void 0 : _a2.getAttribute("random-id")) ?? c;
49963
50060
  return (0, import_jsx_runtime.jsx)(LoadedSlot, {
49964
50061
  ...e,
49965
- widget: h.default,
49966
- value: f
50062
+ widget: f.default,
50063
+ setValue: y,
50064
+ value: d
49967
50065
  }, b);
49968
50066
  };
49969
50067
  async function runAnyWidgetModule(e, r, c) {
@@ -49980,70 +50078,61 @@ To suppress this warning, you need to explicitly provide the \`palette.${r}Chann
49980
50078
  model: r,
49981
50079
  experimental: l
49982
50080
  }));
49983
- let f = await ((_b2 = d.render) == null ? void 0 : _b2.call(d, {
49984
- model: r,
49985
- el: c,
49986
- experimental: l
49987
- }));
49988
- return () => {
49989
- f == null ? void 0 : f();
49990
- };
50081
+ try {
50082
+ let e2 = await ((_b2 = d.render) == null ? void 0 : _b2.call(d, {
50083
+ model: r,
50084
+ el: c,
50085
+ experimental: l
50086
+ }));
50087
+ return () => {
50088
+ e2 == null ? void 0 : e2();
50089
+ };
50090
+ } catch (e2) {
50091
+ return Logger.error("Error rendering anywidget", e2), c.classList.add("text-error"), c.innerHTML = `Error rendering anywidget: ${prettyError(e2)}`, () => {
50092
+ };
50093
+ }
49991
50094
  }
49992
50095
  function isAnyWidgetModule(e) {
49993
50096
  var _a2, _b2;
49994
50097
  return e.default && (typeof e.default == "function" || ((_a2 = e.default) == null ? void 0 : _a2.render) || ((_b2 = e.default) == null ? void 0 : _b2.initialize));
49995
50098
  }
49996
- function getDirtyFields$1(e, r) {
49997
- return new Set(Object.keys(e).filter((c) => !isEqual_default(e[c], r[c])));
49998
- }
49999
50099
  function hasModelId(e) {
50000
50100
  return typeof e == "object" && !!e && "model_id" in e;
50001
50101
  }
50002
50102
  var LoadedSlot = (e) => {
50003
- let r = (0, import_compiler_runtime$129.c)(15), { value: c, setValue: l, widget: d, functions: f, data: h, host: g } = e, v = (0, import_react.useRef)(null), y;
50004
- r[0] !== h.initialValue || r[1] !== f.send_to_widget || r[2] !== l || r[3] !== c ? (y = new Model({
50005
- ...h.initialValue,
50006
- ...c
50007
- }, l, f.send_to_widget, getDirtyFields$1(c, h.initialValue)), r[0] = h.initialValue, r[1] = f.send_to_widget, r[2] = l, r[3] = c, r[4] = y) : y = r[4];
50103
+ let r = (0, import_compiler_runtime$129.c)(14), { value: c, setValue: l, widget: d, functions: f, data: h, host: g } = e, v = (0, import_react.useRef)(null), y;
50104
+ r[0] !== f.send_to_widget || r[1] !== l || r[2] !== c ? (y = new Model(c, l, f.send_to_widget, /* @__PURE__ */ new Set()), r[0] = f.send_to_widget, r[1] = l, r[2] = c, r[3] = y) : y = r[3];
50008
50105
  let b = (0, import_react.useRef)(y), x;
50009
- r[5] === Symbol.for("react.memo_cache_sentinel") ? (x = (e2) => {
50106
+ r[4] === Symbol.for("react.memo_cache_sentinel") ? (x = (e2) => {
50010
50107
  let r2 = e2.detail.message;
50011
50108
  hasModelId(r2) ? MODEL_MANAGER.get(r2.model_id).then((c2) => {
50012
50109
  c2.receiveCustomMessage(r2, e2.detail.buffers);
50013
50110
  }) : b.current.receiveCustomMessage(r2, e2.detail.buffers);
50014
- }, r[5] = x) : x = r[5], useEventListener(g, MarimoIncomingMessageEvent.TYPE, x);
50111
+ }, r[4] = x) : x = r[4], useEventListener(g, MarimoIncomingMessageEvent.TYPE, x);
50015
50112
  let E;
50016
- r[6] === d ? E = r[7] : (E = () => {
50113
+ r[5] === d ? E = r[6] : (E = () => {
50017
50114
  if (!v.current) return;
50018
50115
  let e2 = runAnyWidgetModule(d, b.current, v.current);
50019
50116
  return () => {
50020
50117
  e2.then(_temp$34);
50021
50118
  };
50022
- }, r[6] = d, r[7] = E);
50119
+ }, r[5] = d, r[6] = E);
50023
50120
  let O;
50024
- r[8] !== h.jsUrl || r[9] !== d ? (O = [
50121
+ r[7] !== h.jsUrl || r[8] !== d ? (O = [
50025
50122
  d,
50026
50123
  h.jsUrl
50027
- ], r[8] = h.jsUrl, r[9] = d, r[10] = O) : O = r[10], (0, import_react.useEffect)(E, O);
50124
+ ], r[7] = h.jsUrl, r[8] = d, r[9] = O) : O = r[9], (0, import_react.useEffect)(E, O);
50028
50125
  let A = useDeepCompareMemoize(c), I, R;
50029
- r[11] === A ? (I = r[12], R = r[13]) : (I = () => {
50126
+ r[10] === A ? (I = r[11], R = r[12]) : (I = () => {
50030
50127
  b.current.updateAndEmitDiffs(A);
50031
50128
  }, R = [
50032
50129
  A
50033
- ], r[11] = A, r[12] = I, r[13] = R), (0, import_react.useEffect)(I, R);
50130
+ ], r[10] = A, r[11] = I, r[12] = R), (0, import_react.useEffect)(I, R);
50034
50131
  let z;
50035
- return r[14] === Symbol.for("react.memo_cache_sentinel") ? (z = (0, import_jsx_runtime.jsx)("div", {
50132
+ return r[13] === Symbol.for("react.memo_cache_sentinel") ? (z = (0, import_jsx_runtime.jsx)("div", {
50036
50133
  ref: v
50037
- }), r[14] = z) : z = r[14], z;
50134
+ }), r[13] = z) : z = r[13], z;
50038
50135
  };
50039
- function resolveInitialValue(e, r) {
50040
- let c = structuredClone(e);
50041
- for (let l of r) {
50042
- let r2 = byteStringToBinary(typedAtob(get_default(e, l)));
50043
- set_default(c, l, new DataView(r2.buffer));
50044
- }
50045
- return c;
50046
- }
50047
50136
  function _temp$34(e) {
50048
50137
  return e();
50049
50138
  }
@@ -59561,12 +59650,16 @@ Database schema: ${c}`), (_a3 = r2.aiFix) == null ? void 0 : _a3.setAiCompletion
59561
59650
  operator: "is_false",
59562
59651
  value: void 0
59563
59652
  };
59564
- case "select":
59565
- return {
59653
+ case "select": {
59654
+ let e2 = r.operator;
59655
+ return r.operator !== "in" && r.operator !== "not_in" && (Logger.warn("Invalid operator for select filter", {
59656
+ operator: r.operator
59657
+ }), e2 = "in"), {
59566
59658
  column_id: c,
59567
- operator: "in",
59659
+ operator: e2,
59568
59660
  value: r.options
59569
59661
  };
59662
+ }
59570
59663
  default:
59571
59664
  assertNever(r);
59572
59665
  }
@@ -64822,9 +64915,12 @@ ${r}
64822
64915
  if (e.type === "time") return formatMinMax(e.min ? r.format(e.min) : void 0, e.max ? r.format(e.max) : void 0);
64823
64916
  if (e.type === "datetime") return formatMinMax((_c2 = e.min) == null ? void 0 : _c2.toISOString(), (_d2 = e.max) == null ? void 0 : _d2.toISOString());
64824
64917
  if (e.type === "boolean") return `is ${e.value ? "True" : "False"}`;
64825
- if (e.type === "select") return `is in [${e.options.map((e2) => stringifyUnknownValue({
64826
- value: e2
64827
- })).join(", ")}]`;
64918
+ if (e.type === "select") {
64919
+ let r2 = e.options.map((e2) => stringifyUnknownValue({
64920
+ value: e2
64921
+ }));
64922
+ return `${e.operator === "in" ? "is in" : "not in"} [${r2.join(", ")}]`;
64923
+ }
64828
64924
  if (e.type === "text") return `contains "${e.text}"`;
64829
64925
  logNever(e);
64830
64926
  }
@@ -65881,7 +65977,14 @@ ${r}
65881
65977
  } catch (e2) {
65882
65978
  Logger.error("Failed to copy context menu cell", e2);
65883
65979
  }
65884
- }, f = l.column, h = f.getCanFilter() && ((_a2 = f.columnDef.meta) == null ? void 0 : _a2.filterType);
65980
+ }, f = l.column, h = f.getCanFilter() && ((_a2 = f.columnDef.meta) == null ? void 0 : _a2.filterType), g = (e2) => {
65981
+ f.setFilterValue(Filter.select({
65982
+ options: [
65983
+ l.getValue()
65984
+ ],
65985
+ operator: e2
65986
+ }));
65987
+ };
65885
65988
  return (0, import_jsx_runtime.jsxs)(ContextMenuContent, {
65886
65989
  children: [
65887
65990
  (0, import_jsx_runtime.jsxs)(ContextMenuItem, {
@@ -65906,20 +66009,22 @@ ${r}
65906
66009
  children: [
65907
66010
  (0, import_jsx_runtime.jsx)(ContextMenuSeparator, {}),
65908
66011
  (0, import_jsx_runtime.jsxs)(ContextMenuItem, {
65909
- onClick: () => {
65910
- f.setFilterValue(Filter.select({
65911
- options: [
65912
- l.getValue()
65913
- ],
65914
- operator: "in"
65915
- }));
65916
- },
66012
+ onClick: () => g("in"),
65917
66013
  children: [
65918
66014
  (0, import_jsx_runtime.jsx)(Funnel, {
65919
66015
  className: "mo-dropdown-icon h-3 w-3"
65920
66016
  }),
65921
66017
  "Filter by this value"
65922
66018
  ]
66019
+ }),
66020
+ (0, import_jsx_runtime.jsxs)(ContextMenuItem, {
66021
+ onClick: () => g("not_in"),
66022
+ children: [
66023
+ (0, import_jsx_runtime.jsx)(Funnel, {
66024
+ className: "mo-dropdown-icon h-3 w-3"
66025
+ }),
66026
+ "Remove rows with this value"
66027
+ ]
65923
66028
  })
65924
66029
  ]
65925
66030
  })
@@ -69995,7 +70100,7 @@ Image URL: ${r.imageUrl}`)), contextToXml({
69995
70100
  function getVegaFieldTypes(e) {
69996
70101
  return !e || Object.keys(e).length === 0 ? "auto" : Objects.mapValues(e, (e2) => e2 === "date" || e2 === "time" ? "string" : e2 === "datetime" ? "date" : e2);
69997
70102
  }
69998
- var import_compiler_runtime$79 = require_compiler_runtime(), LazyDataEditor = import_react.lazy(() => import("./glide-data-editor-D-Ia_Jsv.js").then(async (m2) => {
70103
+ var import_compiler_runtime$79 = require_compiler_runtime(), LazyDataEditor = import_react.lazy(() => import("./glide-data-editor-DXF8E-QD.js").then(async (m2) => {
69999
70104
  await m2.__tla;
70000
70105
  return m2;
70001
70106
  }));
@@ -79926,6 +80031,9 @@ ${c}
79926
80031
  in: [
79927
80032
  Schema.stringMultiColumnValues
79928
80033
  ],
80034
+ not_in: [
80035
+ Schema.stringMultiColumnValues
80036
+ ],
79929
80037
  is_null: [],
79930
80038
  is_not_null: []
79931
80039
  }, ALL_OPERATORS = {
@@ -91903,7 +92011,7 @@ ${c}
91903
92011
  return true;
91904
92012
  }
91905
92013
  }
91906
- var LazyVegaComponent = import_react.lazy(() => import("./vega-component-kU4hFYYJ.js")), VegaPlugin = class {
92014
+ var LazyVegaComponent = import_react.lazy(() => import("./vega-component-BFcH2SqR.js")), VegaPlugin = class {
91907
92015
  constructor() {
91908
92016
  __publicField(this, "tagName", "marimo-vega");
91909
92017
  __publicField(this, "validator", object$1({
@@ -94329,7 +94437,8 @@ Defaulting to \`null\`.`;
94329
94437
  target_direction: _enum([
94330
94438
  "increase",
94331
94439
  "decrease"
94332
- ]).default("increase")
94440
+ ]).default("increase"),
94441
+ slot: any().optional()
94333
94442
  }));
94334
94443
  }
94335
94444
  render({ data: e }) {
@@ -94339,60 +94448,83 @@ Defaulting to \`null\`.`;
94339
94448
  }
94340
94449
  };
94341
94450
  const StatComponent = (e) => {
94342
- let r = (0, import_compiler_runtime$9.c)(23), { value: c, label: l, caption: d, bordered: f, direction: h, target_direction: g } = e, { locale: v } = $18f2051aff69b9bf$export$43bb16f9c6d9e3f7(), y;
94343
- r[0] !== v || r[1] !== c ? (y = () => c == null ? (0, import_jsx_runtime.jsx)("i", {
94451
+ let r = (0, import_compiler_runtime$9.c)(31), { value: c, label: l, caption: d, bordered: f, direction: h, target_direction: g, slot: v } = e, { locale: y } = $18f2051aff69b9bf$export$43bb16f9c6d9e3f7(), b;
94452
+ r[0] !== y || r[1] !== c ? (b = () => c == null ? (0, import_jsx_runtime.jsx)("i", {
94344
94453
  children: "No value"
94345
- }) : typeof c == "string" ? c : typeof c == "number" ? prettyNumber(c, v) : typeof c == "boolean" ? c ? "True" : "False" : String(c), r[0] = v, r[1] = c, r[2] = y) : y = r[2];
94346
- let b = y, x = h === g, E = x ? "var(--grass-8)" : "var(--red-8)", O = x ? "var(--grass-9)" : "var(--red-9)", A = f && "rounded-xl border shadow bg-card", I;
94347
- r[3] === A ? I = r[4] : (I = cn("text-card-foreground", A), r[3] = A, r[4] = I);
94348
- let R;
94349
- r[5] === l ? R = r[6] : (R = l && (0, import_jsx_runtime.jsx)("div", {
94350
- className: "p-6 flex flex-row items-center justify-between space-y-0 pb-2",
94454
+ }) : typeof c == "string" ? c : typeof c == "number" ? prettyNumber(c, y) : typeof c == "boolean" ? c ? "True" : "False" : String(c), r[0] = y, r[1] = c, r[2] = b) : b = r[2];
94455
+ let x = b, E = h === g, O = E ? "var(--grass-8)" : "var(--red-8)", A = E ? "var(--grass-9)" : "var(--red-9)", I;
94456
+ r[3] === v ? I = r[4] : (I = () => {
94457
+ let e2 = getMimeValues(v);
94458
+ if (e2 == null ? void 0 : e2[0]) {
94459
+ let { mimetype: r2, data: c2 } = e2[0];
94460
+ return r2 !== "text/html" && Logger.warn(`Expected text/html, got ${r2}`), renderHTML({
94461
+ html: c2,
94462
+ alwaysSanitizeHtml: true
94463
+ });
94464
+ }
94465
+ }, r[3] = v, r[4] = I);
94466
+ let R = I, z = f && "rounded-xl border shadow bg-card", B;
94467
+ r[5] === z ? B = r[6] : (B = cn("text-card-foreground p-6", z), r[5] = z, r[6] = B);
94468
+ let K;
94469
+ r[7] === l ? K = r[8] : (K = l && (0, import_jsx_runtime.jsx)("div", {
94470
+ className: "flex flex-row items-center justify-between space-y-0 pb-2",
94351
94471
  children: (0, import_jsx_runtime.jsx)("h3", {
94352
94472
  className: "tracking-tight text-sm font-medium",
94353
94473
  children: l
94354
94474
  })
94355
- }), r[5] = l, r[6] = R);
94356
- let z;
94357
- r[7] === b ? z = r[8] : (z = b(), r[7] = b, r[8] = z);
94358
- let B;
94359
- r[9] === z ? B = r[10] : (B = (0, import_jsx_runtime.jsx)("div", {
94475
+ }), r[7] = l, r[8] = K);
94476
+ let q;
94477
+ r[9] === x ? q = r[10] : (q = x(), r[9] = x, r[10] = q);
94478
+ let BY;
94479
+ r[11] === q ? BY = r[12] : (BY = (0, import_jsx_runtime.jsx)("div", {
94360
94480
  className: "text-2xl font-bold",
94361
- children: z
94362
- }), r[9] = z, r[10] = B);
94363
- let K;
94364
- r[11] !== d || r[12] !== h || r[13] !== E || r[14] !== O ? (K = d && (0, import_jsx_runtime.jsxs)("p", {
94365
- className: "pt-1 text-xs text-muted-foreground flex align-center",
94481
+ children: q
94482
+ }), r[11] = q, r[12] = BY);
94483
+ let VY;
94484
+ r[13] !== d || r[14] !== h || r[15] !== O || r[16] !== A ? (VY = d && (0, import_jsx_runtime.jsxs)("p", {
94485
+ className: "pt-1 text-xs text-muted-foreground flex align-center whitespace-nowrap",
94366
94486
  children: [
94367
94487
  h === "increase" && (0, import_jsx_runtime.jsx)(Triangle, {
94368
94488
  className: "w-4 h-4 mr-1 p-0.5",
94369
- fill: E,
94370
- stroke: O
94489
+ fill: O,
94490
+ stroke: A
94371
94491
  }),
94372
94492
  h === "decrease" && (0, import_jsx_runtime.jsx)(Triangle, {
94373
94493
  className: "w-4 h-4 mr-1 p-0.5 transform rotate-180",
94374
- fill: E,
94375
- stroke: O
94494
+ fill: O,
94495
+ stroke: A
94376
94496
  }),
94377
94497
  d
94378
94498
  ]
94379
- }), r[11] = d, r[12] = h, r[13] = E, r[14] = O, r[15] = K) : K = r[15];
94380
- let q;
94381
- r[16] !== B || r[17] !== K ? (q = (0, import_jsx_runtime.jsxs)("div", {
94382
- className: "p-6 pt-0",
94499
+ }), r[13] = d, r[14] = h, r[15] = O, r[16] = A, r[17] = VY) : VY = r[17];
94500
+ let HY;
94501
+ r[18] !== BY || r[19] !== VY ? (HY = (0, import_jsx_runtime.jsxs)("div", {
94383
94502
  children: [
94384
- B,
94385
- K
94503
+ BY,
94504
+ VY
94386
94505
  ]
94387
- }), r[16] = B, r[17] = K, r[18] = q) : q = r[18];
94388
- let BY;
94389
- return r[19] !== I || r[20] !== R || r[21] !== q ? (BY = (0, import_jsx_runtime.jsxs)("div", {
94390
- className: I,
94506
+ }), r[18] = BY, r[19] = VY, r[20] = HY) : HY = r[20];
94507
+ let UY;
94508
+ r[21] !== R || r[22] !== v ? (UY = v && (0, import_jsx_runtime.jsx)("div", {
94509
+ className: "[--slot:true]",
94510
+ children: R()
94511
+ }), r[21] = R, r[22] = v, r[23] = UY) : UY = r[23];
94512
+ let WY;
94513
+ r[24] !== UY || r[25] !== HY ? (WY = (0, import_jsx_runtime.jsxs)("div", {
94514
+ className: "pt-0 flex flex-row gap-3.5",
94391
94515
  children: [
94392
- R,
94393
- q
94516
+ HY,
94517
+ UY
94518
+ ]
94519
+ }), r[24] = UY, r[25] = HY, r[26] = WY) : WY = r[26];
94520
+ let GY;
94521
+ return r[27] !== WY || r[28] !== B || r[29] !== K ? (GY = (0, import_jsx_runtime.jsxs)("div", {
94522
+ className: B,
94523
+ children: [
94524
+ K,
94525
+ WY
94394
94526
  ]
94395
- }), r[19] = I, r[20] = R, r[21] = q, r[22] = BY) : BY = r[22], BY;
94527
+ }), r[27] = WY, r[28] = B, r[29] = K, r[30] = GY) : GY = r[30], GY;
94396
94528
  };
94397
94529
  var import_compiler_runtime$8 = require_compiler_runtime(), TexPlugin = class {
94398
94530
  constructor() {
@@ -98401,7 +98533,7 @@ Defaulting to \`null\`.`;
98401
98533
  return Logger.warn("Failed to get version from mount config"), null;
98402
98534
  }
98403
98535
  }
98404
- const marimoVersionAtom = atom(getVersionFromMountConfig() || "0.18.2"), showCodeInRunModeAtom = atom(true);
98536
+ const marimoVersionAtom = atom(getVersionFromMountConfig() || "0.18.4"), showCodeInRunModeAtom = atom(true);
98405
98537
  atom(null);
98406
98538
  var VIRTUAL_FILE_REGEX = /\/@file\/([^\s"&'/]+)\.([\dA-Za-z]+)/g, VirtualFileTracker = class e {
98407
98539
  constructor() {
@@ -98701,7 +98833,7 @@ Defaulting to \`null\`.`;
98701
98833
  r[14] !== f || r[15] !== VY || r[16] !== c || r[17] !== q ? (e2 = (0, import_jsx_runtime.jsx)(OutputArea, {
98702
98834
  allowExpand: true,
98703
98835
  output: c,
98704
- className: "output-area",
98836
+ className: CSSClasses.outputArea,
98705
98837
  cellId: f,
98706
98838
  stale: q,
98707
98839
  loading: VY
@@ -98749,7 +98881,7 @@ Defaulting to \`null\`.`;
98749
98881
  r[45] !== f || r[46] !== VY || r[47] !== c || r[48] !== q || r[49] !== qY ? (JY = (0, import_jsx_runtime.jsx)(OutputArea, {
98750
98882
  allowExpand: qY,
98751
98883
  output: c,
98752
- className: "output-area",
98884
+ className: CSSClasses.outputArea,
98753
98885
  cellId: f,
98754
98886
  stale: q,
98755
98887
  loading: VY