@marimo-team/islands 0.20.5-dev7 → 0.20.5-dev74
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/{Combination-Du-o_hC9.js → Combination-Dk6JxauT.js} +1 -1
- package/dist/{ConnectedDataExplorerComponent-DUS-zJoR.js → ConnectedDataExplorerComponent-pQ4sWAoT.js} +11 -11
- package/dist/{_baseIsEqual-5cAxzk6f.js → _baseIsEqual-CvgsjYoW.js} +38 -38
- package/dist/{_basePickBy-3JVb5wYm.js → _basePickBy-pTDW2_2A.js} +6 -6
- package/dist/{_baseUniq-DSSiFuIJ.js → _baseUniq-BUFhl85h.js} +1 -1
- package/dist/{any-language-editor-BL9o7y0_.js → any-language-editor-BIj11a2e.js} +19 -19
- package/dist/{architecture-7HQA4BMR-BxkNpYRp.js → architecture-7HQA4BMR-BmtmhGMc.js} +2 -2
- package/dist/{architectureDiagram-VXUJARFQ-DrJeyFHq.js → architectureDiagram-VXUJARFQ-Df0FNeBR.js} +14 -14
- package/dist/assets/__vite-browser-external-Us1ds95c.js +1 -0
- package/dist/assets/{worker-DUYMdbtA.js → worker-D10K3OOz.js} +2 -2
- package/dist/{blockDiagram-VD42YOAC-BJrP6qKc.js → blockDiagram-VD42YOAC-DszWqlLz.js} +7 -7
- package/dist/{button-KYalaJYu.js → button-DQpBib29.js} +24 -11
- package/dist/{c4Diagram-YG6GDRKO-Bo4gytQ5.js → c4Diagram-YG6GDRKO-Dyj8LoUX.js} +4 -4
- package/dist/{channel-IWLGkaBE.js → channel-CUFaIkTh.js} +1 -1
- package/dist/{check-C50jsehH.js → check-DpqPQmzz.js} +1 -1
- package/dist/{chunk-4F5CHEZ2-CxKDFd-t.js → chunk-4F5CHEZ2-CRwwZ2ED.js} +1 -1
- package/dist/{chunk-ABZYJK2D-CRwanrkd.js → chunk-ABZYJK2D-7QYXAAhe.js} +1 -1
- package/dist/{chunk-ATLVNIR6-CMMCMvOK.js → chunk-ATLVNIR6-pmHPAPSd.js} +1 -1
- package/dist/{chunk-B2363JML-e_W7KW1D.js → chunk-B2363JML-BuBMltZc.js} +1 -1
- package/dist/{chunk-B4BG7PRW-BNsHrGHG.js → chunk-B4BG7PRW-Dbta9cTX.js} +4 -4
- package/dist/{chunk-DI55MBZ5-DQeYbfMV.js → chunk-DI55MBZ5-DyKB35wC.js} +4 -4
- package/dist/{chunk-EXTU4WIE-CV_DQeaX.js → chunk-EXTU4WIE-BRFl4iNd.js} +1 -1
- package/dist/{chunk-FRFDVMJY-C7q09nvl.js → chunk-FRFDVMJY-Bk2LD5Te.js} +1 -1
- package/dist/{chunk-JA3XYJ7Z-Cmt--e0q.js → chunk-JA3XYJ7Z-BkrY9SdL.js} +2 -2
- package/dist/{chunk-JZLCHNYA-CkyMJnI9.js → chunk-JZLCHNYA-Bk_Lil-q.js} +4 -4
- package/dist/{chunk-N4CR4FBY-BJfHtJbD.js → chunk-N4CR4FBY-f5n6meOd.js} +5 -5
- package/dist/{chunk-PL6DKKU2-ChKBqnoD.js → chunk-PL6DKKU2-DiFkzMfM.js} +1 -1
- package/dist/{chunk-QN33PNHL-WOLIPUAJ.js → chunk-QN33PNHL-CXfJywHv.js} +1 -1
- package/dist/{chunk-QXUST7PY-DYuD50pU.js → chunk-QXUST7PY-D7-26sj3.js} +5 -5
- package/dist/{chunk-S3R3BYOJ-CsnX6RKs.js → chunk-S3R3BYOJ-BRT9vd1R.js} +3 -3
- package/dist/{chunk-SJTYNZTY-j6_1s5om.js → chunk-SJTYNZTY-BvVkbShU.js} +1 -1
- package/dist/{chunk-TCCFYFTB-DdLCbCTn.js → chunk-TCCFYFTB-DqxhgXG0.js} +31 -31
- package/dist/{chunk-TQ3KTPDO-CGsUIC73.js → chunk-TQ3KTPDO-CPkEruAA.js} +1 -1
- package/dist/{chunk-TZMSLE5B-B3eYTGCw.js → chunk-TZMSLE5B-DSfBOnzx.js} +1 -1
- package/dist/{chunk-UMXZTB3W--LdAK3Bv.js → chunk-UMXZTB3W-C4ypIY3V.js} +1 -1
- package/dist/{classDiagram-v2-WZHVMYZB-UTw37Gg8.js → classDiagram-2ON5EDUG-DphiMW3Y.js} +10 -10
- package/dist/{classDiagram-2ON5EDUG-C7C-oefv.js → classDiagram-v2-WZHVMYZB-BH1x5h4a.js} +10 -10
- package/dist/{clone-BJrS4PdE.js → clone-CEQ-pda1.js} +1 -1
- package/dist/{constants-D1Tbg_6B.js → constants-CytQ_3LM.js} +3 -3
- package/dist/{copy-oc-FcZzt.js → copy-BkBF0Xgk.js} +2 -2
- package/dist/{dagre-6UL2VRFP-BgsUhJrV.js → dagre-6UL2VRFP-DGEbtmgU.js} +12 -12
- package/dist/{dagre-CyZCGfV_.js → dagre-BVnNvbvD.js} +37 -37
- package/dist/{diagram-PSM6KHXK-BIUUOfKo.js → diagram-PSM6KHXK-CG_usglE.js} +15 -15
- package/dist/{diagram-QEK2KX5R-BFjolZQv.js → diagram-QEK2KX5R-CtGFEwzJ.js} +13 -13
- package/dist/{diagram-S2PKOQOG-4jfkWoZw.js → diagram-S2PKOQOG-ClKAGmbv.js} +13 -13
- package/dist/dist-B4MxkKHf.js +8 -0
- package/dist/{dist-De9X_Des.js → dist-B9EjSb9T.js} +1 -1
- package/dist/{dist-IW_ARJ3S.js → dist-BFxYppVR.js} +4 -4
- package/dist/{dist-D7ZGWV_9.js → dist-BGZ7TWS9.js} +3 -3
- package/dist/{dist-CwtEWuFb.js → dist-BSfYc7vq.js} +2 -2
- package/dist/{dist-DMS81OrU.js → dist-BUrWeMEP.js} +1 -1
- package/dist/dist-BYghZv6b.js +5 -0
- package/dist/dist-Be-uQhz5.js +6 -0
- package/dist/{dist-Ch_JuCvc.js → dist-BpMlUdNO.js} +3 -3
- package/dist/{dist-C6z8U-ms.js → dist-Bq5eYK43.js} +2 -2
- package/dist/{dist-BFL9TlzD.js → dist-Bq9zYwJs.js} +5 -5
- package/dist/{dist-7ZF--V_D.js → dist-C4K7pumm.js} +2 -2
- package/dist/{dist-Qjf6pcqK.js → dist-CAKwXCWI.js} +2 -2
- package/dist/dist-CB_xf0ju.js +5 -0
- package/dist/{dist-BwQHkjA9.js → dist-CDHl2i1x.js} +4 -4
- package/dist/dist-CK0qFAbF.js +8 -0
- package/dist/{dist-C4XMUaob.js → dist-CPlGUbk-.js} +2 -2
- package/dist/{dist-BT6_J2eq.js → dist-CSEWGuDq.js} +7 -2
- package/dist/dist-CYEk-qrr.js +8 -0
- package/dist/{dist-CYo3w-nC.js → dist-Cl5iM8xL.js} +3 -3
- package/dist/dist-CmKoWpMk.js +5 -0
- package/dist/{dist-I8MQW60_.js → dist-CseYuPtL.js} +2 -2
- package/dist/dist-D1nf4IQl.js +5 -0
- package/dist/{dist-CsqiXw7J.js → dist-D4gcY469.js} +2 -2
- package/dist/{dist-DUxS2paD.js → dist-D5NMgbbv.js} +2 -2
- package/dist/{dist-UYm1IE5s.js → dist-DERtJN02.js} +2 -2
- package/dist/{dist-CFToYDWO.js → dist-DEj2X26M.js} +2 -2
- package/dist/{dist-BuapEdlD.js → dist-DOoqn-VL.js} +70 -67
- package/dist/{dist-BLThQiU4.js → dist-DUretbKK.js} +2 -2
- package/dist/{dist-DEFZ7dnD.js → dist-D_-CGmlh.js} +2 -2
- package/dist/dist-Df3AcKpt.js +6 -0
- package/dist/dist-DgaFHt_I.js +5 -0
- package/dist/dist-Dk10C3ui.js +5 -0
- package/dist/{dist-D0f6Yrrb.js → dist-DodLQWPg.js} +1 -1
- package/dist/dist-DtyPVMHR.js +5 -0
- package/dist/{dist-Cb3cLT39.js → dist-HoZO6brh.js} +2 -2
- package/dist/{dist-Cqpjy6bK.js → dist-RNGn_-uD.js} +1 -1
- package/dist/{dist-BBcqvpvP.js → dist-Ux6dL_VB.js} +1 -1
- package/dist/{dist-B8Y11RWn.js → dist-WIWVvdBh.js} +2 -2
- package/dist/{dist-CB6qhQ8K.js → dist-gc9KgJuA.js} +1 -1
- package/dist/{dist-ovDpXuSB.js → dist-i-ud9aCA.js} +1 -1
- package/dist/dist-ko7WnHAO.js +5 -0
- package/dist/{dist-BTQbjEKU.js → dist-lNe4i1Nm.js} +1 -1
- package/dist/dist-of7gLRFK.js +8 -0
- package/dist/{erDiagram-Q2GNP2WA-Cq5Bz5lG.js → erDiagram-Q2GNP2WA-DPMseVVp.js} +10 -10
- package/dist/{error-banner-D0tXnwl4.js → error-banner-BctofTCP.js} +2 -2
- package/dist/{esm-BxMbHo0y.js → esm-BBkPJL8N.js} +29 -27
- package/dist/{flowDiagram-NV44I4VS-6WPJVFl7.js → flowDiagram-NV44I4VS-BpAIFwW7.js} +10 -10
- package/dist/{ganttDiagram-JELNMOA3-AfDhh9CI.js → ganttDiagram-JELNMOA3-DXYghZ9C.js} +3 -3
- package/dist/{gitGraph-G5XIXVHT-C0o6gecv.js → gitGraph-G5XIXVHT-ChHUSAop.js} +2 -2
- package/dist/{gitGraphDiagram-V2S2FVAM-BRSwuj0Q.js → gitGraphDiagram-V2S2FVAM-CBL-7g3_.js} +12 -12
- package/dist/{glide-data-editor-ByPNTNVG.js → glide-data-editor-DqxJOnJk.js} +63 -63
- package/dist/{graphlib-DZnBMcsX.js → graphlib-D18eZCT4.js} +10 -10
- package/dist/hasIn-B9AbGLj3.js +86 -0
- package/dist/{info-VBDWY6EO-Bzsods6X.js → info-VBDWY6EO-CwyXEo8E.js} +2 -2
- package/dist/{infoDiagram-HS3SLOUP-Cmxo6jKx.js → infoDiagram-HS3SLOUP-BXGbfBss.js} +12 -12
- package/dist/{isArrayLikeObject-Btu-i6_P.js → isArrayLikeObject-BrYl-ETg.js} +25 -26
- package/dist/{isEmpty-CZvUtYFp.js → isEmpty-C-xMag79.js} +2 -2
- package/dist/{isString-CBr7TEb7.js → isString-D-vNYDBA.js} +1 -1
- package/dist/{isSymbol-BuQsMXhk.js → isSymbol-Dyt2NSnN.js} +1 -1
- package/dist/{journeyDiagram-XKPGCS4Q-CKYr8cSR.js → journeyDiagram-XKPGCS4Q-D5BIjS4N.js} +3 -3
- package/dist/{kanban-definition-3W4ZIXB7-DVvAZzQD.js → kanban-definition-3W4ZIXB7-DhDkqxFB.js} +7 -7
- package/dist/{label-CV0KYhtH.js → label-BLDcDYdI.js} +6 -6
- package/dist/{loader-eJCvvApN.js → loader-DsE3MiYo.js} +2 -2
- package/dist/main.js +1589 -1110
- package/dist/{memoize-P1T1IGb9.js → memoize-Cs8aS5RW.js} +1 -1
- package/dist/merge-NuyC7LN7.js +51 -0
- package/dist/{mermaid-COOB_abB.js → mermaid-DkdSmFY8.js} +42 -42
- package/dist/{mermaid-parser.core-Cd-wu4tE.js → mermaid-parser.core-OkWZ8nr-.js} +8 -8
- package/dist/{min-CMDDtXJP.js → min-ECVRnCdn.js} +30 -30
- package/dist/{mindmap-definition-VGOIOE7T-1ExmnvYy.js → mindmap-definition-VGOIOE7T-BxQi78Vl.js} +9 -9
- package/dist/{now-BxlRp0OQ.js → now-BC2mX0ZT.js} +1 -1
- package/dist/{packet-DYOGHKS2-Bf1CvFco.js → packet-DYOGHKS2-C62XQjZh.js} +2 -2
- package/dist/{pie-VRWISCQL-LY_wbqji.js → pie-VRWISCQL-nfAKQJw3.js} +2 -2
- package/dist/{pieDiagram-ADFJNKIX-CJlIsdsU.js → pieDiagram-ADFJNKIX-DfSJXUHa.js} +13 -13
- package/dist/{purify.es-CyOIw8ru.js → purify.es-DGenX2XH.js} +67 -67
- package/dist/{quadrantDiagram-AYHSOK5B-BU78RiaH.js → quadrantDiagram-AYHSOK5B-CAcVWXc-.js} +2 -2
- package/dist/{radar-ZZBFDIW7-Ro3iXZCk.js → radar-ZZBFDIW7-lopS8_4j.js} +2 -2
- package/dist/{range-Dh0_-r8P.js → range-BKaWvVUE.js} +8 -8
- package/dist/reduce-CqQo8ppc.js +275 -0
- package/dist/{requirementDiagram-UZGBJVZJ-DACHtrFr.js → requirementDiagram-UZGBJVZJ-BU7dwzFM.js} +9 -9
- package/dist/{sankeyDiagram-TZEHDZUN-Bzg7_UWs.js → sankeyDiagram-TZEHDZUN-BVJnR4_b.js} +2 -2
- package/dist/{sequenceDiagram-WL72ISMW-agybEe9J.js → sequenceDiagram-WL72ISMW-CQcFQTwX.js} +4 -4
- package/dist/{slides-component-B0yK5GXP.js → slides-component-DwvL_HJi.js} +2 -2
- package/dist/{spec-Dq_reDGM.js → spec-CbYkiXG3.js} +5 -5
- package/dist/{stateDiagram-FKZM4ZOC-DehQAt8g.js → stateDiagram-FKZM4ZOC-Dx9AIGDe.js} +12 -12
- package/dist/{stateDiagram-v2-4FDKWEC3-8VzeREl9.js → stateDiagram-v2-4FDKWEC3-BIeUs-Ed.js} +10 -10
- package/dist/style.css +1 -1
- package/dist/{timeline-definition-IT6M3QCI-CdCfdaCF.js → timeline-definition-IT6M3QCI-D8B3p7ID.js} +2 -2
- package/dist/{toNumber-By7s5JC_.js → toNumber-CbZ70FdN.js} +2 -2
- package/dist/{toString-Ckpb50uw.js → toString-DbIAWQpF.js} +2 -2
- package/dist/{tooltip-CL8m4f9y.js → tooltip-SPkubVH3.js} +3 -3
- package/dist/{treemap-GDKQZRPO-DRxfDG65.js → treemap-GDKQZRPO-CkR-5ai2.js} +2 -2
- package/dist/{types-BwnzGcE4.js → types-0FB-N7AA.js} +519 -408
- package/dist/{uniq-cCc07Q8K.js → uniq-H2E5nMLq.js} +1 -1
- package/dist/{useAsyncData-B4hMFGnF.js → useAsyncData-D7-oahg5.js} +1 -1
- package/dist/{useDeepCompareMemoize-DuPhOXzr.js → useDeepCompareMemoize-DLS-bHHT.js} +5 -5
- package/dist/{useIframeCapabilities-CAt6D2EI.js → useIframeCapabilities-DFGZKWkO.js} +1 -1
- package/dist/{useTheme-BNYQnvu-.js → useTheme-D0rdoMBF.js} +6 -5
- package/dist/{vega-component-DouPy8AI.js → vega-component-D2knjGgv.js} +10 -10
- package/dist/{xychartDiagram-PRI3JC2R-rEm_SIsC.js → xychartDiagram-PRI3JC2R-XO8FiQjU.js} +5 -5
- package/package.json +9 -9
- package/src/__mocks__/common.ts +41 -8
- package/src/__mocks__/requests.ts +1 -0
- package/src/components/app-config/ai-config.tsx +10 -0
- package/src/components/chat/__tests__/useFileState.test.tsx +2 -3
- package/src/components/chat/acp/__tests__/context-utils.test.ts +2 -6
- package/src/components/datasources/components.tsx +3 -6
- package/src/components/datasources/datasources.tsx +8 -21
- package/src/components/editor/__tests__/data-attributes.test.tsx +2 -11
- package/src/components/editor/actions/types.ts +6 -1
- package/src/components/editor/actions/useNotebookActions.tsx +50 -13
- package/src/components/editor/chrome/types.ts +17 -0
- package/src/components/editor/connections/add-connection-dialog.tsx +27 -2
- package/src/components/editor/connections/database/__tests__/__snapshots__/as-code.test.ts.snap +105 -6
- package/src/components/editor/connections/database/__tests__/as-code.test.ts +101 -8
- package/src/components/editor/connections/database/as-code.ts +115 -25
- package/src/components/editor/connections/database/schemas.ts +49 -2
- package/src/components/editor/connections/storage/as-code.ts +1 -1
- package/src/components/editor/controls/command-palette.tsx +7 -0
- package/src/components/editor/controls/keyboard-shortcuts.tsx +3 -1
- package/src/components/editor/file-tree/__tests__/requesting-tree.test.ts +2 -3
- package/src/components/editor/file-tree/file-explorer.tsx +48 -62
- package/src/components/editor/file-tree/file-icons.tsx +132 -0
- package/src/components/editor/file-tree/file-viewer.tsx +1 -1
- package/src/components/editor/file-tree/tree-actions.tsx +107 -0
- package/src/components/editor/file-tree/types.ts +2 -96
- package/src/components/editor/header/filename-input.tsx +4 -1
- package/src/components/editor/navigation/__tests__/clipboard.test.ts +2 -4
- package/src/components/editor/output/console/__tests__/ConsoleOutput.test.tsx +2 -12
- package/src/components/icons/marimo-icons.tsx +2 -2
- package/src/components/pages/home-page.tsx +5 -5
- package/src/components/storage/__tests__/storage-snippets.test.ts +253 -0
- package/src/components/storage/components.tsx +0 -38
- package/src/components/storage/storage-file-viewer.tsx +1 -1
- package/src/components/storage/storage-inspector.tsx +66 -51
- package/src/components/storage/storage-snippets.ts +67 -0
- package/src/components/ui/command.tsx +2 -0
- package/src/components/ui/links.tsx +1 -0
- package/src/core/ai/tools/__tests__/run-cells-tool.test.ts +206 -0
- package/src/core/ai/tools/run-cells-tool.ts +75 -40
- package/src/core/cells/__tests__/cells.test.ts +62 -0
- package/src/core/cells/__tests__/session.test.ts +2 -7
- package/src/core/cells/cells.ts +25 -3
- package/src/core/codemirror/compat/__tests__/jupyter.test.ts +2 -3
- package/src/core/codemirror/markdown/__tests__/commands.test.ts +2 -3
- package/src/core/config/__tests__/config-schema.test.ts +6 -2
- package/src/core/config/config-schema.ts +1 -0
- package/src/core/config/feature-flag.tsx +1 -1
- package/src/core/export/__tests__/hooks.test.ts +3 -10
- package/src/core/hotkeys/__tests__/hotkeys.test.ts +64 -1
- package/src/core/hotkeys/hotkeys.ts +29 -3
- package/src/core/islands/bridge.ts +1 -0
- package/src/core/network/__tests__/requests-network.test.ts +17 -0
- package/src/core/network/requests-lazy.ts +1 -0
- package/src/core/network/requests-network.ts +9 -0
- package/src/core/network/requests-static.ts +1 -0
- package/src/core/network/requests-toasting.tsx +1 -0
- package/src/core/network/types.ts +1 -0
- package/src/core/runtime/__tests__/runtime.test.ts +2 -8
- package/src/core/storage/__tests__/state.test.ts +1 -0
- package/src/core/wasm/bridge.ts +1 -0
- package/src/core/websocket/useMarimoKernelConnection.tsx +2 -0
- package/src/plugins/impl/FileBrowserPlugin.tsx +4 -4
- package/src/plugins/impl/__tests__/DataTablePlugin.test.tsx +2 -11
- package/src/plugins/impl/__tests__/DropdownPlugin.test.tsx +2 -11
- package/src/plugins/impl/mpl-interactive/MplInteractivePlugin.tsx +309 -0
- package/src/plugins/impl/mpl-interactive/__tests__/mpl-websocket-shim.test.ts +110 -0
- package/src/plugins/impl/mpl-interactive/mpl-websocket-shim.ts +57 -0
- package/src/plugins/impl/plotly/PlotlyPlugin.tsx +8 -2
- package/src/plugins/plugins.ts +2 -0
- package/src/utils/__tests__/download.test.tsx +12 -14
- package/src/utils/__tests__/filenames.test.ts +7 -0
- package/src/utils/__tests__/smartMatch.test.ts +61 -0
- package/src/utils/filenames.ts +3 -0
- package/src/utils/smartMatch.ts +62 -0
- package/dist/_baseProperty-D1nWkRMz.js +0 -93
- package/dist/assets/__vite-browser-external-WSlCcXn_.js +0 -1
- package/dist/dist-BAeGo2rp.js +0 -5
- package/dist/dist-BqwCMSEa.js +0 -5
- package/dist/dist-Bum8FwTO.js +0 -6
- package/dist/dist-C0YiOwt_.js +0 -5
- package/dist/dist-C2uPv4iU.js +0 -5
- package/dist/dist-C5hOLsJN.js +0 -8
- package/dist/dist-C9NIAKMs.js +0 -8
- package/dist/dist-CCrzTtvk.js +0 -5
- package/dist/dist-CFS9i1rS.js +0 -8
- package/dist/dist-CyHZuhPH.js +0 -5
- package/dist/dist-CzcjWdIk.js +0 -6
- package/dist/dist-DaYyUSNC.js +0 -5
- package/dist/dist-DpDcJYNh.js +0 -8
- package/dist/dist-U_BfxcPn.js +0 -5
- package/dist/merge-CGQkMGzr.js +0 -51
- package/dist/reduce-BXFHs7IQ.js +0 -268
package/src/plugins/plugins.ts
CHANGED
|
@@ -26,6 +26,7 @@ import { MatrixPlugin } from "./impl/MatrixPlugin";
|
|
|
26
26
|
import { MicrophonePlugin } from "./impl/MicrophonePlugin";
|
|
27
27
|
import { MultiselectPlugin } from "./impl/MultiselectPlugin";
|
|
28
28
|
import { MatplotlibPlugin } from "./impl/matplotlib/MatplotlibPlugin";
|
|
29
|
+
import { MplInteractivePlugin } from "./impl/mpl-interactive/MplInteractivePlugin";
|
|
29
30
|
import { NumberPlugin } from "./impl/NumberPlugin";
|
|
30
31
|
import { PanelPlugin } from "./impl/panel/PanelPlugin";
|
|
31
32
|
import { PlotlyPlugin } from "./impl/plotly/PlotlyPlugin";
|
|
@@ -92,6 +93,7 @@ export const UI_PLUGINS: IPlugin<any, unknown>[] = [
|
|
|
92
93
|
AnyWidgetPlugin,
|
|
93
94
|
DataEditorPlugin,
|
|
94
95
|
PanelPlugin,
|
|
96
|
+
MplInteractivePlugin,
|
|
95
97
|
];
|
|
96
98
|
|
|
97
99
|
// List of output / layout plugins
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
2
|
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
|
3
|
+
import { Mocks } from "@/__mocks__/common";
|
|
3
4
|
import type { CellId } from "@/core/cells/ids";
|
|
4
5
|
import { CellOutputId } from "@/core/cells/ids";
|
|
5
6
|
import {
|
|
@@ -27,26 +28,23 @@ vi.mock("@/core/network/requests", () => ({
|
|
|
27
28
|
}));
|
|
28
29
|
|
|
29
30
|
// Mock the toast module
|
|
30
|
-
const mockDismiss = vi.
|
|
31
|
-
const
|
|
32
|
-
vi.
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}
|
|
31
|
+
const { mockDismiss, mockUpdate, toastMock } = vi.hoisted(() => {
|
|
32
|
+
const dismiss = vi.fn();
|
|
33
|
+
const update = vi.fn();
|
|
34
|
+
return {
|
|
35
|
+
mockDismiss: dismiss,
|
|
36
|
+
mockUpdate: update,
|
|
37
|
+
toastMock: { toast: vi.fn(() => ({ dismiss, update })) },
|
|
38
|
+
};
|
|
39
|
+
});
|
|
40
|
+
vi.mock("@/components/ui/use-toast", () => toastMock);
|
|
38
41
|
|
|
39
42
|
// Mock the Spinner component
|
|
40
43
|
vi.mock("@/components/icons/spinner", () => ({
|
|
41
44
|
Spinner: () => "MockSpinner",
|
|
42
45
|
}));
|
|
43
46
|
|
|
44
|
-
|
|
45
|
-
vi.mock("@/utils/Logger", () => ({
|
|
46
|
-
Logger: {
|
|
47
|
-
error: vi.fn(),
|
|
48
|
-
},
|
|
49
|
-
}));
|
|
47
|
+
vi.mock("@/utils/Logger", () => ({ Logger: Mocks.quietLogger() }));
|
|
50
48
|
|
|
51
49
|
// Mock Filenames
|
|
52
50
|
vi.mock("@/utils/filenames", () => ({
|
|
@@ -23,6 +23,12 @@ describe("Filenames", () => {
|
|
|
23
23
|
expect(Filenames.toPNG("test.foo.py")).toEqual("test.foo.png");
|
|
24
24
|
});
|
|
25
25
|
|
|
26
|
+
it("should convert filename to ipynb", () => {
|
|
27
|
+
expect(Filenames.toIPYNB("test")).toEqual("test.ipynb");
|
|
28
|
+
expect(Filenames.toIPYNB("test.txt")).toEqual("test.ipynb");
|
|
29
|
+
expect(Filenames.toIPYNB("test.foo.py")).toEqual("test.foo.ipynb");
|
|
30
|
+
});
|
|
31
|
+
|
|
26
32
|
it("should remove extension from filename", () => {
|
|
27
33
|
expect(Filenames.withoutExtension("test")).toEqual("test");
|
|
28
34
|
expect(Filenames.withoutExtension("test.txt")).toEqual("test");
|
|
@@ -39,6 +45,7 @@ describe("Filenames", () => {
|
|
|
39
45
|
expect(Filenames.toHTML(filename)).toEqual(`${withoutExt}.html`);
|
|
40
46
|
expect(Filenames.toPNG(filename)).toEqual(`${withoutExt}.png`);
|
|
41
47
|
expect(Filenames.toPY(filename)).toEqual(`${withoutExt}.py`);
|
|
48
|
+
expect(Filenames.toIPYNB(filename)).toEqual(`${withoutExt}.ipynb`);
|
|
42
49
|
|
|
43
50
|
// Ensure operations preserve unicode and special characters in base name
|
|
44
51
|
expect(withoutExt).not.toEqual("");
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
|
+
import { describe, expect, it } from "vitest";
|
|
3
|
+
import { smartMatch, smartMatchFilter } from "../smartMatch";
|
|
4
|
+
|
|
5
|
+
describe("smartMatch", () => {
|
|
6
|
+
it("matches exact word", () => {
|
|
7
|
+
expect(smartMatch("run", "Run cell")).toBe(true);
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
it("matches word prefix", () => {
|
|
11
|
+
expect(smartMatch("exe", "execute start")).toBe(true);
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
it("matches across array of haystacks", () => {
|
|
15
|
+
expect(smartMatch("exe", ["Run", "execute start"])).toBe(true);
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
it("does not match unrelated terms", () => {
|
|
19
|
+
expect(smartMatch("xyz", "Run cell")).toBe(false);
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
it("empty search matches everything", () => {
|
|
23
|
+
expect(smartMatch("", "anything")).toBe(true);
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
it("multi-word needle requires all words to match", () => {
|
|
27
|
+
expect(smartMatch("run cell", "Run cell")).toBe(true);
|
|
28
|
+
expect(smartMatch("run xyz", "Run cell")).toBe(false);
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
it("is case-insensitive", () => {
|
|
32
|
+
expect(smartMatch("RUN", "run cell")).toBe(true);
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
it("skips null/undefined haystacks", () => {
|
|
36
|
+
expect(smartMatch("run", [null, undefined, "Run cell"])).toBe(true);
|
|
37
|
+
expect(smartMatch("run", [null, undefined])).toBe(false);
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
describe("smartMatchFilter", () => {
|
|
42
|
+
it("returns 1 for value match", () => {
|
|
43
|
+
expect(smartMatchFilter("Run cell", "run")).toBe(1);
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
it("returns 0 for no match", () => {
|
|
47
|
+
expect(smartMatchFilter("Run cell", "xyz")).toBe(0);
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
it("returns 0.8 for keyword-only match", () => {
|
|
51
|
+
expect(smartMatchFilter("Run", "execute", ["execute", "start"])).toBe(0.8);
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
it("returns 1 when value matches even if keywords also match", () => {
|
|
55
|
+
expect(smartMatchFilter("Run", "run", ["execute", "start"])).toBe(1);
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
it("does not match without relevant keywords", () => {
|
|
59
|
+
expect(smartMatchFilter("Run", "preferences", ["execute"])).toBe(0);
|
|
60
|
+
});
|
|
61
|
+
});
|
package/src/utils/filenames.ts
CHANGED
|
@@ -15,6 +15,9 @@ export const Filenames = {
|
|
|
15
15
|
toPY: (filename: string): string => {
|
|
16
16
|
return Filenames.replace(filename, "py");
|
|
17
17
|
},
|
|
18
|
+
toIPYNB: (filename: string): string => {
|
|
19
|
+
return Filenames.replace(filename, "ipynb");
|
|
20
|
+
},
|
|
18
21
|
withoutExtension: (filename: string): string => {
|
|
19
22
|
// Just remove the last extension
|
|
20
23
|
const parts = filename.split(".");
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Split a string into lowercase words (letters/digits only).
|
|
5
|
+
*/
|
|
6
|
+
function words(s: string): string[] {
|
|
7
|
+
return s.toLowerCase().match(/[\da-z]+/g) || [];
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Returns true when every word in `needle` is a prefix of at least one word
|
|
12
|
+
* in one of the `haystacks`.
|
|
13
|
+
*
|
|
14
|
+
* Examples:
|
|
15
|
+
* smartMatch("run", "Run cell") // true – "run" prefixes "run"
|
|
16
|
+
* smartMatch("exe", ["Run", "execute start"]) // true – "exe" prefixes "execute"
|
|
17
|
+
* smartMatch("xyz", "Run cell") // false
|
|
18
|
+
*/
|
|
19
|
+
export function smartMatch(
|
|
20
|
+
needle: string,
|
|
21
|
+
haystackOrHaystacks: string | (string | null | undefined)[],
|
|
22
|
+
): boolean {
|
|
23
|
+
const needleWords = words(needle);
|
|
24
|
+
if (needleWords.length === 0) {
|
|
25
|
+
return true; // empty search matches everything
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const haystacks = Array.isArray(haystackOrHaystacks)
|
|
29
|
+
? haystackOrHaystacks
|
|
30
|
+
: [haystackOrHaystacks];
|
|
31
|
+
|
|
32
|
+
// Collect all words from all haystacks
|
|
33
|
+
const haystackWords: string[] = [];
|
|
34
|
+
for (const h of haystacks) {
|
|
35
|
+
if (h) {
|
|
36
|
+
haystackWords.push(...words(h));
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// Every needle word must be a prefix of at least one haystack word
|
|
41
|
+
return needleWords.every((nw) => {
|
|
42
|
+
return haystackWords.some((hw) => hw.startsWith(nw));
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* cmdk-compatible filter function.
|
|
48
|
+
* Returns 1 for a value match, 0.8 for a keyword-only match, 0 for no match.
|
|
49
|
+
*/
|
|
50
|
+
export function smartMatchFilter(
|
|
51
|
+
value: string,
|
|
52
|
+
search: string,
|
|
53
|
+
keywords?: string[],
|
|
54
|
+
): number {
|
|
55
|
+
if (smartMatch(search, value)) {
|
|
56
|
+
return 1;
|
|
57
|
+
}
|
|
58
|
+
if (keywords && smartMatch(search, keywords)) {
|
|
59
|
+
return 0.8;
|
|
60
|
+
}
|
|
61
|
+
return 0;
|
|
62
|
+
}
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import { M as _isIndex_default, T as isLength_default, V as isArray_default, W as _Symbol_default, y as isArguments_default } from "./isArrayLikeObject-Btu-i6_P.js";
|
|
2
|
-
import { t as isSymbol_default } from "./isSymbol-BuQsMXhk.js";
|
|
3
|
-
import { t as toString_default } from "./toString-Ckpb50uw.js";
|
|
4
|
-
import { p as _arrayPush_default } from "./_baseIsEqual-5cAxzk6f.js";
|
|
5
|
-
import { t as memoize_default } from "./memoize-P1T1IGb9.js";
|
|
6
|
-
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/;
|
|
7
|
-
function isKey(d, j) {
|
|
8
|
-
if (isArray_default(d)) return false;
|
|
9
|
-
var N = typeof d;
|
|
10
|
-
return N == "number" || N == "symbol" || N == "boolean" || d == null || isSymbol_default(d) ? true : reIsPlainProp.test(d) || !reIsDeepProp.test(d) || j != null && d in Object(j);
|
|
11
|
-
}
|
|
12
|
-
var _isKey_default = isKey, MAX_MEMOIZE_SIZE = 500;
|
|
13
|
-
function memoizeCapped(d) {
|
|
14
|
-
var j = memoize_default(d, function(d2) {
|
|
15
|
-
return M.size === MAX_MEMOIZE_SIZE && M.clear(), d2;
|
|
16
|
-
}), M = j.cache;
|
|
17
|
-
return j;
|
|
18
|
-
}
|
|
19
|
-
var _memoizeCapped_default = memoizeCapped, rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, reEscapeChar = /\\(\\)?/g, _stringToPath_default = _memoizeCapped_default(function(d) {
|
|
20
|
-
var j = [];
|
|
21
|
-
return d.charCodeAt(0) === 46 && j.push(""), d.replace(rePropName, function(d2, M, N, P) {
|
|
22
|
-
j.push(N ? P.replace(reEscapeChar, "$1") : M || d2);
|
|
23
|
-
}), j;
|
|
24
|
-
});
|
|
25
|
-
function castPath(d, j) {
|
|
26
|
-
return isArray_default(d) ? d : _isKey_default(d, j) ? [d] : _stringToPath_default(toString_default(d));
|
|
27
|
-
}
|
|
28
|
-
var _castPath_default = castPath, INFINITY = Infinity;
|
|
29
|
-
function toKey(d) {
|
|
30
|
-
if (typeof d == "string" || isSymbol_default(d)) return d;
|
|
31
|
-
var j = d + "";
|
|
32
|
-
return j == "0" && 1 / d == -INFINITY ? "-0" : j;
|
|
33
|
-
}
|
|
34
|
-
var _toKey_default = toKey;
|
|
35
|
-
function baseGet(d, j) {
|
|
36
|
-
j = _castPath_default(j, d);
|
|
37
|
-
for (var M = 0, N = j.length; d != null && M < N; ) d = d[_toKey_default(j[M++])];
|
|
38
|
-
return M && M == N ? d : void 0;
|
|
39
|
-
}
|
|
40
|
-
var _baseGet_default = baseGet;
|
|
41
|
-
function get(d, j, M) {
|
|
42
|
-
var N = d == null ? void 0 : _baseGet_default(d, j);
|
|
43
|
-
return N === void 0 ? M : N;
|
|
44
|
-
}
|
|
45
|
-
var get_default = get, spreadableSymbol = _Symbol_default ? _Symbol_default.isConcatSpreadable : void 0;
|
|
46
|
-
function isFlattenable(d) {
|
|
47
|
-
return isArray_default(d) || isArguments_default(d) || !!(spreadableSymbol && d && d[spreadableSymbol]);
|
|
48
|
-
}
|
|
49
|
-
var _isFlattenable_default = isFlattenable;
|
|
50
|
-
function baseFlatten(d, j, M, N, P) {
|
|
51
|
-
var F = -1, I = d.length;
|
|
52
|
-
for (M || (M = _isFlattenable_default), P || (P = []); ++F < I; ) {
|
|
53
|
-
var R = d[F];
|
|
54
|
-
j > 0 && M(R) ? j > 1 ? baseFlatten(R, j - 1, M, N, P) : _arrayPush_default(P, R) : N || (P[P.length] = R);
|
|
55
|
-
}
|
|
56
|
-
return P;
|
|
57
|
-
}
|
|
58
|
-
var _baseFlatten_default = baseFlatten;
|
|
59
|
-
function baseHasIn(d, j) {
|
|
60
|
-
return d != null && j in Object(d);
|
|
61
|
-
}
|
|
62
|
-
var _baseHasIn_default = baseHasIn;
|
|
63
|
-
function hasPath(N, F, I) {
|
|
64
|
-
F = _castPath_default(F, N);
|
|
65
|
-
for (var L = -1, R = F.length, z = false; ++L < R; ) {
|
|
66
|
-
var B = _toKey_default(F[L]);
|
|
67
|
-
if (!(z = N != null && I(N, B))) break;
|
|
68
|
-
N = N[B];
|
|
69
|
-
}
|
|
70
|
-
return z || ++L != R ? z : (R = N == null ? 0 : N.length, !!R && isLength_default(R) && _isIndex_default(B, R) && (isArray_default(N) || isArguments_default(N)));
|
|
71
|
-
}
|
|
72
|
-
var _hasPath_default = hasPath;
|
|
73
|
-
function hasIn(d, j) {
|
|
74
|
-
return d != null && _hasPath_default(d, j, _baseHasIn_default);
|
|
75
|
-
}
|
|
76
|
-
var hasIn_default = hasIn;
|
|
77
|
-
function baseProperty(d) {
|
|
78
|
-
return function(j) {
|
|
79
|
-
return j == null ? void 0 : j[d];
|
|
80
|
-
};
|
|
81
|
-
}
|
|
82
|
-
var _baseProperty_default = baseProperty;
|
|
83
|
-
export {
|
|
84
|
-
get_default as a,
|
|
85
|
-
_castPath_default as c,
|
|
86
|
-
_baseFlatten_default as i,
|
|
87
|
-
_isKey_default as l,
|
|
88
|
-
hasIn_default as n,
|
|
89
|
-
_baseGet_default as o,
|
|
90
|
-
_hasPath_default as r,
|
|
91
|
-
_toKey_default as s,
|
|
92
|
-
_baseProperty_default as t
|
|
93
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./worker-DUYMdbtA.js";var t=e(((e,t)=>{t.exports={}}));export default t();
|
package/dist/dist-BAeGo2rp.js
DELETED
package/dist/dist-BqwCMSEa.js
DELETED
package/dist/dist-Bum8FwTO.js
DELETED
package/dist/dist-C0YiOwt_.js
DELETED
package/dist/dist-C2uPv4iU.js
DELETED
package/dist/dist-C5hOLsJN.js
DELETED
package/dist/dist-C9NIAKMs.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import "./dist-BuapEdlD.js";
|
|
2
|
-
import "./dist-Ch_JuCvc.js";
|
|
3
|
-
import "./dist-BBcqvpvP.js";
|
|
4
|
-
import "./dist-CsqiXw7J.js";
|
|
5
|
-
import { i as jinjaLanguage, n as jinja, r as jinjaCompletionSource, t as closePercentBrace } from "./dist-I8MQW60_.js";
|
|
6
|
-
export {
|
|
7
|
-
jinja
|
|
8
|
-
};
|
package/dist/dist-CCrzTtvk.js
DELETED
package/dist/dist-CFS9i1rS.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import "./dist-BuapEdlD.js";
|
|
2
|
-
import "./dist-Ch_JuCvc.js";
|
|
3
|
-
import "./dist-BBcqvpvP.js";
|
|
4
|
-
import "./dist-CsqiXw7J.js";
|
|
5
|
-
import { i as liquidLanguage, n as liquid, r as liquidCompletionSource, t as closePercentBrace } from "./dist-BLThQiU4.js";
|
|
6
|
-
export {
|
|
7
|
-
liquid
|
|
8
|
-
};
|
package/dist/dist-CyHZuhPH.js
DELETED
package/dist/dist-CzcjWdIk.js
DELETED
package/dist/dist-DaYyUSNC.js
DELETED
package/dist/dist-DpDcJYNh.js
DELETED
package/dist/dist-U_BfxcPn.js
DELETED
package/dist/merge-CGQkMGzr.js
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { A as eq_default, B as isObject_default, F as _copyArray_default, H as isObjectLike_default, O as _copyObject_default, R as isFunction_default, S as _createAssigner_default, U as _baseGetTag_default, V as isArray_default, c as _Stack_default, f as keysIn_default, h as isTypedArray_default, i as _cloneTypedArray_default, j as _baseAssignValue_default, l as _getPrototype_default, n as _baseFor_default, r as _initCloneObject_default, s as _cloneBuffer_default, t as isArrayLikeObject_default, v as isBuffer_default, y as isArguments_default } from "./isArrayLikeObject-Btu-i6_P.js";
|
|
2
|
-
var objectTag = "[object Object]", funcProto = Function.prototype, objectProto = Object.prototype, funcToString = funcProto.toString, hasOwnProperty = objectProto.hasOwnProperty, objectCtorString = funcToString.call(Object);
|
|
3
|
-
function isPlainObject(r) {
|
|
4
|
-
if (!isObjectLike_default(r) || _baseGetTag_default(r) != objectTag) return false;
|
|
5
|
-
var S = _getPrototype_default(r);
|
|
6
|
-
if (S === null) return true;
|
|
7
|
-
var C = hasOwnProperty.call(S, "constructor") && S.constructor;
|
|
8
|
-
return typeof C == "function" && C instanceof C && funcToString.call(C) == objectCtorString;
|
|
9
|
-
}
|
|
10
|
-
var isPlainObject_default = isPlainObject;
|
|
11
|
-
function assignMergeValue(S, C, w) {
|
|
12
|
-
(w !== void 0 && !eq_default(S[C], w) || w === void 0 && !(C in S)) && _baseAssignValue_default(S, C, w);
|
|
13
|
-
}
|
|
14
|
-
var _assignMergeValue_default = assignMergeValue;
|
|
15
|
-
function safeGet(r, S) {
|
|
16
|
-
if (!(S === "constructor" && typeof r[S] == "function") && S != "__proto__") return r[S];
|
|
17
|
-
}
|
|
18
|
-
var _safeGet_default = safeGet;
|
|
19
|
-
function toPlainObject(r) {
|
|
20
|
-
return _copyObject_default(r, keysIn_default(r));
|
|
21
|
-
}
|
|
22
|
-
var toPlainObject_default = toPlainObject;
|
|
23
|
-
function baseMergeDeep(r, w, T, D, O, A, j) {
|
|
24
|
-
var M = _safeGet_default(r, T), N = _safeGet_default(w, T), P = j.get(N);
|
|
25
|
-
if (P) {
|
|
26
|
-
_assignMergeValue_default(r, T, P);
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
var F = A ? A(M, N, T + "", r, w, j) : void 0, I = F === void 0;
|
|
30
|
-
if (I) {
|
|
31
|
-
var L = isArray_default(N), R = !L && isBuffer_default(N), z = !L && !R && isTypedArray_default(N);
|
|
32
|
-
F = N, L || R || z ? isArray_default(M) ? F = M : isArrayLikeObject_default(M) ? F = _copyArray_default(M) : R ? (I = false, F = _cloneBuffer_default(N, true)) : z ? (I = false, F = _cloneTypedArray_default(N, true)) : F = [] : isPlainObject_default(N) || isArguments_default(N) ? (F = M, isArguments_default(M) ? F = toPlainObject_default(M) : (!isObject_default(M) || isFunction_default(M)) && (F = _initCloneObject_default(N))) : I = false;
|
|
33
|
-
}
|
|
34
|
-
I && (j.set(N, F), O(F, N, D, A, j), j.delete(N)), _assignMergeValue_default(r, T, F);
|
|
35
|
-
}
|
|
36
|
-
var _baseMergeDeep_default = baseMergeDeep;
|
|
37
|
-
function baseMerge(r, C, w, T, E) {
|
|
38
|
-
r !== C && _baseFor_default(C, function(D, O) {
|
|
39
|
-
if (E || (E = new _Stack_default()), isObject_default(D)) _baseMergeDeep_default(r, C, O, w, baseMerge, T, E);
|
|
40
|
-
else {
|
|
41
|
-
var k = T ? T(_safeGet_default(r, O), D, O + "", r, C, E) : void 0;
|
|
42
|
-
k === void 0 && (k = D), _assignMergeValue_default(r, O, k);
|
|
43
|
-
}
|
|
44
|
-
}, keysIn_default);
|
|
45
|
-
}
|
|
46
|
-
var _baseMerge_default = baseMerge, merge_default = _createAssigner_default(function(r, S, C) {
|
|
47
|
-
_baseMerge_default(r, S, C);
|
|
48
|
-
});
|
|
49
|
-
export {
|
|
50
|
-
merge_default as t
|
|
51
|
-
};
|