@marimo-team/frontend 0.24.1-dev99 → 0.24.2-dev129
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-wvvZkEPY.js → CellStatus-LoTwk7fR.js} +1 -1
- package/dist/assets/{ConnectedDataExplorerComponent-Dkqk66Mv.js → ConnectedDataExplorerComponent-DW6cJ-Lr.js} +1 -1
- package/dist/assets/{ErrorBoundary-npvnLp9x.js → ErrorBoundary-CDVGFYfr.js} +1 -1
- package/dist/assets/JsonOutput-CzIGPEZQ.js +50 -0
- package/dist/assets/{LazyAnyLanguageCodeMirror-zSwE3dvU.js → LazyAnyLanguageCodeMirror-LboTfNDv.js} +2 -2
- package/dist/assets/{MarimoErrorOutput-CeUo5oka.js → MarimoErrorOutput-DqpoYOvw.js} +1 -1
- package/dist/assets/RenderHTML-DwhMAd9l.js +1 -0
- package/dist/assets/{RunButton-BaV8A-z4.js → RunButton-BlpbweyH.js} +1 -1
- package/dist/assets/{VisuallyHidden-SChAyKIQ.js → VisuallyHidden-CBMDmozt.js} +1 -1
- package/dist/assets/{add-cell-with-ai-DoLkfzYn.js → add-cell-with-ai-R-3DS79K.js} +1 -1
- package/dist/assets/{add-connection-dialog-C1IF1nR0.js → add-connection-dialog-BGfpw5lC.js} +1 -1
- package/dist/assets/{agent-panel-CG154QrU.js → agent-panel-Cgt_K0tD.js} +1 -1
- package/dist/assets/ai-model-dropdown-DCmiuk7x.js +3 -0
- package/dist/assets/alert-dialog-CA-2mBs3.js +11 -0
- package/dist/assets/any-language-editor-DflLjPSQ.js +1 -0
- package/dist/assets/{app-config-button-ktBH1pEB.js → app-config-button-DUJC6b6x.js} +1 -1
- package/dist/assets/badge-BSgtkC2e.js +1 -0
- package/dist/assets/{blob-DVtvZmWH.js → blob-B2d_dHwI.js} +1 -1
- package/dist/assets/button-Dh8EwhsF.js +1 -0
- package/dist/assets/{cache-panel-C7jsiqCa.js → cache-panel-DqgtC98s.js} +1 -1
- package/dist/assets/{capabilities-LWzb3E3M.js → capabilities-D8kPgMKr.js} +1 -1
- package/dist/assets/{cell-editor-DoDqaCZp.js → cell-editor-Dw09J9yD.js} +6 -6
- package/dist/assets/{cell-link-Dqqt6Rgs.js → cell-link-6burT2XF.js} +1 -1
- package/dist/assets/{cells-D4RwofRx.js → cells-Cp-G34Rz.js} +56 -56
- package/dist/assets/{chat-display-COmzHgx5.js → chat-display-Bu405iyc.js} +1 -1
- package/dist/assets/{chat-panel-B2tyEfGW.js → chat-panel-BlUwNY5j.js} +1 -1
- package/dist/assets/{chat-ui-B5bsr-7V.js → chat-ui-DGiVDzNh.js} +1 -1
- package/dist/assets/{circle--ysFeW9z.js → circle-ByJdIf5p.js} +1 -1
- package/dist/assets/{column-preview-CW5DPFvy.js → column-preview-riSXbYe_.js} +1 -1
- package/dist/assets/{command-palette-B9dyvMvJ.js → command-palette-CCVzJcyf.js} +1 -1
- package/dist/assets/{common-CC3tuCpi.js → common-CHR7w7aQ.js} +1 -1
- package/dist/assets/{components-D02ZZZMP.js → components-C7mWrmXr.js} +1 -1
- package/dist/assets/{components-CBlGIIAX.js → components-DUYCXngU.js} +1 -1
- package/dist/assets/config-B-r81uZ6.js +1 -0
- package/dist/assets/{config-D4frVGQ4.js → config-BlNM0caL.js} +1 -1
- package/dist/assets/{copy-Cg05mM3C.js → copy-DlEomWzI.js} +1 -1
- package/dist/assets/{copy-icon-CRxVZTJ9.js → copy-icon-z8fuTE3w.js} +1 -1
- package/dist/assets/{createReducer-Bq-nQJiK.js → createReducer-B_XmHROl.js} +1 -1
- package/dist/assets/{datasource-Do8f2hFf.js → datasource-DrODSIs0.js} +1 -1
- package/dist/assets/{dates-DK5JikJo.js → dates-B58T85Jq.js} +1 -1
- package/dist/assets/dependency-graph-panel-AY5BEVH2.js +5 -0
- package/dist/assets/{dist-7qdHLg-L.js → dist-B0RXffUm.js} +1 -1
- package/dist/assets/dist-B0qYy1Ye.js +1 -0
- package/dist/assets/{dist-B97dKQGP.js → dist-B8pdsUrS.js} +1 -1
- package/dist/assets/{dist-BcfF-rkl.js → dist-BF7Lrekv.js} +1 -1
- package/dist/assets/dist-BL8RjfvI.js +1 -0
- package/dist/assets/dist-BVZxge7j.js +1 -0
- package/dist/assets/{dist-fxnYzq-R.js → dist-BaRNSaca.js} +1 -1
- package/dist/assets/dist-Bk2yQtw4.js +1 -0
- package/dist/assets/dist-BsfiiKoy.js +1 -0
- package/dist/assets/dist-BskmVd3B.js +1 -0
- package/dist/assets/{dist-DL1Thauf.js → dist-Bsu3h9O7.js} +1 -1
- package/dist/assets/{dist-PIe1xcZo.js → dist-BtC9ym6k.js} +7 -7
- package/dist/assets/{dist-DeuWxYVk.js → dist-Bv0S1RlZ.js} +1 -1
- package/dist/assets/{dist-CidBzUqR.js → dist-C--ZICxQ.js} +1 -1
- package/dist/assets/dist-C-2fD3XY.js +1 -0
- package/dist/assets/{dist-DzAWvPVK.js → dist-CKUpxYGQ.js} +1 -1
- package/dist/assets/dist-CMFMfBm1.js +1 -0
- package/dist/assets/dist-CZNULd6Z.js +2 -0
- package/dist/assets/dist-CjFduPiC.js +1 -0
- package/dist/assets/{dist-DoAjHgMj.js → dist-CmImLjus.js} +1 -1
- package/dist/assets/{dist-BKx0MLbb.js → dist-Cq8NOszX.js} +1 -1
- package/dist/assets/{dist-DCc0VfiO.js → dist-Cx4BE7jC.js} +3 -3
- package/dist/assets/dist-D45ScydS.js +1 -0
- package/dist/assets/dist-D6dg87r7.js +1 -0
- package/dist/assets/dist-DEjfQLz0.js +1 -0
- package/dist/assets/{dist-BcYW-EJk.js → dist-DJOWOALB.js} +1 -1
- package/dist/assets/{dist-CxxZaSme.js → dist-DPoYlxSC.js} +1 -1
- package/dist/assets/dist-DR-Y-nl3.js +1 -0
- package/dist/assets/dist-Dahlp9JQ.js +1 -0
- package/dist/assets/{dist-DIkuvChK.js → dist-Db-HC93w.js} +1 -1
- package/dist/assets/{dist-DTM7BAUu.js → dist-DdOlZ6mj.js} +1 -1
- package/dist/assets/{dist-Dz_04liz.js → dist-DiYjQAhI.js} +1 -1
- package/dist/assets/{dist-BO5c5n_b.js → dist-DkPPv0FB.js} +1 -1
- package/dist/assets/{dist-DkCO0b-0.js → dist-DmGtPaVM.js} +1 -1
- package/dist/assets/{dist-CXmhxecl.js → dist-DnxYYyU7.js} +1 -1
- package/dist/assets/{dist-CO1Hfv5H.js → dist-Dw9YRsCU.js} +1 -1
- package/dist/assets/dist-Dwx3KdUP.js +1 -0
- package/dist/assets/{dist-BgL43w5r.js → dist-DzCQtGkt.js} +1 -1
- package/dist/assets/dist-JweaDt6P.js +1 -0
- package/dist/assets/{dist-Dbu5sPgR.js → dist-gELFCfHH.js} +1 -1
- package/dist/assets/dist-kGDJ0AWF.js +1 -0
- package/dist/assets/{dist-Cqm1W-Zm.js → dist-kaLvV_d4.js} +1 -1
- package/dist/assets/{dist-CEeRVpMD.js → dist-qvk3g06H.js} +1 -1
- package/dist/assets/dist-wCw2twuB.js +1 -0
- package/dist/assets/dist-wF42tUcr.js +1 -0
- package/dist/assets/dist-wY2yia-1.js +3 -0
- package/dist/assets/{documentation-panel-DvHjxlli.js → documentation-panel-CaJF7e-j.js} +1 -1
- package/dist/assets/{download-BP8MrprC.js → download-DMxOzI7b.js} +1 -1
- package/dist/assets/dropdown-menu-C40jM9o4.js +1 -0
- package/dist/assets/{edit-page-71cK-Nhe.js → edit-page-Vqd9NedM.js} +6 -6
- package/dist/assets/{error-banner-BYN8YUMe.js → error-banner-Dw5YY9wq.js} +1 -1
- package/dist/assets/{error-entries-DOZ1u97X.js → error-entries-Cv2m1yhc.js} +1 -1
- package/dist/assets/{error-panel-CINcf76Z.js → error-panel-Bhlvt6_H.js} +1 -1
- package/dist/assets/{es-BuMFDpR4.js → es-CrFhA96G.js} +1 -1
- package/dist/assets/{esm-Dw0vvSg2.js → esm-BHMOvJzM.js} +1 -1
- package/dist/assets/{esm-BGpfQNhD.js → esm-DmqQGMel.js} +1 -1
- package/dist/assets/file-explorer-panel-6HvNfCrJ.js +1 -0
- package/dist/assets/{file-icons-DgKj9mrV.js → file-icons-DdGYuADJ.js} +1 -1
- package/dist/assets/file-name-input-K4MKESI_.js +3 -0
- package/dist/assets/{floating-outline-CRXIsrPm.js → floating-outline-DaUHnl_e.js} +1 -1
- package/dist/assets/{formats-DSzGCKeO.js → formats-C6s96nu2.js} +1 -1
- package/dist/assets/{formatting-BJlT1s_3.js → formatting-BWZH2nBg.js} +1 -1
- package/dist/assets/{fullscreen-0EEPR7uc.js → fullscreen-BH2jz-F4.js} +5 -5
- package/dist/assets/{gallery-page-TqnFYECu.js → gallery-page-C3pBpHlY.js} +1 -1
- package/dist/assets/{glide-data-editor-DcY3nXI8.js → glide-data-editor-sICUMEhk.js} +1 -1
- package/dist/assets/{glide-utils-CR1sWLZU.js → glide-utils-UGsrRHYj.js} +1 -1
- package/dist/assets/home-page-BLd6rnbk.js +4 -0
- package/dist/assets/{html-to-image-DMn_7CCA.js → html-to-image-D6GUC5q6.js} +1 -1
- package/dist/assets/index-BGT7have.css +2 -0
- package/dist/assets/index-ipFYAeCF.js +29 -0
- package/dist/assets/{input-Daz6sk8l.js → input-DEbY281O.js} +2 -2
- package/dist/assets/{kiosk-mode-CzGt3mc2.js → kiosk-mode-mxgb5lWf.js} +1 -1
- package/dist/assets/{layout-KJMQADEj.js → layout-DWnrxIo2.js} +5 -5
- package/dist/assets/links-DLvOXyO_.js +1 -0
- package/dist/assets/{logs-panel-DFibPeCT.js → logs-panel-BGS2v3ba.js} +1 -1
- package/dist/assets/lua-1tNpM92n.js +1 -0
- package/dist/assets/{lua-CRIS5afH.js → lua-DXBxhmso.js} +1 -1
- package/dist/assets/{markdown-renderer-CdZX2MvM.js → markdown-renderer-BZKlbm2Q.js} +1 -1
- package/dist/assets/menu-items-BSRA2YI9.js +1 -0
- package/dist/assets/{mermaid-CeseGGnS.js → mermaid-l6lQkCib.js} +1 -1
- package/dist/assets/{name-cell-input-B-d5Jwh4.js → name-cell-input-BMCdK-el.js} +1 -1
- package/dist/assets/{numbers-DKurV_vq.js → numbers-Bc-r3jsC.js} +1 -1
- package/dist/assets/{outline-panel-D2Wk10hY.js → outline-panel-Dr5u73V6.js} +1 -1
- package/dist/assets/{packages-panel-CQsbxIlG.js → packages-panel-BdpRg9tX.js} +1 -1
- package/dist/assets/{pair-with-agent-modal-CNxmIMFM.js → pair-with-agent-modal-CbUFKJHP.js} +1 -1
- package/dist/assets/{panel-accordion-state-D6-FMXE2.js → panel-accordion-state-DjUTN7i5.js} +1 -1
- package/dist/assets/{panels-BgcK_4M7.js → panels-CWn0Yh1D.js} +1 -1
- package/dist/assets/process-output-Ck7-P_xp.js +1 -0
- package/dist/assets/{readonly-code-display-BvqLeUsJ.js → readonly-code-display--S2daDa6.js} +1 -1
- package/dist/assets/{readonly-python-code-GSN4D4sb.js → readonly-python-code-DpIyjHqY.js} +1 -1
- package/dist/assets/{renderShortcut-DK_OucLT.js → renderShortcut-X-CJUSM8.js} +1 -1
- package/dist/assets/{reveal-component-u9ED2diI.js → reveal-component-nZIAapoD.js} +1 -1
- package/dist/assets/{run-page-U5iuhyz8.js → run-page-9pl8qhQR.js} +1 -1
- package/dist/assets/{runs-BQTlv6Ja.js → runs-euHSzlw_.js} +1 -1
- package/dist/assets/{scratchpad-panel--YOR0kUB.js → scratchpad-panel-BleGt2KM.js} +1 -1
- package/dist/assets/{scroll-to-bottom-button-xua0e9rA.js → scroll-to-bottom-button-DufiYUD7.js} +1 -1
- package/dist/assets/{secrets-panel-CZPbFAZH.js → secrets-panel-D3BpDIgg.js} +1 -1
- package/dist/assets/select-nLt2y0Sw.js +1 -0
- package/dist/assets/{session-CEdta5_Q.js → session-Sz5nSFku.js} +1 -1
- package/dist/assets/session-panel-DRGPlL5J.js +1 -0
- package/dist/assets/{share-C2MPy_VX.js → share-CPtBiNgr.js} +1 -1
- package/dist/assets/{skeleton-CsceCAjw.js → skeleton-BKeh8hf3.js} +1 -1
- package/dist/assets/{snippets-panel-BxwHsPmW.js → snippets-panel-D5yy7kj0.js} +1 -1
- package/dist/assets/{spec-CUFquO6R.js → spec-DKsAmLTi.js} +1 -1
- package/dist/assets/{state-BqrF--O0.js → state-B6AklCzD.js} +1 -1
- package/dist/assets/{state-C2c3_VuY.js → state-B8XRqyFg.js} +1 -1
- package/dist/assets/{state-CHplO0zn.js → state-Di9TbuV9.js} +1 -1
- package/dist/assets/{strings-CpYReX2Q.js → strings-CReV1AYG.js} +1 -1
- package/dist/assets/{swiper-component-Bot7ehYH.js → swiper-component-5Kdi1-Gn.js} +1 -1
- package/dist/assets/{switch-CtH5Ct94.js → switch-DjXr9Y9D.js} +1 -1
- package/dist/assets/{tabs-c6mpccpH.js → tabs-Cy1qXLzH.js} +1 -1
- package/dist/assets/{terminal-C73iz1fU.js → terminal-CQAFGBfN.js} +1 -1
- package/dist/assets/{tooltip-Cwltdez8.js → tooltip-BG35uS_N.js} +1 -1
- package/dist/assets/{tooltip-D7dq6bnc.js → tooltip-BUtPzKB4.js} +1 -1
- package/dist/assets/{tracing-Dhq121dR.js → tracing-DNk3gmWv.js} +1 -1
- package/dist/assets/{tracing-panel-IKt1933_.js → tracing-panel-Yqazr6w_.js} +2 -2
- package/dist/assets/{tree-actions-DIfWonCA.js → tree-actions-CG5g7aUQ.js} +1 -1
- package/dist/assets/{useAddCell-BYrVaYfZ.js → useAddCell-DdB_uBif.js} +1 -1
- package/dist/assets/{useBoolean-ZU5StAbr.js → useBoolean-BXC4CItZ.js} +1 -1
- package/dist/assets/{useCellActionButton-DbXDs0MA.js → useCellActionButton-B31neI3m.js} +1 -1
- package/dist/assets/{useDebounce-Dulm61-t.js → useDebounce-DgpSQhrP.js} +1 -1
- package/dist/assets/{useDeleteCell-Wgcl3CRG.js → useDeleteCell-Bz49_cFj.js} +1 -1
- package/dist/assets/{useDependencyPanelTab-C5AU8GKL.js → useDependencyPanelTab-C_ps0r--.js} +1 -1
- package/dist/assets/{useEventListener-D27Dii_l.js → useEventListener-92uWqz-P.js} +1 -1
- package/dist/assets/{useIframeCapabilities-DEpTCh1Q.js → useIframeCapabilities-C7Di8f2y.js} +1 -1
- package/dist/assets/{useInstallPackage-u7d0wo79.js → useInstallPackage-DsD08SLK.js} +1 -1
- package/dist/assets/{useInterval-B1_J4wdT.js → useInterval-B4v7_zd0.js} +1 -1
- package/dist/assets/{useNotebookActions-FuMERtHq.js → useNotebookActions-CQtbk9CB.js} +2 -2
- package/dist/assets/{useRunCells-DTdMRbkE.js → useRunCells-CX7oW5zy.js} +1 -1
- package/dist/assets/{useSplitCell-2z0zEB8X.js → useSplitCell-Dy2_DmJR.js} +1 -1
- package/dist/assets/{useTheme-CF-zG9YH.js → useTheme-C-ri8BtY.js} +1 -1
- package/dist/assets/utils-D5Ywm7-q.js +1 -0
- package/dist/assets/{vega-component-BSXJcTJb.js → vega-component-C7TCzyaU.js} +1 -1
- package/dist/assets/write-secret-modal-D6zoZgLY.js +2 -0
- package/dist/index.html +73 -73
- package/package.json +26 -26
- package/src/components/ai/ai-provider-icon.tsx +2 -2
- package/src/components/ai/ai-utils.ts +1 -1
- package/src/components/app-config/ai-config.tsx +33 -37
- package/src/components/app-config/user-config-form.tsx +1 -1
- package/src/components/data-table/__tests__/column-explorer.test.tsx +64 -4
- package/src/components/data-table/__tests__/column-visibility-dropdown.test.tsx +137 -4
- package/src/components/data-table/__tests__/url-detector.test.tsx +1 -1
- package/src/components/data-table/__tests__/useColumnVisibility.test.ts +153 -1
- package/src/components/data-table/column-explorer-panel/column-explorer.tsx +54 -25
- package/src/components/data-table/column-visibility-dropdown.tsx +62 -14
- package/src/components/data-table/date-popover.tsx +2 -1
- package/src/components/data-table/hooks/use-column-visibility.ts +76 -0
- package/src/components/data-table/renderers.tsx +4 -8
- package/src/components/data-table/show-only-column-button.tsx +58 -0
- package/src/components/dependency-graph/__tests__/elements.test.ts +151 -0
- package/src/components/dependency-graph/custom-edge.tsx +68 -0
- package/src/components/dependency-graph/custom-node.tsx +54 -26
- package/src/components/dependency-graph/dependency-graph-tree.tsx +110 -21
- package/src/components/dependency-graph/elements.ts +225 -31
- package/src/components/dependency-graph/panels.tsx +23 -2
- package/src/components/dependency-graph/utils/__tests__/layout.test.ts +78 -0
- package/src/components/dependency-graph/utils/layout.ts +108 -18
- package/src/components/editor/Output.tsx +40 -0
- package/src/components/editor/__tests__/Output.test.tsx +85 -2
- package/src/components/editor/connections/secret-combobox.tsx +3 -1
- package/src/components/editor/file-tree/__tests__/file-explorer-navigation.test.tsx +832 -0
- package/src/components/editor/file-tree/__tests__/file-viewer.test.tsx +27 -0
- package/src/components/editor/file-tree/__tests__/requesting-tree.test.ts +130 -0
- package/src/components/editor/file-tree/file-browser-row.tsx +82 -0
- package/src/components/editor/file-tree/file-explorer.tsx +377 -159
- package/src/components/editor/file-tree/file-operations.tsx +1 -1
- package/src/components/editor/file-tree/file-search-results.tsx +142 -0
- package/src/components/editor/file-tree/file-tree-row.tsx +40 -0
- package/src/components/editor/file-tree/file-viewer.tsx +2 -1
- package/src/components/editor/file-tree/renderers.tsx +4 -2
- package/src/components/editor/file-tree/requesting-tree.tsx +162 -32
- package/src/components/editor/file-tree/use-file-search.ts +142 -0
- package/src/components/editor/file-tree/use-hover-expand.ts +34 -0
- package/src/components/editor/navigation/__tests__/navigation.test.ts +30 -0
- package/src/components/editor/navigation/navigation.ts +20 -0
- package/src/components/forms/form.tsx +6 -4
- package/src/components/home/components.tsx +1 -0
- package/src/components/static-html/share-modal.tsx +3 -2
- package/src/components/ui/__tests__/badge.test.ts +63 -0
- package/src/components/ui/__tests__/button.test.ts +19 -0
- package/src/components/ui/__tests__/fullscreen.test.tsx +88 -0
- package/src/components/ui/__tests__/menu-items.test.ts +31 -0
- package/src/components/ui/badge.tsx +9 -7
- package/src/components/ui/button.tsx +1 -0
- package/src/components/ui/combobox.tsx +1 -1
- package/src/components/ui/date-input.tsx +1 -1
- package/src/components/ui/dialog.tsx +3 -1
- package/src/components/ui/fullscreen.tsx +43 -1
- package/src/components/ui/input.tsx +5 -1
- package/src/components/ui/links.tsx +2 -1
- package/src/components/ui/menu-items.tsx +9 -9
- package/src/components/ui/native-select.tsx +2 -2
- package/src/components/ui/navigation.tsx +1 -1
- package/src/components/ui/range-slider.tsx +5 -3
- package/src/components/ui/select.tsx +1 -1
- package/src/components/ui/sheet.tsx +1 -1
- package/src/components/ui/toast.tsx +8 -5
- package/src/components/ui/toaster.tsx +2 -2
- package/src/core/ai/ids/__tests__/ids.test.ts +0 -8
- package/src/core/ai/ids/ids.ts +1 -1
- package/src/core/cells/__tests__/add-missing-import.test.ts +20 -0
- package/src/core/codemirror/language/__tests__/utils.test.ts +1 -1
- package/src/core/config/config-schema.ts +1 -0
- package/src/core/hotkeys/hotkeys.ts +5 -0
- package/src/core/network/__tests__/requests-toasting.test.tsx +14 -0
- package/src/core/network/requests-toasting.tsx +1 -1
- package/src/css/globals.css +28 -0
- package/src/hooks/useEventListener.ts +1 -1
- package/src/plugins/core/RenderHTML.tsx +6 -4
- package/src/plugins/impl/MatrixPlugin.tsx +1 -1
- package/src/plugins/impl/code/any-language-editor.tsx +7 -4
- package/src/plugins/impl/data-frames/__tests__/schema.test.ts +34 -1
- package/src/plugins/impl/data-frames/forms/__tests__/__snapshots__/form.test.tsx.snap +25 -25
- package/src/plugins/impl/data-frames/schema.ts +5 -11
- package/src/plugins/impl/panel/__tests__/utils.test.ts +4 -4
- package/src/plugins/impl/vega/__tests__/vega.test.ts +1 -1
- package/src/stories/cell.stories.tsx +15 -11
- package/src/utils/__tests__/events.test.ts +1 -1
- package/dist/assets/JsonOutput-CRLQQVKf.js +0 -50
- package/dist/assets/RenderHTML-YkwVPe9V.js +0 -1
- package/dist/assets/ai-model-dropdown-CrSrb8Zz.js +0 -3
- package/dist/assets/alert-dialog-BVi_GyOB.js +0 -11
- package/dist/assets/any-language-editor-BL8H-DwB.js +0 -1
- package/dist/assets/badge-D_-uqy2N.js +0 -1
- package/dist/assets/button-Btj6GXNy.js +0 -1
- package/dist/assets/config-ycxJQP2b.js +0 -1
- package/dist/assets/dependency-graph-panel-Dg-tUB9T.js +0 -5
- package/dist/assets/dist-2oRmY-BC.js +0 -1
- package/dist/assets/dist-8lhGoJ54.js +0 -3
- package/dist/assets/dist-B4QaGCvF.js +0 -1
- package/dist/assets/dist-B_ABJVTW.js +0 -1
- package/dist/assets/dist-Bke0Ybxy.js +0 -1
- package/dist/assets/dist-Bw8CAY5i.js +0 -1
- package/dist/assets/dist-BwmO3SSk.js +0 -1
- package/dist/assets/dist-C3KxgR0m.js +0 -1
- package/dist/assets/dist-CLE562nZ.js +0 -1
- package/dist/assets/dist-CLi0j3bw.js +0 -1
- package/dist/assets/dist-CMIyXejt.js +0 -1
- package/dist/assets/dist-CbQrIaPV.js +0 -2
- package/dist/assets/dist-CpgfIIzU.js +0 -1
- package/dist/assets/dist-D7aYPqs9.js +0 -1
- package/dist/assets/dist-DKCF5R0T.js +0 -1
- package/dist/assets/dist-DbFa9cik.js +0 -1
- package/dist/assets/dist-DdPuhs_-.js +0 -1
- package/dist/assets/dist-DkfdZExz.js +0 -1
- package/dist/assets/dist-hOh6JBwi.js +0 -1
- package/dist/assets/dist-mY1j_5eA.js +0 -1
- package/dist/assets/dist-tg3aVnpD.js +0 -1
- package/dist/assets/dropdown-menu-CqNabM1f.js +0 -1
- package/dist/assets/file-explorer-panel-cflxW8a7.js +0 -1
- package/dist/assets/file-name-input-CQF4Ovwx.js +0 -3
- package/dist/assets/home-page-DPRHPAQM.js +0 -4
- package/dist/assets/index-BkIXRAbi.css +0 -2
- package/dist/assets/index-p49fbIlR.js +0 -29
- package/dist/assets/links-DPh7yoP-.js +0 -1
- package/dist/assets/lua-_4wuYo1j.js +0 -1
- package/dist/assets/menu-items-BSVrMleU.js +0 -1
- package/dist/assets/process-output-DvTtgoMs.js +0 -1
- package/dist/assets/select-czJLm6jf.js +0 -1
- package/dist/assets/session-panel-C_N3WGWQ.js +0 -1
- package/dist/assets/utils-CWSZQEjr.js +0 -1
- package/dist/assets/write-secret-modal-lNU_7c2x.js +0 -2
|
@@ -132,7 +132,7 @@ const RangeSlider = React.forwardRef<
|
|
|
132
132
|
"relative flex touch-none select-none hover:cursor-pointer",
|
|
133
133
|
"data-[orientation=horizontal]:w-full data-[orientation=horizontal]:items-center",
|
|
134
134
|
"data-[orientation=vertical]:h-full data-[orientation=vertical]:justify-center",
|
|
135
|
-
"data-disabled:cursor-not-allowed",
|
|
135
|
+
"data-disabled:cursor-not-allowed forced-color-adjust-none",
|
|
136
136
|
className,
|
|
137
137
|
)}
|
|
138
138
|
{...props}
|
|
@@ -142,6 +142,7 @@ const RangeSlider = React.forwardRef<
|
|
|
142
142
|
data-testid="track"
|
|
143
143
|
className={cn(
|
|
144
144
|
"relative grow overflow-hidden rounded-full bg-slate-200 dark:bg-accent/60",
|
|
145
|
+
"forced-colors:border forced-colors:border-[ButtonText] forced-colors:bg-[ButtonFace]",
|
|
145
146
|
"data-[orientation=horizontal]:h-2 data-[orientation=horizontal]:w-full",
|
|
146
147
|
"data-[orientation=vertical]:h-full data-[orientation=vertical]:w-2",
|
|
147
148
|
)}
|
|
@@ -150,6 +151,7 @@ const RangeSlider = React.forwardRef<
|
|
|
150
151
|
data-testid="range"
|
|
151
152
|
className={cn(
|
|
152
153
|
"absolute bg-blue-500 dark:bg-primary",
|
|
154
|
+
"forced-colors:bg-[Highlight] forced-colors:data-disabled:bg-[GrayText]",
|
|
153
155
|
"data-[orientation=horizontal]:h-full",
|
|
154
156
|
"data-[orientation=vertical]:w-full",
|
|
155
157
|
"data-disabled:opacity-50",
|
|
@@ -165,7 +167,7 @@ const RangeSlider = React.forwardRef<
|
|
|
165
167
|
<TooltipTrigger asChild={true}>
|
|
166
168
|
<SliderPrimitive.Thumb
|
|
167
169
|
data-testid="thumb"
|
|
168
|
-
className="block h-4 w-4 rounded-full shadow-xs-solid border border-blue-500 dark:border-primary dark:bg-accent bg-white hover:bg-blue-300 focus:bg-blue-300 transition-colors focus-visible:outline-hidden data-disabled:pointer-events-none data-disabled:opacity-50"
|
|
170
|
+
className="block h-4 w-4 rounded-full shadow-xs-solid border border-blue-500 dark:border-primary dark:bg-accent bg-white hover:bg-blue-300 focus:bg-blue-300 transition-colors focus-visible:outline-hidden data-disabled:pointer-events-none data-disabled:opacity-50 forced-colors:border-[ButtonText] forced-colors:bg-[ButtonFace] forced-colors:data-disabled:border-[GrayText]"
|
|
169
171
|
onFocus={openActions.setTrue}
|
|
170
172
|
onBlur={openActions.setFalse}
|
|
171
173
|
onMouseEnter={openActions.setTrue}
|
|
@@ -186,7 +188,7 @@ const RangeSlider = React.forwardRef<
|
|
|
186
188
|
<TooltipTrigger asChild={true}>
|
|
187
189
|
<SliderPrimitive.Thumb
|
|
188
190
|
data-testid="thumb"
|
|
189
|
-
className="block h-4 w-4 rounded-full shadow-xs-solid border border-blue-500 dark:border-primary dark:bg-accent bg-white hover:bg-blue-300 focus:bg-blue-300 transition-colors focus-visible:outline-hidden data-disabled:pointer-events-none data-disabled:opacity-50"
|
|
191
|
+
className="block h-4 w-4 rounded-full shadow-xs-solid border border-blue-500 dark:border-primary dark:bg-accent bg-white hover:bg-blue-300 focus:bg-blue-300 transition-colors focus-visible:outline-hidden data-disabled:pointer-events-none data-disabled:opacity-50 forced-colors:border-[ButtonText] forced-colors:bg-[ButtonFace] forced-colors:data-disabled:border-[GrayText]"
|
|
190
192
|
onFocus={openActions.setTrue}
|
|
191
193
|
onBlur={openActions.setFalse}
|
|
192
194
|
onMouseEnter={openActions.setTrue}
|
|
@@ -125,7 +125,7 @@ const SelectItem = React.forwardRef<
|
|
|
125
125
|
<SelectPrimitive.Item
|
|
126
126
|
ref={ref}
|
|
127
127
|
className={cn(
|
|
128
|
-
"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-hidden
|
|
128
|
+
"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-hidden data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground forced-colors:data-[highlighted]:bg-[Highlight] forced-colors:data-[highlighted]:text-[HighlightText]",
|
|
129
129
|
MENU_ITEM_DISABLED,
|
|
130
130
|
className,
|
|
131
131
|
)}
|
|
@@ -68,7 +68,7 @@ const SheetContent = React.forwardRef<
|
|
|
68
68
|
{...props}
|
|
69
69
|
>
|
|
70
70
|
{children}
|
|
71
|
-
<SheetPrimitive.Close className="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary">
|
|
71
|
+
<SheetPrimitive.Close className="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary">
|
|
72
72
|
<Cross2Icon className="h-4 w-4" />
|
|
73
73
|
<span className="sr-only">Close</span>
|
|
74
74
|
</SheetPrimitive.Close>
|
|
@@ -26,15 +26,16 @@ const ToastViewport = React.forwardRef<
|
|
|
26
26
|
ToastViewport.displayName = ToastPrimitives.Viewport.displayName;
|
|
27
27
|
|
|
28
28
|
const VARIANT_CLASSES = {
|
|
29
|
-
default:
|
|
29
|
+
default:
|
|
30
|
+
"bg-background border forced-colors:border-[CanvasText] forced-colors:bg-[Canvas] forced-colors:text-[CanvasText]",
|
|
30
31
|
danger:
|
|
31
|
-
"group destructive text-error border-destructive bg-(--red-1) shadow-md-solid shadow-error",
|
|
32
|
+
"group destructive text-error border-destructive bg-(--red-1) shadow-md-solid shadow-error forced-colors:border-[CanvasText] forced-colors:bg-[Canvas] forced-colors:text-[CanvasText]",
|
|
32
33
|
} as const satisfies Record<string, string>;
|
|
33
34
|
|
|
34
35
|
type ToastVariant = keyof typeof VARIANT_CLASSES;
|
|
35
36
|
|
|
36
37
|
const toastVariants = cva(
|
|
37
|
-
"data-[swipe=move]:transition-none group relative pointer-events-auto flex w-full items-start justify-between gap-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=move]:translate-x-(--radix-toast-swipe-move-x) data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-(--radix-toast-swipe-end-x) data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=open]:slide-in-from-top-full sm:data-[state=open]:slide-in-from-bottom-full data-[state=closed]:slide-out-to-right-full",
|
|
38
|
+
"data-[swipe=move]:transition-none group relative pointer-events-auto flex w-full items-start justify-between gap-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=move]:translate-x-(--radix-toast-swipe-move-x) data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-(--radix-toast-swipe-end-x) data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=open]:slide-in-from-top-full sm:data-[state=open]:slide-in-from-bottom-full data-[state=closed]:slide-out-to-right-full forced-color-adjust-none",
|
|
38
39
|
{
|
|
39
40
|
variants: {
|
|
40
41
|
variant: VARIANT_CLASSES,
|
|
@@ -76,7 +77,8 @@ const ToastAction = React.forwardRef<
|
|
|
76
77
|
<ToastPrimitives.Action
|
|
77
78
|
ref={ref}
|
|
78
79
|
className={cn(
|
|
79
|
-
"inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-destructive/30 hover:group-[.destructive]:border-destructive/30 hover:group-[.destructive]:bg-destructive hover:group-[.destructive]:text-destructive-foreground focus:group-[.destructive]:ring-destructive",
|
|
80
|
+
"inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-destructive/30 hover:group-[.destructive]:border-destructive/30 hover:group-[.destructive]:bg-destructive hover:group-[.destructive]:text-destructive-foreground focus-visible:group-[.destructive]:ring-destructive",
|
|
81
|
+
"forced-color-adjust-none forced-colors:border-[ButtonText] forced-colors:bg-[ButtonFace] forced-colors:text-[ButtonText] forced-colors:hover:bg-[Highlight] forced-colors:hover:text-[HighlightText] forced-colors:disabled:border-[GrayText] forced-colors:disabled:text-[GrayText]",
|
|
80
82
|
className,
|
|
81
83
|
)}
|
|
82
84
|
{...props}
|
|
@@ -91,7 +93,8 @@ const ToastClose = React.forwardRef<
|
|
|
91
93
|
<ToastPrimitives.Close
|
|
92
94
|
ref={ref}
|
|
93
95
|
className={cn(
|
|
94
|
-
"absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-hidden focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 hover:group-[.destructive]:text-red-500 focus:group-[.destructive]:ring-red-400 focus:group-[.destructive]:ring-offset-red-600",
|
|
96
|
+
"absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus-visible:outline-hidden focus-visible:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 hover:group-[.destructive]:text-red-500 focus-visible:group-[.destructive]:ring-red-400 focus-visible:group-[.destructive]:ring-offset-red-600",
|
|
97
|
+
"forced-colors:text-[CanvasText] forced-colors:hover:text-[CanvasText] forced-colors:group-[.destructive]:text-[CanvasText] forced-colors:hover:group-[.destructive]:text-[CanvasText]",
|
|
95
98
|
className,
|
|
96
99
|
)}
|
|
97
100
|
toast-close=""
|
|
@@ -84,8 +84,8 @@ const ToastItem = ({
|
|
|
84
84
|
className="h-4 w-4"
|
|
85
85
|
buttonClassName={cn(
|
|
86
86
|
"absolute right-8 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity",
|
|
87
|
-
"hover:text-foreground focus:opacity-100 focus:outline-hidden group-hover:opacity-100",
|
|
88
|
-
"group-[.destructive]:text-red-300 hover:group-[.destructive]:text-red-500 focus:group-[.destructive]:ring-red-400 focus:group-[.destructive]:ring-offset-red-600",
|
|
87
|
+
"hover:text-foreground focus:opacity-100 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 group-hover:opacity-100",
|
|
88
|
+
"group-[.destructive]:text-red-300 hover:group-[.destructive]:text-red-500 focus-visible:group-[.destructive]:ring-red-400 focus-visible:group-[.destructive]:ring-offset-red-600",
|
|
89
89
|
)}
|
|
90
90
|
value={() =>
|
|
91
91
|
descriptionRef.current?.innerText ??
|
|
@@ -26,7 +26,6 @@ describe("AiModelId", () => {
|
|
|
26
26
|
"google",
|
|
27
27
|
"ollama",
|
|
28
28
|
"bedrock",
|
|
29
|
-
"github",
|
|
30
29
|
];
|
|
31
30
|
|
|
32
31
|
providers.forEach((provider) => {
|
|
@@ -68,12 +67,6 @@ describe("AiModelId", () => {
|
|
|
68
67
|
expect(modelId.shortModelId).toBe("titan-text");
|
|
69
68
|
});
|
|
70
69
|
|
|
71
|
-
it("should parse github qualified id", () => {
|
|
72
|
-
const modelId = AiModelId.parse("github/gpt-4o");
|
|
73
|
-
expect(modelId.providerId).toBe("github");
|
|
74
|
-
expect(modelId.shortModelId).toBe("gpt-4o");
|
|
75
|
-
});
|
|
76
|
-
|
|
77
70
|
it("should handle multiple slashes", () => {
|
|
78
71
|
const modelId = AiModelId.parse("openai/gpt-4/turbo");
|
|
79
72
|
expect(modelId.providerId).toBe("openai");
|
|
@@ -178,7 +171,6 @@ describe("AiModelId", () => {
|
|
|
178
171
|
"google",
|
|
179
172
|
"ollama",
|
|
180
173
|
"bedrock",
|
|
181
|
-
"github",
|
|
182
174
|
];
|
|
183
175
|
|
|
184
176
|
providers.forEach((provider) => {
|
package/src/core/ai/ids/ids.ts
CHANGED
|
@@ -4,13 +4,13 @@ import type { TypedString } from "@/utils/typed";
|
|
|
4
4
|
|
|
5
5
|
export const KNOWN_PROVIDERS = [
|
|
6
6
|
"openai",
|
|
7
|
+
"github",
|
|
7
8
|
"anthropic",
|
|
8
9
|
"google",
|
|
9
10
|
"ollama",
|
|
10
11
|
"bedrock",
|
|
11
12
|
"deepseek",
|
|
12
13
|
"azure",
|
|
13
|
-
"github",
|
|
14
14
|
"openrouter",
|
|
15
15
|
"wandb",
|
|
16
16
|
"opencode-go",
|
|
@@ -120,4 +120,24 @@ describe("maybeAddMissingImport", () => {
|
|
|
120
120
|
expect(result).toBeNull();
|
|
121
121
|
}
|
|
122
122
|
});
|
|
123
|
+
|
|
124
|
+
it("should create a marimo import before the source cell when requested", () => {
|
|
125
|
+
const createNewCell = vi.fn();
|
|
126
|
+
|
|
127
|
+
const result = maybeAddMarimoImport({
|
|
128
|
+
autoInstantiate: false,
|
|
129
|
+
createNewCell,
|
|
130
|
+
fromCellId: Cell2,
|
|
131
|
+
before: true,
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
expect(result).not.toBeNull();
|
|
135
|
+
expect(createNewCell).toHaveBeenCalledWith(
|
|
136
|
+
expect.objectContaining({
|
|
137
|
+
cellId: Cell2,
|
|
138
|
+
before: true,
|
|
139
|
+
code: "import marimo as mo",
|
|
140
|
+
}),
|
|
141
|
+
);
|
|
142
|
+
});
|
|
123
143
|
});
|
|
@@ -158,7 +158,7 @@ Hello,
|
|
|
158
158
|
});
|
|
159
159
|
|
|
160
160
|
// f-strings not currently supported
|
|
161
|
-
it.
|
|
161
|
+
it.fails("handles markdown with variables", () => {
|
|
162
162
|
const mockEditor = createEditor('mo.md(f"""{a}\n{b}!""")');
|
|
163
163
|
// Set to markdown
|
|
164
164
|
switchLanguage(mockEditor, { language: "markdown" });
|
|
@@ -171,6 +171,7 @@ export const UserConfigSchema = z
|
|
|
171
171
|
inline_tooltip: z.boolean().prefault(false),
|
|
172
172
|
allow_provider_config: z.boolean().prefault(true),
|
|
173
173
|
open_ai: AiConfigSchema.optional(),
|
|
174
|
+
github: AiConfigSchema.optional(),
|
|
174
175
|
anthropic: AiConfigSchema.optional(),
|
|
175
176
|
google: AiConfigSchema.optional(),
|
|
176
177
|
ollama: AiConfigSchema.optional(),
|
|
@@ -458,6 +458,11 @@ const DEFAULT_HOT_KEY = {
|
|
|
458
458
|
group: "Command",
|
|
459
459
|
key: "b",
|
|
460
460
|
},
|
|
461
|
+
"command.createSqlCellAfter": {
|
|
462
|
+
name: "Create a SQL cell after current cell",
|
|
463
|
+
group: "Command",
|
|
464
|
+
key: "q",
|
|
465
|
+
},
|
|
461
466
|
"command.copyCell": {
|
|
462
467
|
name: "Copy cell",
|
|
463
468
|
group: "Command",
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
2
|
|
|
3
3
|
import { beforeEach, describe, expect, it, vi } from "vitest";
|
|
4
|
+
import { MockRequestClient } from "@/__mocks__/requests";
|
|
4
5
|
import { HTTPError } from "@/utils/errors";
|
|
5
6
|
|
|
6
7
|
const toastMock = vi.fn();
|
|
@@ -44,6 +45,19 @@ describe("createErrorToastingRequests", () => {
|
|
|
44
45
|
);
|
|
45
46
|
});
|
|
46
47
|
|
|
48
|
+
it("leaves search errors to callers without a toast per failed root", async () => {
|
|
49
|
+
const client = MockRequestClient.create();
|
|
50
|
+
const error = new Error("Storage unavailable");
|
|
51
|
+
vi.mocked(client.sendSearchFiles).mockRejectedValue(error);
|
|
52
|
+
const requests = createErrorToastingRequests(client);
|
|
53
|
+
for (const path of ["/workspace", "/shared"]) {
|
|
54
|
+
await expect(
|
|
55
|
+
requests.sendSearchFiles({ query: "report", path }),
|
|
56
|
+
).rejects.toBe(error);
|
|
57
|
+
}
|
|
58
|
+
expect(toastMock).not.toHaveBeenCalled();
|
|
59
|
+
});
|
|
60
|
+
|
|
47
61
|
it("leaves file-root errors for the requesting tree to surface", async () => {
|
|
48
62
|
const error = new Error("Failed to load roots");
|
|
49
63
|
const requests = createErrorToastingRequests({
|
|
@@ -50,7 +50,7 @@ export function createErrorToastingRequests(
|
|
|
50
50
|
getEnvironmentInfo: "", // No toast
|
|
51
51
|
getFileRoots: "", // RequestingTree surfaces this error
|
|
52
52
|
sendListFiles: "Failed to list files",
|
|
53
|
-
sendSearchFiles: "
|
|
53
|
+
sendSearchFiles: "", // Search callers handle errors
|
|
54
54
|
sendPdb: "Failed to start debug session",
|
|
55
55
|
sendSetBreakpoints: "", // No toast
|
|
56
56
|
sendCreateFileOrFolder: "Failed to create file or folder",
|
package/src/css/globals.css
CHANGED
|
@@ -151,6 +151,34 @@
|
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
153
|
|
|
154
|
+
@media (prefers-reduced-motion: reduce) {
|
|
155
|
+
.marimo,
|
|
156
|
+
.marimo::before,
|
|
157
|
+
.marimo::after,
|
|
158
|
+
.marimo *,
|
|
159
|
+
.marimo *::before,
|
|
160
|
+
.marimo *::after {
|
|
161
|
+
scroll-behavior: auto !important;
|
|
162
|
+
animation-duration: 0.01ms !important;
|
|
163
|
+
animation-delay: 0s !important;
|
|
164
|
+
animation-iteration-count: 1 !important;
|
|
165
|
+
transition-duration: 0.01ms !important;
|
|
166
|
+
transition-delay: 0s !important;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.marimo .running-app-icon {
|
|
170
|
+
visibility: visible !important;
|
|
171
|
+
animation-name: none !important;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
@media (forced-colors: active) {
|
|
176
|
+
.marimo :focus-visible {
|
|
177
|
+
outline: 2px solid Highlight !important;
|
|
178
|
+
outline-offset: 2px;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
|
|
154
182
|
@layer base {
|
|
155
183
|
* {
|
|
156
184
|
@apply border-border;
|
|
@@ -17,7 +17,7 @@ export function isRefObject<T>(target: unknown): target is RefObject<T | null> {
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
export function useEventListener<K extends keyof DocumentEventMap>(
|
|
20
|
-
targetValue: Document,
|
|
20
|
+
targetValue: Document | null,
|
|
21
21
|
type: K,
|
|
22
22
|
listener: (ev: DocumentEventMap[K]) => unknown,
|
|
23
23
|
options?: boolean | AddEventListenerOptions,
|
|
@@ -24,6 +24,8 @@ import { sanitizeHtml, useSanitizeHtml } from "./sanitize";
|
|
|
24
24
|
type ReplacementFn = NonNullable<HTMLReactParserOptions["replace"]>;
|
|
25
25
|
type TransformFn = NonNullable<HTMLReactParserOptions["transform"]>;
|
|
26
26
|
|
|
27
|
+
const EMPTY_REPLACEMENTS: readonly ReplacementFn[] = [];
|
|
28
|
+
|
|
27
29
|
interface Options {
|
|
28
30
|
html: string;
|
|
29
31
|
/**
|
|
@@ -31,7 +33,7 @@ interface Options {
|
|
|
31
33
|
* @default true
|
|
32
34
|
*/
|
|
33
35
|
alwaysSanitizeHtml?: boolean;
|
|
34
|
-
additionalReplacements?: ReplacementFn[];
|
|
36
|
+
additionalReplacements?: readonly ReplacementFn[];
|
|
35
37
|
}
|
|
36
38
|
|
|
37
39
|
const replaceValidTags = (domNode: DOMNode) => {
|
|
@@ -299,7 +301,7 @@ const CopyableCode = ({ children }: { children: ReactNode }) => {
|
|
|
299
301
|
*/
|
|
300
302
|
export const renderHTML = ({
|
|
301
303
|
html,
|
|
302
|
-
additionalReplacements =
|
|
304
|
+
additionalReplacements = EMPTY_REPLACEMENTS,
|
|
303
305
|
alwaysSanitizeHtml = true,
|
|
304
306
|
}: Options) => {
|
|
305
307
|
return (
|
|
@@ -313,7 +315,7 @@ export const renderHTML = ({
|
|
|
313
315
|
|
|
314
316
|
const RenderHTML = ({
|
|
315
317
|
html,
|
|
316
|
-
additionalReplacements =
|
|
318
|
+
additionalReplacements = EMPTY_REPLACEMENTS,
|
|
317
319
|
alwaysSanitizeHtml,
|
|
318
320
|
}: Options) => {
|
|
319
321
|
const shouldSanitizeHtml = useSanitizeHtml();
|
|
@@ -333,7 +335,7 @@ const RenderHTML = ({
|
|
|
333
335
|
|
|
334
336
|
function parseHtml({
|
|
335
337
|
html,
|
|
336
|
-
additionalReplacements =
|
|
338
|
+
additionalReplacements = EMPTY_REPLACEMENTS,
|
|
337
339
|
}: Pick<Options, "html" | "additionalReplacements">) {
|
|
338
340
|
const renderFunctions: ReplacementFn[] = [
|
|
339
341
|
replaceValidTags,
|
|
@@ -27,6 +27,8 @@ export const LANGUAGE_MAP: Record<string, LanguageName | undefined> = {
|
|
|
27
27
|
undefined: "text",
|
|
28
28
|
};
|
|
29
29
|
|
|
30
|
+
const EMPTY_EXTENSIONS: readonly Extension[] = [];
|
|
31
|
+
|
|
30
32
|
function isSupportedLanguage(
|
|
31
33
|
language: string | undefined,
|
|
32
34
|
): language is LanguageName {
|
|
@@ -43,17 +45,18 @@ function isSupportedLanguage(
|
|
|
43
45
|
* language support.
|
|
44
46
|
*/
|
|
45
47
|
const AnyLanguageCodeMirror: React.FC<
|
|
46
|
-
ReactCodeMirrorProps & {
|
|
48
|
+
Omit<ReactCodeMirrorProps, "extensions"> & {
|
|
47
49
|
language: string | undefined;
|
|
48
50
|
hideUnsupportedLanguageErrors?: boolean;
|
|
49
51
|
theme: ResolvedTheme;
|
|
50
52
|
showCopyButton?: boolean;
|
|
53
|
+
extensions?: readonly Extension[];
|
|
51
54
|
}
|
|
52
55
|
> = ({
|
|
53
56
|
language,
|
|
54
57
|
hideUnsupportedLanguageErrors,
|
|
55
58
|
showCopyButton,
|
|
56
|
-
extensions =
|
|
59
|
+
extensions = EMPTY_EXTENSIONS,
|
|
57
60
|
...props
|
|
58
61
|
}) => {
|
|
59
62
|
// Maybe normalize the language to the extension
|
|
@@ -64,7 +67,7 @@ const AnyLanguageCodeMirror: React.FC<
|
|
|
64
67
|
Logger.warn(`Language ${language} not found in CodeMirror.`);
|
|
65
68
|
}
|
|
66
69
|
|
|
67
|
-
const finalExtensions = useMemo((): Extension[] => {
|
|
70
|
+
const finalExtensions = useMemo((): readonly Extension[] => {
|
|
68
71
|
if (!isSupportedLanguage(language)) {
|
|
69
72
|
return extensions;
|
|
70
73
|
}
|
|
@@ -90,7 +93,7 @@ const AnyLanguageCodeMirror: React.FC<
|
|
|
90
93
|
toastTitle="Copied to clipboard"
|
|
91
94
|
/>
|
|
92
95
|
)}
|
|
93
|
-
<ReactCodeMirror {...props} extensions={finalExtensions} />
|
|
96
|
+
<ReactCodeMirror {...props} extensions={[...finalExtensions]} />
|
|
94
97
|
</div>
|
|
95
98
|
);
|
|
96
99
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
2
|
|
|
3
3
|
import { describe, expect, it } from "vitest";
|
|
4
|
-
import { columnToFieldTypesSchema } from "../schema";
|
|
4
|
+
import { columnToFieldTypesSchema, TransformationsSchema } from "../schema";
|
|
5
|
+
import type { ColumnId } from "../types";
|
|
5
6
|
|
|
6
7
|
describe("columnToFieldTypesSchema", () => {
|
|
7
8
|
it("keeps known field types", () => {
|
|
@@ -36,3 +37,35 @@ describe("columnToFieldTypesSchema", () => {
|
|
|
36
37
|
expect(result).toEqual([["geom", ["geometry", "geometry"]]]);
|
|
37
38
|
});
|
|
38
39
|
});
|
|
40
|
+
|
|
41
|
+
describe("FilterRowsTransformSchema", () => {
|
|
42
|
+
const condition = {
|
|
43
|
+
column_id: "col" as ColumnId,
|
|
44
|
+
operator: "in" as const,
|
|
45
|
+
value: ["a"],
|
|
46
|
+
type: "condition" as const,
|
|
47
|
+
negate: false,
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
it("does not wrap where in a FilterGroup", () => {
|
|
51
|
+
const result = TransformationsSchema.parse({
|
|
52
|
+
transforms: [
|
|
53
|
+
{
|
|
54
|
+
type: "filter_rows",
|
|
55
|
+
operation: "keep_rows",
|
|
56
|
+
where: [condition],
|
|
57
|
+
},
|
|
58
|
+
],
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
expect(result).toEqual({
|
|
62
|
+
transforms: [
|
|
63
|
+
{
|
|
64
|
+
type: "filter_rows",
|
|
65
|
+
operation: "keep_rows",
|
|
66
|
+
where: [condition],
|
|
67
|
+
},
|
|
68
|
+
],
|
|
69
|
+
});
|
|
70
|
+
});
|
|
71
|
+
});
|