@marimo-team/islands 0.23.16-dev6 → 0.23.16-dev62

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 (198) hide show
  1. package/dist/{ConnectedDataExplorerComponent-CJaUI-S-.js → ConnectedDataExplorerComponent-f9vLjQiF.js} +13 -13
  2. package/dist/{ErrorBoundary-DXlxsrTF.js → ErrorBoundary-DhLqwSWA.js} +3 -3
  3. package/dist/{any-language-editor-P9tjkj4n.js → any-language-editor-DifE-fl7.js} +5 -5
  4. package/dist/{button-BcSml68y.js → button-BSm8IXRU.js} +2 -4
  5. package/dist/{capabilities-BYLFYTYv.js → capabilities-C6OQ5YBO.js} +1 -1
  6. package/dist/{chat-ui-BdSDiVjk.js → chat-ui-DsZJj75A.js} +3117 -3120
  7. package/dist/{check-Cs-KV5XY.js → check-DP7U0H0G.js} +1 -1
  8. package/dist/{code-visibility-CfBftiVM.js → common-Bpnmu1Yz.js} +1085 -1053
  9. package/dist/{copy-Cs3yt6Vt.js → copy-DNq8q3zw.js} +2 -2
  10. package/dist/{dist-B96tMAst.js → dist-DIlxLFXG.js} +2 -2
  11. package/dist/{error-banner-DR7o3CbX.js → error-banner-B_GQfxxD.js} +2 -2
  12. package/dist/{esm-k8PIvuZW.js → esm-DzZVaNH4.js} +1 -1
  13. package/dist/{extends-Cq2JYHKy.js → extends-w2_S44bV.js} +4 -4
  14. package/dist/{formats-BFhkZJwd.js → formats-Dwq1THhr.js} +3 -3
  15. package/dist/{glide-data-editor--CaN-f27.js → glide-data-editor-B9K6-MJe.js} +9 -9
  16. package/dist/{html-to-image-DDENewl2.js → html-to-image-CZ1kLKkq.js} +7350 -6356
  17. package/dist/{input-DStQIuqD.js → input-C5K4VBvB.js} +7 -7
  18. package/dist/{label-DIk0QoFe.js → label-DjoYwqmj.js} +2 -2
  19. package/dist/{loader-CTHCI-qe.js → loader-DX-IDS7n.js} +1 -1
  20. package/dist/main.js +259 -194
  21. package/dist/{mermaid-CdSvixW2.js → mermaid-hv6IckVw.js} +5 -5
  22. package/dist/{node-sql-parser-DLl_zNw0.js → node-sql-parser-v1Vi-Fft.js} +16867 -16665
  23. package/dist/{process-output-2QPcgBQg.js → process-output-bVfbcx5_.js} +32 -28
  24. package/dist/{reveal-component-BclLkYnV.js → reveal-component-JIt3oSeU.js} +642 -634
  25. package/dist/{spec-CnaxwDqy.js → spec-CQKL_D3i.js} +4 -4
  26. package/dist/{strings-BYAhZnQi.js → strings-DIy9NAmg.js} +4 -4
  27. package/dist/style.css +1 -1
  28. package/dist/{swiper-component-DE94711u.js → swiper-component-CEdAYjb7.js} +2 -2
  29. package/dist/toDate-CqhBWjvO.js +713 -0
  30. package/dist/{tooltip-B-qh7UPB.js → tooltip-f-qR0iUx.js} +3 -3
  31. package/dist/{types-DQl7jVYK.js → types-DicH9Oi0.js} +1 -1
  32. package/dist/{useAsyncData-CvO8WUy3.js → useAsyncData-CYOQb1EW.js} +1 -1
  33. package/dist/{useDateFormatter-BSoGim-G.js → useDateFormatter-Bt2qr_XS.js} +2 -2
  34. package/dist/{useDeepCompareMemoize-J3MKRdA4.js → useDeepCompareMemoize-CSHQeQEI.js} +1 -1
  35. package/dist/{useIframeCapabilities-POcFXHbw.js → useIframeCapabilities-kA09ykNq.js} +1 -1
  36. package/dist/{useLifecycle-DqPxHgAN.js → useLifecycle-CMJGqBaY.js} +3 -3
  37. package/dist/{useTheme-XMq9mNf_.js → useTheme-DYfby65G.js} +2 -2
  38. package/dist/{vega-component-CrFoZT1S.js → vega-component-C7nO5zcf.js} +10 -10
  39. package/dist/{zod-D0yOqoGe.js → zod-BUcyXSdR.js} +1 -1
  40. package/package.json +3 -4
  41. package/src/__mocks__/requests.ts +56 -4
  42. package/src/components/data-table/__tests__/__snapshots__/chart-spec-model.test.ts.snap +174 -21
  43. package/src/components/data-table/__tests__/chart-spec-model.test.ts +102 -1
  44. package/src/components/data-table/__tests__/columns.test.tsx +9 -1
  45. package/src/components/data-table/column-summary/chart-spec-model.tsx +163 -103
  46. package/src/components/data-table/column-summary/legacy-chart-spec.ts +15 -7
  47. package/src/components/data-table/column-summary/utils.ts +26 -7
  48. package/src/components/data-table/columns.tsx +11 -1
  49. package/src/components/data-table/types.ts +1 -1
  50. package/src/components/editor/__tests__/viewer-banner.test.tsx +14 -0
  51. package/src/components/editor/actions/__tests__/pair-with-agent-commands.test.ts +99 -18
  52. package/src/components/editor/actions/__tests__/pdf-export.test.ts +32 -13
  53. package/src/components/editor/actions/pair-with-agent-commands.ts +21 -10
  54. package/src/components/editor/actions/pair-with-agent-modal.tsx +2 -2
  55. package/src/components/editor/actions/pdf-export.ts +11 -14
  56. package/src/components/editor/actions/useNotebookActions.tsx +28 -19
  57. package/src/components/editor/cell/code/__tests__/cell-editor-activity-lifecycle.test.ts +250 -0
  58. package/src/components/editor/cell/code/cell-editor.tsx +13 -7
  59. package/src/components/editor/chrome/__tests__/state.test.ts +7 -1
  60. package/src/components/editor/chrome/panels/__tests__/logs-panel.test.tsx +25 -0
  61. package/src/components/editor/chrome/panels/__tests__/panel-accordion-state.test.ts +42 -0
  62. package/src/components/editor/chrome/panels/file-explorer-panel.tsx +6 -17
  63. package/src/components/editor/chrome/panels/logs-panel.tsx +12 -2
  64. package/src/components/editor/chrome/panels/panel-accordion-state.ts +51 -0
  65. package/src/components/editor/chrome/panels/session-panel.tsx +5 -16
  66. package/src/components/editor/chrome/panels/write-secret-modal.tsx +40 -12
  67. package/src/components/editor/chrome/state.ts +10 -0
  68. package/src/components/editor/connections/__tests__/json-credentials.test.ts +114 -0
  69. package/src/components/editor/connections/__tests__/paths.test.ts +39 -0
  70. package/src/components/editor/connections/__tests__/quick-add-data-sources.test.tsx +113 -0
  71. package/src/components/editor/connections/add-connection-dialog.tsx +2 -0
  72. package/src/components/editor/connections/components.tsx +6 -2
  73. package/src/components/editor/connections/database/__tests__/__snapshots__/as-code.test.ts.snap +27 -5
  74. package/src/components/editor/connections/database/__tests__/as-code.test.ts +33 -0
  75. package/src/components/editor/connections/database/as-code.ts +37 -13
  76. package/src/components/editor/connections/database/schemas.ts +6 -5
  77. package/src/components/editor/connections/form-renderers.tsx +99 -1
  78. package/src/components/editor/connections/json-credentials.ts +57 -0
  79. package/src/components/editor/connections/paths.ts +21 -0
  80. package/src/components/editor/connections/quick-add-data-sources.tsx +106 -0
  81. package/src/components/editor/connections/secret-combobox.tsx +41 -20
  82. package/src/components/editor/connections/storage/__tests__/__snapshots__/as-code.test.ts.snap +88 -2
  83. package/src/components/editor/connections/storage/__tests__/as-code.test.ts +128 -8
  84. package/src/components/editor/connections/storage/as-code.ts +79 -36
  85. package/src/components/editor/connections/storage/schemas.ts +85 -44
  86. package/src/components/editor/file-tree/__tests__/renderers.test.ts +31 -0
  87. package/src/components/editor/file-tree/file-viewer.tsx +11 -7
  88. package/src/components/editor/file-tree/renderers.tsx +21 -0
  89. package/src/components/editor/renderers/vertical-layout/vertical-layout.tsx +2 -2
  90. package/src/components/editor/viewer-banner.tsx +6 -1
  91. package/src/components/forms/form.tsx +59 -24
  92. package/src/components/forms/options.ts +2 -1
  93. package/src/components/slides/__tests__/cell-output-block.test.tsx +40 -0
  94. package/src/components/slides/__tests__/slide-cell-view.test.tsx +33 -0
  95. package/src/components/slides/reveal-component.tsx +22 -17
  96. package/src/components/slides/slide-cell-view.tsx +1 -1
  97. package/src/components/slides/slides.css +4 -2
  98. package/src/components/static-html/share-modal.tsx +1 -1
  99. package/src/components/ui/input.tsx +1 -1
  100. package/src/core/ai/context/providers/file.ts +8 -29
  101. package/src/core/cells/__tests__/cells.test.ts +12 -2
  102. package/src/core/cells/__tests__/logs.test.ts +5 -5
  103. package/src/core/cells/cells.ts +17 -4
  104. package/src/core/cells/document-changes.ts +1 -0
  105. package/src/core/cells/logs.ts +14 -4
  106. package/src/core/codemirror/cm.ts +3 -0
  107. package/src/core/codemirror/code-lens/__tests__/actions.test.ts +68 -0
  108. package/src/core/codemirror/code-lens/__tests__/analyzer.test.ts +224 -0
  109. package/src/core/codemirror/code-lens/__tests__/entities.test.ts +175 -0
  110. package/src/core/codemirror/code-lens/__tests__/extension.test.ts +325 -0
  111. package/src/core/codemirror/code-lens/__tests__/perf.test.ts +121 -0
  112. package/src/core/codemirror/code-lens/__tests__/popover.test.ts +93 -0
  113. package/src/core/codemirror/code-lens/actions.ts +33 -0
  114. package/src/core/codemirror/code-lens/analyzer.ts +284 -0
  115. package/src/core/codemirror/code-lens/entities.ts +123 -0
  116. package/src/core/codemirror/code-lens/extension.ts +298 -0
  117. package/src/core/codemirror/code-lens/icons.ts +36 -0
  118. package/src/core/codemirror/code-lens/popover.tsx +240 -0
  119. package/src/core/codemirror/copilot/__tests__/language-server.test.ts +396 -100
  120. package/src/core/codemirror/copilot/__tests__/transport.test.ts +128 -540
  121. package/src/core/codemirror/copilot/language-server.ts +182 -70
  122. package/src/core/codemirror/copilot/transport.ts +15 -207
  123. package/src/core/codemirror/copilot/types.ts +9 -2
  124. package/src/core/codemirror/find-replace/__tests__/navigate.test.ts +42 -30
  125. package/src/core/codemirror/find-replace/navigate.ts +2 -0
  126. package/src/core/codemirror/go-to-definition/__tests__/commands.test.ts +24 -3
  127. package/src/core/codemirror/go-to-definition/commands.ts +93 -90
  128. package/src/core/codemirror/keymaps/__tests__/keymaps.test.ts +31 -2
  129. package/src/core/codemirror/keymaps/keymaps.ts +12 -0
  130. package/src/core/codemirror/language/__tests__/sql.test.ts +627 -61
  131. package/src/core/codemirror/language/languages/python.ts +23 -11
  132. package/src/core/codemirror/language/languages/sql/completion-store.ts +5 -1
  133. package/src/core/codemirror/language/languages/sql/renderers.tsx +3 -3
  134. package/src/core/codemirror/language/languages/sql/sql.ts +251 -16
  135. package/src/core/codemirror/lsp/__tests__/federated-lsp.test.ts +161 -0
  136. package/src/core/codemirror/lsp/__tests__/log-messages.test.ts +53 -0
  137. package/src/core/codemirror/lsp/__tests__/normalize-markdown-math.test.ts +25 -0
  138. package/src/core/codemirror/lsp/__tests__/notebook-lsp.test.ts +598 -156
  139. package/src/core/codemirror/lsp/__tests__/transports.test.ts +112 -0
  140. package/src/core/codemirror/lsp/federated-lsp.ts +76 -23
  141. package/src/core/codemirror/lsp/log-messages.ts +37 -0
  142. package/src/core/codemirror/lsp/normalize-markdown-math.ts +8 -4
  143. package/src/core/codemirror/lsp/notebook-lsp.ts +220 -56
  144. package/src/core/codemirror/lsp/transports.ts +8 -1
  145. package/src/core/codemirror/lsp/types.ts +68 -8
  146. package/src/core/codemirror/lsp/utils.ts +14 -0
  147. package/src/core/codemirror/python-node-names.ts +90 -0
  148. package/src/core/codemirror/reactive-references/analyzer.ts +52 -57
  149. package/src/core/codemirror/utils.ts +28 -0
  150. package/src/core/config/feature-flag.tsx +3 -1
  151. package/src/core/datasets/data-source-discovery.ts +5 -0
  152. package/src/core/datasets/request-registry.ts +11 -0
  153. package/src/core/edit-app.tsx +1 -2
  154. package/src/core/export/__tests__/hooks.test.ts +2 -4
  155. package/src/core/export/hooks.ts +4 -3
  156. package/src/core/hotkeys/hotkeys.ts +0 -2
  157. package/src/core/islands/__tests__/bridge.test.ts +107 -0
  158. package/src/core/islands/bootstrap.ts +1 -0
  159. package/src/core/islands/bridge.ts +18 -0
  160. package/src/core/kernel/messages.ts +2 -0
  161. package/src/core/lsp/__tests__/transport.test.ts +509 -337
  162. package/src/core/lsp/transport.ts +304 -132
  163. package/src/core/mode.ts +10 -0
  164. package/src/core/network/__tests__/api.test.ts +42 -0
  165. package/src/core/network/__tests__/connection.test.ts +45 -0
  166. package/src/core/network/__tests__/requests-lazy.test.ts +47 -1
  167. package/src/core/network/__tests__/requests-network.test.ts +48 -0
  168. package/src/core/network/api.ts +27 -0
  169. package/src/core/network/connection.ts +15 -0
  170. package/src/core/network/requests-lazy.ts +3 -0
  171. package/src/core/network/requests-network.ts +31 -8
  172. package/src/core/network/requests-static.ts +3 -0
  173. package/src/core/network/requests-toasting.tsx +3 -0
  174. package/src/core/network/types.ts +27 -6
  175. package/src/core/rtc/state.ts +9 -0
  176. package/src/core/static/download-html.ts +5 -14
  177. package/src/core/wasm/__tests__/bridge.test.ts +99 -5
  178. package/src/core/wasm/bridge.ts +42 -9
  179. package/src/core/wasm/worker/types.ts +10 -3
  180. package/src/core/wasm/worker/worker.ts +7 -8
  181. package/src/core/websocket/useMarimoKernelConnection.tsx +4 -0
  182. package/src/css/app/codemirror.css +16 -2
  183. package/src/hooks/__tests__/useDataSourceDiscovery.test.ts +80 -0
  184. package/src/hooks/useDataSourceDiscovery.ts +18 -0
  185. package/src/plugins/impl/DataTablePlugin.tsx +4 -1
  186. package/src/plugins/impl/FormPlugin.tsx +1 -1
  187. package/src/plugins/impl/__tests__/DataTablePlugin.test.tsx +158 -0
  188. package/src/plugins/impl/__tests__/FormPlugin.test.tsx +162 -0
  189. package/src/plugins/impl/anywidget/__tests__/model.test.ts +55 -0
  190. package/src/plugins/impl/anywidget/model.ts +20 -5
  191. package/src/plugins/impl/data-frames/forms/__tests__/__snapshots__/form.test.tsx.snap +33 -21
  192. package/src/plugins/impl/data-frames/forms/renderers.tsx +11 -8
  193. package/src/stories/log-viewer.stories.tsx +12 -6
  194. package/src/utils/__tests__/blob.test.ts +27 -1
  195. package/src/utils/__tests__/download.test.tsx +44 -4
  196. package/src/utils/blob.ts +24 -1
  197. package/src/utils/download.ts +14 -15
  198. package/dist/toDate-B3IRfHhw.js +0 -692
