@marimo-team/frontend 0.23.10-dev2 → 0.23.10-dev21
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.
- package/dist/assets/{CellStatus-B4qIAZip.js → CellStatus-DMwpAXMZ.js} +1 -1
- package/dist/assets/{ConnectedDataExplorerComponent-W0UfNkj7.js → ConnectedDataExplorerComponent-LDEBEgrJ.js} +1 -1
- package/dist/assets/{DeferredRequestRegistry-CNldVcrP.js → DeferredRequestRegistry-CzVJLtsG.js} +1 -1
- package/dist/assets/{ImperativeModal-B3Th7k4R.js → ImperativeModal-BeQmePpG.js} +1 -1
- package/dist/assets/{JsonOutput-sim6s58u.js → JsonOutput-B70lHHvX.js} +13 -13
- package/dist/assets/{LazyAnyLanguageCodeMirror-BEvXb3VX.js → LazyAnyLanguageCodeMirror-Bv7Emsba.js} +2 -2
- package/dist/assets/{MarimoErrorOutput-IoNFtcZT.js → MarimoErrorOutput-BQo8RTib.js} +1 -1
- package/dist/assets/{RSPContexts-CdN1NyAt.js → RSPContexts-Clr6RnG2.js} +1 -1
- package/dist/assets/{RenderHTML-BpmpkBqm.js → RenderHTML-DTHZ0W_b.js} +1 -1
- package/dist/assets/RunButton-eAKy_Bh8.js +1 -0
- package/dist/assets/__vite-browser-external-CeH7R2Sf.js +1 -0
- package/dist/assets/__vite-browser-external-DTK_qJHK.js +1 -0
- package/dist/assets/{add-cell-with-ai-Da5NaDZ_.js → add-cell-with-ai-CxjV-UXz.js} +10 -10
- package/dist/assets/{add-connection-dialog-qtpp-Zvj.js → add-connection-dialog-BHZQ8B7f.js} +1 -1
- package/dist/assets/{agent-panel-CTXCTxgV.js → agent-panel-CSht0CWB.js} +1 -1
- package/dist/assets/{ai-model-dropdown-CDevlJTs.js → ai-model-dropdown-Bbt--cwF.js} +1 -1
- package/dist/assets/{any-language-editor-CXeLf_N8.js → any-language-editor-CT8HF6T6.js} +1 -1
- package/dist/assets/{app-config-button-BXlR4nKW.js → app-config-button-Z8gpKuxR.js} +1 -1
- package/dist/assets/{architectureDiagram-VXUJARFQ-Cgi4wo9P.js → architectureDiagram-VXUJARFQ-BheLn0Ym.js} +1 -1
- package/dist/assets/{blockDiagram-VD42YOAC-CsHap8-F.js → blockDiagram-VD42YOAC-DQbkWeS9.js} +1 -1
- package/dist/assets/{c4Diagram-YG6GDRKO-CZuArudM.js → c4Diagram-YG6GDRKO-i6Rgjbmb.js} +1 -1
- package/dist/assets/{cache-panel-DYiVMv5x.js → cache-panel-js9LAxft.js} +1 -1
- package/dist/assets/{cell-editor-Z3xJhFik.js → cell-editor-72C0Zygh.js} +5 -5
- package/dist/assets/{cell-link-D26yaUlf.js → cell-link-ChdlswWe.js} +1 -1
- package/dist/assets/{cells-DZTFtAVj.js → cells-B1UeqCia.js} +64 -64
- package/dist/assets/cells-BSWdJzbh.css +2 -0
- package/dist/assets/channel-CT-fBYRb.js +1 -0
- package/dist/assets/{chat-display-BgfGVz5S.js → chat-display-D4aawkG5.js} +1 -1
- package/dist/assets/{chat-panel-CXxu4TZ_.js → chat-panel-DqzUBGAQ.js} +1 -1
- package/dist/assets/{chat-ui-BkyiYz6q.js → chat-ui-sZqz1Jfc.js} +1 -1
- package/dist/assets/{chunk-5FQGJX7Z-D9iBG0F7.js → chunk-5FQGJX7Z-CfK7VoEZ.js} +3 -3
- package/dist/assets/{chunk-ABZYJK2D-BG7Eb4WW.js → chunk-ABZYJK2D-DimfG7ZJ.js} +1 -1
- package/dist/assets/{chunk-ATLVNIR6-CqLn9HI1.js → chunk-ATLVNIR6-DJKlaII_.js} +1 -1
- package/dist/assets/{chunk-B4BG7PRW-D4SyZNjn.js → chunk-B4BG7PRW-CBlVg3ZE.js} +1 -1
- package/dist/assets/{chunk-DI55MBZ5-t9uiMPiN.js → chunk-DI55MBZ5-bDEWTXNJ.js} +1 -1
- package/dist/assets/{chunk-EXTU4WIE-BmVk7Fyq.js → chunk-EXTU4WIE-B_Wal6ww.js} +1 -1
- package/dist/assets/{chunk-JA3XYJ7Z-B5b2QHOb.js → chunk-JA3XYJ7Z-BU8T1Ru_.js} +1 -1
- package/dist/assets/{chunk-JZLCHNYA-1_sVfAnw.js → chunk-JZLCHNYA-B3ot_8ri.js} +1 -1
- package/dist/assets/{chunk-N4CR4FBY-CFJoD-EQ.js → chunk-N4CR4FBY-DWtppJdE.js} +2 -2
- package/dist/assets/{chunk-QN33PNHL-BBE_bx9E.js → chunk-QN33PNHL-DWg4n9qk.js} +1 -1
- package/dist/assets/{chunk-QXUST7PY-Cu1nR-L2.js → chunk-QXUST7PY-DXSOUlP-.js} +1 -1
- package/dist/assets/{chunk-S3R3BYOJ-Cl0iW04v.js → chunk-S3R3BYOJ-D_Pw7wuz.js} +1 -1
- package/dist/assets/{chunk-TZMSLE5B-f5ix6iSd.js → chunk-TZMSLE5B-CoYomI0C.js} +1 -1
- package/dist/assets/classDiagram-2ON5EDUG-Cl2DZr6D.js +1 -0
- package/dist/assets/classDiagram-v2-WZHVMYZB-CZjujGyB.js +1 -0
- package/dist/assets/{code-block-37QAKDTI-B19XL3UR.js → code-block-37QAKDTI-DKLARgTX.js} +1 -1
- package/dist/assets/{column-preview-DEY7H3Nv.js → column-preview-BIhZkwx8.js} +1 -1
- package/dist/assets/{command-KARR7KMq.js → command-DUeag2QH.js} +1 -1
- package/dist/assets/{command-palette-DNG8Q_or.js → command-palette-DZeNDzl3.js} +1 -1
- package/dist/assets/{common-BMiQG5NP.js → common-6io3mKWY.js} +1 -1
- package/dist/assets/{components-r46WLNJG.js → components-CZp0urSr.js} +1 -1
- package/dist/assets/{components-DYnN18mE.js → components-oTA8dVbr.js} +1 -1
- package/dist/assets/{config-ClMcu_sV.js → config-DH1Le_e1.js} +1 -1
- package/dist/assets/{context-QkTujrKn.js → context-C1Tm_47t.js} +1 -1
- package/dist/assets/{copy-icon-OjtDb4gO.js → copy-icon-z0dzhmL4.js} +1 -1
- package/dist/assets/{dagre-6UL2VRFP-CVKXpDlr.js → dagre-6UL2VRFP-BSaSwo7-.js} +1 -1
- package/dist/assets/{data-grid-overlay-editor-BdDYn72O.js → data-grid-overlay-editor-B9m0-RJr.js} +1 -1
- package/dist/assets/{datasource-B7h8qmJZ.js → datasource-7l-qg4-b.js} +1 -1
- package/dist/assets/{dates-CTxr0EqQ.js → dates-DS_7IZoI.js} +1 -1
- package/dist/assets/{dependency-graph-panel-uTlnFEz0.js → dependency-graph-panel-CqUTS6ib.js} +1 -1
- package/dist/assets/{diagram-PSM6KHXK-BfzLNKp-.js → diagram-PSM6KHXK-CIQUQR45.js} +1 -1
- package/dist/assets/{diagram-QEK2KX5R-D_H77Ni5.js → diagram-QEK2KX5R-DZcaMxln.js} +1 -1
- package/dist/assets/{diagram-S2PKOQOG-DJmVBeMk.js → diagram-S2PKOQOG-Dh2iJpv3.js} +1 -1
- package/dist/assets/{dist-CpcTHxTt.js → dist-AZ6vC6cU.js} +1 -1
- package/dist/assets/{dist-CAIBlJtJ.js → dist-B0N0-Vx5.js} +1 -1
- package/dist/assets/{dist-BF6UNR6V.js → dist-B7WRiLJK.js} +1 -1
- package/dist/assets/{dist-CqEym3Sr.js → dist-BE3jO1WU.js} +1 -1
- package/dist/assets/{dist-CpTFpfm_.js → dist-BZr6MMV-.js} +1 -1
- package/dist/assets/dist-BcAHw69V.js +1 -0
- package/dist/assets/dist-C63_XIZr.js +1 -0
- package/dist/assets/dist-CDHGLvB9.js +1 -0
- package/dist/assets/{dist-CocyeH0q.js → dist-CSozmdJ6.js} +1 -1
- package/dist/assets/{dist-CKT_lJKW.js → dist-CXYKut-0.js} +1 -1
- package/dist/assets/{dist-CNyMUs19.js → dist-CaCigNvN.js} +1 -1
- package/dist/assets/{dist-CciFN1z_.js → dist-Ckx5b63P.js} +1 -1
- package/dist/assets/{dist-DqVEVg0c.js → dist-CtcHy8Nq.js} +1 -1
- package/dist/assets/dist-CtfyEjVj.js +1 -0
- package/dist/assets/{dist-Dr8mWwQ_.js → dist-D4Od5Ds4.js} +1 -1
- package/dist/assets/{dist-BQWswd1A.js → dist-D7OgrWeC.js} +1 -1
- package/dist/assets/{dist-CBSMxaO_.js → dist-DCqxOggh.js} +1 -1
- package/dist/assets/dist-DK9FT3QL.js +1 -0
- package/dist/assets/{dist-CJIOLS6O.js → dist-DoJEa3O2.js} +1 -1
- package/dist/assets/{dist-B7U5jPfs.js → dist-LFeDu06u.js} +1 -1
- package/dist/assets/dist-bRDVNr1s.js +1 -0
- package/dist/assets/{dist-_fyDen1v.js → dist-v1cdVFWt.js} +1 -1
- package/dist/assets/{documentation-panel-DNberbcy.js → documentation-panel-DBd3biLb.js} +1 -1
- package/dist/assets/download-DcQWg8-m.js +9 -0
- package/dist/assets/{edit-page-CJPMGRxx.js → edit-page-CzRGkZBf.js} +6 -6
- package/dist/assets/{erDiagram-Q2GNP2WA-ROTNwSJz.js → erDiagram-Q2GNP2WA-ChWC983-.js} +1 -1
- package/dist/assets/{error-banner-LdWZDbqd.js → error-banner-CLO6LFll.js} +1 -1
- package/dist/assets/{error-panel-D5hoQy8n.js → error-panel-BoafWEAy.js} +1 -1
- package/dist/assets/{es-DGgq-Wes.js → es-au8YY-8E.js} +1 -1
- package/dist/assets/{esm-CqWdmSnV.js → esm-Cb2bnV6o.js} +1 -1
- package/dist/assets/{esm-DeiyaVAJ.js → esm-Cv-OC7z7.js} +1 -1
- package/dist/assets/eye-off-BT-KOYV5.js +1 -0
- package/dist/assets/{field-zLmMOSA4.js → field-B4CdIHa9.js} +1 -1
- package/dist/assets/file-explorer-panel-B94q-LIo.js +26 -0
- package/dist/assets/{file-icons-BrqycRag.js → file-icons-8bgrYNC0.js} +1 -1
- package/dist/assets/{file-name-input-BNHbCr1E.js → file-name-input-C-nkVqG_.js} +1 -1
- package/dist/assets/{fileToBase64-DZfwJMrG.js → fileToBase64-BeYUTUzO.js} +1 -1
- package/dist/assets/{floating-outline-BnioYLEY.js → floating-outline-BBTN16Pi.js} +1 -1
- package/dist/assets/{flowDiagram-NV44I4VS--ee3IIVF.js → flowDiagram-NV44I4VS-CwJmdEwh.js} +1 -1
- package/dist/assets/{focus-D3CLyF2k.js → focus-C0_hrGnH.js} +1 -1
- package/dist/assets/{form-DdqAF_p5.js → form-Bq0lMUxv.js} +1 -1
- package/dist/assets/{formats-b7Sf6DAK.js → formats-DP_z0P-n.js} +1 -1
- package/dist/assets/{formatting-CSG9kqNb.js → formatting-XTtGIhGk.js} +1 -1
- package/dist/assets/{gallery-page-Bcf7fYLy.js → gallery-page-BDt-STRr.js} +1 -1
- package/dist/assets/{ganttDiagram-JELNMOA3-BGhmW2aP.js → ganttDiagram-JELNMOA3-CFD5UywU.js} +1 -1
- package/dist/assets/{gitGraphDiagram-V2S2FVAM-DXFCZcxr.js → gitGraphDiagram-V2S2FVAM-DRxIbU0j.js} +1 -1
- package/dist/assets/{glide-data-editor-DqKNgyfg.js → glide-data-editor-CipAqqJq.js} +4 -4
- package/dist/assets/{globals-7JnRMGd4.js → globals-LRz1TwrD.js} +1 -1
- package/dist/assets/{home-page-hvU2Ck7f.js → home-page-WYmfqTfP.js} +1 -1
- package/dist/assets/{hooks-CneeLUm3.js → hooks-DyYXumVE.js} +1 -1
- package/dist/assets/{html-to-image-BoIWRm-U.js → html-to-image-rfnXdqfv.js} +1 -1
- package/dist/assets/index-C1PbYyzr.js +38 -0
- package/dist/assets/index-DsKy-8bh.css +2 -0
- package/dist/assets/{infoDiagram-HS3SLOUP-CaaUieFa.js → infoDiagram-HS3SLOUP-VEIg8kOj.js} +1 -1
- package/dist/assets/{input-C3Hrdlqq.js → input-TSilD7AA.js} +1 -1
- package/dist/assets/{journeyDiagram-XKPGCS4Q-9D2JCyrN.js → journeyDiagram-XKPGCS4Q-CzBYjYDP.js} +1 -1
- package/dist/assets/{kanban-definition-3W4ZIXB7-DxV26rf-.js → kanban-definition-3W4ZIXB7-qf5QcOCE.js} +1 -1
- package/dist/assets/{kiosk-mode-CZZ1SAgt.js → kiosk-mode-Da3sO64c.js} +1 -1
- package/dist/assets/layout-DYQGL_5W.js +9 -0
- package/dist/assets/{linear-CW_ww8od.js → linear-Bg82k_or.js} +1 -1
- package/dist/assets/{links-1rtF1-eC.js → links-C6riF5tE.js} +1 -1
- package/dist/assets/{logs-panel-fbUDvNKz.js → logs-panel-CBQtSb87.js} +1 -1
- package/dist/assets/{markdown-renderer-BGO5zfUp.js → markdown-renderer-YEl8Z67L.js} +3 -3
- package/dist/assets/mermaid-4DMBBIKO-BuE4YRiK.js +1 -0
- package/dist/assets/{mermaid-Bes0ynI8.js → mermaid-DskEfPqD.js} +3 -3
- package/dist/assets/{mermaid-parser.core-aYU6qXxk.js → mermaid-parser.core-Cw_lBEej.js} +1 -1
- package/dist/assets/{mindmap-definition-VGOIOE7T-DTJAbAQ8.js → mindmap-definition-VGOIOE7T-b6NvhSJG.js} +1 -1
- package/dist/assets/{name-cell-input-IbrFfjTR.js → name-cell-input-CSSNMAt-.js} +1 -1
- package/dist/assets/{number-overlay-editor-DL4IwqDH.js → number-overlay-editor-DXGzRTU9.js} +1 -1
- package/dist/assets/{outline-panel-BQ87B9Ft.js → outline-panel-Bzu7s3vt.js} +1 -1
- package/dist/assets/{packages-panel-ChY1D8eZ.js → packages-panel-DsHF0wGn.js} +1 -1
- package/dist/assets/{pair-with-agent-modal-1tufe5MP.js → pair-with-agent-modal-Dh1WKytX.js} +1 -1
- package/dist/assets/{panels-DWrP0hzF.js → panels-Rpjf9H5q.js} +1 -1
- package/dist/assets/{pathUtils-CJjndqMI.js → pathUtils-vgBYIo5B.js} +1 -1
- package/dist/assets/{pieDiagram-ADFJNKIX-_3l2XiEo.js → pieDiagram-ADFJNKIX-DxRJfbR9.js} +1 -1
- package/dist/assets/{precisionRound-Cl9k9ZmS.js → precisionRound-NX56vp6K.js} +1 -1
- package/dist/assets/{process-output-CW1wS2Hr.js → process-output-D34znTpg.js} +1 -1
- package/dist/assets/{quadrantDiagram-AYHSOK5B-CX3AMAvR.js → quadrantDiagram-AYHSOK5B-CYmhoW3N.js} +1 -1
- package/dist/assets/{radio-group-9x2A1Fsc.js → radio-group-B4UJ7sCK.js} +1 -1
- package/dist/assets/{react-vega-CXIQBUis.js → react-vega-7FnlLMIn.js} +1 -1
- package/dist/assets/react-vega-hzWc6HV-.js +1 -0
- package/dist/assets/readonly-python-code-DRB4Oujr.js +1 -0
- package/dist/assets/{renderShortcut-CcFk3m01.js → renderShortcut-BTgMpqTK.js} +1 -1
- package/dist/assets/{request-registry--h6PWG50.js → request-registry-cDhqBe-K.js} +1 -1
- package/dist/assets/{requirementDiagram-UZGBJVZJ-ORHKBnkg.js → requirementDiagram-UZGBJVZJ-COy0V1k7.js} +1 -1
- package/dist/assets/{reveal-component-D13HX3en.js → reveal-component-CMD_BnK_.js} +3 -3
- package/dist/assets/{run-page-BNG5gaoM.js → run-page-BGVh53Fv.js} +1 -1
- package/dist/assets/{sankeyDiagram-TZEHDZUN-Dvb8kmWa.js → sankeyDiagram-TZEHDZUN-CltfYesU.js} +1 -1
- package/dist/assets/save-worker-Bcr7rl0C.js +77 -0
- package/dist/assets/scratchpad-panel-Bu5uSOnh.js +1 -0
- package/dist/assets/{secrets-panel-BBvdIhtU.js → secrets-panel-C-AiYcTm.js} +1 -1
- package/dist/assets/{sequenceDiagram-WL72ISMW-DQycpQtE.js → sequenceDiagram-WL72ISMW-poUheIRc.js} +1 -1
- package/dist/assets/session-panel-CUuZscI9.js +1 -0
- package/dist/assets/{share-DMwTZOTH.js → share-DQLjaPiK.js} +1 -1
- package/dist/assets/{snippets-panel-C4UEEe7X.js → snippets-panel-FZipjVGj.js} +1 -1
- package/dist/assets/{spec-CPQR_o92.js → spec-D1ptWKg6.js} +1 -1
- package/dist/assets/{state-BGDrw26V.js → state-B_c922_d.js} +1 -1
- package/dist/assets/{state-DTislnZA.js → state-CcAGAozT.js} +1 -1
- package/dist/assets/{state-D2ocm4JL.js → state-Dd_QMTIr.js} +1 -1
- package/dist/assets/{state-C6hNg_X-.js → state-DhERtUKY.js} +3 -3
- package/dist/assets/{stateDiagram-FKZM4ZOC-D78DIR_F.js → stateDiagram-FKZM4ZOC-DvWmNTbQ.js} +1 -1
- package/dist/assets/stateDiagram-v2-4FDKWEC3-B48rhKHl.js +1 -0
- package/dist/assets/stex-C8c2RsN8.js +1 -0
- package/dist/assets/{swiper-component-YGJlBaCp.js → swiper-component-B_R-BaT5.js} +1 -1
- package/dist/assets/{switch-BiU_sAcn.js → switch-NmKFCQsT.js} +1 -1
- package/dist/assets/{terminal-BYGihNNp.js → terminal-Brlgq9Xx.js} +1 -1
- package/dist/assets/{textarea-C3qk0qJ7.js → textarea-DsHy664W.js} +1 -1
- package/dist/assets/{time-DLdI7jB3.js → time-tROo95ox.js} +1 -1
- package/dist/assets/{timeline-definition-IT6M3QCI-DIywx3xf.js → timeline-definition-IT6M3QCI-CfgM6G05.js} +1 -1
- package/dist/assets/{tracing-B0e3S01T.js → tracing-B91zi1Cr.js} +1 -1
- package/dist/assets/{tracing-panel-CmLBnJCg.js → tracing-panel-B68PNYS8.js} +2 -2
- package/dist/assets/tree-actions-DfrTuUnZ.js +1 -0
- package/dist/assets/use-toast-9t59MOqR.js +1 -0
- package/dist/assets/{useBoolean-Bp18o6XG.js → useBoolean-DElMi9Nd.js} +1 -1
- package/dist/assets/useCellActionButton-DS0VmOT4.js +1 -0
- package/dist/assets/{useDateFormatter-ICIDGgHf.js → useDateFormatter-d3yglQmW.js} +1 -1
- package/dist/assets/useDeleteCell-ByueGyf0.js +1 -0
- package/dist/assets/{useDependencyPanelTab-DK6mAVzQ.js → useDependencyPanelTab-B-_R5nHC.js} +1 -1
- package/dist/assets/{useInstallPackage-DUF4IRRI.js → useInstallPackage-CKRPRNft.js} +1 -1
- package/dist/assets/useNotebookActions-BPxBZnuZ.js +1 -0
- package/dist/assets/{useNumberFormatter-ByUv-u9o.js → useNumberFormatter-CW4V-fpE.js} +1 -1
- package/dist/assets/{usePress-DQ_tAz5W.js → usePress-jH2RfcUG.js} +1 -1
- package/dist/assets/{useRunCells-Dt6DS29E.js → useRunCells-c7zq0oWm.js} +1 -1
- package/dist/assets/{useSplitCell-VdsEBWhq.js → useSplitCell-Dd5NLOUh.js} +1 -1
- package/dist/assets/{utils-DCL4n9wx.js → utils-DQRuLEof.js} +1 -1
- package/dist/assets/{vega-component-COOhhZ3h.js → vega-component-DqVeZqOU.js} +1 -1
- package/dist/assets/{vega-loader.browser-C8wT63Va.js → vega-loader.browser-xq8miGHn.js} +1 -1
- package/dist/assets/{worker-B38WhSlZ.js → worker-Bp53hInb.js} +6 -6
- package/dist/assets/{write-secret-modal-BFLlHwgU.js → write-secret-modal-BRlgVZs9.js} +1 -1
- package/dist/assets/{xychartDiagram-PRI3JC2R-CjS1dL8k.js → xychartDiagram-PRI3JC2R-Ij7-bbhi.js} +1 -1
- package/dist/index.html +117 -116
- package/package.json +3 -3
- package/src/components/data-table/__tests__/data-table.test.tsx +154 -12
- package/src/components/data-table/hover-tooltip/__tests__/content.test.ts +60 -0
- package/src/components/data-table/hover-tooltip/content.ts +44 -0
- package/src/components/data-table/hover-tooltip/hover-tooltip.tsx +55 -0
- package/src/components/data-table/hover-tooltip/use-table-hover-tooltip.ts +159 -0
- package/src/components/data-table/renderers.tsx +27 -43
- package/src/components/datasources/__tests__/filter-empty.test.ts +183 -0
- package/src/components/datasources/datasources.tsx +92 -3
- package/src/components/editor/cell/cell-context-menu.tsx +15 -2
- package/src/components/editor/documentation.css +16 -0
- package/src/components/editor/file-tree/file-explorer.tsx +8 -18
- package/src/components/editor/file-tree/tree-actions.tsx +46 -1
- package/src/components/slides/__tests__/minimap-actions.test.tsx +166 -0
- package/src/components/slides/minimap.tsx +127 -10
- package/src/components/storage/__tests__/storage-inspector.test.ts +53 -0
- package/src/components/storage/storage-inspector.tsx +68 -48
- package/src/components/ui/__tests__/use-toast.test.ts +75 -0
- package/src/components/ui/use-toast.ts +33 -13
- package/src/core/cells/__tests__/__snapshots__/cells.test.ts.snap +0 -28
- package/src/core/cells/__tests__/cell.test.ts +29 -2
- package/src/core/cells/cell.ts +5 -1
- package/src/core/codemirror/go-to-definition/__tests__/utils.test.ts +37 -0
- package/src/core/codemirror/go-to-definition/commands.ts +17 -9
- package/src/core/codemirror/go-to-definition/utils.ts +1 -0
- package/src/core/codemirror/language/languages/sql/utils.ts +3 -1
- package/src/core/datasets/data-source-connections.ts +2 -0
- package/src/core/network/__tests__/requests-static.test.ts +30 -0
- package/src/core/network/requests-static.ts +14 -10
- package/src/core/wasm/worker/bootstrap.ts +12 -4
- package/src/plugins/layout/DownloadPlugin.tsx +1 -1
- package/dist/assets/RunButton-NDsrcmxR.js +0 -1
- package/dist/assets/__vite-browser-external-DuZehUbK.js +0 -1
- package/dist/assets/__vite-browser-external-Jpm67kL1.js +0 -1
- package/dist/assets/cells-jmgGt1lS.css +0 -2
- package/dist/assets/channel-6XBTrC3Q.js +0 -1
- package/dist/assets/classDiagram-2ON5EDUG-DlIMDu6i.js +0 -1
- package/dist/assets/classDiagram-v2-WZHVMYZB-CcIhhkQu.js +0 -1
- package/dist/assets/dist-BtL81uwZ.js +0 -1
- package/dist/assets/dist-Bww7hlVc.js +0 -1
- package/dist/assets/dist-CuCuJBdf.js +0 -1
- package/dist/assets/dist-W1iHBJeE.js +0 -1
- package/dist/assets/dist-cgiAP5sW.js +0 -1
- package/dist/assets/dist-vkd1160q.js +0 -1
- package/dist/assets/download-HxGLUdmz.js +0 -9
- package/dist/assets/file-explorer-panel-Dpu3jlWY.js +0 -26
- package/dist/assets/index-BIw7BKLH.css +0 -2
- package/dist/assets/index-CgI7_ZFC.js +0 -38
- package/dist/assets/layout-tjJkaOem.js +0 -9
- package/dist/assets/mermaid-4DMBBIKO-CekzuCTz.js +0 -1
- package/dist/assets/play-C7DcCsoO.js +0 -1
- package/dist/assets/react-vega-COx3Ibyn.js +0 -1
- package/dist/assets/readonly-python-code-CEfd-Ppu.js +0 -1
- package/dist/assets/save-worker-D2iQi-UK.js +0 -77
- package/dist/assets/scratchpad-panel-fupP7ZgK.js +0 -1
- package/dist/assets/session-panel-B9dcCqYr.js +0 -1
- package/dist/assets/stateDiagram-v2-4FDKWEC3-DX9rpmwh.js +0 -1
- package/dist/assets/stex-Ccczot4V.js +0 -1
- package/dist/assets/tree-actions-BM_EJr3E.js +0 -1
- package/dist/assets/use-toast-IPAtJGea.js +0 -1
- package/dist/assets/useCellActionButton-D2MPJYfm.js +0 -1
- package/dist/assets/useDeleteCell-vHE9B5l2.js +0 -1
- package/dist/assets/useNotebookActions-BV5iVwE4.js +0 -1
- /package/dist/assets/{Deferred-CP7vq682.js → Deferred-DWBqOhWa.js} +0 -0
- /package/dist/assets/{SSRProvider-CkFAAHXw.js → SSRProvider-BIDQNg9Q.js} +0 -0
- /package/dist/assets/{alert-yTS3WpF4.js → alert-DrHguQlr.js} +0 -0
- /package/dist/assets/{azure-B42ls0Ui.js → azure-DBVzcmvx.js} +0 -0
- /package/dist/assets/{badge-j3NGjqhR.js → badge-DOX1Xxa9.js} +0 -0
- /package/dist/assets/{blob-Bgnx1kuY.js → blob-3_FN0u9S.js} +0 -0
- /package/dist/assets/{bundle.esm-DjhGJy4I.js → bundle.esm-BXIlAZ6T.js} +0 -0
- /package/dist/assets/{card--6HRj4T9.js → card-BFWJLptH.js} +0 -0
- /package/dist/assets/{copy-LK56fFow.js → copy-Ch48HVPK.js} +0 -0
- /package/dist/assets/{defaultLocale-BLUna9fQ.js → defaultLocale-DPBdGRrH.js} +0 -0
- /package/dist/assets/{defaultLocale-DzliDDTm.js → defaultLocale-Lfi0pexn.js} +0 -0
- /package/dist/assets/{dialog-DzC_QCtT.js → dialog-DqOQT_n4.js} +0 -0
- /package/dist/assets/{dist-B1U1kGCR.js → dist-BU26XwgJ.js} +0 -0
- /package/dist/assets/{dist-ChF5Ln9c.js → dist-COs9gIu5.js} +0 -0
- /package/dist/assets/{dist-4ni0fia5.js → dist-DP9Si-4r.js} +0 -0
- /package/dist/assets/{dist-CPczQFlJ.js → dist-DkA__6UI.js} +0 -0
- /package/dist/assets/{emotion-is-prop-valid.esm-C59xfSYt.js → emotion-is-prop-valid.esm-Dangy3Bv.js} +0 -0
- /package/dist/assets/{en-US-Cb8rIK52.js → en-US-C7vnqfgk.js} +0 -0
- /package/dist/assets/{errors-vr57w7Ul.js → errors-iwK4b4VF.js} +0 -0
- /package/dist/assets/{events-CPoJAfgx.js → events-CBm-hwqS.js} +0 -0
- /package/dist/assets/{extends-BiFDv3jB.js → extends-Dqvpuc10.js} +0 -0
- /package/dist/assets/{file-BrdxGLRX.js → file-HTLbeC2b.js} +0 -0
- /package/dist/assets/{file-headphone-BrQspHac.js → file-headphone-B3fuktN0.js} +0 -0
- /package/dist/assets/{github-BKS_2Qwn.js → github-raQvpeuZ.js} +0 -0
- /package/dist/assets/{house-mGK3v0Mm.js → house-D2ldnAB9.js} +0 -0
- /package/dist/assets/{icons-Ol38nIbL.js → icons-8tfAri2V.js} +0 -0
- /package/dist/assets/{image-DQHXdEQn.js → image-BIibSXT6.js} +0 -0
- /package/dist/assets/{isValid-CklTTytn.js → isValid-DdlR4-BY.js} +0 -0
- /package/dist/assets/{kbd-CTUAEnEx.js → kbd-BJB2rf7K.js} +0 -0
- /package/dist/assets/{link-CfEtM3Rl.js → link-CoJxTwWE.js} +0 -0
- /package/dist/assets/{links-D1JoyKTt.js → links-B8WzCnbo.js} +0 -0
- /package/dist/assets/{message-circle-CWm2KnSx.js → message-circle-1YLdnr8A.js} +0 -0
- /package/dist/assets/{micromark-factory-space-BygYYKhs.js → micromark-factory-space-bqhKsQDn.js} +0 -0
- /package/dist/assets/{numbers-C3BAdHZE.js → numbers-mY4EY0yG.js} +0 -0
- /package/dist/assets/{objectWithoutPropertiesLoose-DfWeGRFv.js → objectWithoutPropertiesLoose-DoKw85w0.js} +0 -0
- /package/dist/assets/{ordinal-_nQ2r1qQ.js → ordinal-bISkqI45.js} +0 -0
- /package/dist/assets/{package-Tv6ztuzw.js → package-B8oXOUM-.js} +0 -0
- /package/dist/assets/{paths-D5zczhUD.js → paths-SFhaqGlE.js} +0 -0
- /package/dist/assets/{plus-BgB18UzY.js → plus-CxkHs8QM.js} +0 -0
- /package/dist/assets/{preload-helper-BPPi7vOr.js → preload-helper-DdZsAcJe.js} +0 -0
- /package/dist/assets/{prop-types-DaaA-ptl.js → prop-types-DVDiRdwc.js} +0 -0
- /package/dist/assets/{purify.es-B9KxLTTS.js → purify.es-DvRMX74T.js} +0 -0
- /package/dist/assets/{range-gMGfxVwZ.js → range-Dk7lXDev.js} +0 -0
- /package/dist/assets/{react-icons.esm-BNzu6e7h.js → react-icons.esm--O4lBTlZ.js} +0 -0
- /package/dist/assets/{react-resizable-panels.browser.esm-CV8-hvjx.js → react-resizable-panels.browser.esm-BdtIs0E-.js} +0 -0
- /package/dist/assets/{refresh-ccw-C-n2VFP5.js → refresh-ccw-DLc784Sj.js} +0 -0
- /package/dist/assets/{refresh-cw-DHwG4Mac.js → refresh-cw-a_9k9BK7.js} +0 -0
- /package/dist/assets/{rotate-ccw-CNsAb2VZ.js → rotate-ccw-DoQtGgvU.js} +0 -0
- /package/dist/assets/{save-Clg5dMoP.js → save-DZ5aail6.js} +0 -0
- /package/dist/assets/{semaphore-FlZezxaf.js → semaphore-X3ApuO41.js} +0 -0
- /package/dist/assets/{session-0B5NBztP.js → session-DGdfs0bJ.js} +0 -0
- /package/dist/assets/{settings-DfFe0dWD.js → settings-SnYErNWQ.js} +0 -0
- /package/dist/assets/{sparkles-lWUAsPhp.js → sparkles-CC9Bko6a.js} +0 -0
- /package/dist/assets/{spinner-Bhir8k53.js → spinner-UuZAUjoP.js} +0 -0
- /package/dist/assets/{square-function-uY_yJr5g.js → square-function-blYaQso8.js} +0 -0
- /package/dist/assets/{square-B5xWCt0a.js → square-rACnnz-q.js} +0 -0
- /package/dist/assets/{stex-BGrE-q7N.js → stex-lcoTi-7o.js} +0 -0
- /package/dist/assets/{table-BGPSHfig.js → table-Bgc-inJs.js} +0 -0
- /package/dist/assets/{trash-2-rVklqqFF.js → trash-2-BJLYnZpG.js} +0 -0
- /package/dist/assets/{trash-DqeDe-Ua.js → trash-wVOgGgQw.js} +0 -0
- /package/dist/assets/{triangle-alert-D2p96PEF.js → triangle-alert-CJ0ZIqcz.js} +0 -0
- /package/dist/assets/{types-W8WWuumF.js → types-BYwxXaSY.js} +0 -0
- /package/dist/assets/{useAsyncData-bgszE9F0.js → useAsyncData-Dg8E_bPh.js} +0 -0
- /package/dist/assets/{useDebounce-7xZwVnnu.js → useDebounce-_BZcy6gx.js} +0 -0
- /package/dist/assets/{useDeepCompareMemoize-zUHU--0D.js → useDeepCompareMemoize-CWcgQCbT.js} +0 -0
- /package/dist/assets/{useHotkey-TKvjHf1m.js → useHotkey-B5GI97Mf.js} +0 -0
- /package/dist/assets/{useIframeCapabilities-CcI1zSdn.js → useIframeCapabilities-DPVTppnD.js} +0 -0
- /package/dist/assets/{useTheme-CI2eq4XN.js → useTheme-BrivXfaa.js} +0 -0
- /package/dist/assets/{uuid-e9lSomwA.js → uuid-D_zLHhNi.js} +0 -0
- /package/dist/assets/{workflow-Bm8qF7yj.js → workflow-CgnDnnoN.js} +0 -0
- /package/dist/assets/{youtube-CbdpN8oL.js → youtube-3lRHw8NU.js} +0 -0
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
2
|
|
|
3
3
|
import { CommandList } from "cmdk";
|
|
4
|
-
import { atom, useAtomValue, useSetAtom } from "jotai";
|
|
4
|
+
import { atom, useAtom, useAtomValue, useSetAtom } from "jotai";
|
|
5
|
+
import { atomWithStorage } from "jotai/utils";
|
|
5
6
|
import { PlusIcon, PlusSquareIcon, XIcon } from "lucide-react";
|
|
6
7
|
import React from "react";
|
|
7
8
|
import { dbDisplayName } from "@/components/databases/display";
|
|
8
9
|
import { EngineVariable } from "@/components/databases/engine-variable";
|
|
9
10
|
import { DatabaseLogo } from "@/components/databases/icon";
|
|
10
|
-
import {
|
|
11
|
+
import {
|
|
12
|
+
RefreshIconButton,
|
|
13
|
+
VisibilityToggleButton,
|
|
14
|
+
} from "@/components/editor/file-tree/tree-actions";
|
|
11
15
|
import { CopyClipboardIcon } from "@/components/icons/copy-icon";
|
|
12
16
|
import { Button } from "@/components/ui/button";
|
|
13
17
|
import { Command, CommandInput, CommandItem } from "@/components/ui/command";
|
|
@@ -52,6 +56,7 @@ import { sortBy } from "@/utils/arrays";
|
|
|
52
56
|
import { logNever } from "@/utils/assertNever";
|
|
53
57
|
import { cn } from "@/utils/cn";
|
|
54
58
|
import { Events } from "@/utils/events";
|
|
59
|
+
import { jotaiJsonStorage } from "@/utils/storage/jotai";
|
|
55
60
|
import {
|
|
56
61
|
DatabaseIcon,
|
|
57
62
|
SchemaIcon,
|
|
@@ -116,6 +121,63 @@ const sortedTablesAtom = atom((get) => {
|
|
|
116
121
|
});
|
|
117
122
|
});
|
|
118
123
|
|
|
124
|
+
/**
|
|
125
|
+
* Whether to hide empty schemas and databases (those with no tables) in the
|
|
126
|
+
* datasources panel.
|
|
127
|
+
*/
|
|
128
|
+
export const hideEmptyDatasourcesAtom = atomWithStorage<boolean>(
|
|
129
|
+
"marimo:datasources:hideEmpty",
|
|
130
|
+
false,
|
|
131
|
+
jotaiJsonStorage,
|
|
132
|
+
{ getOnInit: true },
|
|
133
|
+
);
|
|
134
|
+
|
|
135
|
+
function isKnownEmptySchema(schema: DatabaseSchema): boolean {
|
|
136
|
+
return schema.tables_resolved !== false && schema.tables.length === 0;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Apply the "hide empty" filter to a connection's databases.
|
|
141
|
+
*
|
|
142
|
+
* - Schemas with confirmed-empty table lists are hidden.
|
|
143
|
+
* - Databases are hidden when either (a) their schemas have been enumerated
|
|
144
|
+
* and the list is empty, or (b) every schema in them was hidden by the
|
|
145
|
+
* schema-level filter.
|
|
146
|
+
* - Databases / schemas whose contents haven't been resolved yet (deferred
|
|
147
|
+
* discovery — `schemas_resolved === false` or `tables_resolved === false`)
|
|
148
|
+
* are preserved so the user can expand them to trigger a fetch.
|
|
149
|
+
*/
|
|
150
|
+
export function filterEmptyDatabases(databases: Database[]): Database[] {
|
|
151
|
+
let changed = false;
|
|
152
|
+
const result: Database[] = [];
|
|
153
|
+
for (const database of databases) {
|
|
154
|
+
// Known-empty database: schema list was enumerated and is empty.
|
|
155
|
+
if (database.schemas_resolved !== false && database.schemas.length === 0) {
|
|
156
|
+
changed = true;
|
|
157
|
+
continue;
|
|
158
|
+
}
|
|
159
|
+
// Deferred schema discovery — keep so the user can expand and load.
|
|
160
|
+
if (database.schemas.length === 0) {
|
|
161
|
+
result.push(database);
|
|
162
|
+
continue;
|
|
163
|
+
}
|
|
164
|
+
const visibleSchemas = database.schemas.filter(
|
|
165
|
+
(schema) => !isKnownEmptySchema(schema),
|
|
166
|
+
);
|
|
167
|
+
if (visibleSchemas.length === 0) {
|
|
168
|
+
changed = true;
|
|
169
|
+
continue;
|
|
170
|
+
}
|
|
171
|
+
if (visibleSchemas.length === database.schemas.length) {
|
|
172
|
+
result.push(database);
|
|
173
|
+
continue;
|
|
174
|
+
}
|
|
175
|
+
changed = true;
|
|
176
|
+
result.push({ ...database, schemas: visibleSchemas });
|
|
177
|
+
}
|
|
178
|
+
return changed ? result : databases;
|
|
179
|
+
}
|
|
180
|
+
|
|
119
181
|
/**
|
|
120
182
|
* This atom is used to get the data connections that are available to the user.
|
|
121
183
|
* It filters out the internal engines if it has no databases or if it has only the in-memory database and no schemas.
|
|
@@ -152,10 +214,27 @@ export const connectionsAtom = atom((get) => {
|
|
|
152
214
|
|
|
153
215
|
export const DataSources: React.FC = () => {
|
|
154
216
|
const [searchValue, setSearchValue] = React.useState<string>("");
|
|
217
|
+
const [hideEmpty, setHideEmpty] = useAtom(hideEmptyDatasourcesAtom);
|
|
155
218
|
|
|
156
219
|
const closeAllColumns = useSetAtom(closeAllColumnsAtom);
|
|
157
220
|
const tables = useAtomValue(sortedTablesAtom);
|
|
158
|
-
const
|
|
221
|
+
const rawConnections = useAtomValue(connectionsAtom);
|
|
222
|
+
|
|
223
|
+
const dataConnections = React.useMemo(() => {
|
|
224
|
+
if (!hideEmpty) {
|
|
225
|
+
return rawConnections;
|
|
226
|
+
}
|
|
227
|
+
let changed = false;
|
|
228
|
+
const filtered = rawConnections.map((connection) => {
|
|
229
|
+
const databases = filterEmptyDatabases(connection.databases);
|
|
230
|
+
if (databases === connection.databases) {
|
|
231
|
+
return connection;
|
|
232
|
+
}
|
|
233
|
+
changed = true;
|
|
234
|
+
return { ...connection, databases };
|
|
235
|
+
});
|
|
236
|
+
return changed ? filtered : rawConnections;
|
|
237
|
+
}, [rawConnections, hideEmpty]);
|
|
159
238
|
|
|
160
239
|
if (tables.length === 0 && dataConnections.length === 0) {
|
|
161
240
|
return (
|
|
@@ -204,6 +283,16 @@ export const DataSources: React.FC = () => {
|
|
|
204
283
|
</button>
|
|
205
284
|
)}
|
|
206
285
|
|
|
286
|
+
<VisibilityToggleButton
|
|
287
|
+
data-testid="datasources-hide-empty-button"
|
|
288
|
+
isVisible={!hideEmpty}
|
|
289
|
+
onToggle={() => setHideEmpty(!hideEmpty)}
|
|
290
|
+
showTooltip="Show empty schemas and databases"
|
|
291
|
+
hideTooltip="Hide empty schemas and databases"
|
|
292
|
+
size="sm"
|
|
293
|
+
className="px-2 rounded-none focus-visible:outline-hidden"
|
|
294
|
+
/>
|
|
295
|
+
|
|
207
296
|
<AddConnectionDialog>
|
|
208
297
|
<Button
|
|
209
298
|
variant="ghost"
|
|
@@ -61,6 +61,7 @@ export const CellActionsContextMenu = ({
|
|
|
61
61
|
});
|
|
62
62
|
const [imageRightClicked, setImageRightClicked] =
|
|
63
63
|
React.useState<HTMLImageElement>();
|
|
64
|
+
const suppressCloseAutoFocus = React.useRef(false);
|
|
64
65
|
|
|
65
66
|
const DEFAULT_CONTEXT_MENU_ITEMS: ActionButton[] = [
|
|
66
67
|
{
|
|
@@ -166,7 +167,10 @@ export const CellActionsContextMenu = ({
|
|
|
166
167
|
handle: () => {
|
|
167
168
|
const editorView = getEditorView();
|
|
168
169
|
if (editorView) {
|
|
169
|
-
|
|
170
|
+
// Only suppress focus restoration when we actually navigated;
|
|
171
|
+
// otherwise let Radix return focus to the trigger cell.
|
|
172
|
+
suppressCloseAutoFocus.current =
|
|
173
|
+
goToDefinitionAtCursorPosition(editorView);
|
|
170
174
|
}
|
|
171
175
|
},
|
|
172
176
|
},
|
|
@@ -194,7 +198,16 @@ export const CellActionsContextMenu = ({
|
|
|
194
198
|
>
|
|
195
199
|
{children}
|
|
196
200
|
</ContextMenuTrigger>
|
|
197
|
-
<ContextMenuContent
|
|
201
|
+
<ContextMenuContent
|
|
202
|
+
className="w-[300px]"
|
|
203
|
+
scrollable={true}
|
|
204
|
+
onCloseAutoFocus={(evt) => {
|
|
205
|
+
if (suppressCloseAutoFocus.current) {
|
|
206
|
+
evt.preventDefault();
|
|
207
|
+
suppressCloseAutoFocus.current = false;
|
|
208
|
+
}
|
|
209
|
+
}}
|
|
210
|
+
>
|
|
198
211
|
{visibleActions.map((group, i) => (
|
|
199
212
|
<Fragment key={i}>
|
|
200
213
|
{group.map((action) => {
|
|
@@ -51,6 +51,22 @@
|
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
+
a {
|
|
55
|
+
cursor: pointer;
|
|
56
|
+
text-decoration: inherit;
|
|
57
|
+
|
|
58
|
+
@apply text-link;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
a:hover,
|
|
62
|
+
a:active {
|
|
63
|
+
text-decoration: underline;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
a:visited {
|
|
67
|
+
@apply text-link-visited;
|
|
68
|
+
}
|
|
69
|
+
|
|
54
70
|
code {
|
|
55
71
|
@apply border px-1 rounded font-mono bg-[var(--slate-2)] text-sm mb-4 mt-2;
|
|
56
72
|
}
|
|
@@ -9,8 +9,6 @@ import {
|
|
|
9
9
|
CopyMinusIcon,
|
|
10
10
|
DownloadIcon,
|
|
11
11
|
ExternalLinkIcon,
|
|
12
|
-
EyeIcon,
|
|
13
|
-
EyeOffIcon,
|
|
14
12
|
FilePlus2Icon,
|
|
15
13
|
FolderPlusIcon,
|
|
16
14
|
ListTreeIcon,
|
|
@@ -43,6 +41,7 @@ import {
|
|
|
43
41
|
MENU_ITEM_ICON_CLASS,
|
|
44
42
|
RefreshIconButton,
|
|
45
43
|
TreeChevron,
|
|
44
|
+
VisibilityToggleButton,
|
|
46
45
|
} from "@/components/editor/file-tree/tree-actions";
|
|
47
46
|
import { MarimoIcon, MarimoPlusIcon } from "@/components/icons/marimo-icons";
|
|
48
47
|
import { Spinner } from "@/components/icons/spinner";
|
|
@@ -338,22 +337,13 @@ const Toolbar = ({
|
|
|
338
337
|
data-testid="file-explorer-refresh-button"
|
|
339
338
|
onClick={onRefresh}
|
|
340
339
|
/>
|
|
341
|
-
<
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
size="xs"
|
|
349
|
-
>
|
|
350
|
-
{showHiddenFiles ? (
|
|
351
|
-
<EyeIcon size={16} className="text-primary" />
|
|
352
|
-
) : (
|
|
353
|
-
<EyeOffIcon size={16} />
|
|
354
|
-
)}
|
|
355
|
-
</Button>
|
|
356
|
-
</Tooltip>
|
|
340
|
+
<VisibilityToggleButton
|
|
341
|
+
data-testid="file-explorer-hidden-files-button"
|
|
342
|
+
isVisible={showHiddenFiles}
|
|
343
|
+
onToggle={onHidden}
|
|
344
|
+
showTooltip="Show hidden files"
|
|
345
|
+
hideTooltip="Hide hidden files"
|
|
346
|
+
/>
|
|
357
347
|
<Tooltip content="Collapse all folders">
|
|
358
348
|
<Button
|
|
359
349
|
data-testid="file-explorer-collapse-button"
|
|
@@ -2,11 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
4
|
ChevronRightIcon,
|
|
5
|
+
EyeIcon,
|
|
6
|
+
EyeOffIcon,
|
|
5
7
|
MoreVerticalIcon,
|
|
6
8
|
RefreshCwIcon,
|
|
7
9
|
} from "lucide-react";
|
|
8
10
|
import React, { useCallback, useState } from "react";
|
|
9
|
-
import { Button } from "@/components/ui/button";
|
|
11
|
+
import { Button, type ButtonProps } from "@/components/ui/button";
|
|
10
12
|
import { Tooltip } from "@/components/ui/tooltip";
|
|
11
13
|
import { cn } from "@/utils/cn";
|
|
12
14
|
|
|
@@ -73,6 +75,49 @@ export const RefreshIconButton: React.FC<{
|
|
|
73
75
|
return <Tooltip content={tooltip}>{button}</Tooltip>;
|
|
74
76
|
};
|
|
75
77
|
|
|
78
|
+
/**
|
|
79
|
+
* Toggle button that switches between an eye (visible) and crossed-out eye
|
|
80
|
+
* (hidden) icon. Used to show/hide optional items in toolbars, e.g. hidden
|
|
81
|
+
* files in the file explorer or empty schemas in the data sources panel.
|
|
82
|
+
*/
|
|
83
|
+
export const VisibilityToggleButton: React.FC<{
|
|
84
|
+
/** Whether the optional items are currently visible. */
|
|
85
|
+
isVisible: boolean;
|
|
86
|
+
onToggle: () => void;
|
|
87
|
+
showTooltip: string;
|
|
88
|
+
hideTooltip: string;
|
|
89
|
+
size?: ButtonProps["size"];
|
|
90
|
+
className?: string;
|
|
91
|
+
iconClassName?: string;
|
|
92
|
+
"data-testid"?: string;
|
|
93
|
+
}> = ({
|
|
94
|
+
isVisible,
|
|
95
|
+
onToggle,
|
|
96
|
+
showTooltip,
|
|
97
|
+
hideTooltip,
|
|
98
|
+
size = "xs",
|
|
99
|
+
className,
|
|
100
|
+
iconClassName,
|
|
101
|
+
"data-testid": dataTestId,
|
|
102
|
+
}) => {
|
|
103
|
+
const Icon = isVisible ? EyeIcon : EyeOffIcon;
|
|
104
|
+
return (
|
|
105
|
+
<Tooltip content={isVisible ? hideTooltip : showTooltip}>
|
|
106
|
+
<Button
|
|
107
|
+
data-testid={dataTestId}
|
|
108
|
+
variant="text"
|
|
109
|
+
size={size}
|
|
110
|
+
className={className}
|
|
111
|
+
onClick={onToggle}
|
|
112
|
+
>
|
|
113
|
+
<Icon
|
|
114
|
+
className={cn("h-4 w-4", isVisible && "text-primary", iconClassName)}
|
|
115
|
+
/>
|
|
116
|
+
</Button>
|
|
117
|
+
</Tooltip>
|
|
118
|
+
);
|
|
119
|
+
};
|
|
120
|
+
|
|
76
121
|
/**
|
|
77
122
|
* Three-dot menu trigger that fades in on row hover.
|
|
78
123
|
* Must be inside a `group` container.
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
|
+
|
|
3
|
+
import { fireEvent, render, screen } from "@testing-library/react";
|
|
4
|
+
import { beforeAll, describe, expect, it, vi } from "vitest";
|
|
5
|
+
import { cellId } from "@/__tests__/branded";
|
|
6
|
+
import { TooltipProvider } from "@/components/ui/tooltip";
|
|
7
|
+
import type { CellId } from "@/core/cells/ids";
|
|
8
|
+
import type { CellData, CellRuntimeState } from "@/core/cells/types";
|
|
9
|
+
import { MultiColumn } from "@/utils/id-tree";
|
|
10
|
+
import { SlidesMinimap } from "../minimap";
|
|
11
|
+
|
|
12
|
+
const A = cellId("a");
|
|
13
|
+
const B = cellId("b");
|
|
14
|
+
|
|
15
|
+
// Spies shared with the hoisted module mocks below.
|
|
16
|
+
const { createNewCell, deleteCell, moveCellToIndex } = vi.hoisted(() => ({
|
|
17
|
+
createNewCell: vi.fn(),
|
|
18
|
+
deleteCell: vi.fn(),
|
|
19
|
+
moveCellToIndex: vi.fn(),
|
|
20
|
+
}));
|
|
21
|
+
|
|
22
|
+
vi.mock("@/core/cells/cells", async (importOriginal) => {
|
|
23
|
+
const actual = await importOriginal<typeof import("@/core/cells/cells")>();
|
|
24
|
+
return {
|
|
25
|
+
...actual,
|
|
26
|
+
useCellActions: () => ({ moveCellToIndex, createNewCell }),
|
|
27
|
+
useCellIds: () => MultiColumn.from([[A, B]]),
|
|
28
|
+
};
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
vi.mock("@/components/editor/cell/useDeleteCell", () => ({
|
|
32
|
+
useDeleteCellCallback: () => deleteCell,
|
|
33
|
+
}));
|
|
34
|
+
|
|
35
|
+
beforeAll(() => {
|
|
36
|
+
// jsdom doesn't implement these; radix menus poke at them.
|
|
37
|
+
global.HTMLElement.prototype.scrollIntoView = () => {
|
|
38
|
+
/* noop */
|
|
39
|
+
};
|
|
40
|
+
if (!global.HTMLElement.prototype.hasPointerCapture) {
|
|
41
|
+
global.HTMLElement.prototype.hasPointerCapture = () => false;
|
|
42
|
+
}
|
|
43
|
+
if (!global.HTMLElement.prototype.releasePointerCapture) {
|
|
44
|
+
global.HTMLElement.prototype.releasePointerCapture = () => {
|
|
45
|
+
/* noop */
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
global.IntersectionObserver ??= class {
|
|
49
|
+
observe() {
|
|
50
|
+
/* noop */
|
|
51
|
+
}
|
|
52
|
+
unobserve() {
|
|
53
|
+
/* noop */
|
|
54
|
+
}
|
|
55
|
+
disconnect() {
|
|
56
|
+
/* noop */
|
|
57
|
+
}
|
|
58
|
+
takeRecords() {
|
|
59
|
+
return [];
|
|
60
|
+
}
|
|
61
|
+
root = null;
|
|
62
|
+
rootMargin = "";
|
|
63
|
+
thresholds = [];
|
|
64
|
+
} as unknown as typeof IntersectionObserver;
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
// The minimap only reads `id`/`code`/`status`/`output`, so a minimal stub is
|
|
68
|
+
// enough; the cast is confined to this helper.
|
|
69
|
+
function makeCell(id: CellId): CellRuntimeState & CellData {
|
|
70
|
+
return {
|
|
71
|
+
id,
|
|
72
|
+
code: `print("${id}")`,
|
|
73
|
+
output: null,
|
|
74
|
+
status: "idle",
|
|
75
|
+
} as unknown as CellRuntimeState & CellData;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
function renderMinimap() {
|
|
79
|
+
const onSlideClick = vi.fn();
|
|
80
|
+
const utils = render(
|
|
81
|
+
<TooltipProvider>
|
|
82
|
+
<SlidesMinimap
|
|
83
|
+
cells={[makeCell(A), makeCell(B)]}
|
|
84
|
+
thumbnailWidth={200}
|
|
85
|
+
canReorder={false}
|
|
86
|
+
activeCellId={null}
|
|
87
|
+
onSlideClick={onSlideClick}
|
|
88
|
+
/>
|
|
89
|
+
</TooltipProvider>,
|
|
90
|
+
);
|
|
91
|
+
return { ...utils, onSlideClick };
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
const EMPTY_CELL = { code: "", autoFocus: false } as const;
|
|
95
|
+
|
|
96
|
+
describe("SlidesMinimap insert lines", () => {
|
|
97
|
+
it("inserts a blank cell above the first row and below any row", () => {
|
|
98
|
+
renderMinimap();
|
|
99
|
+
// First row exposes both an above and a below line; later rows only below.
|
|
100
|
+
// DOM order: [A-above, A-below, B-below].
|
|
101
|
+
const inserts = screen.getAllByTestId("minimap-insert-cell");
|
|
102
|
+
expect(inserts).toHaveLength(3);
|
|
103
|
+
|
|
104
|
+
fireEvent.click(inserts[0]);
|
|
105
|
+
expect(createNewCell).toHaveBeenLastCalledWith({
|
|
106
|
+
cellId: A,
|
|
107
|
+
before: true,
|
|
108
|
+
...EMPTY_CELL,
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
fireEvent.click(inserts[1]);
|
|
112
|
+
expect(createNewCell).toHaveBeenLastCalledWith({
|
|
113
|
+
cellId: A,
|
|
114
|
+
before: false,
|
|
115
|
+
...EMPTY_CELL,
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
fireEvent.click(inserts[2]);
|
|
119
|
+
expect(createNewCell).toHaveBeenLastCalledWith({
|
|
120
|
+
cellId: B,
|
|
121
|
+
before: false,
|
|
122
|
+
...EMPTY_CELL,
|
|
123
|
+
});
|
|
124
|
+
});
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
describe("SlidesMinimap context menu", () => {
|
|
128
|
+
const openRowMenu = (container: HTMLElement, id: CellId) => {
|
|
129
|
+
const row = container.querySelector<HTMLElement>(`[data-cell-id="${id}"]`);
|
|
130
|
+
expect(row).not.toBeNull();
|
|
131
|
+
fireEvent.contextMenu(row!);
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
it('"Add cell" inserts a blank cell below the row', () => {
|
|
135
|
+
const { container } = renderMinimap();
|
|
136
|
+
openRowMenu(container, A);
|
|
137
|
+
fireEvent.click(screen.getByText("Add cell"));
|
|
138
|
+
expect(createNewCell).toHaveBeenCalledWith({
|
|
139
|
+
cellId: A,
|
|
140
|
+
before: false,
|
|
141
|
+
...EMPTY_CELL,
|
|
142
|
+
});
|
|
143
|
+
});
|
|
144
|
+
|
|
145
|
+
it('"Delete cell" deletes the row\'s cell', () => {
|
|
146
|
+
const { container } = renderMinimap();
|
|
147
|
+
openRowMenu(container, B);
|
|
148
|
+
fireEvent.click(screen.getByText("Delete cell"));
|
|
149
|
+
expect(deleteCell).toHaveBeenCalledWith({ cellId: B });
|
|
150
|
+
});
|
|
151
|
+
});
|
|
152
|
+
|
|
153
|
+
describe("SlidesMinimap keyboard activation", () => {
|
|
154
|
+
it("activates the row on Enter but ignores Space (reserved by reveal.js)", () => {
|
|
155
|
+
const { container, onSlideClick } = renderMinimap();
|
|
156
|
+
const row = container.querySelector<HTMLElement>(`[data-cell-id="${A}"]`);
|
|
157
|
+
expect(row).not.toBeNull();
|
|
158
|
+
|
|
159
|
+
fireEvent.keyDown(row!, { key: "Enter" });
|
|
160
|
+
expect(onSlideClick).toHaveBeenCalledWith(0);
|
|
161
|
+
|
|
162
|
+
onSlideClick.mockClear();
|
|
163
|
+
fireEvent.keyDown(row!, { key: " " });
|
|
164
|
+
expect(onSlideClick).not.toHaveBeenCalled();
|
|
165
|
+
});
|
|
166
|
+
});
|