@marimo-team/frontend 0.23.16-dev9 → 0.23.17-dev0

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 (706) hide show
  1. package/dist/assets/{CellStatus-BwCqFeIT.js → CellStatus-BYH-DZdr.js} +1 -1
  2. package/dist/assets/{ConnectedDataExplorerComponent-CMaZapRd.js → ConnectedDataExplorerComponent-C4zEgCZh.js} +1 -1
  3. package/dist/assets/JsonOutput-D2UI9WX5.js +53 -0
  4. package/dist/assets/LazyAnyLanguageCodeMirror-A-Ant1Ad.js +2 -0
  5. package/dist/assets/{MarimoErrorOutput-2CXbNUBb.js → MarimoErrorOutput-Cu5WMawt.js} +4 -4
  6. package/dist/assets/RenderHTML-C1rWkDWe.js +1 -0
  7. package/dist/assets/{RunButton-DLoWn_Jd.js → RunButton-BO02PdVH.js} +1 -1
  8. package/dist/assets/__vite-browser-external-mTzvI0UM.js +1 -0
  9. package/dist/assets/{add-cell-with-ai-C1L7x0xr.js → add-cell-with-ai-PVABTCGt.js} +35 -35
  10. package/dist/assets/add-connection-dialog-GskQAyZw.js +178 -0
  11. package/dist/assets/{agent-panel-D3_CUvz_.js → agent-panel-BitNk-Gl.js} +5 -5
  12. package/dist/assets/ai-model-dropdown-DzobPTdx.js +5 -0
  13. package/dist/assets/{any-language-editor--tRHs8C_.js → any-language-editor-BIeaxtdD.js} +1 -1
  14. package/dist/assets/apl-BnIcQcjL.js +1 -0
  15. package/dist/assets/app-config-button-D_JaIWhO.js +1 -0
  16. package/dist/assets/{arc-CfUZAQDm.js → arc-DPwkj0YX.js} +1 -1
  17. package/dist/assets/{architecture-7HQA4BMR-Bvqj37EA.js → architecture-7HQA4BMR-CzgzqOCD.js} +1 -1
  18. package/dist/assets/{architectureDiagram-VXUJARFQ-sx_yisiZ.js → architectureDiagram-VXUJARFQ-BMZxefa_.js} +1 -1
  19. package/dist/assets/arrow-left-pVgT2h-8.js +1 -0
  20. package/dist/assets/asciiarmor-VNkYxCrW.js +1 -0
  21. package/dist/assets/asn1-DHaiamxN.js +1 -0
  22. package/dist/assets/blob-BNTWOaI9.js +1 -0
  23. package/dist/assets/{blockDiagram-VD42YOAC-KexI-fgH.js → blockDiagram-VD42YOAC-O9sd6I0b.js} +1 -1
  24. package/dist/assets/brainfuck-B7OQ4qXM.js +1 -0
  25. package/dist/assets/{c4Diagram-YG6GDRKO-d8NrlxRF.js → c4Diagram-YG6GDRKO-CJ4NJdbh.js} +1 -1
  26. package/dist/assets/{cache-panel-DcQUeUpg.js → cache-panel-B2B1ePao.js} +1 -1
  27. package/dist/assets/cell-editor-BuU4BDSk.js +27 -0
  28. package/dist/assets/cell-link-CWQ4BYr-.js +1 -0
  29. package/dist/assets/cells-CJLUCcQg.js +235 -0
  30. package/dist/assets/channel-DELDOomM.js +1 -0
  31. package/dist/assets/{chat-display-DomMe89U.js → chat-display-CfiA-GdA.js} +1 -1
  32. package/dist/assets/{chat-panel-DzLbxcWT.js → chat-panel-DghO5Y6C.js} +3 -3
  33. package/dist/assets/{chat-ui-BpWZ6JeY.js → chat-ui-CNXmMUI1.js} +1 -1
  34. package/dist/assets/{chunk-4BX2VUAB-fhh1HlXH.js → chunk-4BX2VUAB-BCgdxLTg.js} +1 -1
  35. package/dist/assets/chunk-55IACEB6-DnPXlz-P.js +1 -0
  36. package/dist/assets/{chunk-5FQGJX7Z-Cp0LZT-a.js → chunk-5FQGJX7Z-CYQpNADu.js} +2 -2
  37. package/dist/assets/{chunk-ABZYJK2D-BtK4zInQ.js → chunk-ABZYJK2D-M8yn2N69.js} +3 -3
  38. package/dist/assets/{chunk-ATLVNIR6-YZDenslF.js → chunk-ATLVNIR6-CY4Q_7DV.js} +1 -1
  39. package/dist/assets/{chunk-B4BG7PRW-DYIZwDbt.js → chunk-B4BG7PRW-0izjR6gH.js} +1 -1
  40. package/dist/assets/{chunk-CVBHYZKI-CIyHeK0Q.js → chunk-CVBHYZKI-Dtb0_R-R.js} +1 -1
  41. package/dist/assets/{chunk-DI55MBZ5-TodwBGEN.js → chunk-DI55MBZ5-CeYy94Hv.js} +1 -1
  42. package/dist/assets/{chunk-EXTU4WIE-C76bF1UD.js → chunk-EXTU4WIE-CZBftw0u.js} +1 -1
  43. package/dist/assets/{chunk-FMBD7UC4-Yq65IDPA.js → chunk-FMBD7UC4-BTonlpoo.js} +1 -1
  44. package/dist/assets/{chunk-HN2XXSSU-CcbN4n6W.js → chunk-HN2XXSSU-Bqib0VeJ.js} +1 -1
  45. package/dist/assets/{chunk-JA3XYJ7Z-CPXEu7AX.js → chunk-JA3XYJ7Z-CMnBpyzd.js} +1 -1
  46. package/dist/assets/{chunk-JZLCHNYA-D8q1z6Py.js → chunk-JZLCHNYA-BWjnV_v7.js} +1 -1
  47. package/dist/assets/{chunk-MI3HLSF2-bmomnexd.js → chunk-MI3HLSF2-CA3zpyGZ.js} +1 -1
  48. package/dist/assets/{chunk-N4CR4FBY-BhsjB2qn.js → chunk-N4CR4FBY-CZmndviH.js} +2 -2
  49. package/dist/assets/{chunk-QN33PNHL-ngvPqyQ0.js → chunk-QN33PNHL-B5rSVblq.js} +1 -1
  50. package/dist/assets/{chunk-QXUST7PY-C4c0Sjmn.js → chunk-QXUST7PY-Cz8b__fX.js} +1 -1
  51. package/dist/assets/{chunk-QZHKN3VN-CkbwBDOS.js → chunk-QZHKN3VN-B7nq9C0W.js} +1 -1
  52. package/dist/assets/{chunk-S3R3BYOJ-Bt2NnquF.js → chunk-S3R3BYOJ-CUGnLh1o.js} +1 -1
  53. package/dist/assets/{chunk-TZMSLE5B-Dysko1OC.js → chunk-TZMSLE5B-CXQovw1I.js} +1 -1
  54. package/dist/assets/classDiagram-2ON5EDUG-B3IKXY7k.js +1 -0
  55. package/dist/assets/classDiagram-v2-WZHVMYZB-C0Db1CRa.js +1 -0
  56. package/dist/assets/{clike-DKPr2D1_.js → clike-CcPLlJ3-.js} +1 -1
  57. package/dist/assets/clojure-DK3HqqeG.js +1 -0
  58. package/dist/assets/cmake-Bnhxe81D.js +1 -0
  59. package/dist/assets/cobol-ISPch7J4.js +1 -0
  60. package/dist/assets/{code-block-37QAKDTI-DlENujeV.js → code-block-37QAKDTI-21cPxSHu.js} +1 -1
  61. package/dist/assets/coffeescript-B3cS2ooz.js +1 -0
  62. package/dist/assets/{column-preview-D5Btj8aG.js → column-preview-DREOGG_c.js} +1 -1
  63. package/dist/assets/{command-palette-CNp7T2c5.js → command-palette-C95r8rOd.js} +1 -1
  64. package/dist/assets/{common-BrPgvCtD.js → common-DCWeeUhr.js} +1 -1
  65. package/dist/assets/commonlisp-DH0yllOU.js +1 -0
  66. package/dist/assets/components-BGqqoLEG.js +1 -0
  67. package/dist/assets/components-K_Mi0vdC.js +1 -0
  68. package/dist/assets/config-B-Q7J_6d.js +1 -0
  69. package/dist/assets/{cose-bilkent-S5V4N54A-BlMw4-M9.js → cose-bilkent-S5V4N54A-DK9gIUQX.js} +1 -1
  70. package/dist/assets/crystal-CfSxbewa.js +1 -0
  71. package/dist/assets/{css-DsUcFZz8.js → css-IVPzYP6l.js} +1 -1
  72. package/dist/assets/cypher-DqUctVOg.js +1 -0
  73. package/dist/assets/d-DYRkEHFy.js +1 -0
  74. package/dist/assets/{dagre-6UL2VRFP-kJ4x17JK.js → dagre-6UL2VRFP-DQFoIrK8.js} +1 -1
  75. package/dist/assets/{data-grid-overlay-editor-DbobQcVo.js → data-grid-overlay-editor-CVM5ufb4.js} +1 -1
  76. package/dist/assets/{datasource-wn1PTlXA.js → datasource-DbljozeY.js} +2 -2
  77. package/dist/assets/{dependency-graph-panel-B8Q8RQNh.js → dependency-graph-panel-Bg9bLMXq.js} +4 -4
  78. package/dist/assets/{diagram-PSM6KHXK-d-5aQNHk.js → diagram-PSM6KHXK-DIXxW5au.js} +1 -1
  79. package/dist/assets/{diagram-QEK2KX5R-CO-PXq75.js → diagram-QEK2KX5R-B8KoKZCY.js} +1 -1
  80. package/dist/assets/{diagram-S2PKOQOG-Dv7pcvYC.js → diagram-S2PKOQOG-D0bjlYXx.js} +1 -1
  81. package/dist/assets/diff-Cd5HBT58.js +1 -0
  82. package/dist/assets/dist-B99-E4qp.js +1 -0
  83. package/dist/assets/{dist-BsphJPAV.js → dist-BiwuSVkx.js} +1 -1
  84. package/dist/assets/{dist-CECF_J8y.js → dist-BrZjJXDA.js} +1 -1
  85. package/dist/assets/{dist-Du-wcJyR.js → dist-By4rFZwg.js} +1 -1
  86. package/dist/assets/dist-CaZf6AoY.js +1 -0
  87. package/dist/assets/{dist-BMOD2Pyh.js → dist-Cgoy5550.js} +1 -1
  88. package/dist/assets/{dist-6c4zOh78.js → dist-D6WgndTj.js} +1 -1
  89. package/dist/assets/dist-DcXy-1eJ.js +1 -0
  90. package/dist/assets/{dist-0QUuSoRx.js → dist-DtbtRAqz.js} +1 -1
  91. package/dist/assets/dist-I3qeQWuP.js +1 -0
  92. package/dist/assets/{dist-sPfKr-vH.js → dist-aeKlrIMv.js} +1 -1
  93. package/dist/assets/{dist-CDUl-YL4.js → dist-gDi2I7IJ.js} +1 -1
  94. package/dist/assets/{dist-CRrIf3gB.js → dist-miDa4-cz.js} +1 -1
  95. package/dist/assets/{dist-R1kU4nzJ.js → dist-nDEBxpL6.js} +1 -1
  96. package/dist/assets/{dist-DQNaXfK1.js → dist-oUL4XFdB.js} +1 -1
  97. package/dist/assets/{dockerfile-C2PznFWk.js → dockerfile-CLtE40Sb.js} +1 -1
  98. package/dist/assets/{documentation-panel-hFyikugH.js → documentation-panel-BhtY-lKF.js} +1 -1
  99. package/dist/assets/download-DwYUg-o4.js +9 -0
  100. package/dist/assets/dtd-C24SyIVW.js +1 -0
  101. package/dist/assets/dylan-CrkzDmc1.js +1 -0
  102. package/dist/assets/ecl-DSuYw2WY.js +1 -0
  103. package/dist/assets/{edit-page-jUsez4HZ.js → edit-page-D_hRRfNq.js} +6 -6
  104. package/dist/assets/eiffel-D60uMU52.js +1 -0
  105. package/dist/assets/elm-pYZdVh3P.js +1 -0
  106. package/dist/assets/{erDiagram-Q2GNP2WA-BQ8HfnRu.js → erDiagram-Q2GNP2WA-D7EuT99Y.js} +1 -1
  107. package/dist/assets/erlang-D9MlcoAb.js +1 -0
  108. package/dist/assets/error-entries-4LYRQSOP.js +8 -0
  109. package/dist/assets/{error-panel-DAseRhAS.js → error-panel-FG7tsVQ_.js} +1 -1
  110. package/dist/assets/{esm-Cmv0Nuxi.js → esm-BDGraAqp.js} +1 -1
  111. package/dist/assets/factor-gTHEdNEJ.js +1 -0
  112. package/dist/assets/{factor-DMrXrOH8.js → factor-xSp9WnN7.js} +1 -1
  113. package/dist/assets/file-explorer-panel-CpUlOt1N.js +26 -0
  114. package/dist/assets/{file-icons-Chripuk-.js → file-icons-CODNoWOy.js} +1 -1
  115. package/dist/assets/{file-name-input-B1NJd3KY.js → file-name-input-DyvZhLvk.js} +1 -1
  116. package/dist/assets/{fileToBase64-C2Yy-YXq.js → fileToBase64-hLJmVjNJ.js} +1 -1
  117. package/dist/assets/floating-outline-DBlzcHYf.js +1 -0
  118. package/dist/assets/{flowDiagram-NV44I4VS-xBOzhlfg.js → flowDiagram-NV44I4VS-Bz3PhSZq.js} +1 -1
  119. package/dist/assets/focus-B6HBbAwF.js +1 -0
  120. package/dist/assets/form-BYlqbYKI.js +2 -0
  121. package/dist/assets/form-W6ZZMHnc.js +1 -0
  122. package/dist/assets/forth-CWZXTLFs.js +1 -0
  123. package/dist/assets/fortran-B8kNpt8O.js +1 -0
  124. package/dist/assets/{gallery-page-CJ3ms1Hn.js → gallery-page-DbuxknAw.js} +1 -1
  125. package/dist/assets/{ganttDiagram-JELNMOA3-D2O_k-Zg.js → ganttDiagram-JELNMOA3-DaS60lKW.js} +1 -1
  126. package/dist/assets/gas-DxuMSeqj.js +1 -0
  127. package/dist/assets/gherkin-ZkKEDs6K.js +1 -0
  128. package/dist/assets/{gitGraph-G5XIXVHT-8HJwNcdU.js → gitGraph-G5XIXVHT-Cd5ecvAE.js} +1 -1
  129. package/dist/assets/{gitGraphDiagram-V2S2FVAM-Nk4Ll9GY.js → gitGraphDiagram-V2S2FVAM-D7jUmjBw.js} +1 -1
  130. package/dist/assets/{glide-data-editor-j2igs9Y_.js → glide-data-editor-CejKKgnN.js} +4 -4
  131. package/dist/assets/globe-Dwo3iXzC.js +1 -0
  132. package/dist/assets/groovy-CqQZm41C.js +1 -0
  133. package/dist/assets/haskell-DWF-arrK.js +1 -0
  134. package/dist/assets/haxe-LmdIWMMr.js +1 -0
  135. package/dist/assets/home-page-DYaHMq8Q.js +4 -0
  136. package/dist/assets/{html-to-image-B-nAUvDC.js → html-to-image-CN9yTa5s.js} +2 -2
  137. package/dist/assets/idl-DEd51qv-.js +1 -0
  138. package/dist/assets/index-8Nlyq3mV.css +2 -0
  139. package/dist/assets/index-Gv23EHlE.js +38 -0
  140. package/dist/assets/{info-VBDWY6EO-rfe3WPvd.js → info-VBDWY6EO-BTT52JaO.js} +1 -1
  141. package/dist/assets/infoDiagram-HS3SLOUP-GkG80Qxa.js +2 -0
  142. package/dist/assets/javascript-BFIOGZ-j.js +1 -0
  143. package/dist/assets/{journeyDiagram-XKPGCS4Q-D61FGivn.js → journeyDiagram-XKPGCS4Q-DwL-PxSb.js} +1 -1
  144. package/dist/assets/julia-Chs3F4Sv.js +1 -0
  145. package/dist/assets/{kanban-definition-3W4ZIXB7-Bnv0X0Tu.js → kanban-definition-3W4ZIXB7-DiBaV6eK.js} +1 -1
  146. package/dist/assets/katex-12J11HuB.js +1 -0
  147. package/dist/assets/kiosk-mode-Di-gTPu2.js +1 -0
  148. package/dist/assets/{layout-1Z2AhO6k.js → layout-B6D_84rz.js} +5 -5
  149. package/dist/assets/{line-DNm2phYo.js → line-BDmwHhfs.js} +1 -1
  150. package/dist/assets/{linear-CTQqNbVX.js → linear-BPv4krGt.js} +1 -1
  151. package/dist/assets/livescript-CZOCkk31.js +1 -0
  152. package/dist/assets/logs-panel-V4PsZD48.js +1 -0
  153. package/dist/assets/{loro_wasm_bg-Duqr-kJ2.js → loro_wasm_bg-CjrUicyy.js} +1 -1
  154. package/dist/assets/lua-DK4FKJLN.js +1 -0
  155. package/dist/assets/{markdown-renderer-Cs1sISb9.js → markdown-renderer-CzJx-MnJ.js} +3 -3
  156. package/dist/assets/mathematica-BoEJU8On.js +1 -0
  157. package/dist/assets/mbox-1WJcoGln.js +1 -0
  158. package/dist/assets/{mermaid-4DMBBIKO-CDGmT6YQ.js → mermaid-4DMBBIKO-3ntkrgCA.js} +1 -1
  159. package/dist/assets/{mermaid-CYN0wOyG.js → mermaid-B8gNHyGy.js} +3 -3
  160. package/dist/assets/{mermaid-parser.core-Dz2GMGqQ.js → mermaid-parser.core-Ddjs6Jmy.js} +2 -2
  161. package/dist/assets/{mhchem-CIWniJp4.js → mhchem-Cnt1CrAX.js} +1 -1
  162. package/dist/assets/{mindmap-definition-VGOIOE7T-C-YaKmEU.js → mindmap-definition-VGOIOE7T-DKJd1wuU.js} +1 -1
  163. package/dist/assets/mirc-OXxqihhx.js +1 -0
  164. package/dist/assets/mllike-fFPa49Ft.js +1 -0
  165. package/dist/assets/modelica-B2hOO40U.js +1 -0
  166. package/dist/assets/mscgen-BUm8DSPh.js +1 -0
  167. package/dist/assets/mumps-BUUE1QKi.js +1 -0
  168. package/dist/assets/{name-cell-input-2sM8a_OS.js → name-cell-input-Bq1sljc2.js} +1 -1
  169. package/dist/assets/node-sql-parser-CAudyJSw.js +68 -0
  170. package/dist/assets/nsis-CQPY661e.js +1 -0
  171. package/dist/assets/{nsis-Ccvd1gbp.js → nsis-SCfsPq8M.js} +1 -1
  172. package/dist/assets/ntriples-CtWbsB7O.js +1 -0
  173. package/dist/assets/{number-overlay-editor-BQ9P6yP7.js → number-overlay-editor-KHf1PkHr.js} +1 -1
  174. package/dist/assets/octave-D4HWE405.js +1 -0
  175. package/dist/assets/{ordinal-DyTNGK17.js → ordinal-BSXHDD5k.js} +1 -1
  176. package/dist/assets/{outline-panel-BXWCkGu_.js → outline-panel-Tn3DVuNl.js} +1 -1
  177. package/dist/assets/oz-Cp-6fXH5.js +1 -0
  178. package/dist/assets/{packages-panel-CJfHGfax.js → packages-panel-er2ghj4m.js} +1 -1
  179. package/dist/assets/{packet-DYOGHKS2-DTVloLa7.js → packet-DYOGHKS2-pYSTMj1G.js} +1 -1
  180. package/dist/assets/pair-with-agent-modal-CVYH-Guh.js +4 -0
  181. package/dist/assets/panel-accordion-state-DN1hLusu.js +1 -0
  182. package/dist/assets/panels-oc6cK0j0.js +4 -0
  183. package/dist/assets/pascal-B2F20-Dq.js +1 -0
  184. package/dist/assets/perl-C8I4my72.js +1 -0
  185. package/dist/assets/{pie-VRWISCQL-Bmght6JF.js → pie-VRWISCQL-BtGe15Zk.js} +1 -1
  186. package/dist/assets/{pieDiagram-ADFJNKIX-DlFYL0BN.js → pieDiagram-ADFJNKIX-BdWIv6Xr.js} +1 -1
  187. package/dist/assets/pig-Dg7z9udE.js +1 -0
  188. package/dist/assets/powershell-BjupwEXi.js +1 -0
  189. package/dist/assets/process-output-DXnqTuGm.js +1 -0
  190. package/dist/assets/properties-CWyPUxmr.js +1 -0
  191. package/dist/assets/protobuf-B2dHC-BL.js +1 -0
  192. package/dist/assets/pug-B-MnYZUt.js +1 -0
  193. package/dist/assets/{pug-BtXi5KiX.js → pug-D81S7inS.js} +1 -1
  194. package/dist/assets/puppet-CeBQQ4Li.js +1 -0
  195. package/dist/assets/python-DgHNYu_r.js +1 -0
  196. package/dist/assets/q-wSguJrTU.js +1 -0
  197. package/dist/assets/{quadrantDiagram-AYHSOK5B-BpJug2BH.js → quadrantDiagram-AYHSOK5B-DJuGB95-.js} +1 -1
  198. package/dist/assets/r-BoIJ2Zve.js +1 -0
  199. package/dist/assets/{radar-ZZBFDIW7-CYwWzRgW.js → radar-ZZBFDIW7-DyFu57RV.js} +1 -1
  200. package/dist/assets/{radio-group-PT0_zVHo.js → radio-group-CcU5wNVj.js} +1 -1
  201. package/dist/assets/{react-vega-TNCk_eWj.js → react-vega-BLc5RhC7.js} +1 -1
  202. package/dist/assets/{readonly-code-display-CFbCSGms.js → readonly-code-display-DoQFa0ET.js} +1 -1
  203. package/dist/assets/{readonly-python-code-DB23yd7T.js → readonly-python-code-CYfbPYQ0.js} +1 -1
  204. package/dist/assets/{requirementDiagram-UZGBJVZJ-Bd-1eny8.js → requirementDiagram-UZGBJVZJ-aWGJtWy2.js} +1 -1
  205. package/dist/assets/{reveal-component-fwTDxf5N.js → reveal-component-CZgRCMe1.js} +42 -42
  206. package/dist/assets/rpm-DmyUNIkv.js +1 -0
  207. package/dist/assets/{ecl-B6UC4tME.js → ruby-Djlw6kjU.js} +1 -1
  208. package/dist/assets/run-page-Dxm4ltqq.js +1 -0
  209. package/dist/assets/{sankeyDiagram-TZEHDZUN-CDWAE6GV.js → sankeyDiagram-TZEHDZUN-nJIZ3_NQ.js} +1 -1
  210. package/dist/assets/sas-B8AwxLVS.js +1 -0
  211. package/dist/assets/scheme-o4lPnt7c.js +1 -0
  212. package/dist/assets/{scratchpad-panel-BLC2oQ_3.js → scratchpad-panel-pQP0zGxD.js} +1 -1
  213. package/dist/assets/{secrets-panel-6J6wcuVR.js → secrets-panel-Cz17_MLf.js} +1 -1
  214. package/dist/assets/{sequenceDiagram-WL72ISMW-B6hjDGBF.js → sequenceDiagram-WL72ISMW-Bvkxl3m4.js} +1 -1
  215. package/dist/assets/session-panel-C-y42nqB.js +1 -0
  216. package/dist/assets/shell-DJuOhLmg.js +1 -0
  217. package/dist/assets/sieve-BBDbJOX3.js +1 -0
  218. package/dist/assets/{skeleton-xuR254Kw.js → skeleton-Bd78PcP9.js} +1 -1
  219. package/dist/assets/slides-DkEgzTJB.css +1 -0
  220. package/dist/assets/smalltalk-CmTnbqu4.js +1 -0
  221. package/dist/assets/{snippets-panel-DwAjNUqR.js → snippets-panel-BRtH_9R3.js} +1 -1
  222. package/dist/assets/sparql-BQuPdHqO.js +1 -0
  223. package/dist/assets/{src-CIOdyciO.js → src-xYaLe_3f.js} +1 -1
  224. package/dist/assets/state-C4kiwedg.js +1 -0
  225. package/dist/assets/state-CsGOoEZv.js +3 -0
  226. package/dist/assets/{state-Tc7pRohh.js → state-Rxc-B11B.js} +1 -1
  227. package/dist/assets/{stateDiagram-FKZM4ZOC-Bzv6j99z.js → stateDiagram-FKZM4ZOC-CVF8M4di.js} +1 -1
  228. package/dist/assets/stateDiagram-v2-4FDKWEC3-Dj-G9wuu.js +1 -0
  229. package/dist/assets/{step-CDlhJj9-.js → step-DkIPWA0m.js} +1 -1
  230. package/dist/assets/stylus-DrNz1BCZ.js +1 -0
  231. package/dist/assets/swift-UQ24LctC.js +1 -0
  232. package/dist/assets/switch-OVajJBPR.js +1 -0
  233. package/dist/assets/tcl-BBEwSttz.js +1 -0
  234. package/dist/assets/{terminal-DaLxAnKx.js → terminal-Cdd3rO1L.js} +1 -1
  235. package/dist/assets/textarea-DtCcemo9.js +1 -0
  236. package/dist/assets/textile-CYG_qV_5.js +1 -0
  237. package/dist/assets/{time-BuRlxEhE.js → time-p47i6wvp.js} +1 -1
  238. package/dist/assets/{timeline-definition-IT6M3QCI-DXwdU1og.js → timeline-definition-IT6M3QCI-D1XRbH5P.js} +1 -1
  239. package/dist/assets/toml-DB6lKkvi.js +1 -0
  240. package/dist/assets/{tracing-BmBBYynL.js → tracing-CdeezhIN.js} +1 -1
  241. package/dist/assets/{tracing-panel-AReiFUol.js → tracing-panel-Dl3MlGyG.js} +2 -2
  242. package/dist/assets/{tree-actions-Bz3fJ7p-.js → tree-actions-BiQ4VzX-.js} +1 -1
  243. package/dist/assets/{treemap-GDKQZRPO-4Cm6HMmj.js → treemap-GDKQZRPO-Z4m-KHQY.js} +1 -1
  244. package/dist/assets/troff-WrtaE-DW.js +1 -0
  245. package/dist/assets/ttcn-DNOLsGjD.js +1 -0
  246. package/dist/assets/ttcn-cfg-D2oRz-8W.js +1 -0
  247. package/dist/assets/turtle-hoYUNcbl.js +1 -0
  248. package/dist/assets/{useBoolean-CA7K8rap.js → useBoolean-CFj86iac.js} +1 -1
  249. package/dist/assets/useCellActionButton-B5wkKtv1.js +1 -0
  250. package/dist/assets/{useDeleteCell-DQP-NBq2.js → useDeleteCell-BfKWOHfk.js} +1 -1
  251. package/dist/assets/{useDependencyPanelTab-BrkWlCTP.js → useDependencyPanelTab-BTipqN67.js} +1 -1
  252. package/dist/assets/useNotebookActions-CCwjICU_.js +12 -0
  253. package/dist/assets/useRunCells-DZ4glj3f.js +1 -0
  254. package/dist/assets/{useSplitCell-jH70A2Sz.js → useSplitCell-DXzfZTCe.js} +1 -1
  255. package/dist/assets/vb-CSArj0Ox.js +1 -0
  256. package/dist/assets/vbscript-Cy_b6RxB.js +1 -0
  257. package/dist/assets/{vega-component-DSvWLXIy.js → vega-component-VDedA5Cd.js} +1 -1
  258. package/dist/assets/{vega-embed-container-hDAVOOba.js → vega-embed-container-DxSqUOCK.js} +1 -1
  259. package/dist/assets/velocity-8fvVYgdA.js +1 -0
  260. package/dist/assets/verilog-BPXnWs06.js +1 -0
  261. package/dist/assets/vhdl-C4JSE7Sd.js +1 -0
  262. package/dist/assets/webidl-uP8WR81M.js +1 -0
  263. package/dist/assets/{worker-BQo2bijx.js → worker-BM73L67p.js} +3 -6
  264. package/dist/assets/write-secret-modal-Dtm66yVf.js +2 -0
  265. package/dist/assets/xquery-C8ppAT5Z.js +1 -0
  266. package/dist/assets/{xychartDiagram-PRI3JC2R-Cb0exSKs.js → xychartDiagram-PRI3JC2R-B8A0hi-Q.js} +1 -1
  267. package/dist/assets/yacas-CnXhtfs7.js +1 -0
  268. package/dist/assets/z80-B0aL_Tnf.js +1 -0
  269. package/dist/index.html +36 -34
  270. package/package.json +3 -4
  271. package/src/__mocks__/requests.ts +56 -4
  272. package/src/components/data-table/__tests__/__snapshots__/chart-spec-model.test.ts.snap +174 -21
  273. package/src/components/data-table/__tests__/chart-spec-model.test.ts +102 -1
  274. package/src/components/data-table/__tests__/columns.test.tsx +9 -1
  275. package/src/components/data-table/column-summary/chart-spec-model.tsx +163 -103
  276. package/src/components/data-table/column-summary/legacy-chart-spec.ts +15 -7
  277. package/src/components/data-table/column-summary/utils.ts +26 -7
  278. package/src/components/data-table/columns.tsx +11 -1
  279. package/src/components/data-table/types.ts +1 -1
  280. package/src/components/editor/__tests__/viewer-banner.test.tsx +14 -0
  281. package/src/components/editor/actions/__tests__/pair-with-agent-commands.test.ts +99 -18
  282. package/src/components/editor/actions/__tests__/pdf-export.test.ts +32 -13
  283. package/src/components/editor/actions/pair-with-agent-commands.ts +21 -10
  284. package/src/components/editor/actions/pair-with-agent-modal.tsx +2 -2
  285. package/src/components/editor/actions/pdf-export.ts +11 -14
  286. package/src/components/editor/actions/useNotebookActions.tsx +28 -19
  287. package/src/components/editor/cell/code/__tests__/cell-editor-activity-lifecycle.test.ts +250 -0
  288. package/src/components/editor/cell/code/cell-editor.tsx +13 -7
  289. package/src/components/editor/chrome/__tests__/state.test.ts +7 -1
  290. package/src/components/editor/chrome/panels/__tests__/logs-panel.test.tsx +25 -0
  291. package/src/components/editor/chrome/panels/__tests__/panel-accordion-state.test.ts +42 -0
  292. package/src/components/editor/chrome/panels/file-explorer-panel.tsx +6 -17
  293. package/src/components/editor/chrome/panels/logs-panel.tsx +12 -2
  294. package/src/components/editor/chrome/panels/panel-accordion-state.ts +51 -0
  295. package/src/components/editor/chrome/panels/session-panel.tsx +5 -16
  296. package/src/components/editor/chrome/panels/write-secret-modal.tsx +40 -12
  297. package/src/components/editor/chrome/state.ts +10 -0
  298. package/src/components/editor/connections/__tests__/json-credentials.test.ts +114 -0
  299. package/src/components/editor/connections/__tests__/paths.test.ts +39 -0
  300. package/src/components/editor/connections/__tests__/quick-add-data-sources.test.tsx +113 -0
  301. package/src/components/editor/connections/add-connection-dialog.tsx +2 -0
  302. package/src/components/editor/connections/components.tsx +6 -2
  303. package/src/components/editor/connections/database/__tests__/__snapshots__/as-code.test.ts.snap +27 -5
  304. package/src/components/editor/connections/database/__tests__/as-code.test.ts +33 -0
  305. package/src/components/editor/connections/database/as-code.ts +37 -13
  306. package/src/components/editor/connections/database/schemas.ts +6 -5
  307. package/src/components/editor/connections/form-renderers.tsx +99 -1
  308. package/src/components/editor/connections/json-credentials.ts +57 -0
  309. package/src/components/editor/connections/paths.ts +21 -0
  310. package/src/components/editor/connections/quick-add-data-sources.tsx +106 -0
  311. package/src/components/editor/connections/secret-combobox.tsx +41 -20
  312. package/src/components/editor/connections/storage/__tests__/__snapshots__/as-code.test.ts.snap +88 -2
  313. package/src/components/editor/connections/storage/__tests__/as-code.test.ts +128 -8
  314. package/src/components/editor/connections/storage/as-code.ts +79 -36
  315. package/src/components/editor/connections/storage/schemas.ts +85 -44
  316. package/src/components/editor/file-tree/__tests__/renderers.test.ts +31 -0
  317. package/src/components/editor/file-tree/file-viewer.tsx +11 -7
  318. package/src/components/editor/file-tree/renderers.tsx +21 -0
  319. package/src/components/editor/renderers/vertical-layout/vertical-layout.tsx +2 -2
  320. package/src/components/editor/viewer-banner.tsx +6 -1
  321. package/src/components/forms/form.tsx +59 -24
  322. package/src/components/forms/options.ts +2 -1
  323. package/src/components/slides/__tests__/cell-output-block.test.tsx +40 -0
  324. package/src/components/slides/__tests__/slide-cell-view.test.tsx +33 -0
  325. package/src/components/slides/reveal-component.tsx +22 -17
  326. package/src/components/slides/slide-cell-view.tsx +1 -1
  327. package/src/components/slides/slides.css +4 -2
  328. package/src/components/static-html/share-modal.tsx +1 -1
  329. package/src/core/ai/context/providers/file.ts +8 -29
  330. package/src/core/cells/__tests__/cells.test.ts +12 -2
  331. package/src/core/cells/__tests__/logs.test.ts +5 -5
  332. package/src/core/cells/cells.ts +17 -4
  333. package/src/core/cells/document-changes.ts +1 -0
  334. package/src/core/cells/logs.ts +14 -4
  335. package/src/core/codemirror/cm.ts +3 -0
  336. package/src/core/codemirror/code-lens/__tests__/actions.test.ts +68 -0
  337. package/src/core/codemirror/code-lens/__tests__/analyzer.test.ts +224 -0
  338. package/src/core/codemirror/code-lens/__tests__/entities.test.ts +175 -0
  339. package/src/core/codemirror/code-lens/__tests__/extension.test.ts +325 -0
  340. package/src/core/codemirror/code-lens/__tests__/perf.test.ts +121 -0
  341. package/src/core/codemirror/code-lens/__tests__/popover.test.ts +93 -0
  342. package/src/core/codemirror/code-lens/actions.ts +33 -0
  343. package/src/core/codemirror/code-lens/analyzer.ts +284 -0
  344. package/src/core/codemirror/code-lens/entities.ts +123 -0
  345. package/src/core/codemirror/code-lens/extension.ts +298 -0
  346. package/src/core/codemirror/code-lens/icons.ts +36 -0
  347. package/src/core/codemirror/code-lens/popover.tsx +240 -0
  348. package/src/core/codemirror/copilot/__tests__/language-server.test.ts +396 -100
  349. package/src/core/codemirror/copilot/__tests__/transport.test.ts +128 -540
  350. package/src/core/codemirror/copilot/language-server.ts +182 -70
  351. package/src/core/codemirror/copilot/transport.ts +15 -207
  352. package/src/core/codemirror/copilot/types.ts +9 -2
  353. package/src/core/codemirror/find-replace/__tests__/navigate.test.ts +42 -30
  354. package/src/core/codemirror/find-replace/navigate.ts +2 -0
  355. package/src/core/codemirror/go-to-definition/__tests__/commands.test.ts +24 -3
  356. package/src/core/codemirror/go-to-definition/commands.ts +93 -90
  357. package/src/core/codemirror/language/__tests__/sql.test.ts +627 -61
  358. package/src/core/codemirror/language/languages/python.ts +23 -11
  359. package/src/core/codemirror/language/languages/sql/completion-store.ts +5 -1
  360. package/src/core/codemirror/language/languages/sql/renderers.tsx +3 -3
  361. package/src/core/codemirror/language/languages/sql/sql.ts +251 -16
  362. package/src/core/codemirror/lsp/__tests__/federated-lsp.test.ts +161 -0
  363. package/src/core/codemirror/lsp/__tests__/log-messages.test.ts +53 -0
  364. package/src/core/codemirror/lsp/__tests__/normalize-markdown-math.test.ts +25 -0
  365. package/src/core/codemirror/lsp/__tests__/notebook-lsp.test.ts +598 -156
  366. package/src/core/codemirror/lsp/__tests__/transports.test.ts +112 -0
  367. package/src/core/codemirror/lsp/federated-lsp.ts +76 -23
  368. package/src/core/codemirror/lsp/log-messages.ts +37 -0
  369. package/src/core/codemirror/lsp/normalize-markdown-math.ts +8 -4
  370. package/src/core/codemirror/lsp/notebook-lsp.ts +220 -56
  371. package/src/core/codemirror/lsp/transports.ts +8 -1
  372. package/src/core/codemirror/lsp/types.ts +68 -8
  373. package/src/core/codemirror/lsp/utils.ts +14 -0
  374. package/src/core/codemirror/python-node-names.ts +90 -0
  375. package/src/core/codemirror/reactive-references/analyzer.ts +52 -57
  376. package/src/core/codemirror/utils.ts +28 -0
  377. package/src/core/config/feature-flag.tsx +3 -1
  378. package/src/core/datasets/data-source-discovery.ts +5 -0
  379. package/src/core/datasets/request-registry.ts +11 -0
  380. package/src/core/edit-app.tsx +1 -2
  381. package/src/core/export/__tests__/hooks.test.ts +2 -4
  382. package/src/core/export/hooks.ts +4 -3
  383. package/src/core/islands/__tests__/bridge.test.ts +107 -0
  384. package/src/core/islands/bootstrap.ts +1 -0
  385. package/src/core/islands/bridge.ts +18 -0
  386. package/src/core/kernel/messages.ts +2 -0
  387. package/src/core/lsp/__tests__/transport.test.ts +509 -337
  388. package/src/core/lsp/transport.ts +304 -132
  389. package/src/core/mode.ts +10 -0
  390. package/src/core/network/__tests__/api.test.ts +42 -0
  391. package/src/core/network/__tests__/connection.test.ts +45 -0
  392. package/src/core/network/__tests__/requests-lazy.test.ts +47 -1
  393. package/src/core/network/__tests__/requests-network.test.ts +48 -0
  394. package/src/core/network/api.ts +27 -0
  395. package/src/core/network/connection.ts +15 -0
  396. package/src/core/network/requests-lazy.ts +3 -0
  397. package/src/core/network/requests-network.ts +31 -8
  398. package/src/core/network/requests-static.ts +3 -0
  399. package/src/core/network/requests-toasting.tsx +3 -0
  400. package/src/core/network/types.ts +27 -6
  401. package/src/core/rtc/state.ts +9 -0
  402. package/src/core/static/download-html.ts +5 -14
  403. package/src/core/wasm/__tests__/bridge.test.ts +99 -5
  404. package/src/core/wasm/bridge.ts +42 -9
  405. package/src/core/wasm/worker/types.ts +10 -3
  406. package/src/core/wasm/worker/worker.ts +7 -8
  407. package/src/core/websocket/useMarimoKernelConnection.tsx +4 -0
  408. package/src/css/app/codemirror.css +16 -2
  409. package/src/hooks/__tests__/useDataSourceDiscovery.test.ts +80 -0
  410. package/src/hooks/useDataSourceDiscovery.ts +18 -0
  411. package/src/plugins/impl/DataTablePlugin.tsx +4 -1
  412. package/src/plugins/impl/__tests__/DataTablePlugin.test.tsx +158 -0
  413. package/src/plugins/impl/anywidget/__tests__/model.test.ts +55 -0
  414. package/src/plugins/impl/anywidget/model.ts +20 -5
  415. package/src/plugins/impl/data-frames/forms/__tests__/__snapshots__/form.test.tsx.snap +33 -21
  416. package/src/plugins/impl/data-frames/forms/renderers.tsx +11 -8
  417. package/src/stories/log-viewer.stories.tsx +12 -6
  418. package/src/utils/__tests__/blob.test.ts +27 -1
  419. package/src/utils/__tests__/download.test.tsx +44 -4
  420. package/src/utils/blob.ts +24 -1
  421. package/src/utils/download.ts +14 -15
  422. package/dist/assets/JsonOutput-B0aYK7up.js +0 -53
  423. package/dist/assets/LazyAnyLanguageCodeMirror-B2JvSXP-.js +0 -2
  424. package/dist/assets/RenderHTML-uBc4LkCP.js +0 -1
  425. package/dist/assets/__vite-browser-external-BkrtI7wJ.js +0 -1
  426. package/dist/assets/add-connection-dialog-BgQ7HuWu.js +0 -170
  427. package/dist/assets/ai-model-dropdown-C7iiWBqP.js +0 -5
  428. package/dist/assets/apl-DTwRFDps.js +0 -1
  429. package/dist/assets/app-config-button-DhmeKMjL.js +0 -1
  430. package/dist/assets/asciiarmor-CiqkDK0s.js +0 -1
  431. package/dist/assets/asn1-RTvH5MEs.js +0 -1
  432. package/dist/assets/blob-C3EfaMOb.js +0 -1
  433. package/dist/assets/brainfuck-szH_VGzd.js +0 -1
  434. package/dist/assets/cell-editor-DD0zaU_N.js +0 -27
  435. package/dist/assets/cell-link-C0hhYyNu.js +0 -1
  436. package/dist/assets/cells-aqfX084m.js +0 -229
  437. package/dist/assets/channel-D-k8o3T1.js +0 -1
  438. package/dist/assets/chunk-55IACEB6-xhaY4LU6.js +0 -1
  439. package/dist/assets/classDiagram-2ON5EDUG-C-rIg7EQ.js +0 -1
  440. package/dist/assets/classDiagram-v2-WZHVMYZB-MBAsRLae.js +0 -1
  441. package/dist/assets/clojure-CyEbLmch.js +0 -1
  442. package/dist/assets/cmake-Dk8f7QuI.js +0 -1
  443. package/dist/assets/cobol-BJJRqW1D.js +0 -1
  444. package/dist/assets/coffeescript-BDuWJ9WO.js +0 -1
  445. package/dist/assets/commonlisp-CVHm2VSp.js +0 -1
  446. package/dist/assets/components-1i9OlkxM.js +0 -1
  447. package/dist/assets/config-CR3KxW53.js +0 -1
  448. package/dist/assets/crystal-C2Fgr79A.js +0 -1
  449. package/dist/assets/cypher-CUlCm6vR.js +0 -1
  450. package/dist/assets/d-4ANEHA6q.js +0 -1
  451. package/dist/assets/diff-C-W-5V8L.js +0 -1
  452. package/dist/assets/dist-CCAhuqF-.js +0 -1
  453. package/dist/assets/dist-DGhK0kPE.js +0 -1
  454. package/dist/assets/dist-SVDIDTM2.js +0 -1
  455. package/dist/assets/dist-xSLg7wNV.js +0 -1
  456. package/dist/assets/download-CkMUlfM3.js +0 -9
  457. package/dist/assets/dtd-D9h-tL8G.js +0 -1
  458. package/dist/assets/dylan-D3MC56xy.js +0 -1
  459. package/dist/assets/eiffel-CjvEov4k.js +0 -1
  460. package/dist/assets/elm-DvSbvRWe.js +0 -1
  461. package/dist/assets/erlang-DJYaGXyq.js +0 -1
  462. package/dist/assets/error-entries-NXVkubuN.js +0 -8
  463. package/dist/assets/factor-CUQCrkTo.js +0 -1
  464. package/dist/assets/file-explorer-panel-D7VHUIPp.js +0 -26
  465. package/dist/assets/floating-outline-BOqWJRw_.js +0 -1
  466. package/dist/assets/focus-tOmGbv38.js +0 -1
  467. package/dist/assets/form-CIXAzTfC.js +0 -2
  468. package/dist/assets/forth-D9xegiCO.js +0 -1
  469. package/dist/assets/fortran-B0Oe0U8s.js +0 -1
  470. package/dist/assets/gas-jLjj-PIq.js +0 -1
  471. package/dist/assets/gherkin-3Ig8Crit.js +0 -1
  472. package/dist/assets/groovy-NKpNVJ-n.js +0 -1
  473. package/dist/assets/haskell-OPE4bAjk.js +0 -1
  474. package/dist/assets/haxe-DEAZF8L3.js +0 -1
  475. package/dist/assets/home-page-DO_MqQAB.js +0 -4
  476. package/dist/assets/idl-BM6265Xl.js +0 -1
  477. package/dist/assets/index-wLUfvfaV.js +0 -38
  478. package/dist/assets/index-xs-zSSrX.css +0 -2
  479. package/dist/assets/infoDiagram-HS3SLOUP-DQnMjKYJ.js +0 -2
  480. package/dist/assets/javascript-CZ9vDpAy.js +0 -1
  481. package/dist/assets/julia-BrY9TQnt.js +0 -1
  482. package/dist/assets/katex-C-lfa1AM.js +0 -1
  483. package/dist/assets/kiosk-mode-QsYGYiC8.js +0 -1
  484. package/dist/assets/livescript-CNahkUp5.js +0 -1
  485. package/dist/assets/logs-panel-B6AfYQb6.js +0 -1
  486. package/dist/assets/lua-Skr4TVu_.js +0 -1
  487. package/dist/assets/mathematica-BXxhrpeY.js +0 -1
  488. package/dist/assets/mbox-BRrQCVe9.js +0 -1
  489. package/dist/assets/mirc-CffYPE4R.js +0 -1
  490. package/dist/assets/mllike-C1DLZhEI.js +0 -1
  491. package/dist/assets/modelica-CvAyRRNV.js +0 -1
  492. package/dist/assets/mscgen-uMZWtMZv.js +0 -1
  493. package/dist/assets/mumps-DFJehEx7.js +0 -1
  494. package/dist/assets/node-sql-parser-BWgUjcfV.js +0 -68
  495. package/dist/assets/nsis-BVI9YULz.js +0 -1
  496. package/dist/assets/ntriples-Bcdh7b2H.js +0 -1
  497. package/dist/assets/octave-CdAKz6YS.js +0 -1
  498. package/dist/assets/oz-DSySeR-W.js +0 -1
  499. package/dist/assets/pair-with-agent-modal-C9nKHvCp.js +0 -4
  500. package/dist/assets/panels-Ch_sUzTx.js +0 -4
  501. package/dist/assets/pascal-DefziIUN.js +0 -1
  502. package/dist/assets/perl-BOOloBPk.js +0 -1
  503. package/dist/assets/pig-f0nBb-5x.js +0 -1
  504. package/dist/assets/powershell-DToQjbK9.js +0 -1
  505. package/dist/assets/process-output-BFSCpqNt.js +0 -1
  506. package/dist/assets/properties-BRob-nyj.js +0 -1
  507. package/dist/assets/protobuf-DZyC6051.js +0 -1
  508. package/dist/assets/pug-pVoM8FRt.js +0 -1
  509. package/dist/assets/puppet-9fuYG07F.js +0 -1
  510. package/dist/assets/python-_Mr8fyXP.js +0 -1
  511. package/dist/assets/q-D73s4Y77.js +0 -1
  512. package/dist/assets/r-BOEjz92e.js +0 -1
  513. package/dist/assets/rpm-LpXWTM5t.js +0 -1
  514. package/dist/assets/ruby-DodgSDfF.js +0 -1
  515. package/dist/assets/run-page-D9-9chbw.js +0 -1
  516. package/dist/assets/sas-D9KCtUmL.js +0 -1
  517. package/dist/assets/scheme-p8UJxmJw.js +0 -1
  518. package/dist/assets/session-panel-Dz-DQDeV.js +0 -1
  519. package/dist/assets/shell-BWdqyqwL.js +0 -1
  520. package/dist/assets/sieve-CLwJmtiQ.js +0 -1
  521. package/dist/assets/slides-MCbMDtlY.css +0 -1
  522. package/dist/assets/smalltalk-D3KV-Qah.js +0 -1
  523. package/dist/assets/sparql-D9Jz2mBw.js +0 -1
  524. package/dist/assets/state-BpkJVsmT.js +0 -3
  525. package/dist/assets/state-DDag0B_B.js +0 -1
  526. package/dist/assets/stateDiagram-v2-4FDKWEC3-CA1l0rNa.js +0 -1
  527. package/dist/assets/stylus-ClN4l_XO.js +0 -1
  528. package/dist/assets/swift-Dvd_9xBv.js +0 -1
  529. package/dist/assets/switch-DLGijIXN.js +0 -1
  530. package/dist/assets/tcl-DR2p8cyi.js +0 -1
  531. package/dist/assets/textarea-aocYW9hl.js +0 -1
  532. package/dist/assets/textile-D6S27_J2.js +0 -1
  533. package/dist/assets/toml-B-YuQ2Id.js +0 -1
  534. package/dist/assets/troff-HSk8AoRF.js +0 -1
  535. package/dist/assets/ttcn-CehzlVdx.js +0 -1
  536. package/dist/assets/ttcn-cfg-CLEPwk1s.js +0 -1
  537. package/dist/assets/turtle-DQLHkbOu.js +0 -1
  538. package/dist/assets/useCellActionButton-BG7n5b0H.js +0 -1
  539. package/dist/assets/useNotebookActions-COdGI2fR.js +0 -12
  540. package/dist/assets/useRunCells-BtSwerrU.js +0 -1
  541. package/dist/assets/vb-o1EHrS4z.js +0 -1
  542. package/dist/assets/vbscript-BS8yUFpf.js +0 -1
  543. package/dist/assets/velocity-u_oGPFaA.js +0 -1
  544. package/dist/assets/verilog-CSmDH7su.js +0 -1
  545. package/dist/assets/vhdl-BCaWLcjw.js +0 -1
  546. package/dist/assets/webidl-Bf6dokXM.js +0 -1
  547. package/dist/assets/write-secret-modal-3-v-dHVj.js +0 -1
  548. package/dist/assets/xquery-Di0kkiXg.js +0 -1
  549. package/dist/assets/yacas-DB8tPtyp.js +0 -1
  550. package/dist/assets/z80-DFUvlWxk.js +0 -1
  551. /package/dist/assets/{ImageComparisonComponent-Cz3xVDLH.js → ImageComparisonComponent-COvcNAUu.js} +0 -0
  552. /package/dist/assets/{Inputs-B8-VCb_j.js → Inputs-BmtHnGKp.js} +0 -0
  553. /package/dist/assets/{Plot-X2G47XHf.js → Plot-CB_5AR7d.js} +0 -0
  554. /package/dist/assets/{apl-DVqFAlEd.js → apl-Cp4QYSh2.js} +0 -0
  555. /package/dist/assets/{array-Ddg9CgJT.js → array-BuhHwWF4.js} +0 -0
  556. /package/dist/assets/{asciiarmor-B45BhOLj.js → asciiarmor-BUxo-e6o.js} +0 -0
  557. /package/dist/assets/{asn1-C4T2ctU6.js → asn1-Cp_b5sxr.js} +0 -0
  558. /package/dist/assets/{asterisk-9U_4Kgke.js → asterisk-BKEE609E.js} +0 -0
  559. /package/dist/assets/{azure-nN8APleF.js → azure-t5-hyIQ1.js} +0 -0
  560. /package/dist/assets/{brainfuck-kVh8Eud4.js → brainfuck-DmRCaE-Q.js} +0 -0
  561. /package/dist/assets/{card-VUBaYDpT.js → card-P_NJTnTd.js} +0 -0
  562. /package/dist/assets/{chunk-4F5CHEZ2-ClSh5rxG.js → chunk-4F5CHEZ2-D6n-cT3v.js} +0 -0
  563. /package/dist/assets/{chunk-B2363JML-cit0ouFv.js → chunk-B2363JML-kkXnm2Yp.js} +0 -0
  564. /package/dist/assets/{chunk-DR5Q36YT-Bsu9Glc0.js → chunk-DR5Q36YT-DZQANAzH.js} +0 -0
  565. /package/dist/assets/{chunk-FRFDVMJY--Re1QfFE.js → chunk-FRFDVMJY-MdHMrSks.js} +0 -0
  566. /package/dist/assets/{chunk-PL6DKKU2-CAwRAr-p.js → chunk-PL6DKKU2-BPi2wKR3.js} +0 -0
  567. /package/dist/assets/{chunk-SJTYNZTY-G1spWesO.js → chunk-SJTYNZTY-BcV9dsih.js} +0 -0
  568. /package/dist/assets/{chunk-TQ3KTPDO-DBwra5xv.js → chunk-TQ3KTPDO-XDjkQ8Xj.js} +0 -0
  569. /package/dist/assets/{chunk-UMXZTB3W-A5RvYDPE.js → chunk-UMXZTB3W-C-xu4f6g.js} +0 -0
  570. /package/dist/assets/{clear-button-DQtvx6eq.js → clear-button-clPKQb-5.js} +0 -0
  571. /package/dist/assets/{click-outside-container-CrWZsAF5.js → click-outside-container-BU5ChL3W.js} +0 -0
  572. /package/dist/assets/{clike-O0gwXilc.js → clike--wVFVJzz.js} +0 -0
  573. /package/dist/assets/{clojure-CsbMWxp9.js → clojure-xvpMtcD1.js} +0 -0
  574. /package/dist/assets/{cmake-FpJvOdyj.js → cmake-ChD_WVwL.js} +0 -0
  575. /package/dist/assets/{cobol-Duxbpsru.js → cobol-B5K8KXv5.js} +0 -0
  576. /package/dist/assets/{coffeescript-D-Unz9IP.js → coffeescript-EMaA6sFP.js} +0 -0
  577. /package/dist/assets/{colors-C_0lIznd.js → colors-CQfhPUa2.js} +0 -0
  578. /package/dist/assets/{common-keywords-PqH2GDfH.js → common-keywords-DdCmdKox.js} +0 -0
  579. /package/dist/assets/{commonlisp-_nR12oc7.js → commonlisp-BTUt7Wms.js} +0 -0
  580. /package/dist/assets/{crystal-dj3W4b1A.js → crystal-CaYGQjnj.js} +0 -0
  581. /package/dist/assets/{css-0BG6A_BC.js → css-Ci5CSFmt.js} +0 -0
  582. /package/dist/assets/{cypher-CKPokaoH.js → cypher-Bt0cHBYq.js} +0 -0
  583. /package/dist/assets/{cytoscape.esm-DzUNSF80.js → cytoscape.esm-CbUmcCyd.js} +0 -0
  584. /package/dist/assets/{d-BrbqzVa2.js → d-Y6y0yT7l.js} +0 -0
  585. /package/dist/assets/{diff-BmdR9FsO.js → diff-DWzGHZfz.js} +0 -0
  586. /package/dist/assets/{dist-CpbbK4-I.js → dist-8SH6SWEG.js} +0 -0
  587. /package/dist/assets/{dist-DzAAhYcW.js → dist-9o0Xjd5v.js} +0 -0
  588. /package/dist/assets/{dist-DNGKAtWk.js → dist-BKgHjzML.js} +0 -0
  589. /package/dist/assets/{dist-98K4fusX.js → dist-BP4hpPAE.js} +0 -0
  590. /package/dist/assets/{dist-D35OyUMQ.js → dist-C-3FVUQA.js} +0 -0
  591. /package/dist/assets/{dist-OgwOt8T2.js → dist-C6_DArtj.js} +0 -0
  592. /package/dist/assets/{dist-O5-NiN3f.js → dist-CLyRge8R.js} +0 -0
  593. /package/dist/assets/{dist-D5ToCtv8.js → dist-CZvbHnyT.js} +0 -0
  594. /package/dist/assets/{dist-DrtRBAn8.js → dist-CrKffqgx.js} +0 -0
  595. /package/dist/assets/{dist-B8g3pNYJ.js → dist-Cros4IAo.js} +0 -0
  596. /package/dist/assets/{dist-3N7-WLqi.js → dist-D47O3FBX.js} +0 -0
  597. /package/dist/assets/{dist-BaKJ0-Tb.js → dist-DJuRuTXr.js} +0 -0
  598. /package/dist/assets/{dist-CM-lWxt3.js → dist-DQl27SFq.js} +0 -0
  599. /package/dist/assets/{dist-DokId-qM.js → dist-DeJBvhAc.js} +0 -0
  600. /package/dist/assets/{dist-C5kf6g-d.js → dist-fLBYOt9R.js} +0 -0
  601. /package/dist/assets/{dist-56ul6-mm.js → dist-kLs0VbW_.js} +0 -0
  602. /package/dist/assets/{dist-ByK00N0T.js → dist-l4RTzHX-.js} +0 -0
  603. /package/dist/assets/{dist-D9sE1udr.js → dist-ut5UbaRH.js} +0 -0
  604. /package/dist/assets/{dtd-DbCXDVgi.js → dtd-CkphQXbR.js} +0 -0
  605. /package/dist/assets/{duckdb-keywords-mPlR0SxW.js → duckdb-keywords-D9ZiGTTc.js} +0 -0
  606. /package/dist/assets/{dylan-CLLzL2Js.js → dylan-CPyS5Usd.js} +0 -0
  607. /package/dist/assets/{ebnf-Cnws41cu.js → ebnf-C4SDYpAu.js} +0 -0
  608. /package/dist/assets/{ecl-BC7x2nzk.js → ecl-Dy8k_w5N.js} +0 -0
  609. /package/dist/assets/{eiffel-CDU836rz.js → eiffel-DZMtnEo6.js} +0 -0
  610. /package/dist/assets/{elm-D-_bXARs.js → elm-CkuOc7z-.js} +0 -0
  611. /package/dist/assets/{empty-state-CqJvEFRk.js → empty-state-JOk_hLQe.js} +0 -0
  612. /package/dist/assets/{erlang-CwDZk2zM.js → erlang-CSyJ5dU6.js} +0 -0
  613. /package/dist/assets/{esm-D6WfbcL3.js → esm-7r3G8FZG.js} +0 -0
  614. /package/dist/assets/{fcl-CwkPc-_9.js → fcl-Px-Zskiw.js} +0 -0
  615. /package/dist/assets/{formatting-CDf6w1Kt.js → formatting-COz4XEaB.js} +0 -0
  616. /package/dist/assets/{forth-D6FsO_8x.js → forth-HHM4VU-4.js} +0 -0
  617. /package/dist/assets/{fortran-D4BMbIkG.js → fortran-D_hdoGUs.js} +0 -0
  618. /package/dist/assets/{gas-JFjzcgdY.js → gas-DwXUGevO.js} +0 -0
  619. /package/dist/assets/{gherkin-Cyu-qGaF.js → gherkin-6UjduaeQ.js} +0 -0
  620. /package/dist/assets/{github-_JH-0hIO.js → github-A_zUd4Uj.js} +0 -0
  621. /package/dist/assets/{groovy-CZaE9eN-.js → groovy-BMSTiLIi.js} +0 -0
  622. /package/dist/assets/{haskell-Dc6o0IGr.js → haskell-CwQPWeas.js} +0 -0
  623. /package/dist/assets/{haxe-Bsf0tzqs.js → haxe-BwgB7edi.js} +0 -0
  624. /package/dist/assets/{http-BQNSD-HR.js → http-CqevOCDe.js} +0 -0
  625. /package/dist/assets/{idl-1W91kQ8_.js → idl-DaVQAS85.js} +0 -0
  626. /package/dist/assets/{init-nx27Zb9l.js → init-D5qG588s.js} +0 -0
  627. /package/dist/assets/{javascript-BZ81-2rO.js → javascript-DgYFgf02.js} +0 -0
  628. /package/dist/assets/{julia-BZOsq0r_.js → julia-ZzackTsi.js} +0 -0
  629. /package/dist/assets/{katex-CvZ3kCGk.js → katex-Di-siZEY.js} +0 -0
  630. /package/dist/assets/{links-CZr5bjvo.js → links-ClNQSIal.js} +0 -0
  631. /package/dist/assets/{livescript-CNZfmikk.js → livescript-fyjJd0Zu.js} +0 -0
  632. /package/dist/assets/{loro_wasm_bg-RNUly1SE.js → loro_wasm_bg-BPjF1TWb.js} +0 -0
  633. /package/dist/assets/{lua-DXGRliwd.js → lua-Cx9isc8d.js} +0 -0
  634. /package/dist/assets/{marimo-icons-C_nFooxr.js → marimo-icons-yD_pAOm9.js} +0 -0
  635. /package/dist/assets/{math-CLO4uoaP.js → math-7EMdGNhR.js} +0 -0
  636. /package/dist/assets/{mathematica-BoUj8M7D.js → mathematica-BJvaPi1-.js} +0 -0
  637. /package/dist/assets/{mbox-DLVP8LAe.js → mbox-43z3jriT.js} +0 -0
  638. /package/dist/assets/{mirc-kI4d5fMu.js → mirc-B1ZSd8Bn.js} +0 -0
  639. /package/dist/assets/{mllike-CD9vBc_2.js → mllike-DZwCuWJi.js} +0 -0
  640. /package/dist/assets/{modelica-DgfsLJuF.js → modelica-DJJ2ie2z.js} +0 -0
  641. /package/dist/assets/{mscgen-B1HDwshJ.js → mscgen-CKYpxNp_.js} +0 -0
  642. /package/dist/assets/{multi-icon-nrKPWjDU.js → multi-icon-DVD1luis.js} +0 -0
  643. /package/dist/assets/{mumps-D_-b9TZD.js → mumps-DYGlTYd1.js} +0 -0
  644. /package/dist/assets/{nginx-Cm282mo8.js → nginx-D6Zlgok6.js} +0 -0
  645. /package/dist/assets/{ntriples-COX9JFZ8.js → ntriples-DizNPLuO.js} +0 -0
  646. /package/dist/assets/{octave-BejycR79.js → octave-DdwI7gwd.js} +0 -0
  647. /package/dist/assets/{oz-CFFivrGn.js → oz-DMPAJRti.js} +0 -0
  648. /package/dist/assets/{panel-context-CH75ubGG.js → panel-context-CckkyW-1.js} +0 -0
  649. /package/dist/assets/{pascal-B_p9jkCs.js → pascal-Do0zihr_.js} +0 -0
  650. /package/dist/assets/{path-Bz_hIzg5.js → path-WJo29M9I.js} +0 -0
  651. /package/dist/assets/{pathUtils-Bfcp5m-a.js → pathUtils-icFgkNy9.js} +0 -0
  652. /package/dist/assets/{perl-C-SFBTly.js → perl-t4XY-5wj.js} +0 -0
  653. /package/dist/assets/{pig-BhxDMp2k.js → pig-CgweiC6M.js} +0 -0
  654. /package/dist/assets/{powershell-c59M-9N2.js → powershell-OQGwpWeH.js} +0 -0
  655. /package/dist/assets/{properties-D1JNwCKy.js → properties-BU4KenKz.js} +0 -0
  656. /package/dist/assets/{protobuf-DQS7ex8R.js → protobuf--IbBPde2.js} +0 -0
  657. /package/dist/assets/{puppet-DaQvhvew.js → puppet-DkR_zpq4.js} +0 -0
  658. /package/dist/assets/{python-XHl3eRTS.js → python-PdpM9cxt.js} +0 -0
  659. /package/dist/assets/{q-DppnoRE3.js → q-BmGsZsKc.js} +0 -0
  660. /package/dist/assets/{r-D8-F_FWj.js → r-D1cPebaP.js} +0 -0
  661. /package/dist/assets/{request-registry-DHocQ_4I.js → request-registry-Dpk9hQrX.js} +0 -0
  662. /package/dist/assets/{requests-DYeT4CEe.js → requests-BMphPdzB.js} +0 -0
  663. /package/dist/assets/{rpm-CegJhNNO.js → rpm-CG3vlu2-.js} +0 -0
  664. /package/dist/assets/{ruby-YMIxufV1.js → ruby-BU2XuRQM.js} +0 -0
  665. /package/dist/assets/{runs-DBTXqJHS.js → runs-s9t2f_Tg.js} +0 -0
  666. /package/dist/assets/{sas-wTtX9UIQ.js → sas-ig9j_2iC.js} +0 -0
  667. /package/dist/assets/{scheme-BGenom3k.js → scheme-9DZXzBKN.js} +0 -0
  668. /package/dist/assets/{semaphore-DtBYRzWS.js → semaphore-C-Nli4KG.js} +0 -0
  669. /package/dist/assets/{shell-Bu1sLaiP.js → shell-BtigxJqY.js} +0 -0
  670. /package/dist/assets/{sieve-ffe6rUQh.js → sieve-DJ-mn8HY.js} +0 -0
  671. /package/dist/assets/{simple-mode-DBSzUJLA.js → simple-mode-lTjyt9i9.js} +0 -0
  672. /package/dist/assets/{smalltalk-NU5EGjHp.js → smalltalk-Bn53uNk6.js} +0 -0
  673. /package/dist/assets/{solr-ptw1yIqO.js → solr-BenHzQuB.js} +0 -0
  674. /package/dist/assets/{sparql-uqVktnwO.js → sparql-mdFRPSSw.js} +0 -0
  675. /package/dist/assets/{spreadsheet-VEzeu_mb.js → spreadsheet-CIIID0RN.js} +0 -0
  676. /package/dist/assets/{sql-tYjnWETe.js → sql-BJS8pfHr.js} +0 -0
  677. /package/dist/assets/{src-BshXgZd4.js → src-C042FyXq.js} +0 -0
  678. /package/dist/assets/{state-D10U2MwA.js → state-DCtLlFJq.js} +0 -0
  679. /package/dist/assets/{stylus-B2E6Ulaz.js → stylus-CUXYXPeL.js} +0 -0
  680. /package/dist/assets/{swift-Rmnn7ATv.js → swift-BgwlI0GN.js} +0 -0
  681. /package/dist/assets/{swiper-component-Che9MNs4.js → swiper-component-DXW8snlt.js} +0 -0
  682. /package/dist/assets/{tcl-ZPWCn2nn.js → tcl-B8Khjzwl.js} +0 -0
  683. /package/dist/assets/{textile-uhA33kFk.js → textile-DmfgOrXO.js} +0 -0
  684. /package/dist/assets/{tiddlywiki-CPkGLyXH.js → tiddlywiki-mgaN9k7_.js} +0 -0
  685. /package/dist/assets/{tiki-BtjLo8OF.js → tiki-B8Sxh4ZA.js} +0 -0
  686. /package/dist/assets/{timer-VYMLXPue.js → timer-Bt8Z3SQI.js} +0 -0
  687. /package/dist/assets/{toml-BFZv2Mv7.js → toml-CPrwnn25.js} +0 -0
  688. /package/dist/assets/{treemap-Bca0xNNq.js → treemap-CshYMgJw.js} +0 -0
  689. /package/dist/assets/{troff-B5eayHop.js → troff-Cb-2hp0t.js} +0 -0
  690. /package/dist/assets/{ttcn-cfg-CfbkL3Q_.js → ttcn-cfg-O0cle81j.js} +0 -0
  691. /package/dist/assets/{ttcn-BM0Yp8NY.js → ttcn-mp3DV9SP.js} +0 -0
  692. /package/dist/assets/{turtle-DvetLxrv.js → turtle-Bo_IjRT-.js} +0 -0
  693. /package/dist/assets/{types-Da7lA5YC.js → types-Bn-E0Dh-.js} +0 -0
  694. /package/dist/assets/{use-vega-container-remeasure-CbKTb_jy.js → use-vega-container-remeasure-C52OJt1l.js} +0 -0
  695. /package/dist/assets/{useInterval-CWBTUy5W.js → useInterval-CnQfyMa9.js} +0 -0
  696. /package/dist/assets/{vb-i5Z8scch.js → vb-B84py4l9.js} +0 -0
  697. /package/dist/assets/{vbscript-BiPYgIyi.js → vbscript-DCWGTF8B.js} +0 -0
  698. /package/dist/assets/{velocity-Dw3R3YoX.js → velocity-COls9qbE.js} +0 -0
  699. /package/dist/assets/{verilog-B8FhJcX6.js → verilog-Dn4JRpb3.js} +0 -0
  700. /package/dist/assets/{vhdl-BqPEoXdJ.js → vhdl-DxQ-aNCu.js} +0 -0
  701. /package/dist/assets/{web-vitals-CwE0GGzl.js → web-vitals-DBq6CjRf.js} +0 -0
  702. /package/dist/assets/{webidl-mMO-qW5Q.js → webidl-IlD_Nbdp.js} +0 -0
  703. /package/dist/assets/{ws-BmTnbVEi.js → ws-Dj1iZVFK.js} +0 -0
  704. /package/dist/assets/{xquery-DvqNwq7L.js → xquery-DwkwsYYE.js} +0 -0
  705. /package/dist/assets/{yacas-Dku9Z6Kf.js → yacas-CR27GINL.js} +0 -0
  706. /package/dist/assets/{z80-DvazU5Tr.js → z80-DDujbhXi.js} +0 -0