@@ -1,10 +1,10 @@
1
1
  import { s as __toESM } from "./chunk-BNovOVIE.js";
2
- import { d as createSlottable, h as cn, p as useComposedRefs } from "./button-BcSml68y.js";
2
+ import { d as createSlottable, h as cn, p as useComposedRefs } from "./button-BSm8IXRU.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 { a as createPopperScope, i as Root2, n as Arrow, r as Content, s as Root, t as Anchor } from "./dist-B96tMAst.js";
5
+ import { a as createPopperScope, i as Root2, n as Arrow, r as Content, s as Root, t as Anchor } from "./dist-DIlxLFXG.js";
6
6
  import { t as require_jsx_runtime } from "./jsx-runtime-DebpN0FN.js";
7
- import { Q as withSmartCollisionBoundary, Z as withFullScreenAsRoot, _t as createContextScope, at as Portal, ct as DismissableLayer, dt as useId, et as StyleNamespace, ft as Presence, ht as composeEventHandlers, pt as useControllableState, vt as Primitive } from "./zod-D0yOqoGe.js";
7
+ import { Q as withSmartCollisionBoundary, Z as withFullScreenAsRoot, _t as createContextScope, at as Portal, ct as DismissableLayer, dt as useId, et as StyleNamespace, ft as Presence, ht as composeEventHandlers, pt as useControllableState, vt as Primitive } from "./zod-BUcyXSdR.js";
8
8
  var import_react = /* @__PURE__ */ __toESM(require_react(), 1), import_jsx_runtime = /* @__PURE__ */ __toESM(require_jsx_runtime(), 1), [createTooltipContext, createTooltipScope] = createContextScope("Tooltip", [createPopperScope]), usePopperScope = createPopperScope(), PROVIDER_NAME = "TooltipProvider", DEFAULT_DELAY_DURATION = 700, TOOLTIP_OPEN = "tooltip.open", [TooltipProviderContextProvider, useTooltipProviderContext] = createTooltipContext(PROVIDER_NAME), TooltipProvider$1 = (n) => {
9
9
  let { __scopeTooltip: j, delayDuration: M = DEFAULT_DELAY_DURATION, skipDelayDuration: N = 300, disableHoverableContent: P = false, children: F } = n, I = import_react.useRef(true), L = import_react.useRef(false), R = import_react.useRef(0);
10
10
  return import_react.useEffect(() => {
@@ -1,4 +1,4 @@
1
- import { u as createLucideIcon } from "./dist-B96tMAst.js";
1
+ import { u as createLucideIcon } from "./dist-DIlxLFXG.js";
2
2
  var Pencil = createLucideIcon("pencil", [["path", {
3
3
  d: "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",
4
4
  key: "1a8usu"
@@ -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 { A as useEvent_default } from "./useTheme-XMq9mNf_.js";
4
+ import { A as useEvent_default } from "./useTheme-DYfby65G.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,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
- import { u as createLucideIcon } from "./dist-B96tMAst.js";
4
- import { E as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "./strings-BYAhZnQi.js";
3
+ import { u as createLucideIcon } from "./dist-DIlxLFXG.js";
4
+ import { E as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "./strings-DIy9NAmg.js";
5
5
  var ChartPie = createLucideIcon("chart-pie", [["path", {
6
6
  d: "M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z",
7
7
  key: "pzmjnu"
@@ -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 { k as dequal } from "./useTheme-XMq9mNf_.js";
3
+ import { k as dequal } from "./useTheme-DYfby65G.js";
4
4
  var import_react = /* @__PURE__ */ __toESM(require_react(), 1);
5
5
  function useDeepCompareMemoize(e) {
6
6
  let i = import_react.useRef(e);
@@ -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 { t as getIframeCapabilities } from "./capabilities-BYLFYTYv.js";
4
+ import { t as getIframeCapabilities } from "./capabilities-C6OQ5YBO.js";
5
5
  var import_compiler_runtime = require_compiler_runtime();
6
6
  require_react();
7
7
  function useIframeCapabilities() {
@@ -1,10 +1,10 @@
1
1
  import { s as __toESM } from "./chunk-BNovOVIE.js";
2
- import { g as Logger, h as cn, r as cva } from "./button-BcSml68y.js";
2
+ import { g as Logger, h as cn, r as cva } from "./button-BSm8IXRU.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 { u as createLucideIcon } from "./dist-B96tMAst.js";
5
+ import { u as createLucideIcon } from "./dist-DIlxLFXG.js";
6
6
  import { t as require_jsx_runtime } from "./jsx-runtime-DebpN0FN.js";
7
- import { C as useSetAtom, T as atom } from "./useTheme-XMq9mNf_.js";
7
+ import { C as useSetAtom, T as atom } from "./useTheme-DYfby65G.js";
8
8
  var Calendar = createLucideIcon("calendar", [
9
9
  ["path", {
10
10
  d: "M8 2v4",
@@ -1,8 +1,8 @@
1
1
  import { s as __toESM } from "./chunk-BNovOVIE.js";
2
- import { a as OverridingHotkeyProvider, g as Logger, s as resolvePlatform } from "./button-BcSml68y.js";
2
+ import { a as OverridingHotkeyProvider, g as Logger, s as resolvePlatform } from "./button-BSm8IXRU.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 { A as looseObject, B as union, I as record, N as number, P as object, R as string, T as boolean, b as _enum, w as array } from "./zod-D0yOqoGe.js";
5
+ import { A as looseObject, B as union, I as record, N as number, P as object, R as string, T as boolean, b as _enum, w as array } from "./zod-BUcyXSdR.js";
6
6
  import { t as merge_default } from "./merge-Be1CqGnU.js";
7
7
  var import_react = /* @__PURE__ */ __toESM(require_react()), useInsertionEffect = typeof window < "u" ? import_react.useInsertionEffect || import_react.useLayoutEffect : () => {
8
8
  };
@@ -1,25 +1,25 @@
1
1
  import { s as __toESM } from "./chunk-BNovOVIE.js";
2
- import { g as Logger, h as cn, m as Events } from "./button-BcSml68y.js";
2
+ import { g as Logger, h as cn, m as Events } from "./button-BSm8IXRU.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-B3IRfHhw.js";
5
+ import { c as asRemoteURL, w as CircleQuestionMark } from "./toDate-CqhBWjvO.js";
6
6
  import "./react-dom-BTJzcVJ9.js";
7
7
  import { t as require_jsx_runtime } from "./jsx-runtime-DebpN0FN.js";
8
- import "./zod-D0yOqoGe.js";
9
- import { n as ErrorBanner } from "./error-banner-DR7o3CbX.js";
10
- import { t as Tooltip } from "./tooltip-B-qh7UPB.js";
8
+ import "./zod-BUcyXSdR.js";
9
+ import { n as ErrorBanner } from "./error-banner-B_GQfxxD.js";
10
+ import { t as Tooltip } from "./tooltip-f-qR0iUx.js";
11
11
  import { t as debounce_default } from "./debounce-BOD3DbfP.js";
12
- import { A as useEvent_default, n as useTheme } from "./useTheme-XMq9mNf_.js";
12
+ import { A as useEvent_default, n as useTheme } from "./useTheme-DYfby65G.js";
13
13
  import { s as uniq } from "./arrays-sEtDRoG4.js";
14
14
  import { t as Objects } from "./objects-De59twF-.js";
15
- import { a as isValid, i as AlertTitle, n as Alert, t as arrow } from "./formats-BFhkZJwd.js";
15
+ import { a as isValid, i as AlertTitle, n as Alert, t as arrow } from "./formats-Dwq1THhr.js";
16
16
  import { V as getContainerWidth, n as formats } from "./vega-loader.browser-DmpxCJqx.js";
17
- import { a as tooltipHandler, n as vegaLoadData } from "./loader-CTHCI-qe.js";
17
+ import { a as tooltipHandler, n as vegaLoadData } from "./loader-DX-IDS7n.js";
18
18
  import { t as j } from "./react-vega-BazDALhI.js";
19
19
  import "./defaultLocale-BpsHxBd7.js";
20
20
  import "./defaultLocale-DoeErsX2.js";
21
- import { t as useAsyncData } from "./useAsyncData-CvO8WUy3.js";
22
- import { t as useDeepCompareMemoize } from "./useDeepCompareMemoize-J3MKRdA4.js";
21
+ import { t as useAsyncData } from "./useAsyncData-CYOQb1EW.js";
22
+ import { t as useDeepCompareMemoize } from "./useDeepCompareMemoize-CSHQeQEI.js";
23
23
  import { t as Semaphore } from "./semaphore-C8rmHdhj.js";
24
24
  import { t as useVegaContainerRemeasure } from "./use-vega-container-remeasure-DGNrIQSk.js";
25
25
  var import_compiler_runtime = require_compiler_runtime(), import_react = /* @__PURE__ */ __toESM(require_react(), 1);
@@ -1,5 +1,5 @@
1
1
  import { r as __export, s as __toESM } from "./chunk-BNovOVIE.js";
2
- import { c as useEventListener, p as useComposedRefs, u as createSlot } from "./button-BcSml68y.js";
2
+ import { c as useEventListener, p as useComposedRefs, u as createSlot } from "./button-BSm8IXRU.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
5
  import { t as require_react_dom } from "./react-dom-BTJzcVJ9.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marimo-team/islands",
3
- "version": "0.23.16-dev6",
3
+ "version": "0.23.16-dev62",
4
4
  "main": "dist/main.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",
@@ -55,15 +55,14 @@
55
55
  "@lezer/markdown": "^1.6.3",
56
56
  "@lezer/python": "^1.1.18",
57
57
  "@marimo-team/codemirror-ai": "^0.3.7",
58
- "@marimo-team/codemirror-languageserver": "^1.16.12",
58
+ "@marimo-team/codemirror-languageserver": "^2.0.0",
59
59
  "@marimo-team/codemirror-mcp": "^0.1.7",
60
- "@marimo-team/codemirror-sql": "^0.2.8",
60
+ "@marimo-team/codemirror-sql": "^0.3.0",
61
61
  "@marimo-team/llm-info": "workspace:*",
62
62
  "@marimo-team/marimo-api": "workspace:*",
63
63
  "@marimo-team/react-slotz": "^0.2.0",
64
64
  "@marimo-team/smart-cells": "workspace:*",
65
65
  "@mui/material": "^6.5.0",
66
- "@open-rpc/client-js": "^1.8.1",
67
66
  "@paralleldrive/cuid2": "^2.3.1",
68
67
  "@radix-ui/colors": "^3.0.0",
69
68
  "@radix-ui/react-icons": "~1.3.2",
@@ -41,6 +41,7 @@ export const MockRequestClient = {
41
41
  previewSQLTableList: vi.fn().mockResolvedValue({ tables: [] }),
42
42
  previewSQLSchemaList: vi.fn().mockResolvedValue({ schemas: [] }),
43
43
  previewDataSourceConnection: vi.fn().mockResolvedValue({}),
44
+ discoverDataSources: vi.fn().mockResolvedValue({}),
44
45
  validateSQL: vi.fn().mockResolvedValue({}),
45
46
  openFile: vi.fn().mockResolvedValue({}),
46
47
  getUsageStats: vi.fn().mockResolvedValue({}),
@@ -64,10 +65,61 @@ export const MockRequestClient = {
64
65
  getWorkspaceFiles: vi.fn().mockResolvedValue({ files: [] }),
65
66
  getRunningNotebooks: vi.fn().mockResolvedValue({ files: [] }),
66
67
  shutdownSession: vi.fn().mockResolvedValue({}),
67
- exportAsHTML: vi.fn().mockResolvedValue({ html: "" }),
68
- exportAsIPYNB: vi.fn().mockResolvedValue(""),
69
- exportAsMarkdown: vi.fn().mockResolvedValue({ markdown: "" }),
70
- exportAsPDF: vi.fn().mockResolvedValue(new Blob()),
68
+ getExportAvailability: vi.fn().mockResolvedValue({
69
+ source: "server",
70
+ formats: [
71
+ {
72
+ format: "html",
73
+ dependenciesAvailable: true,
74
+ missingPackages: [],
75
+ },
76
+ {
77
+ format: "markdown",
78
+ dependenciesAvailable: true,
79
+ missingPackages: [],
80
+ },
81
+ {
82
+ format: "ipynb",
83
+ dependenciesAvailable: true,
84
+ missingPackages: [],
85
+ },
86
+ {
87
+ format: "pdf",
88
+ dependenciesAvailable: true,
89
+ missingPackages: [],
90
+ },
91
+ {
92
+ format: "script",
93
+ dependenciesAvailable: true,
94
+ missingPackages: [],
95
+ },
96
+ ],
97
+ }),
98
+ exportAsHTML: vi.fn().mockResolvedValue({
99
+ contents: "",
100
+ filename: "notebook.html",
101
+ mediaType: "text/html; charset=utf-8",
102
+ }),
103
+ exportAsIPYNB: vi.fn().mockResolvedValue({
104
+ contents: "",
105
+ filename: "notebook.ipynb",
106
+ mediaType: "text/plain; charset=utf-8",
107
+ }),
108
+ exportAsMarkdown: vi.fn().mockResolvedValue({
109
+ contents: "",
110
+ filename: "notebook.md",
111
+ mediaType: "text/plain; charset=utf-8",
112
+ }),
113
+ exportAsScript: vi.fn().mockResolvedValue({
114
+ contents: "",
115
+ filename: "notebook.script.py",
116
+ mediaType: "text/plain; charset=utf-8",
117
+ }),
118
+ exportAsPDF: vi.fn().mockResolvedValue({
119
+ contents: new Blob(),
120
+ filename: "notebook.pdf",
121
+ mediaType: "application/pdf",
122
+ }),
71
123
  autoExportAsHTML: vi.fn().mockResolvedValue({}),
72
124
  autoExportAsMarkdown: vi.fn().mockResolvedValue({}),
73
125
  autoExportAsIPYNB: vi.fn().mockResolvedValue({}),
@@ -109,9 +109,10 @@ exports[`ColumnChartSpecModel > file URL handling > should handle arrow data 1`]
109
109
  "type": "temporal",
110
110
  },
111
111
  "y": {
112
- "aggregate": "max",
113
- "axis": null,
114
- "type": "quantitative",
112
+ "value": 0,
113
+ },
114
+ "y2": {
115
+ "value": 100,
115
116
  },
116
117
  },
117
118
  "mark": {
@@ -222,9 +223,10 @@ exports[`ColumnChartSpecModel > should expect bin values to be used for number a
222
223
  "field": "bin_end_extended",
223
224
  },
224
225
  "y": {
225
- "aggregate": "max",
226
- "axis": null,
227
- "type": "quantitative",
226
+ "value": 0,
227
+ },
228
+ "y2": {
229
+ "value": 30,
228
230
  },
229
231
  },
230
232
  "mark": {
@@ -486,9 +488,10 @@ exports[`ColumnChartSpecModel > should handle datetime bin values 1`] = `
486
488
  "type": "ordinal",
487
489
  },
488
490
  "y": {
489
- "aggregate": "max",
490
- "axis": null,
491
- "type": "quantitative",
491
+ "value": 0,
492
+ },
493
+ "y2": {
494
+ "value": 30,
492
495
  },
493
496
  },
494
497
  "mark": {
@@ -633,6 +636,152 @@ exports[`ColumnChartSpecModel > should handle string value counts 1`] = `
633
636
  }
634
637
  `;
635
638
 
639
+ exports[`ColumnChartSpecModel > should render a null bar for all-null temporal columns 1`] = `
640
+ {
641
+ "background": "transparent",
642
+ "config": {
643
+ "axis": {
644
+ "domain": false,
645
+ },
646
+ "view": {
647
+ "stroke": "transparent",
648
+ },
649
+ },
650
+ "data": {
651
+ "name": "bin_values",
652
+ "values": [
653
+ {
654
+ "bin_end": null,
655
+ "bin_start": null,
656
+ "count": 12,
657
+ },
658
+ ],
659
+ },
660
+ "height": 30,
661
+ "layer": [
662
+ {
663
+ "encoding": {
664
+ "x": {
665
+ "axis": null,
666
+ "field": "bin_start",
667
+ "type": "nominal",
668
+ },
669
+ "y": {
670
+ "axis": null,
671
+ "field": "count",
672
+ "type": "quantitative",
673
+ },
674
+ },
675
+ "mark": {
676
+ "color": "#cc4e00",
677
+ "type": "bar",
678
+ },
679
+ },
680
+ {
681
+ "encoding": {
682
+ "tooltip": [
683
+ {
684
+ "field": "count",
685
+ "format": ",d",
686
+ "title": "nulls",
687
+ "type": "quantitative",
688
+ },
689
+ ],
690
+ "x": {
691
+ "axis": null,
692
+ "field": "bin_start",
693
+ "type": "nominal",
694
+ },
695
+ "y": {
696
+ "value": 0,
697
+ },
698
+ "y2": {
699
+ "value": 30,
700
+ },
701
+ },
702
+ "mark": {
703
+ "opacity": 0,
704
+ "type": "bar",
705
+ },
706
+ },
707
+ ],
708
+ "width": 70,
709
+ }
710
+ `;
711
+
712
+ exports[`ColumnChartSpecModel > should render only a null bar for all-null numeric columns 1`] = `
713
+ {
714
+ "background": "transparent",
715
+ "config": {
716
+ "axis": {
717
+ "domain": false,
718
+ },
719
+ "view": {
720
+ "stroke": "transparent",
721
+ },
722
+ },
723
+ "data": {
724
+ "name": "bin_values",
725
+ "values": [
726
+ {
727
+ "bin_end": null,
728
+ "bin_start": null,
729
+ "count": 12,
730
+ },
731
+ ],
732
+ },
733
+ "height": 30,
734
+ "layer": [
735
+ {
736
+ "encoding": {
737
+ "x": {
738
+ "axis": null,
739
+ "field": "bin_start",
740
+ "type": "nominal",
741
+ },
742
+ "y": {
743
+ "axis": null,
744
+ "field": "count",
745
+ "type": "quantitative",
746
+ },
747
+ },
748
+ "mark": {
749
+ "color": "#cc4e00",
750
+ "type": "bar",
751
+ },
752
+ },
753
+ {
754
+ "encoding": {
755
+ "tooltip": [
756
+ {
757
+ "field": "count",
758
+ "format": ",d",
759
+ "title": "nulls",
760
+ "type": "quantitative",
761
+ },
762
+ ],
763
+ "x": {
764
+ "axis": null,
765
+ "field": "bin_start",
766
+ "type": "nominal",
767
+ },
768
+ "y": {
769
+ "value": 0,
770
+ },
771
+ "y2": {
772
+ "value": 30,
773
+ },
774
+ },
775
+ "mark": {
776
+ "opacity": 0,
777
+ "type": "bar",
778
+ },
779
+ },
780
+ ],
781
+ "width": 70,
782
+ }
783
+ `;
784
+
636
785
  exports[`ColumnChartSpecModel > snapshot with legacy data spec > array 1`] = `
637
786
  {
638
787
  "background": "transparent",
@@ -700,9 +849,10 @@ exports[`ColumnChartSpecModel > snapshot with legacy data spec > array 1`] = `
700
849
  "type": "quantitative",
701
850
  },
702
851
  "y": {
703
- "aggregate": "max",
704
- "axis": null,
705
- "type": "quantitative",
852
+ "value": 0,
853
+ },
854
+ "y2": {
855
+ "value": 100,
706
856
  },
707
857
  },
708
858
  "mark": {
@@ -788,9 +938,10 @@ exports[`ColumnChartSpecModel > snapshot with legacy data spec > csv data 1`] =
788
938
  "type": "quantitative",
789
939
  },
790
940
  "y": {
791
- "aggregate": "max",
792
- "axis": null,
793
- "type": "quantitative",
941
+ "value": 0,
942
+ },
943
+ "y2": {
944
+ "value": 100,
794
945
  },
795
946
  },
796
947
  "mark": {
@@ -876,9 +1027,10 @@ exports[`ColumnChartSpecModel > snapshot with legacy data spec > csv string 1`]
876
1027
  "type": "quantitative",
877
1028
  },
878
1029
  "y": {
879
- "aggregate": "max",
880
- "axis": null,
881
- "type": "quantitative",
1030
+ "value": 0,
1031
+ },
1032
+ "y2": {
1033
+ "value": 100,
882
1034
  },
883
1035
  },
884
1036
  "mark": {
@@ -988,9 +1140,10 @@ exports[`ColumnChartSpecModel > snapshot with legacy data spec > url data 1`] =
988
1140
  "type": "temporal",
989
1141
  },
990
1142
  "y": {
991
- "aggregate": "max",
992
- "axis": null,
993
- "type": "quantitative",
1143
+ "value": 0,
1144
+ },
1145
+ "y2": {
1146
+ "value": 100,
994
1147
  },
995
1148
  },
996
1149
  "mark": {
@@ -178,6 +178,104 @@ describe("ColumnChartSpecModel", () => {
178
178
  expect(summary2.spec?.data?.values).toEqual(mockBinValues.integer);
179
179
  });
180
180
 
181
+ it("should render only a null bar for all-null numeric columns", () => {
182
+ const allNullStats: Record<ColumnName, Partial<ColumnHeaderStats>> = {
183
+ number: { nulls: 12, total: 12 },
184
+ };
185
+ const allNullBins: Record<ColumnName, BinValues> = {
186
+ number: [],
187
+ };
188
+ const model = new ColumnChartSpecModel(
189
+ [],
190
+ mockFieldTypes,
191
+ allNullStats,
192
+ allNullBins,
193
+ {},
194
+ { includeCharts: true },
195
+ );
196
+ const summary = model.getHeaderSummary("number");
197
+ expect(summary.spec).toBeDefined();
198
+ // @ts-expect-error hconcat should be available
199
+ expect(summary.spec?.hconcat).toBeUndefined();
200
+ // @ts-expect-error data.values should be available
201
+ expect(summary.spec?.data?.values).toEqual([
202
+ { bin_start: null, bin_end: null, count: 12 },
203
+ ]);
204
+ // Full-width null-only chart (not the thin hconcat null strip)
205
+ expect(summary.spec?.width).toBe(70);
206
+ // Full-height tooltip hit area uses pixel y/y2 (no aggregate:max)
207
+ // @ts-expect-error layer should be available
208
+ expect(summary.spec?.layer?.[1]?.encoding?.y).toEqual({ value: 0 });
209
+ // @ts-expect-error layer should be available
210
+ expect(summary.spec?.layer?.[1]?.encoding?.y2).toEqual({ value: 30 });
211
+ expect(summary.spec).toMatchSnapshot();
212
+ });
213
+
214
+ it("should ignore NaN bins and not mutate stored bin values", () => {
215
+ const nanOnlyBins: Record<ColumnName, BinValues> = {
216
+ number: [
217
+ { bin_start: Number.NaN, bin_end: 0.1, count: 0 },
218
+ { bin_start: Number.NaN, bin_end: 1, count: 0 },
219
+ ],
220
+ };
221
+ const stats: Record<ColumnName, Partial<ColumnHeaderStats>> = {
222
+ number: { nulls: 12, total: 12 },
223
+ };
224
+ const model = new ColumnChartSpecModel(
225
+ [],
226
+ mockFieldTypes,
227
+ stats,
228
+ nanOnlyBins,
229
+ {},
230
+ { includeCharts: true },
231
+ );
232
+ const first = model.getHeaderSummary("number");
233
+ const second = model.getHeaderSummary("number");
234
+ // All NaN bins are invalid → null-only chart
235
+ // @ts-expect-error hconcat should be available
236
+ expect(first.spec?.hconcat).toBeUndefined();
237
+ expect(first.spec?.width).toBe(70);
238
+ // Stored bins must not grow across getHeaderSummary calls
239
+ expect(nanOnlyBins.number).toHaveLength(2);
240
+ expect(second.spec).toEqual(first.spec);
241
+ });
242
+
243
+ it("should render a null bar for all-null temporal columns", () => {
244
+ const model = new ColumnChartSpecModel(
245
+ [],
246
+ mockFieldTypes,
247
+ { datetime: { nulls: 12, total: 12 } },
248
+ { datetime: [] },
249
+ {},
250
+ { includeCharts: true },
251
+ );
252
+ const summary = model.getHeaderSummary("datetime");
253
+ expect(summary.spec).toBeDefined();
254
+ // @ts-expect-error data.values
255
+ expect(summary.spec?.data?.values).toEqual([
256
+ { bin_start: null, bin_end: null, count: 12 },
257
+ ]);
258
+ expect(summary.spec?.width).toBe(70);
259
+ // Same full-height hover hit area as numeric all-null charts
260
+ // @ts-expect-error layer should be available
261
+ expect(summary.spec?.layer?.[1]?.encoding?.y).toEqual({ value: 0 });
262
+ // @ts-expect-error layer should be available
263
+ expect(summary.spec?.layer?.[1]?.encoding?.y2).toEqual({ value: 30 });
264
+ expect(summary.spec).toMatchSnapshot();
265
+ });
266
+
267
+ it("should return null when numeric bins are empty and there are no nulls", () => {
268
+ const model = new ColumnChartSpecModel(
269
+ [],
270
+ mockFieldTypes,
271
+ { number: { min: 0, max: 1 } },
272
+ { number: [] },
273
+ {},
274
+ { includeCharts: true },
275
+ );
276
+ expect(model.getHeaderSummary("number").spec).toBeNull();
277
+ });
278
+
181
279
  it("should handle datetime bin values", () => {
182
280
  const model = new ColumnChartSpecModel(
183
281
  [],
@@ -191,7 +289,10 @@ describe("ColumnChartSpecModel", () => {
191
289
  const summary = model.getHeaderSummary("datetime");
192
290
  expect(summary.spec).toBeDefined();
193
291
  // @ts-expect-error data.values should be available
194
- expect(summary.spec?.data?.values).toEqual(mockBinValues.datetime);
292
+ expect(summary.spec?.data?.values).toEqual([
293
+ ...mockBinValues.datetime,
294
+ { bin_start: null, bin_end: null, count: 10 },
295
+ ]);
195
296
 
196
297
  expect(summary.spec).toMatchSnapshot();
197
298
 
@@ -5,6 +5,7 @@ import { fireEvent, render } from "@testing-library/react";
5
5
  import { I18nProvider } from "react-aria";
6
6
  import { describe, expect, it, test, vi } from "vitest";
7
7
  import { TooltipProvider } from "@/components/ui/tooltip";
8
+ import { Logger } from "@/utils/Logger";
8
9
  import { parseContent } from "@/utils/url-parser";
9
10
  import {
10
11
  generateColumns,
@@ -174,16 +175,23 @@ describe("generateColumns", () => {
174
175
  ];
175
176
 
176
177
  it("should generate columns with row headers", () => {
178
+ const loggerWarn = vi.spyOn(Logger, "warn").mockImplementation(() => {});
179
+ // "name" intentionally appears in both inputs; the row header takes precedence.
177
180
  const columns = generateColumns({
178
181
  rowHeaders: [["name", ["string", "text"]]],
179
182
  selection: null,
180
183
  fieldTypes,
181
184
  });
182
185
 
183
- expect(columns).toHaveLength(3);
186
+ expect(columns).toHaveLength(2);
187
+ expect(columns.map((column) => column.id)).toEqual(["name", "age"]);
184
188
  expect(columns[0].id).toBe("name");
185
189
  expect(columns[0].meta?.rowHeader).toBe(true);
186
190
  expect(columns[0].enableSorting).toBe(true);
191
+ expect(loggerWarn).toHaveBeenCalledWith(
192
+ "Skipping field type for row header column name",
193
+ );
194
+ loggerWarn.mockRestore();
187
195
  });
188
196
 
189
197
  it("should generate columns with nameless row headers", () => {