@marimo-team/islands 0.25.3-dev6 → 0.25.3-dev61

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 (236) hide show
  1. package/dist/{ConnectedDataExplorerComponent-CNMliVzw.js → ConnectedDataExplorerComponent-Da5OoEUL.js} +14 -14
  2. package/dist/{ErrorBoundary-Ca-Sa492.js → ErrorBoundary-BEfUX0zz.js} +8 -8
  3. package/dist/{abnfDiagram-VCTEODGH-D-Ez91gV.js → abnfDiagram-VCTEODGH-Bz3mrprX.js} +2 -2
  4. package/dist/any-language-editor-k2B8YI3Y.js +75 -0
  5. package/dist/{architectureDiagram-5GKGNRK7-CTpcNtO8.js → architectureDiagram-5GKGNRK7-Cs5ujb9K.js} +1 -1
  6. package/dist/{arrays-CN1djC4k.js → arrays-R6JsImiT.js} +8 -0
  7. package/dist/{button-CvjkwdSk.js → button-BxB3RDjN.js} +1 -1
  8. package/dist/{capabilities-CQ5IjhzL.js → capabilities-BgR0osfN.js} +2 -2
  9. package/dist/{chat-ui-0lKdOoQ3.js → chat-ui-C0_lCzql.js} +1139 -1140
  10. package/dist/{check-EDwSwP89.js → check-P35dc2dH.js} +1 -1
  11. package/dist/{chunk-IMKFNOWR-DGxi-zeo.js → chunk-IMKFNOWR-CcTSaxZt.js} +1 -1
  12. package/dist/{chunk-SHT3W25Y-CV9J3rAB.js → chunk-SHT3W25Y-DcJcjOaO.js} +1 -1
  13. package/dist/{chunk-SVP7TREG-BL-9Fqgg.js → chunk-SVP7TREG-BVtDTjaF.js} +1 -1
  14. package/dist/{chunk-TICWLB2K-Cu_XMjDM.js → chunk-TICWLB2K-BkDFkh8q.js} +1 -1
  15. package/dist/{chunk-YOKDWASO-DPZk8vhS.js → chunk-YOKDWASO-DKplTrBY.js} +20 -20
  16. package/dist/{classDiagram-ZZMXUADV-BXXV13Hq.js → classDiagram-ZZMXUADV-CfAt7HT5.js} +2 -2
  17. package/dist/{classDiagram-v2-VYDZK3BY-B7FXJ1Cp.js → classDiagram-v2-VYDZK3BY-CGEjNYa2.js} +2 -2
  18. package/dist/{code-visibility-NGRjhbtA.js → code-visibility-CA0UOEgk.js} +6 -6
  19. package/dist/{common-B7_ZSg0P.js → common-BgoPSdwN.js} +4960 -4835
  20. package/dist/{copy-icon-Ft7t9bqz.js → copy-icon-CPoxUG7G.js} +3 -3
  21. package/dist/{cynefinDiagram-5FMLGOSQ-CH96rwba.js → cynefinDiagram-5FMLGOSQ-BW6NmfJi.js} +1 -1
  22. package/dist/{dagre-GXQ25YYZ-BD3PmpFY.js → dagre-GXQ25YYZ-CWg3CTuF.js} +1 -1
  23. package/dist/{data-grid-overlay-editor-B_cmrkBm.js → data-grid-overlay-editor-CRjm80Ab.js} +5 -5
  24. package/dist/{data-grid-types-BH_r7g7l.js → data-grid-types-0PJ-9N5n.js} +1 -1
  25. package/dist/{diagram-S7CK7UJ4-BsSJJldB.js → diagram-S7CK7UJ4-BPxtoS-z.js} +1 -1
  26. package/dist/{diagram-UQ7AKVKN-muQtNZc4.js → diagram-UQ7AKVKN-DA-vJdFL.js} +1 -1
  27. package/dist/{diagram-VX7I27RA-CdhuZAqR.js → diagram-VX7I27RA-D6bkR84S.js} +1 -1
  28. package/dist/{diagram-Z3DM3KII-BD8mXjOj.js → diagram-Z3DM3KII-m60g4cAT.js} +1 -1
  29. package/dist/{dialog-CEBFZNyc.js → dialog-C1PcpCqX.js} +3 -3
  30. package/dist/{dist-DpBpA_n1.js → dist-Lm-D-Vr6.js} +3 -3
  31. package/dist/{dropdown-menu-CP_qCYHC.js → dropdown-menu-B3eUiVJB.js} +177 -169
  32. package/dist/{ebnfDiagram-PWID7BFC-BIN1sweE.js → ebnfDiagram-PWID7BFC-CK99sho2.js} +2 -2
  33. package/dist/{erDiagram-RLTQ6QDP-Ctp5cfoN.js → erDiagram-RLTQ6QDP-Bryq0tdE.js} +1 -1
  34. package/dist/{error-banner-D-WCIiMt.js → error-banner-Sl2FlSJ4.js} +2 -2
  35. package/dist/{error-entries-DSvFWT_M.js → error-entries-CMNtA8NK.js} +959 -959
  36. package/dist/{feedback-button-CTF2Nj9s.js → feedback-button-CZA7i0Ir.js} +29 -29
  37. package/dist/{flowDiagram-HODETNUW-3EfLrlFb.js → flowDiagram-HODETNUW-D-3aRpfS.js} +2 -2
  38. package/dist/{formats-CeOmU1MU.js → formats-6pLWWrY2.js} +3 -3
  39. package/dist/{ganttDiagram-EL5Y4UJY-BQT16JSc.js → ganttDiagram-EL5Y4UJY-Dh_4cBJZ.js} +2 -2
  40. package/dist/{glide-data-editor-BQHF9puC.js → glide-data-editor-Bd52MLtf.js} +370 -368
  41. package/dist/{glide-utils-DJyqh0EM.js → glide-utils-Bt8_pBa2.js} +16 -16
  42. package/dist/{globals-Cj8iqMEp.js → globals-BvANmUu6.js} +3 -3
  43. package/dist/{highlighted-body-KPVGNVTW-zwjq21tf.js → highlighted-body-KPVGNVTW-3Ziwfz-V.js} +2 -2
  44. package/dist/{html-to-image-B8s5SgGm.js → html-to-image-6xcoTKhC.js} +29 -29
  45. package/dist/{infoDiagram-27XIBGKW-DipQoHxl.js → infoDiagram-27XIBGKW-s1C1kgfU.js} +1 -1
  46. package/dist/{ishikawaDiagram-5VMMS53U-DgFMjSGz.js → ishikawaDiagram-5VMMS53U-CCsRgolY.js} +1 -1
  47. package/dist/{kanban-definition-UXKFOSKX-w1ACVjgl.js → kanban-definition-UXKFOSKX-BrmxDlcc.js} +1 -1
  48. package/dist/{label-BDKF3Afc.js → label-BRnUC0NX.js} +2 -2
  49. package/dist/{linear-Cnaq3Tfb.js → linear-DWERh7eI.js} +121 -73
  50. package/dist/{loader-BQOfjTIJ.js → loader-Bm8cy3e8.js} +12 -12
  51. package/dist/main.js +3177 -2980
  52. package/dist/{mermaid-CHo49Yv-.js → mermaid-DKI0869I.js} +38 -38
  53. package/dist/mermaid-HWGCJPDP-Du3-HPQA.js +2 -0
  54. package/dist/{mindmap-definition-YA3MSWOX-CrT0KSfX.js → mindmap-definition-YA3MSWOX-641xJysF.js} +1 -1
  55. package/dist/{number-overlay-editor-DBcnm0SY.js → number-overlay-editor-C7ffluCS.js} +3 -3
  56. package/dist/{objects-CzUgoMIF.js → objects-DCmMvZtn.js} +1 -3
  57. package/dist/{once-BtE-wKRL.js → once-eG8Vmvjd.js} +1 -1
  58. package/dist/{pegDiagram-XKGWAZYB-BqvywNJA.js → pegDiagram-XKGWAZYB-keVUAUeS.js} +2 -2
  59. package/dist/{pieDiagram-E7YTZNPT-BfxJ_XCc.js → pieDiagram-E7YTZNPT-DHktXPO_.js} +1 -1
  60. package/dist/precisionRound-DhAzeRcm.js +49 -0
  61. package/dist/{process-output-CKRXyszb.js → process-output-BJRJFobf.js} +4 -4
  62. package/dist/{quadrantDiagram-AXDQQJYC-Ccw0xMjN.js → quadrantDiagram-AXDQQJYC-Blrm7V7_.js} +1 -1
  63. package/dist/{railroadDiagram-O6MQD6OU-8vFLVTPu.js → railroadDiagram-O6MQD6OU-BVEF4OV_.js} +2 -2
  64. package/dist/{react-vega-BED0DjiB.js → react-vega-C4T9Rb_w.js} +12284 -12270
  65. package/dist/{requirementDiagram-BXWQKSXE-a_MxGvxe.js → requirementDiagram-BXWQKSXE-CWo-UAKV.js} +1 -1
  66. package/dist/{reveal-component-DTBSuGkC.js → reveal-component-Dfuz8zQ_.js} +19 -19
  67. package/dist/{select-BButFi-d.js → select-B0LRDH0g.js} +4 -4
  68. package/dist/{sequenceDiagram-WJ2MYXX4-CXFMnxGh.js → sequenceDiagram-WJ2MYXX4-CHQvLnq4.js} +1 -1
  69. package/dist/{spec-BwarBpUJ.js → spec-C-LRKGtT.js} +4 -4
  70. package/dist/{stateDiagram-D77RDMKH-DQeA_CwI.js → stateDiagram-D77RDMKH-BOJZgbUJ.js} +2 -2
  71. package/dist/{stateDiagram-v2-MP3YSRHH-BxxQucm1.js → stateDiagram-v2-MP3YSRHH-C53XXdYH.js} +2 -2
  72. package/dist/style.css +1 -1
  73. package/dist/{swimlanes-42K2YHIH-Do6L-cYg.js → swimlanes-42K2YHIH-D2o1gOtw.js} +1 -1
  74. package/dist/{swimlanesDiagram-VR7AAH4N-DUzPvSVU.js → swimlanesDiagram-VR7AAH4N-BHFzN1Wk.js} +2 -2
  75. package/dist/{swiper-component-DKntyn8p.js → swiper-component-DfhRvAFi.js} +2 -2
  76. package/dist/{time-BieKwdYS.js → time-BaMbJs4z.js} +18 -18
  77. package/dist/{timeline-definition-24CTP7MA-D3c46WM5.js → timeline-definition-24CTP7MA-rv7QUa46.js} +1 -1
  78. package/dist/{toDate-vIXljnsr.js → toDate-CjPuEPou.js} +21 -20
  79. package/dist/{toast-B9UMEi8u.js → toast-CFWpihJU.js} +4 -4
  80. package/dist/{tooltip-BO1REbqs.js → tooltip-CKO1pHJo.js} +2 -2
  81. package/dist/{use-restore-focus-BEM7sFWl.js → use-restore-focus-DBCITLeF.js} +1 -1
  82. package/dist/{useAsyncData-Deh5kszT.js → useAsyncData-ChgNtdmE.js} +15 -14
  83. package/dist/{useDateFormatter-D8XruNGG.js → useDateFormatter-c_yJtkAe.js} +2 -2
  84. package/dist/{useDeepCompareMemoize-DXwzRINI.js → useDeepCompareMemoize-Bet7kSsI.js} +1 -1
  85. package/dist/{useIframeCapabilities-DBETvvPl.js → useIframeCapabilities-BkdeVdXC.js} +1 -1
  86. package/dist/{useLifecycle-j7D9uD1o.js → useLifecycle-VVmz_24o.js} +3 -3
  87. package/dist/{useTheme-CRnjkku0.js → useTheme-DympCsQg.js} +5 -5
  88. package/dist/{vega-component-DTG6zxaY.js → vega-component-DnfQeoyt.js} +147 -147
  89. package/dist/{vega-embed-container-BNHE18G9.js → vega-embed-container--LYZqguO.js} +2 -2
  90. package/dist/{vega-loader.browser-DNST6uVf.js → vega-loader.browser-B9Pz0EGP.js} +298 -507
  91. package/dist/{vennDiagram-4TSXK5OY-BSZD8JcZ.js → vennDiagram-4TSXK5OY-D36Zk7t-.js} +1 -1
  92. package/dist/{wardleyDiagram-VM6X3IG4-48cUWkfA.js → wardleyDiagram-VM6X3IG4-BLBolvyQ.js} +1 -1
  93. package/dist/{xychartDiagram-S5SC5T6Z-CswYgYeu.js → xychartDiagram-S5SC5T6Z-CfH57l0v.js} +2 -2
  94. package/package.json +4 -4
  95. package/src/__tests__/host-imports.test.ts +1 -0
  96. package/src/components/app-config/ai-config.tsx +6 -2
  97. package/src/components/chat/__tests__/message-queue.test.tsx +17 -0
  98. package/src/components/chat/chat-panel.tsx +3 -7
  99. package/src/components/chat/chat-utils.ts +4 -8
  100. package/src/components/data-table/__tests__/context-menu-interaction.test.tsx +130 -0
  101. package/src/components/data-table/__tests__/date-popover.test.tsx +72 -0
  102. package/src/components/data-table/__tests__/export-actions.test.tsx +434 -6
  103. package/src/components/data-table/charts/charts.tsx +14 -19
  104. package/src/components/data-table/column-visibility-dropdown.tsx +8 -13
  105. package/src/components/data-table/columns.tsx +2 -1
  106. package/src/components/data-table/context-menu.tsx +36 -20
  107. package/src/components/data-table/date-popover.tsx +6 -4
  108. package/src/components/data-table/export-actions.tsx +267 -163
  109. package/src/components/data-table/row-viewer-panel/row-viewer.tsx +2 -2
  110. package/src/components/data-table/schemas.ts +14 -36
  111. package/src/components/editor/__tests__/dynamic-favicon.test.tsx +111 -18
  112. package/src/components/editor/actions/__tests__/pair-with-agent-modal.test.tsx +24 -0
  113. package/src/components/editor/actions/pair-with-agent-modal.tsx +18 -15
  114. package/src/components/editor/ai/add-cell-with-ai.tsx +3 -3
  115. package/src/components/editor/cell/CreateCellButton.tsx +8 -10
  116. package/src/components/editor/cell/__tests__/useShouldShowInterrupt.test.ts +39 -0
  117. package/src/components/editor/cell/code/__tests__/language-toggle.test.tsx +54 -0
  118. package/src/components/editor/cell/code/cell-editor.tsx +1 -1
  119. package/src/components/editor/cell/code/language-toggle.tsx +8 -7
  120. package/src/components/editor/cell/useShouldShowInterrupt.ts +2 -12
  121. package/src/components/editor/chrome/panels/__tests__/packages-panel.test.tsx +30 -1
  122. package/src/components/editor/chrome/panels/packages-panel.tsx +4 -7
  123. package/src/components/editor/chrome/wrapper/__tests__/attachment-status.test.tsx +12 -18
  124. package/src/components/editor/connections/components.tsx +1 -1
  125. package/src/components/editor/controls/__tests__/command-palette.test.tsx +53 -0
  126. package/src/components/editor/controls/command-palette.tsx +22 -10
  127. package/src/components/editor/dynamic-favicon.tsx +21 -40
  128. package/src/components/editor/errors/__tests__/send-error-report-button.test.tsx +12 -23
  129. package/src/components/editor/file-tree/__tests__/file-explorer-interactions.test.tsx +6 -0
  130. package/src/components/editor/file-tree/__tests__/use-file-search.test.tsx +91 -0
  131. package/src/components/editor/file-tree/file-explorer.tsx +10 -5
  132. package/src/components/editor/file-tree/file-viewer.tsx +4 -2
  133. package/src/components/editor/file-tree/use-file-search.ts +35 -21
  134. package/src/components/editor/output/MarimoTracebackOutput.tsx +1 -1
  135. package/src/components/editor/output/console/ConsoleOutput.tsx +8 -18
  136. package/src/components/icons/__tests__/large-spinner.test.tsx +39 -0
  137. package/src/components/icons/large-spinner.tsx +3 -14
  138. package/src/components/pages/home-page.tsx +4 -4
  139. package/src/components/slides/slide-cell-view.tsx +1 -1
  140. package/src/components/tracing/tracing.tsx +2 -2
  141. package/src/core/attachments/state.ts +5 -8
  142. package/src/core/cells/__tests__/notebook-outline.test.ts +113 -0
  143. package/src/core/cells/cells.ts +2 -1
  144. package/src/core/cells/pending-delete-service.ts +2 -6
  145. package/src/core/datasets/__tests__/data-source-discovery.test.ts +4 -4
  146. package/src/core/datasets/data-source-discovery.ts +4 -6
  147. package/src/core/edit-app.tsx +2 -2
  148. package/src/core/host/AGENTS.md +11 -2
  149. package/src/core/host/__tests__/attachments.test.ts +56 -0
  150. package/src/core/host/__tests__/document.test.ts +126 -0
  151. package/src/core/host/__tests__/events.test.ts +49 -0
  152. package/src/core/host/__tests__/fixtures.ts +41 -0
  153. package/src/core/host/__tests__/notebook-client.test.ts +496 -0
  154. package/src/core/host/connection.ts +81 -0
  155. package/src/core/host/events.ts +68 -0
  156. package/src/core/host/notebook-client.ts +316 -0
  157. package/src/core/host/resources/attachments.ts +19 -0
  158. package/src/core/host/resources/document.ts +101 -0
  159. package/src/core/hotkeys/actions.ts +2 -4
  160. package/src/core/islands/__tests__/bootstrap.test.ts +0 -26
  161. package/src/core/islands/bootstrap.ts +0 -1
  162. package/src/core/network/connection.ts +4 -2
  163. package/src/core/network/useConnectionNotice.ts +8 -2
  164. package/src/core/run-app.tsx +2 -2
  165. package/src/core/runtime/__tests__/runtime.test.ts +5 -12
  166. package/src/core/runtime/runtime.ts +5 -5
  167. package/src/core/static/files.ts +2 -0
  168. package/src/core/websocket/__tests__/{useMarimoKernelConnection.test.ts → connection-state.test.ts} +15 -17
  169. package/src/core/websocket/__tests__/{useWebSocket.test.ts → createConnectionTransport.test.ts} +1 -1
  170. package/src/core/websocket/__tests__/useNotebookClient.hook.test.tsx +149 -0
  171. package/src/core/websocket/__tests__/{useMarimoKernelConnection.hook.test.tsx → useNotebookSession.hook.test.tsx} +168 -253
  172. package/src/core/websocket/connection-state.ts +70 -0
  173. package/src/core/websocket/state.ts +7 -0
  174. package/src/core/websocket/transports/__tests__/sse.test.ts +18 -4
  175. package/src/core/websocket/transports/create.ts +31 -0
  176. package/src/core/websocket/transports/sse.ts +14 -2
  177. package/src/core/websocket/transports/transport.ts +12 -23
  178. package/src/core/websocket/types.ts +9 -39
  179. package/src/core/websocket/useNotebookClient.ts +78 -0
  180. package/src/core/websocket/{useMarimoKernelConnection.tsx → useNotebookSession.tsx} +53 -233
  181. package/src/hooks/__tests__/useAsyncData.test.tsx +148 -0
  182. package/src/hooks/__tests__/useDebounce.test.tsx +51 -0
  183. package/src/hooks/__tests__/useDeepCompareMemoize.test.tsx +39 -0
  184. package/src/hooks/__tests__/useDelayElapsed.test.tsx +28 -0
  185. package/src/hooks/__tests__/useInternalStateWithSync.test.tsx +20 -0
  186. package/src/hooks/__tests__/useScript.test.tsx +77 -0
  187. package/src/hooks/__tests__/useStateForKey.test.tsx +257 -0
  188. package/src/hooks/useAsyncData.ts +3 -3
  189. package/src/hooks/useDataSourceDiscovery.ts +6 -4
  190. package/src/hooks/useDebounce.ts +5 -8
  191. package/src/hooks/useDeepCompareMemoize.ts +1 -1
  192. package/src/hooks/useDelayElapsed.ts +14 -10
  193. package/src/hooks/useElapsedTime.ts +3 -3
  194. package/src/hooks/useInputHistory.ts +4 -7
  195. package/src/hooks/useInternalStateWithSync.ts +6 -6
  196. package/src/hooks/useResizeObserver.ts +4 -7
  197. package/src/hooks/useScript.ts +67 -70
  198. package/src/hooks/useStateForKey.ts +93 -0
  199. package/src/plugins/core/registerReactComponent.tsx +1 -1
  200. package/src/plugins/impl/DataTablePlugin.tsx +14 -15
  201. package/src/plugins/impl/DropdownPlugin.tsx +2 -6
  202. package/src/plugins/impl/FileBrowserPlugin.tsx +4 -16
  203. package/src/plugins/impl/FormPlugin.tsx +1 -1
  204. package/src/plugins/impl/SliderPlugin.tsx +6 -8
  205. package/src/plugins/impl/__tests__/DataTablePlugin.test.tsx +201 -1
  206. package/src/plugins/impl/__tests__/FileBrowserPlugin.test.tsx +45 -0
  207. package/src/plugins/impl/__tests__/SliderPlugin.test.tsx +24 -3
  208. package/src/plugins/impl/anywidget/__tests__/registry.test.ts +2 -0
  209. package/src/plugins/impl/anywidget/__tests__/widget-binding.test.ts +241 -2
  210. package/src/plugins/impl/anywidget/runtime.ts +21 -9
  211. package/src/plugins/impl/anywidget/widget-binding.ts +160 -82
  212. package/src/plugins/impl/chat/__tests__/chat-prompts.test.tsx +93 -0
  213. package/src/plugins/impl/chat/chat-ui.tsx +10 -9
  214. package/src/plugins/impl/code/any-language-editor.tsx +2 -2
  215. package/src/plugins/impl/data-editor/glide-data-editor.tsx +8 -5
  216. package/src/plugins/impl/data-editor/glide-utils.ts +3 -1
  217. package/src/plugins/impl/mpl-interactive/MplInteractivePlugin.tsx +5 -3
  218. package/src/plugins/impl/panel/PanelPlugin.tsx +15 -16
  219. package/src/plugins/impl/panel/__tests__/utils.test.ts +39 -1
  220. package/src/plugins/impl/panel/utils.ts +17 -0
  221. package/src/plugins/impl/vega/make-selectable.ts +3 -6
  222. package/src/stories/__tests__/editor-story.test.tsx +33 -0
  223. package/src/stories/editor.stories.tsx +24 -17
  224. package/src/utils/__tests__/arrays.test.ts +35 -0
  225. package/src/utils/__tests__/numbers.test.ts +48 -1
  226. package/src/utils/__tests__/objects.test.ts +21 -0
  227. package/src/utils/arrays.ts +10 -0
  228. package/src/utils/numbers.ts +28 -17
  229. package/src/utils/objects.ts +3 -7
  230. package/src/utils/once.ts +19 -19
  231. package/dist/any-language-editor-DZ_YTVus.js +0 -76
  232. package/dist/mermaid-HWGCJPDP-ByCsZnYF.js +0 -2
  233. package/dist/precisionRound-DMIVQrt2.js +0 -97
  234. package/src/core/host/__tests__/protocol.test.ts +0 -214
  235. package/src/core/host/protocol.ts +0 -1943
  236. package/src/core/websocket/useWebSocket.tsx +0 -88