@@ -0,0 +1,284 @@
1
+ /* Copyright 2026 Marimo. All rights reserved. */
2
+
3
+ import { syntaxTree } from "@codemirror/language";
4
+ import type { EditorState } from "@codemirror/state";
5
+ import type { SyntaxNode, Tree } from "@lezer/common";
6
+ import {
7
+ NON_CODE_NODES,
8
+ PyKeyword,
9
+ PyNode,
10
+ SCOPE_CREATING_NODES,
11
+ } from "../python-node-names";
12
+ import { hasSyntaxErrors } from "../reactive-references/analyzer";
13
+
14
+ export interface CodeLensTarget {
15
+ from: number;
16
+ to: number;
17
+ name: string;
18
+ }
19
+
20
+ /**
21
+ * Finds the first module-scope assignment site for each name in `names`.
22
+ */
23
+ export function findDeclarationSites(options: {
24
+ state: EditorState;
25
+ names: ReadonlySet<string>;
26
+ }): CodeLensTarget[] {
27
+ const { state, names } = options;
28
+ if (names.size === 0) {
29
+ return [];
30
+ }
31
+ const tree = syntaxTree(state);
32
+ if (!tree || hasSyntaxErrors(tree)) {
33
+ return [];
34
+ }
35
+
36
+ const firstSites = new Map<string, CodeLensTarget>();
37
+
38
+ const collectTargetNames = (node: SyntaxNode) => {
39
+ if (node.name === PyNode.VariableName) {
40
+ const name = state.doc.sliceString(node.from, node.to);
41
+ if (names.has(name) && !firstSites.has(name)) {
42
+ firstSites.set(name, { from: node.from, to: node.to, name });
43
+ }
44
+ return;
45
+ }
46
+ // Recurse into tuple/list unpacking, e.g. `(a, b) = ...` or `[a, b] = ...`,
47
+ // and parenthesized targets, e.g. `(df) = ...`.
48
+ // Member/subscript targets (`obj.attr = ...`) are not declarations.
49
+ if (
50
+ node.name === PyNode.TupleExpression ||
51
+ node.name === PyNode.ArrayExpression ||
52
+ node.name === PyNode.ParenthesizedExpression
53
+ ) {
54
+ for (let child = node.firstChild; child; child = child.nextSibling) {
55
+ collectTargetNames(child);
56
+ }
57
+ }
58
+ };
59
+
60
+ const collectAssignmentTargets = (assign: SyntaxNode) => {
61
+ // Targets are everything before the last AssignOp (handles `a = b = ...`).
62
+ // A bare annotation (`x: int`) has no AssignOp and is skipped.
63
+ let lastAssignOp = -1;
64
+ for (let child = assign.firstChild; child; child = child.nextSibling) {
65
+ if (child.name === PyNode.AssignOp) {
66
+ lastAssignOp = child.from;
67
+ }
68
+ }
69
+ if (lastAssignOp === -1) {
70
+ return;
71
+ }
72
+ for (
73
+ let child = assign.firstChild;
74
+ child && child.from < lastAssignOp;
75
+ child = child.nextSibling
76
+ ) {
77
+ collectTargetNames(child);
78
+ }
79
+ };
80
+
81
+ const visit = (node: SyntaxNode) => {
82
+ // Only module-scope assignments count as creation sites; top-level
83
+ // `if`/`for`/`try` bodies are still module scope.
84
+ if (SCOPE_CREATING_NODES.has(node.name)) {
85
+ return;
86
+ }
87
+ if (node.name === PyNode.AssignStatement) {
88
+ collectAssignmentTargets(node);
89
+ return;
90
+ }
91
+ for (let child = node.firstChild; child; child = child.nextSibling) {
92
+ visit(child);
93
+ }
94
+ };
95
+ visit(tree.topNode);
96
+
97
+ return [...firstSites.values()];
98
+ }
99
+
100
+ // Note that the cache pattern assumes users `import marimo as mo`.
101
+ // This is a common convention for marimo notebooks.
102
+ const CACHE_PATTERN = /\bmo\.(?:persistent_cache|cache)\b/g;
103
+
104
+ export interface CacheSite {
105
+ from: number;
106
+ to: number;
107
+ /**
108
+ * Variable the cache is bound to: the decorated function name
109
+ * (`@mo.cache def f`), the assignment target (`g = mo.cache(f)`), or the
110
+ * `as` binding (`with mo.persistent_cache("k") as c`).
111
+ */
112
+ boundName: string | null;
113
+ /** First string argument, e.g. the persistent_cache name. */
114
+ cacheName: string | null;
115
+ }
116
+
117
+ function stripStringQuotes(text: string): string {
118
+ const match = text.match(/^[A-Za-z]*("""|'''|"|')([\s\S]*)\1$/);
119
+ return match ? match[2] : text;
120
+ }
121
+
122
+ /**
123
+ * Extracts a static cache name from the first positional argument or an
124
+ * explicit `name=` argument. Other string-valued options, such as
125
+ * `hash_type="content"` and `save_path="cache"`, are not cache names.
126
+ */
127
+ function findStaticCacheName(
128
+ argList: SyntaxNode | null,
129
+ text: (node: SyntaxNode) => string,
130
+ ): string | null {
131
+ if (!argList) {
132
+ return null;
133
+ }
134
+
135
+ const isArgumentBoundary = (node: SyntaxNode | null) =>
136
+ node?.name === "," || node?.name === ")";
137
+
138
+ let firstArgument: SyntaxNode | null = null;
139
+ for (let child = argList.firstChild; child; child = child.nextSibling) {
140
+ if (child.name === "(" || child.name === ")" || child.name === ",") {
141
+ continue;
142
+ }
143
+ firstArgument ??= child;
144
+
145
+ if (
146
+ child.name === PyNode.VariableName &&
147
+ text(child) === "name" &&
148
+ child.nextSibling?.name === PyNode.AssignOp
149
+ ) {
150
+ const value = child.nextSibling.nextSibling;
151
+ if (
152
+ value?.name === PyNode.String &&
153
+ isArgumentBoundary(value.nextSibling)
154
+ ) {
155
+ return stripStringQuotes(text(value));
156
+ }
157
+ }
158
+ }
159
+
160
+ if (!firstArgument) {
161
+ return null;
162
+ }
163
+ if (
164
+ firstArgument.name === PyNode.String &&
165
+ isArgumentBoundary(firstArgument.nextSibling)
166
+ ) {
167
+ return stripStringQuotes(text(firstArgument));
168
+ }
169
+ return null;
170
+ }
171
+
172
+ /**
173
+ * Resolves a `mo.cache` / `mo.persistent_cache` match into a CacheSite:
174
+ * extends `to` past call arguments (`mo.cache(pin_modules=True)`), so an
175
+ * icon placed at `to` lands after the closing paren, and extracts the bound
176
+ * variable name and the cache-name string argument.
177
+ */
178
+ function analyzeCacheSite(
179
+ state: EditorState,
180
+ tree: Tree,
181
+ from: number,
182
+ to: number,
183
+ ): CacheSite {
184
+ const text = (node: SyntaxNode) => state.doc.sliceString(node.from, node.to);
185
+ const node = tree.resolveInner(from, 1);
186
+ let boundName: string | null = null;
187
+ let argList: SyntaxNode | null = null;
188
+ let end = to;
189
+
190
+ // `mo.cache(...)` as an expression wraps in a CallExpression that starts
191
+ // at the match
192
+ let call: SyntaxNode | null = null;
193
+ for (
194
+ let ancestor: SyntaxNode | null = node.parent;
195
+ ancestor && ancestor.from === from;
196
+ ancestor = ancestor.parent
197
+ ) {
198
+ if (ancestor.name === PyNode.CallExpression) {
199
+ call = ancestor;
200
+ break;
201
+ }
202
+ }
203
+
204
+ if (call) {
205
+ end = call.to;
206
+ argList = call.getChild(PyNode.ArgList);
207
+ const parent = call.parent;
208
+ if (parent?.name === PyNode.AssignStatement) {
209
+ // `g = mo.cache(f)` — the direct VariableName child is the target
210
+ const target = parent.getChild(PyNode.VariableName);
211
+ boundName = target && target.from < call.from ? text(target) : null;
212
+ } else if (parent?.name === PyNode.WithStatement) {
213
+ // `with mo.persistent_cache("k") as c:` — `as c` follows the call
214
+ let child = parent.firstChild;
215
+ while (child) {
216
+ if (child.from < call.to || child.name === PyKeyword.As) {
217
+ child = child.nextSibling;
218
+ continue;
219
+ }
220
+ if (child.name === PyNode.VariableName) {
221
+ boundName = text(child);
222
+ }
223
+ break;
224
+ }
225
+ }
226
+ } else if (node.parent?.name === PyNode.Decorator) {
227
+ // `@mo.cache(...)` decorators are flat: the ArgList is a direct sibling
228
+ const decorator = node.parent;
229
+ const decoratorArgs = decorator.getChild(PyNode.ArgList);
230
+ if (decoratorArgs?.from === to) {
231
+ argList = decoratorArgs;
232
+ end = decoratorArgs.to;
233
+ }
234
+ // The decorated function's name
235
+ const fn = decorator.parent?.getChild(PyNode.FunctionDefinition);
236
+ const fnName = fn?.getChild(PyNode.VariableName);
237
+ boundName = fnName ? text(fnName) : null;
238
+ }
239
+
240
+ const cacheName = findStaticCacheName(argList, text);
241
+ return { from, to: end, boundName, cacheName };
242
+ }
243
+
244
+ /**
245
+ * True when the `mo` at `from` is a standalone module reference (the object of
246
+ * `mo.cache`), not an attribute of something else. This filters out chains
247
+ * like `obj.mo.cache(f)` — where `mo` is a `PropertyName` rather than a
248
+ * `VariableName` — and mentions inside comments or strings.
249
+ */
250
+ function isStandaloneMoReference(
251
+ state: EditorState,
252
+ tree: Tree,
253
+ from: number,
254
+ ): boolean {
255
+ const node = tree.resolveInner(from, 1);
256
+ if (NON_CODE_NODES.has(node.name)) {
257
+ return false;
258
+ }
259
+ // In `obj.mo.cache`, `mo` parses as a `PropertyName`; a standalone `mo`
260
+ // (including whitespace-separated `mo . cache`) parses as a `VariableName`.
261
+ return (
262
+ node.name === PyNode.VariableName &&
263
+ state.doc.sliceString(node.from, node.to) === "mo"
264
+ );
265
+ }
266
+
267
+ /**
268
+ * Finds occurrences of `mo.cache` / `mo.persistent_cache` (as a decorator,
269
+ * call, or context manager) with a simple text match, skipping mentions in
270
+ * comments, strings, and attribute chains (`obj.mo.cache`). `to` extends past
271
+ * call arguments when present.
272
+ */
273
+ export function findCacheSites(state: EditorState): CacheSite[] {
274
+ const tree = syntaxTree(state);
275
+ if (!tree || hasSyntaxErrors(tree)) {
276
+ return [];
277
+ }
278
+ return [...state.doc.toString().matchAll(CACHE_PATTERN)]
279
+ .filter((match) => isStandaloneMoReference(state, tree, match.index ?? 0))
280
+ .map((match) => {
281
+ const from = match.index ?? 0;
282
+ return analyzeCacheSite(state, tree, from, from + match[0].length);
283
+ });
284
+ }
@@ -0,0 +1,123 @@
1
+ /* Copyright 2026 Marimo. All rights reserved. */
2
+
3
+ import { atom } from "jotai";
4
+ import type { CellId } from "@/core/cells/ids";
5
+ import { dataConnectionsMapAtom } from "@/core/datasets/data-source-connections";
6
+ import { INTERNAL_SQL_ENGINES } from "@/core/datasets/engines";
7
+ import { datasetTablesAtom } from "@/core/datasets/state";
8
+ import { store } from "@/core/state/jotai";
9
+ import { storageNamespacesAtom } from "@/core/storage/state";
10
+ import { variablesAtom } from "@/core/variables/state";
11
+ import type { VariableName } from "@/core/variables/types";
12
+ import { Logger } from "@/utils/Logger";
13
+
14
+ export type CodeLensKind = "table" | "connection" | "bucket" | "cache";
15
+
16
+ export interface CodeLensSpec {
17
+ /** Document position the icon is anchored at */
18
+ pos: number;
19
+ kind: CodeLensKind;
20
+ /** Variable name for entities; a stable identity key for cache sites */
21
+ name: string;
22
+ /** Extra context for cache sites */
23
+ cache?: {
24
+ boundName: string | null;
25
+ cacheName: string | null;
26
+ };
27
+ }
28
+
29
+ /**
30
+ * Sets `name` to `kind`, logging (and overwriting) if the name was already
31
+ * claimed by a different kind. This should be rare.
32
+ */
33
+ function setEntity(
34
+ entities: Map<string, CodeLensKind>,
35
+ name: string,
36
+ kind: CodeLensKind,
37
+ ): void {
38
+ const existing = entities.get(name);
39
+ if (existing !== undefined && existing !== kind) {
40
+ Logger.error(
41
+ `[code-lens] "${name}" is claimed by both a ${existing} and a ${kind} entity; keeping ${kind}`,
42
+ );
43
+ }
44
+ entities.set(name, kind);
45
+ }
46
+
47
+ /**
48
+ * All datasource (dataframe/SQL engine) and storage bucket names in the
49
+ * notebook, keyed by name, independent of any particular cell.
50
+ */
51
+ const lensEntityKindsAtom = atom((get) => {
52
+ const entities = new Map<string, CodeLensKind>();
53
+ for (const table of get(datasetTablesAtom)) {
54
+ if (table.variable_name) {
55
+ setEntity(entities, table.variable_name, "table");
56
+ }
57
+ }
58
+ for (const name of get(dataConnectionsMapAtom).keys()) {
59
+ if (!INTERNAL_SQL_ENGINES.has(name)) {
60
+ setEntity(entities, name, "connection");
61
+ }
62
+ }
63
+ for (const namespace of get(storageNamespacesAtom)) {
64
+ setEntity(entities, namespace.name, "bucket");
65
+ }
66
+ return entities;
67
+ });
68
+
69
+ interface LensEntitiesByCell {
70
+ byCell: Map<CellId, Map<string, CodeLensKind>>;
71
+ /**
72
+ * Entities the kernel hasn't reported a variable for yet (still executing,
73
+ * or just typed), so they can't be attributed to a declaring cell.
74
+ */
75
+ pending: Map<string, CodeLensKind>;
76
+ }
77
+
78
+ /**
79
+ * Groups `lensEntityKindsAtom` by declaring cell, once per store update.
80
+ * With C cells and T datasource/bucket entities, this turns
81
+ * an O(C x T) per-round cost (every cell re-scanning every entity) into O(T) here.
82
+ */
83
+ const lensEntitiesByCellAtom = atom((get): LensEntitiesByCell => {
84
+ const kinds = get(lensEntityKindsAtom);
85
+ const variables = get(variablesAtom);
86
+ const byCell = new Map<CellId, Map<string, CodeLensKind>>();
87
+ const pending = new Map<string, CodeLensKind>();
88
+
89
+ for (const [name, kind] of kinds) {
90
+ const variable = variables[name as VariableName];
91
+ if (variable == null) {
92
+ pending.set(name, kind);
93
+ continue;
94
+ }
95
+ for (const declaringCell of variable.declaredBy) {
96
+ let forCell = byCell.get(declaringCell);
97
+ if (!forCell) {
98
+ forCell = new Map();
99
+ byCell.set(declaringCell, forCell);
100
+ }
101
+ forCell.set(name, kind);
102
+ }
103
+ }
104
+
105
+ return { byCell, pending };
106
+ });
107
+
108
+ /**
109
+ * Variables declared in `cellId` that are datasources (dataframes and SQL
110
+ * engines) or storage buckets, keyed by variable name.
111
+ */
112
+ export function getLensEntities(cellId: CellId): Map<string, CodeLensKind> {
113
+ const { byCell, pending } = store.get(lensEntitiesByCellAtom);
114
+ const entities = new Map(byCell.get(cellId));
115
+ // Be permissive when the kernel hasn't reported a variable yet: any cell
116
+ // could turn out to be the declaring one.
117
+ for (const [name, kind] of pending) {
118
+ if (!entities.has(name)) {
119
+ entities.set(name, kind);
120
+ }
121
+ }
122
+ return entities;
123
+ }
@@ -0,0 +1,298 @@
1
+ /* Copyright 2026 Marimo. All rights reserved. */
2
+
3
+ import { type Extension, StateEffect, StateField } from "@codemirror/state";
4
+ import {
5
+ Decoration,
6
+ type DecorationSet,
7
+ EditorView,
8
+ showTooltip,
9
+ type Tooltip,
10
+ ViewPlugin,
11
+ type ViewUpdate,
12
+ WidgetType,
13
+ } from "@codemirror/view";
14
+ import { type DebouncedFunc, debounce } from "lodash-es";
15
+ import type { CellId } from "@/core/cells/ids";
16
+ import { getFeatureFlag } from "@/core/config/feature-flag";
17
+ import { dataConnectionsMapAtom } from "@/core/datasets/data-source-connections";
18
+ import { datasetTablesAtom } from "@/core/datasets/state";
19
+ import { store } from "@/core/state/jotai";
20
+ import { storageNamespacesAtom } from "@/core/storage/state";
21
+ import { variablesAtom } from "@/core/variables/state";
22
+ import { languageAdapterState } from "../language/extension";
23
+ import { openLensTarget } from "./actions";
24
+ import { findCacheSites, findDeclarationSites } from "./analyzer";
25
+ import { type CodeLensSpec, getLensEntities } from "./entities";
26
+ import { LENS_ICONS, LENS_TOOLTIPS } from "./icons";
27
+ import { mountLensPopover } from "./popover";
28
+
29
+ // Delay (in ms) before showing the hover popover, matching the app's
30
+ // tooltip delay
31
+ export const CODE_LENS_HOVER_DELAY_MS = 400;
32
+
33
+ const setCodeLenses = StateEffect.define<CodeLensSpec[]>();
34
+ const setHoveredLens = StateEffect.define<CodeLensSpec | null>();
35
+
36
+ // Pending hover timers, keyed by widget element so `destroy` can cancel them
37
+ const HOVER_TIMERS = new WeakMap<HTMLElement, number>();
38
+
39
+ class CodeLensWidget extends WidgetType {
40
+ private readonly spec: CodeLensSpec;
41
+
42
+ constructor(spec: CodeLensSpec) {
43
+ super();
44
+ this.spec = spec;
45
+ }
46
+
47
+ override eq(other: CodeLensWidget): boolean {
48
+ return (
49
+ // `pos` is captured by the DOM hover/click handlers, so a reused widget
50
+ // whose anchor moved must not be treated as equal
51
+ this.spec.pos === other.spec.pos &&
52
+ this.spec.kind === other.spec.kind &&
53
+ this.spec.name === other.spec.name &&
54
+ this.spec.cache?.boundName === other.spec.cache?.boundName &&
55
+ this.spec.cache?.cacheName === other.spec.cache?.cacheName
56
+ );
57
+ }
58
+
59
+ override toDOM(view: EditorView): HTMLElement {
60
+ const { spec } = this;
61
+ const element = document.createElement("span");
62
+ element.className = "mo-code-lens";
63
+ element.setAttribute("role", "button");
64
+ // Focusable so the action is reachable and activatable by keyboard
65
+ element.tabIndex = 0;
66
+ // No `title`: the native tooltip is replaced by the hover popover
67
+ element.setAttribute("aria-label", LENS_TOOLTIPS[spec.kind]);
68
+ // Static, trusted markup (see icons.ts)
69
+ element.innerHTML = LENS_ICONS[spec.kind];
70
+ const hidePopover = () => {
71
+ window.clearTimeout(HOVER_TIMERS.get(element));
72
+ HOVER_TIMERS.delete(element);
73
+ if (view.state.field(codeLensHoverField, false)) {
74
+ view.dispatch({ effects: setHoveredLens.of(null) });
75
+ }
76
+ };
77
+ element.onmouseenter = () => {
78
+ const timer = window.setTimeout(() => {
79
+ view.dispatch({ effects: setHoveredLens.of(spec) });
80
+ }, CODE_LENS_HOVER_DELAY_MS);
81
+ HOVER_TIMERS.set(element, timer);
82
+ };
83
+ element.onmouseleave = hidePopover;
84
+ element.onmousemove = (event) => {
85
+ // Keep the editor's built-in hover documentation tooltip from also
86
+ // triggering over the icon
87
+ event.stopPropagation();
88
+ };
89
+ element.onmousedown = (event) => {
90
+ // Don't move the cursor or steal focus from the editor
91
+ event.preventDefault();
92
+ event.stopPropagation();
93
+ };
94
+ element.onclick = (event) => {
95
+ event.preventDefault();
96
+ event.stopPropagation();
97
+ hidePopover();
98
+ openLensTarget(spec.kind);
99
+ };
100
+ element.onkeydown = (event) => {
101
+ if (event.key === "Enter" || event.key === " ") {
102
+ event.preventDefault();
103
+ event.stopPropagation();
104
+ hidePopover();
105
+ openLensTarget(spec.kind);
106
+ }
107
+ };
108
+ return element;
109
+ }
110
+
111
+ override destroy(dom: HTMLElement): void {
112
+ window.clearTimeout(HOVER_TIMERS.get(dom));
113
+ HOVER_TIMERS.delete(dom);
114
+ }
115
+
116
+ override ignoreEvent(): boolean {
117
+ // The widget handles its own events
118
+ return true;
119
+ }
120
+ }
121
+
122
+ function createLensTooltip(spec: CodeLensSpec): Tooltip {
123
+ return {
124
+ pos: spec.pos,
125
+ above: true,
126
+ create: () => {
127
+ const dom = document.createElement("div");
128
+ // Same chrome as the SQL completion/hover popovers
129
+ dom.classList.add("mo-cm-tooltip", "docs-documentation");
130
+ const unmount = mountLensPopover(dom, spec);
131
+ return { dom, resize: false, destroy: unmount };
132
+ },
133
+ };
134
+ }
135
+
136
+ const codeLensHoverField = StateField.define<Tooltip | null>({
137
+ create() {
138
+ return null;
139
+ },
140
+ update(tooltip, tr) {
141
+ for (const effect of tr.effects) {
142
+ if (effect.is(setHoveredLens)) {
143
+ return effect.value ? createLensTooltip(effect.value) : null;
144
+ }
145
+ if (effect.is(setCodeLenses)) {
146
+ // Lenses were rebuilt; the hovered widget may be gone
147
+ return null;
148
+ }
149
+ }
150
+ return tr.docChanged ? null : tooltip;
151
+ },
152
+ provide: (field) => showTooltip.from(field),
153
+ });
154
+
155
+ const codeLensField = StateField.define<DecorationSet>({
156
+ create() {
157
+ return Decoration.none;
158
+ },
159
+ update(decorations, tr) {
160
+ decorations = decorations.map(tr.changes);
161
+ for (const effect of tr.effects) {
162
+ if (effect.is(setCodeLenses)) {
163
+ decorations = Decoration.set(
164
+ effect.value.map((spec) =>
165
+ Decoration.widget({
166
+ widget: new CodeLensWidget(spec),
167
+ side: 1,
168
+ }).range(spec.pos),
169
+ ),
170
+ // Variable and cache lenses are collected separately, so sort
171
+ true,
172
+ );
173
+ }
174
+ }
175
+ return decorations;
176
+ },
177
+ provide: (field) => EditorView.decorations.from(field),
178
+ });
179
+
180
+ /**
181
+ * Plugin that keeps code lens decorations in sync with the document and the
182
+ * datasource/bucket state.
183
+ */
184
+ class CodeLensPlugin {
185
+ private readonly view: EditorView;
186
+ private readonly cellId: CellId;
187
+ private readonly includeCache: boolean;
188
+ private readonly unsubscribes: Array<() => void>;
189
+
190
+ // Delay (in ms) before recomputing lenses after user changes or store updates
191
+ private readonly debounceMs = 300;
192
+ private readonly scheduleUpdate: DebouncedFunc<() => void>;
193
+
194
+ constructor(view: EditorView, cellId: CellId, includeCache: boolean) {
195
+ this.view = view;
196
+ this.cellId = cellId;
197
+ this.includeCache = includeCache;
198
+ this.scheduleUpdate = debounce(() => this.run(), this.debounceMs);
199
+ const onStoreChange = () => this.scheduleUpdate();
200
+ this.unsubscribes = [
201
+ store.sub(datasetTablesAtom, onStoreChange),
202
+ store.sub(dataConnectionsMapAtom, onStoreChange),
203
+ store.sub(storageNamespacesAtom, onStoreChange),
204
+ // The declaring-cell filter depends on variables
205
+ store.sub(variablesAtom, onStoreChange),
206
+ ];
207
+ this.scheduleUpdate();
208
+ }
209
+
210
+ update(update: ViewUpdate) {
211
+ // Recompute on edits, and when the cell's language changes (e.g. Python ->
212
+ // SQL) so stale Python-only icons are cleared even if the text is unchanged
213
+ const adapterChanged =
214
+ update.startState.field(languageAdapterState, false)?.type !==
215
+ update.state.field(languageAdapterState, false)?.type;
216
+ if (update.docChanged || adapterChanged) {
217
+ this.scheduleUpdate();
218
+ }
219
+ }
220
+
221
+ destroy() {
222
+ this.scheduleUpdate.cancel();
223
+ for (const unsubscribe of this.unsubscribes) {
224
+ unsubscribe();
225
+ }
226
+ }
227
+
228
+ private run() {
229
+ const { state } = this.view;
230
+ const lenses: CodeLensSpec[] = [];
231
+
232
+ // Only python cells: SQL/markdown docs aren't python, and a cache icon
233
+ // inside a SQL string would be misleading.
234
+ const adapterType = state.field(languageAdapterState, false)?.type;
235
+ if (adapterType == null || adapterType === "python") {
236
+ const entities = getLensEntities(this.cellId);
237
+ const targets = findDeclarationSites({
238
+ state,
239
+ names: new Set(entities.keys()),
240
+ });
241
+ for (const target of targets) {
242
+ const kind = entities.get(target.name);
243
+ if (kind) {
244
+ lenses.push({ pos: target.to, kind, name: target.name });
245
+ }
246
+ }
247
+ if (this.includeCache) {
248
+ for (const site of findCacheSites(state)) {
249
+ lenses.push({
250
+ pos: site.to,
251
+ kind: "cache",
252
+ name: `cache:${site.from}`,
253
+ cache: { boundName: site.boundName, cacheName: site.cacheName },
254
+ });
255
+ }
256
+ }
257
+ }
258
+
259
+ // Defer dispatch to avoid triggering during an editor update cycle
260
+ queueMicrotask(() => {
261
+ this.view.dispatch({ effects: setCodeLenses.of(lenses) });
262
+ });
263
+ }
264
+ }
265
+
266
+ const codeLensTheme = EditorView.baseTheme({
267
+ ".mo-code-lens": {
268
+ display: "inline-flex",
269
+ verticalAlign: "baseline",
270
+ // Optically center the icon against the text
271
+ transform: "translateY(1.5px)",
272
+ marginLeft: "0.3em",
273
+ cursor: "pointer",
274
+ opacity: "0.5",
275
+ },
276
+ ".mo-code-lens:hover": {
277
+ opacity: "1",
278
+ },
279
+ });
280
+
281
+ /**
282
+ * Inline icons linking datasource/bucket variables and `mo.cache` /
283
+ * `mo.persistent_cache` calls to their panels.
284
+ * Gated behind the `editor_code_lens` feature flag.
285
+ */
286
+ export function codeLensBundle(cellId: CellId): Extension {
287
+ if (!getFeatureFlag("editor_code_lens")) {
288
+ return [];
289
+ }
290
+ return [
291
+ codeLensField,
292
+ codeLensHoverField,
293
+ ViewPlugin.define(
294
+ (view) => new CodeLensPlugin(view, cellId, getFeatureFlag("cache_panel")),
295
+ ),
296
+ codeLensTheme,
297
+ ];
298
+ }