@@ -3,7 +3,7 @@ import { t } from "./src-CA_m4ONl.js";
3
3
  import { n } from "./chunk-Y2CYZVJY-DKKS1VyV.js";
4
4
  import { $ as r, H as i, K as a, U as o, a as s, b as c, c as l, et as u, f as d, nt as f, tt as p, v as m, w as h, y as g } from "./chunk-DU6HZSFF-BwiyaNpg.js";
5
5
  import { t as _ } from "./rough.esm-CtV9AnV1.js";
6
- import { p as v } from "./mermaid-CHo49Yv-.js";
6
+ import { p as v } from "./mermaid-DKI0869I.js";
7
7
  //#region ../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/methods/transparentize.js
8
8
  var y = (e, t) => p(e, "a", -t), b = 1e-10;
9
9
  function x(e, t) {
@@ -2,7 +2,7 @@ import { i as e } from "./chunk-75Z2AOVW-D7gxIs2Q.js";
2
2
  import { n as t } from "./src-CA_m4ONl.js";
3
3
  import { n } from "./chunk-Y2CYZVJY-DKKS1VyV.js";
4
4
  import { D as r, H as i, K as a, U as o, a as s, b as c, c as l, v as u, w as d, x as f, y as p } from "./chunk-DU6HZSFF-BwiyaNpg.js";
5
- import { p as m } from "./mermaid-CHo49Yv-.js";
5
+ import { p as m } from "./mermaid-DKI0869I.js";
6
6
  import { n as h } from "./mermaid-parser.core-DxuSfYwJ.js";
7
7
  import { t as g } from "./chunk-JWPE2WC7-DJvv1t8U.js";
8
8
  //#region ../node_modules/.pnpm/mermaid@11.17.2/node_modules/mermaid/dist/chunks/mermaid.core/wardleyDiagram-VM6X3IG4.mjs
@@ -1,4 +1,4 @@
1
- import { t as e } from "./linear-Cnaq3Tfb.js";
1
+ import { t as e } from "./linear-DWERh7eI.js";
2
2
  import { n as t } from "./ordinal-c7efuCSS.js";
3
3
  import { t as n } from "./range-BAIvbVHp.js";
4
4
  import { q as r } from "./cubic-OaEBhQPK.js";
@@ -9,7 +9,7 @@ import { n as s } from "./chunk-Y2CYZVJY-DKKS1VyV.js";
9
9
  import { D as c, H as l, K as u, U as d, a as f, b as p, c as m, f as h, v as g, w as _, y as v, z as y } from "./chunk-DU6HZSFF-BwiyaNpg.js";
10
10
  import "./chunk-PWAF6VOD-CQw5qATZ.js";
11
11
  import { t as b } from "./chunk-GMAD6QVW-BhaJx0X3.js";
12
- import { p as x } from "./mermaid-CHo49Yv-.js";
12
+ import { p as x } from "./mermaid-DKI0869I.js";
13
13
  //#region ../node_modules/.pnpm/d3-scale@4.0.2/node_modules/d3-scale/src/band.js
14
14
  function S() {
15
15
  var e = t().unknown(void 0), r = e.domain, i = e.range, o = 0, s = 1, c, l, u = !1, d = 0, f = 0, p = .5;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marimo-team/islands",
3
- "version": "0.25.3-dev6",
3
+ "version": "0.25.3-dev61",
4
4
  "main": "dist/main.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",
@@ -57,6 +57,7 @@
57
57
  "@marimo-team/codemirror-mcp": "^0.1.7",
58
58
  "@marimo-team/codemirror-sql": "^0.3.0",
59
59
  "@marimo-team/llm-info": "workspace:*",
60
+ "@marimo-team/client": "workspace:*",
60
61
  "@marimo-team/marimo-api": "workspace:*",
61
62
  "@marimo-team/react-slotz": "^0.2.0",
62
63
  "@marimo-team/smart-cells": "workspace:*",
@@ -152,6 +153,7 @@
152
153
  "typescript-memoize": "^1.1.1",
153
154
  "use-acp": "0.2.6",
154
155
  "use-resize-observer": "^9.1.0",
156
+ "vega": "6.2.0",
155
157
  "vega-lite": "6.4.3",
156
158
  "vega-loader": "^5.1.3",
157
159
  "vega-parser": "^7.1.3",
@@ -184,8 +186,7 @@
184
186
  "storybook": "storybook dev -p 6006",
185
187
  "build-storybook": "storybook build",
186
188
  "sync-katex-css": "node --experimental-strip-types scripts/sync-katex-css.ts",
187
- "codegen": "node --experimental-strip-types scripts/generate-host-protocol.ts",
188
- "codegen:check": "node --experimental-strip-types scripts/generate-host-protocol.ts --check"
189
+ "doctor": "npx react-doctor@latest"
189
190
  },
190
191
  "peerDependencies": {
191
192
  "react": "^17 || ^18 || ^19",
@@ -214,7 +215,6 @@
214
215
  "jsdom": "^24.1.3",
215
216
  "msw": "^2.15.0",
216
217
  "npm-run-all2": "^6.2.6",
217
- "orval": "8.40.0",
218
218
  "oxc-transform-react": "0.145.0",
219
219
  "oxfmt": "^0.68.0",
220
220
  "oxlint": "^1.83.0",
@@ -19,6 +19,7 @@ it("enforces host dependencies for runtime and type imports", () => {
19
19
  "src/core/host/allowed.ts": `
20
20
  import { atom } from "jotai/vanilla";
21
21
  import { z } from "zod";
22
+ import * as Protocol from "@marimo-team/client/protocol";
22
23
  import { Logger } from "@/utils/Logger";
23
24
  import type { Document } from "./document";
24
25
  export * from "@/core/host/events";
@@ -48,6 +48,7 @@ import { DEFAULT_AI_MODEL, type UserConfig } from "@/core/config/config-schema";
48
48
  import { isWasm } from "@/core/wasm/utils";
49
49
  import { cn } from "@/utils/cn";
50
50
  import { Events } from "@/utils/events";
51
+ import { Objects } from "@/utils/objects";
51
52
  import { Strings } from "@/utils/strings";
52
53
  import { AIModelDropdown, getProviderLabel } from "../ai/ai-model-dropdown";
53
54
  import {
@@ -681,7 +682,10 @@ export const CustomProvidersConfig: React.FC<AiConfigProps> = ({
681
682
  };
682
683
 
683
684
  const removeProvider = (providerName: string) => {
684
- const { [providerName]: _, ...rest } = customProviders;
685
+ const rest = Objects.filter(
686
+ customProviders,
687
+ (_, name) => name !== providerName,
688
+ );
685
689
  // Reset to clear nested dirty state, then set new value
686
690
  form.resetField("ai.custom_providers");
687
691
  form.setValue("ai.custom_providers", rest, { shouldDirty: true });
@@ -1846,7 +1850,7 @@ export const AddModelForm: React.FC<{
1846
1850
  id={modelNameInputId}
1847
1851
  value={modelName}
1848
1852
  onChange={(e) => setModelName(e.target.value)}
1849
- placeholder="gpt-4"
1853
+ placeholder="gpt-5.6-sol"
1850
1854
  className="text-xs mb-0"
1851
1855
  />
1852
1856
  </div>
@@ -77,6 +77,23 @@ describe("useMessageQueue", () => {
77
77
  expect(result.current.messages).toEqual([]);
78
78
  });
79
79
 
80
+ it("preserves multiple enqueues and flushes before React renders", () => {
81
+ const { result } = renderHook(() => useMessageQueue());
82
+ const send = vi.fn();
83
+
84
+ act(() => {
85
+ result.current.enqueue([textPart("first")]);
86
+ result.current.enqueue([textPart("second")]);
87
+ result.current.flushNext(send);
88
+ result.current.flushNext(send);
89
+ });
90
+
91
+ expect(send).toHaveBeenNthCalledWith(1, [textPart("first")]);
92
+ expect(send).toHaveBeenNthCalledWith(2, [textPart("second")]);
93
+ expect(result.current.messages).toEqual([]);
94
+ expect(result.current.hasQueuedRef.current).toBe(false);
95
+ });
96
+
80
97
  it("flushNext on an empty queue is a no-op", () => {
81
98
  const { result } = renderHook(() => useMessageQueue());
82
99
  const send = vi.fn();
@@ -716,14 +716,10 @@ const ChatPanelBody = () => {
716
716
  );
717
717
 
718
718
  const isLoading = status === "submitted" || status === "streaming";
719
- // Read via a ref so the queue-vs-send decision stays correct even when it is
720
- // made after an `await` (e.g. resolving @-context), by which point the render
721
- // closure's `isLoading` may be stale.
722
- const isLoadingRef = useRef(isLoading);
723
- isLoadingRef.current = isLoading;
724
-
719
+ // useEvent reads the latest loading state, even when called after an await
720
+ // (e.g. resolving @-context) that outlives the original render's closure.
725
721
  const submitOrQueue = useEvent((parts: ChatMessagePart[]) => {
726
- if (isLoadingRef.current || hasQueuedRef.current) {
722
+ if (isLoading || hasQueuedRef.current) {
727
723
  enqueueUserMessage(parts);
728
724
  } else {
729
725
  sendUserMessage(parts);
@@ -294,16 +294,12 @@ export function useMessageQueue() {
294
294
  // invoked from a callback (e.g. `onFinish`) in the same tick as `enqueue`.
295
295
  const messagesRef = useRef<QueuedUserMessage[]>([]);
296
296
  const hasQueuedRef = useRef(false);
297
- messagesRef.current = messages;
298
- hasQueuedRef.current = messages.length > 0;
299
297
 
300
298
  const enqueue = useEvent((parts: ChatMessagePart[]) => {
301
- setMessages((prev) => {
302
- const next = [...prev, { id: generateUUID(), parts }];
303
- messagesRef.current = next;
304
- hasQueuedRef.current = true;
305
- return next;
306
- });
299
+ const next = [...messagesRef.current, { id: generateUUID(), parts }];
300
+ messagesRef.current = next;
301
+ hasQueuedRef.current = true;
302
+ setMessages(next);
307
303
  });
308
304
 
309
305
  const flushNext = useEvent((send: (parts: ChatMessagePart[]) => void) => {
@@ -0,0 +1,130 @@
1
+ /* Copyright 2026 Marimo. All rights reserved. */
2
+
3
+ import { type Cell, createTable, getCoreRowModel } from "@tanstack/react-table";
4
+ import { fireEvent, render, screen } from "@testing-library/react";
5
+ import { useRef } from "react";
6
+ import { expect, it, vi } from "vitest";
7
+ import { SetupMocks } from "@/__mocks__/common";
8
+ import { DataTableContextMenu } from "../context-menu";
9
+
10
+ SetupMocks.resizeObserver();
11
+
12
+ const rows = [{ value: "first" }, { value: "second" }];
13
+ const columns = [
14
+ { accessorKey: "value", meta: { filterType: "text" as const } },
15
+ ];
16
+
17
+ function createCells() {
18
+ const table = createTable({
19
+ data: rows,
20
+ columns,
21
+ locale: "en-US",
22
+ getCoreRowModel: getCoreRowModel(),
23
+ onColumnFiltersChange: () => undefined,
24
+ state: {},
25
+ onStateChange: () => undefined,
26
+ renderFallbackValue: null,
27
+ });
28
+ return table.getRowModel().rows.map((row) => row.getAllCells()[0]);
29
+ }
30
+
31
+ function Harness({ cells }: { cells: Cell<(typeof rows)[number], unknown>[] }) {
32
+ const contextMenuRef = useRef<Cell<(typeof rows)[number], unknown> | null>(
33
+ null,
34
+ );
35
+ const tableRef = useRef<HTMLTableSectionElement>(null);
36
+ const tableBody = (
37
+ <tbody ref={tableRef}>
38
+ <tr>
39
+ <td>empty</td>
40
+ </tr>
41
+ {cells.map((cell) => {
42
+ return (
43
+ <tr key={cell.id}>
44
+ <td
45
+ data-cell-id={cell.id}
46
+ onContextMenu={() => {
47
+ contextMenuRef.current = cell;
48
+ }}
49
+ >
50
+ {String(cell.getValue())}
51
+ </td>
52
+ </tr>
53
+ );
54
+ })}
55
+ </tbody>
56
+ );
57
+ return (
58
+ <table>
59
+ <DataTableContextMenu
60
+ contextMenuRef={contextMenuRef}
61
+ tableRef={tableRef}
62
+ tableBody={tableBody}
63
+ copyAllCells={() => undefined}
64
+ />
65
+ </table>
66
+ );
67
+ }
68
+
69
+ it("filters the latest right-clicked cell when the menu is already open", () => {
70
+ const onFilter = vi.fn();
71
+ const table = createTable({
72
+ data: rows,
73
+ columns,
74
+ locale: "en-US",
75
+ getCoreRowModel: getCoreRowModel(),
76
+ onColumnFiltersChange: onFilter,
77
+ state: {},
78
+ onStateChange: () => undefined,
79
+ renderFallbackValue: null,
80
+ });
81
+ render(
82
+ <Harness
83
+ cells={table.getRowModel().rows.map((row) => row.getAllCells()[0])}
84
+ />,
85
+ );
86
+
87
+ const firstCell = screen.getByText("first");
88
+ const secondCell = screen.getByText("second");
89
+ fireEvent.contextMenu(firstCell);
90
+ expect(firstCell).toHaveClass("bg-(--green-4)");
91
+ expect(
92
+ screen.getByRole("menuitem", { name: "Filter by this value" }),
93
+ ).toBeInTheDocument();
94
+ fireEvent.contextMenu(secondCell);
95
+ expect(firstCell).not.toHaveClass("bg-(--green-4)");
96
+ expect(secondCell).toHaveClass("bg-(--green-4)");
97
+ fireEvent.click(
98
+ screen.getByRole("menuitem", { name: "Filter by this value" }),
99
+ );
100
+ expect(firstCell).not.toHaveClass("bg-(--green-4)");
101
+ expect(secondCell).not.toHaveClass("bg-(--green-4)");
102
+
103
+ const update = onFilter.mock.calls.at(-1)?.[0];
104
+ expect(update([])).toEqual([
105
+ {
106
+ id: "value",
107
+ value: { type: "text", operator: "equals", text: "second" },
108
+ },
109
+ ]);
110
+ });
111
+
112
+ it("does not reuse a previous cell after the menu closes", () => {
113
+ render(<Harness cells={createCells()} />);
114
+
115
+ const firstCell = screen.getByText("first");
116
+ fireEvent.contextMenu(firstCell);
117
+ expect(firstCell).toHaveClass("bg-(--green-4)");
118
+ fireEvent.keyDown(document.activeElement ?? document.body, {
119
+ key: "Escape",
120
+ });
121
+ expect(firstCell).not.toHaveClass("bg-(--green-4)");
122
+ expect(screen.queryByRole("menu")).not.toBeInTheDocument();
123
+
124
+ // Right-clicking outside any data cell must not resurrect the old one
125
+ fireEvent.contextMenu(screen.getByText("empty"));
126
+ expect(firstCell).not.toHaveClass("bg-(--green-4)");
127
+ expect(
128
+ screen.queryByRole("menuitem", { name: "Filter by this value" }),
129
+ ).not.toBeInTheDocument();
130
+ });
@@ -0,0 +1,72 @@
1
+ /* Copyright 2026 Marimo. All rights reserved. */
2
+ import { render, screen } from "@testing-library/react";
3
+ import type { ReactNode } from "react";
4
+ import { I18nProvider } from "react-aria";
5
+ import { afterEach, describe, expect, it, vi } from "vitest";
6
+ import { DatePopover } from "../date-popover";
7
+
8
+ vi.mock("@/components/ui/tooltip", () => ({
9
+ Tooltip: ({ content }: { content: ReactNode }) => content,
10
+ }));
11
+
12
+ afterEach(() => {
13
+ vi.restoreAllMocks();
14
+ });
15
+
16
+ describe("DatePopover", () => {
17
+ it.each([0, 123])(
18
+ "updates the local timezone and time on rerender with %i milliseconds",
19
+ (milliseconds) => {
20
+ const NativeDateTimeFormat = Intl.DateTimeFormat;
21
+ let systemTimezone = "America/Los_Angeles";
22
+ vi.spyOn(Intl, "DateTimeFormat").mockImplementation(
23
+ function (locales, options) {
24
+ return new NativeDateTimeFormat(locales, {
25
+ ...options,
26
+ timeZone: options?.timeZone ?? systemTimezone,
27
+ });
28
+ },
29
+ );
30
+
31
+ const date = new Date("2026-01-15T12:00:00Z");
32
+ date.setUTCMilliseconds(milliseconds);
33
+ const content = () => (
34
+ <I18nProvider locale="en-US">
35
+ <DatePopover date={date} type="datetime">
36
+ timestamp
37
+ </DatePopover>
38
+ </I18nProvider>
39
+ );
40
+ const { rerender } = render(content());
41
+ const previousTime =
42
+ screen.getByText(systemTimezone).nextElementSibling?.textContent;
43
+ const utcTime = screen.getByText("UTC").nextElementSibling?.textContent;
44
+
45
+ systemTimezone = "Asia/Tokyo";
46
+ rerender(content());
47
+
48
+ const expected = new NativeDateTimeFormat("en-US", {
49
+ timeZone: systemTimezone,
50
+ ...(milliseconds
51
+ ? {
52
+ year: "numeric",
53
+ month: "2-digit",
54
+ day: "2-digit",
55
+ hour: "2-digit",
56
+ minute: "2-digit",
57
+ second: "2-digit",
58
+ fractionalSecondDigits: 3,
59
+ }
60
+ : { dateStyle: "long", timeStyle: "medium" }),
61
+ }).format(date);
62
+ expect(screen.queryByText("America/Los_Angeles")).toBeNull();
63
+ expect(
64
+ screen.getByText(systemTimezone).nextElementSibling?.textContent,
65
+ ).toBe(expected);
66
+ expect(expected).not.toBe(previousTime);
67
+ expect(screen.getByText("UTC").nextElementSibling?.textContent).toBe(
68
+ utcTime,
69
+ );
70
+ },
71
+ );
72
+ });