@marimo-team/islands 0.20.5-dev8 → 0.20.5-dev83
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 +1622 -1122
- 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/cells/ids.ts +2 -1
- package/src/core/codemirror/compat/__tests__/jupyter.test.ts +2 -3
- package/src/core/codemirror/keymaps/vim.ts +32 -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/dom/ui-element-constants.ts +15 -0
- package/src/core/dom/ui-element.ts +3 -2
- 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/islands/components/web-components.tsx +2 -1
- 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/DataTablePlugin.tsx +53 -3
- package/src/plugins/impl/FileBrowserPlugin.tsx +8 -5
- package/src/plugins/impl/__tests__/DataTablePlugin.test.tsx +2 -11
- package/src/plugins/impl/__tests__/DropdownPlugin.test.tsx +2 -11
- package/src/plugins/impl/anywidget/AnyWidgetPlugin.tsx +4 -1
- 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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { s as __toESM } from "./chunk-BNovOVIE.js";
|
|
2
2
|
import { t as require_react } from "./react-Bs6Z0kvn.js";
|
|
3
3
|
import { t as require_compiler_runtime } from "./compiler-runtime-B_OLMU9S.js";
|
|
4
|
-
import { C as useEvent_default } from "./useTheme-
|
|
4
|
+
import { C as useEvent_default } from "./useTheme-D0rdoMBF.js";
|
|
5
5
|
import { t as invariant } from "./invariant-D9QLJ4SZ.js";
|
|
6
6
|
var import_compiler_runtime = require_compiler_runtime(), import_react = /* @__PURE__ */ __toESM(require_react(), 1), Result = {
|
|
7
7
|
error(e, s) {
|
|
@@ -4,12 +4,12 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
4
4
|
import { s as __toESM, t as __commonJSMin } from "./chunk-BNovOVIE.js";
|
|
5
5
|
import { t as require_react } from "./react-Bs6Z0kvn.js";
|
|
6
6
|
import { t as require_compiler_runtime } from "./compiler-runtime-B_OLMU9S.js";
|
|
7
|
-
import { l as createLucideIcon } from "./dist-
|
|
8
|
-
import { a as cva, g as Logger, y as cn } from "./button-
|
|
7
|
+
import { l as createLucideIcon } from "./dist-WIWVvdBh.js";
|
|
8
|
+
import { a as cva, g as Logger, y as cn } from "./button-DQpBib29.js";
|
|
9
9
|
import { t as require_jsx_runtime } from "./jsx-runtime-CTBg5pdT.js";
|
|
10
|
-
import { r as KnownQueryParams } from "./constants-
|
|
11
|
-
import { f as waitFor, p as isIslands, u as store, y as atom } from "./useTheme-
|
|
12
|
-
import { i as tableFromIPC } from "./loader-
|
|
10
|
+
import { r as KnownQueryParams } from "./constants-CytQ_3LM.js";
|
|
11
|
+
import { f as waitFor, p as isIslands, u as store, y as atom } from "./useTheme-D0rdoMBF.js";
|
|
12
|
+
import { i as tableFromIPC } from "./loader-DsE3MiYo.js";
|
|
13
13
|
var CircleQuestionMark = createLucideIcon("circle-question-mark", [
|
|
14
14
|
["circle", {
|
|
15
15
|
cx: "12",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { s as __toESM } from "./chunk-BNovOVIE.js";
|
|
2
2
|
import { t as require_react } from "./react-Bs6Z0kvn.js";
|
|
3
3
|
import { t as require_compiler_runtime } from "./compiler-runtime-B_OLMU9S.js";
|
|
4
|
-
import { g as Logger } from "./button-
|
|
4
|
+
import { g as Logger } from "./button-DQpBib29.js";
|
|
5
5
|
import { n as once } from "./once-BqS42WgZ.js";
|
|
6
6
|
function testStorage(e) {
|
|
7
7
|
try {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { s as __toESM } from "./chunk-BNovOVIE.js";
|
|
2
2
|
import { t as require_react } from "./react-Bs6Z0kvn.js";
|
|
3
3
|
import { t as require_compiler_runtime } from "./compiler-runtime-B_OLMU9S.js";
|
|
4
|
-
import { g as Logger, s as OverridingHotkeyProvider, u as resolvePlatform } from "./button-
|
|
5
|
-
import { B as record, H as string, L as number, O as array, P as looseObject, R as object, W as union, k as boolean, w as _enum } from "./Combination-
|
|
6
|
-
import { t as _baseIsEqual_default } from "./_baseIsEqual-
|
|
7
|
-
import { t as merge_default } from "./merge-
|
|
4
|
+
import { g as Logger, s as OverridingHotkeyProvider, u as resolvePlatform } from "./button-DQpBib29.js";
|
|
5
|
+
import { B as record, H as string, L as number, O as array, P as looseObject, R as object, W as union, k as boolean, w as _enum } from "./Combination-Dk6JxauT.js";
|
|
6
|
+
import { t as _baseIsEqual_default } from "./_baseIsEqual-CvgsjYoW.js";
|
|
7
|
+
import { t as merge_default } from "./merge-NuyC7LN7.js";
|
|
8
8
|
function isEqual(e, A) {
|
|
9
9
|
return _baseIsEqual_default(e, A);
|
|
10
10
|
}
|
|
@@ -594,7 +594,8 @@ const UserConfigSchema = looseObject({
|
|
|
594
594
|
}).prefault({}),
|
|
595
595
|
experimental: looseObject({
|
|
596
596
|
markdown: boolean().optional(),
|
|
597
|
-
rtc: boolean().optional()
|
|
597
|
+
rtc: boolean().optional(),
|
|
598
|
+
storage_inspector: boolean().prefault(true)
|
|
598
599
|
}).prefault(() => ({})),
|
|
599
600
|
server: looseObject({ disable_file_downloads: boolean().optional() }).prefault(() => ({})),
|
|
600
601
|
diagnostics: looseObject({
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { s as __toESM } from "./chunk-BNovOVIE.js";
|
|
2
2
|
import { t as require_react } from "./react-Bs6Z0kvn.js";
|
|
3
3
|
import { t as require_compiler_runtime } from "./compiler-runtime-B_OLMU9S.js";
|
|
4
|
-
import { S as CircleQuestionMark, a as AlertTitle, m as asRemoteURL, n as arrow, o as isValid, r as Alert, t as useDeepCompareMemoize } from "./useDeepCompareMemoize-
|
|
5
|
-
import { d as Objects, g as Logger, h as Events } from "./button-
|
|
6
|
-
import "./Combination-
|
|
4
|
+
import { S as CircleQuestionMark, a as AlertTitle, m as asRemoteURL, n as arrow, o as isValid, r as Alert, t as useDeepCompareMemoize } from "./useDeepCompareMemoize-DLS-bHHT.js";
|
|
5
|
+
import { d as Objects, g as Logger, h as Events } from "./button-DQpBib29.js";
|
|
6
|
+
import "./Combination-Dk6JxauT.js";
|
|
7
7
|
import { t as require_jsx_runtime } from "./jsx-runtime-CTBg5pdT.js";
|
|
8
8
|
import "./react-dom-CqtLRVZP.js";
|
|
9
|
-
import { t as Tooltip } from "./tooltip-
|
|
10
|
-
import { i as debounce_default } from "./constants-
|
|
11
|
-
import { C as useEvent_default, n as useTheme } from "./useTheme-
|
|
12
|
-
import { a as tooltipHandler, n as vegaLoadData } from "./loader-
|
|
13
|
-
import { t as uniq_default } from "./uniq-
|
|
14
|
-
import { n as ErrorBanner } from "./error-banner-
|
|
9
|
+
import { t as Tooltip } from "./tooltip-SPkubVH3.js";
|
|
10
|
+
import { i as debounce_default } from "./constants-CytQ_3LM.js";
|
|
11
|
+
import { C as useEvent_default, n as useTheme } from "./useTheme-D0rdoMBF.js";
|
|
12
|
+
import { a as tooltipHandler, n as vegaLoadData } from "./loader-DsE3MiYo.js";
|
|
13
|
+
import { t as uniq_default } from "./uniq-H2E5nMLq.js";
|
|
14
|
+
import { n as ErrorBanner } from "./error-banner-BctofTCP.js";
|
|
15
15
|
import { n as formats } from "./vega-loader.browser-CQ-lnUkI.js";
|
|
16
|
-
import { t as useAsyncData } from "./useAsyncData-
|
|
16
|
+
import { t as useAsyncData } from "./useAsyncData-D7-oahg5.js";
|
|
17
17
|
import { t as j } from "./react-vega-C6kwcd86.js";
|
|
18
18
|
import "./defaultLocale-Bklbu-Tp.js";
|
|
19
19
|
import "./defaultLocale-CfQ4kBaV.js";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
2
|
-
import "./purify.es-
|
|
2
|
+
import "./purify.es-DGenX2XH.js";
|
|
3
3
|
import { t as linear } from "./linear-DIp6l9sg.js";
|
|
4
4
|
import { n as ordinal } from "./ordinal-Dcvf4J1m.js";
|
|
5
5
|
import { t as range } from "./range-BToS7LsA.js";
|
|
6
6
|
import "./defaultLocale-Bklbu-Tp.js";
|
|
7
7
|
import { t as line_default } from "./line-C1k1rG3Z.js";
|
|
8
|
-
import { i as cleanAndMerge } from "./chunk-S3R3BYOJ-
|
|
8
|
+
import { i as cleanAndMerge } from "./chunk-S3R3BYOJ-BRT9vd1R.js";
|
|
9
9
|
import { n as initRange } from "./init-Ci8VD8ZH.js";
|
|
10
10
|
import { i as log, r as __name } from "./src-CHUphWwL.js";
|
|
11
|
-
import { B as setAccTitle, C as getDiagramTitle, I as sanitizeText, T as getThemeVariables3, U as setDiagramTitle, _ as getAccDescription, a as clear, c as configureSvgSize, d as defaultConfig_default, v as getAccTitle, y as getConfig, z as setAccDescription } from "./chunk-ABZYJK2D-
|
|
12
|
-
import { t as selectSvgElement } from "./chunk-EXTU4WIE-
|
|
11
|
+
import { B as setAccTitle, C as getDiagramTitle, I as sanitizeText, T as getThemeVariables3, U as setDiagramTitle, _ as getAccDescription, a as clear, c as configureSvgSize, d as defaultConfig_default, v as getAccTitle, y as getConfig, z as setAccDescription } from "./chunk-ABZYJK2D-7QYXAAhe.js";
|
|
12
|
+
import { t as selectSvgElement } from "./chunk-EXTU4WIE-BRFl4iNd.js";
|
|
13
13
|
import "./dist-Bymy0kEH.js";
|
|
14
|
-
import { t as computeDimensionOfText } from "./chunk-JA3XYJ7Z-
|
|
14
|
+
import { t as computeDimensionOfText } from "./chunk-JA3XYJ7Z-BkrY9SdL.js";
|
|
15
15
|
function band() {
|
|
16
16
|
var e = ordinal().unknown(void 0), w = e.domain, T = e.range, D = 0, O = 1, k, A, j = false, M = 0, N = 0, P = 0.5;
|
|
17
17
|
delete e.unknown;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@marimo-team/islands",
|
|
3
|
-
"version": "0.20.5-
|
|
3
|
+
"version": "0.20.5-dev83",
|
|
4
4
|
"main": "dist/main.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"type": "module",
|
|
@@ -23,20 +23,20 @@
|
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@ai-sdk/react": "^2.0.125",
|
|
25
25
|
"@anywidget/types": "^0.2.0",
|
|
26
|
-
"@codemirror/autocomplete": "^6.20.
|
|
26
|
+
"@codemirror/autocomplete": "^6.20.1",
|
|
27
27
|
"@codemirror/commands": "^6.10.2",
|
|
28
28
|
"@codemirror/lang-markdown": "^6.5.0",
|
|
29
29
|
"@codemirror/lang-python": "^6.2.1",
|
|
30
30
|
"@codemirror/lang-sql": "^6.10.0",
|
|
31
|
-
"@codemirror/language": "^6.12.
|
|
31
|
+
"@codemirror/language": "^6.12.2",
|
|
32
32
|
"@codemirror/language-data": "^6.5.2",
|
|
33
33
|
"@codemirror/legacy-modes": "^6.5.2",
|
|
34
|
-
"@codemirror/lint": "^6.9.
|
|
35
|
-
"@codemirror/merge": "^6.
|
|
34
|
+
"@codemirror/lint": "^6.9.5",
|
|
35
|
+
"@codemirror/merge": "^6.12.0",
|
|
36
36
|
"@codemirror/search": "^6.6.0",
|
|
37
37
|
"@codemirror/state": "^6.5.4",
|
|
38
38
|
"@codemirror/theme-one-dark": "^6.1.3",
|
|
39
|
-
"@codemirror/view": "^6.39.
|
|
39
|
+
"@codemirror/view": "^6.39.16",
|
|
40
40
|
"@dagrejs/dagre": "^1.1.8",
|
|
41
41
|
"@date-fns/tz": "^1.4.1",
|
|
42
42
|
"@dnd-kit/core": "^6.3.1",
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
"@types/jsdom": "^21.1.7",
|
|
103
103
|
"@types/react-grid-layout": "^1.3.6",
|
|
104
104
|
"@uidotdev/usehooks": "^2.4.1",
|
|
105
|
-
"@uiw/codemirror-extensions-langs": "^4.25.
|
|
105
|
+
"@uiw/codemirror-extensions-langs": "^4.25.7",
|
|
106
106
|
"@uiw/react-codemirror": "4.25.4",
|
|
107
107
|
"@uwdata/flechette": "^1.1.2",
|
|
108
108
|
"@valtown/codemirror-codeium": "^1.1.1",
|
|
@@ -147,8 +147,8 @@
|
|
|
147
147
|
"plotly.js": "^3.3.1",
|
|
148
148
|
"pyodide": "0.27.7",
|
|
149
149
|
"react-arborist": "^3.4.3",
|
|
150
|
-
"react-aria": "3.
|
|
151
|
-
"react-aria-components": "1.
|
|
150
|
+
"react-aria": "3.47.0",
|
|
151
|
+
"react-aria-components": "1.16.0",
|
|
152
152
|
"react-codemirror-merge": "4.25.4",
|
|
153
153
|
"react-dnd": "^16.0.1",
|
|
154
154
|
"react-dnd-html5-backend": "^16.0.1",
|
package/src/__mocks__/common.ts
CHANGED
|
@@ -3,9 +3,19 @@
|
|
|
3
3
|
import { type Mock, vi } from "vitest";
|
|
4
4
|
import { invariant } from "@/utils/invariant";
|
|
5
5
|
|
|
6
|
+
interface MockLogger {
|
|
7
|
+
debug: Mock;
|
|
8
|
+
log: Mock;
|
|
9
|
+
warn: Mock;
|
|
10
|
+
error: Mock;
|
|
11
|
+
trace: Mock;
|
|
12
|
+
get: Mock;
|
|
13
|
+
disabled: Mock;
|
|
14
|
+
}
|
|
15
|
+
|
|
6
16
|
// Common mock factories
|
|
7
17
|
export const Mocks = {
|
|
8
|
-
quietLogger: () => ({
|
|
18
|
+
quietLogger: (): MockLogger => ({
|
|
9
19
|
debug: vi.fn(),
|
|
10
20
|
log: vi.fn(),
|
|
11
21
|
warn: vi.fn(),
|
|
@@ -15,7 +25,7 @@ export const Mocks = {
|
|
|
15
25
|
disabled: vi.fn(),
|
|
16
26
|
}),
|
|
17
27
|
|
|
18
|
-
logger: () => ({
|
|
28
|
+
logger: (): MockLogger => ({
|
|
19
29
|
debug: vi.fn().mockImplementation(console.debug),
|
|
20
30
|
log: vi.fn().mockImplementation(console.log),
|
|
21
31
|
warn: vi.fn().mockImplementation(console.warn),
|
|
@@ -70,8 +80,33 @@ export const Mocks = {
|
|
|
70
80
|
},
|
|
71
81
|
};
|
|
72
82
|
|
|
83
|
+
// Common mock modules for vi.mock() calls
|
|
84
|
+
export const MockModules = {
|
|
85
|
+
toast: () => ({ toast: vi.fn() }),
|
|
86
|
+
toastWithControls: () => {
|
|
87
|
+
const dismiss = vi.fn();
|
|
88
|
+
const update = vi.fn();
|
|
89
|
+
return {
|
|
90
|
+
mock: { toast: vi.fn(() => ({ dismiss, update })) },
|
|
91
|
+
dismiss,
|
|
92
|
+
update,
|
|
93
|
+
};
|
|
94
|
+
},
|
|
95
|
+
};
|
|
96
|
+
|
|
73
97
|
// Global mock setup functions
|
|
74
98
|
export const SetupMocks = {
|
|
99
|
+
resizeObserver: () => {
|
|
100
|
+
const observe = vi.fn();
|
|
101
|
+
const unobserve = vi.fn();
|
|
102
|
+
const disconnect = vi.fn();
|
|
103
|
+
global.ResizeObserver = class MockResizeObserver {
|
|
104
|
+
observe = observe;
|
|
105
|
+
unobserve = unobserve;
|
|
106
|
+
disconnect = disconnect;
|
|
107
|
+
} as unknown as typeof ResizeObserver;
|
|
108
|
+
return { observe, unobserve, disconnect };
|
|
109
|
+
},
|
|
75
110
|
clipboard: (mockClipboard = Mocks.clipboard()) => {
|
|
76
111
|
Object.defineProperty(navigator, "clipboard", {
|
|
77
112
|
value: mockClipboard,
|
|
@@ -79,12 +114,10 @@ export const SetupMocks = {
|
|
|
79
114
|
});
|
|
80
115
|
|
|
81
116
|
// Mock ClipboardItem
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
.fn()
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
global.ClipboardItem.supports = vi.fn().mockReturnValue(true);
|
|
117
|
+
global.ClipboardItem = Object.assign(
|
|
118
|
+
vi.fn().mockImplementation((data) => Mocks.clipboardItem(data)),
|
|
119
|
+
{ supports: vi.fn().mockReturnValue(true) },
|
|
120
|
+
) as unknown as typeof ClipboardItem;
|
|
88
121
|
|
|
89
122
|
// Mock Blob
|
|
90
123
|
global.Blob = vi
|
|
@@ -59,6 +59,7 @@ export const MockRequestClient = {
|
|
|
59
59
|
getRunningNotebooks: vi.fn().mockResolvedValue({ files: [] }),
|
|
60
60
|
shutdownSession: vi.fn().mockResolvedValue({}),
|
|
61
61
|
exportAsHTML: vi.fn().mockResolvedValue({ html: "" }),
|
|
62
|
+
exportAsIPYNB: vi.fn().mockResolvedValue(""),
|
|
62
63
|
exportAsMarkdown: vi.fn().mockResolvedValue({ markdown: "" }),
|
|
63
64
|
exportAsPDF: vi.fn().mockResolvedValue(new Blob()),
|
|
64
65
|
autoExportAsHTML: vi.fn().mockResolvedValue({}),
|
|
@@ -60,6 +60,7 @@ import {
|
|
|
60
60
|
AccordionItem,
|
|
61
61
|
AccordionTrigger,
|
|
62
62
|
} from "../ui/accordion";
|
|
63
|
+
import { Alert, AlertDescription } from "../ui/alert";
|
|
63
64
|
import { Button } from "../ui/button";
|
|
64
65
|
import { Checkbox } from "../ui/checkbox";
|
|
65
66
|
import { DropdownMenuSeparator } from "../ui/dropdown-menu";
|
|
@@ -966,6 +967,15 @@ export const AiProvidersConfig: React.FC<AiConfigProps> = ({
|
|
|
966
967
|
provider="github"
|
|
967
968
|
isConfigured={hasValue("ai.github.api_key")}
|
|
968
969
|
>
|
|
970
|
+
<Alert variant="warning" className="py-1.5 px-3 text-xs">
|
|
971
|
+
<AlertDescription>
|
|
972
|
+
Free tier models have low token limits which can cause errors with
|
|
973
|
+
larger prompts.{" "}
|
|
974
|
+
<ExternalLink href="https://docs.github.com/en/github-models/prototyping-with-ai-models#rate-limits">
|
|
975
|
+
Learn more
|
|
976
|
+
</ExternalLink>
|
|
977
|
+
</AlertDescription>
|
|
978
|
+
</Alert>
|
|
969
979
|
<ApiKey
|
|
970
980
|
form={form}
|
|
971
981
|
config={config}
|
|
@@ -2,12 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
import { act, renderHook } from "@testing-library/react";
|
|
4
4
|
import { beforeEach, describe, expect, it, vi } from "vitest";
|
|
5
|
+
import { MockModules } from "@/__mocks__/common";
|
|
5
6
|
import { toast } from "@/components/ui/use-toast";
|
|
6
7
|
import { useFileState } from "../chat-utils";
|
|
7
8
|
|
|
8
|
-
vi.mock("@/components/ui/use-toast", () => (
|
|
9
|
-
toast: vi.fn(),
|
|
10
|
-
}));
|
|
9
|
+
vi.mock("@/components/ui/use-toast", () => MockModules.toast());
|
|
11
10
|
|
|
12
11
|
describe("useFileState", () => {
|
|
13
12
|
beforeEach(() => {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
2
|
|
|
3
3
|
import { beforeEach, describe, expect, it, type Mocked, vi } from "vitest";
|
|
4
|
+
import { Mocks } from "@/__mocks__/common";
|
|
4
5
|
import {
|
|
5
6
|
convertFilesToResourceLinks,
|
|
6
7
|
parseContextFromPrompt,
|
|
@@ -19,12 +20,7 @@ vi.mock("@/core/state/jotai", () => ({
|
|
|
19
20
|
store: {},
|
|
20
21
|
}));
|
|
21
22
|
|
|
22
|
-
vi.mock("@/utils/Logger", () => ({
|
|
23
|
-
Logger: {
|
|
24
|
-
error: vi.fn(),
|
|
25
|
-
debug: vi.fn(),
|
|
26
|
-
},
|
|
27
|
-
}));
|
|
23
|
+
vi.mock("@/utils/Logger", () => ({ Logger: Mocks.quietLogger() }));
|
|
28
24
|
|
|
29
25
|
import { getAIContextRegistry } from "@/core/ai/context/context";
|
|
30
26
|
import type {
|
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { LoaderCircle, XIcon } from "lucide-react";
|
|
4
4
|
import type { CSSProperties } from "react";
|
|
5
|
+
import { TreeChevron } from "@/components/editor/file-tree/tree-actions";
|
|
5
6
|
import type { DataType } from "@/core/kernel/messages";
|
|
6
7
|
import { cn } from "@/utils/cn";
|
|
7
8
|
import { DATA_TYPE_ICON, getDataTypeColor } from "../datasets/icons";
|
|
8
9
|
|
|
9
10
|
export const RotatingChevron: React.FC<{ isExpanded: boolean }> = ({
|
|
10
11
|
isExpanded,
|
|
11
|
-
}) =>
|
|
12
|
-
<ChevronRightIcon
|
|
13
|
-
className={cn("h-3 w-3 transition-transform", isExpanded && "rotate-90")}
|
|
14
|
-
/>
|
|
15
|
-
);
|
|
12
|
+
}) => <TreeChevron isExpanded={isExpanded} className="h-3 w-3" />;
|
|
16
13
|
|
|
17
14
|
export const DatasourceLabel: React.FC<{
|
|
18
15
|
children: React.ReactNode;
|
|
@@ -3,11 +3,12 @@
|
|
|
3
3
|
import { CommandList } from "cmdk";
|
|
4
4
|
import { atom, useAtomValue, useSetAtom } from "jotai";
|
|
5
5
|
import { sortBy } from "lodash-es";
|
|
6
|
-
import { PlusIcon, PlusSquareIcon,
|
|
6
|
+
import { PlusIcon, PlusSquareIcon, XIcon } from "lucide-react";
|
|
7
7
|
import React from "react";
|
|
8
8
|
import { dbDisplayName } from "@/components/databases/display";
|
|
9
9
|
import { EngineVariable } from "@/components/databases/engine-variable";
|
|
10
10
|
import { DatabaseLogo } from "@/components/databases/icon";
|
|
11
|
+
import { RefreshIconButton } from "@/components/editor/file-tree/tree-actions";
|
|
11
12
|
import { CopyClipboardIcon } from "@/components/icons/copy-icon";
|
|
12
13
|
import { Button } from "@/components/ui/button";
|
|
13
14
|
import { Command, CommandInput, CommandItem } from "@/components/ui/command";
|
|
@@ -265,15 +266,10 @@ const Engine: React.FC<{
|
|
|
265
266
|
const engineName = internalEngine ? "In-Memory" : connection.name;
|
|
266
267
|
const { previewDataSourceConnection } = useRequestClient();
|
|
267
268
|
|
|
268
|
-
const [isSpinning, setIsSpinning] = React.useState(false);
|
|
269
|
-
|
|
270
269
|
const handleRefreshConnection = async () => {
|
|
271
|
-
setIsSpinning(true);
|
|
272
270
|
await previewDataSourceConnection({
|
|
273
271
|
engine: connection.name,
|
|
274
272
|
});
|
|
275
|
-
// Artificially spin the icon if the request is really fast
|
|
276
|
-
setTimeout(() => setIsSpinning(false), 500);
|
|
277
273
|
};
|
|
278
274
|
|
|
279
275
|
return (
|
|
@@ -288,21 +284,12 @@ const Engine: React.FC<{
|
|
|
288
284
|
(<EngineVariable variableName={engineName as VariableName} />)
|
|
289
285
|
</span>
|
|
290
286
|
{!internalEngine && (
|
|
291
|
-
<
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
>
|
|
298
|
-
<RefreshCwIcon
|
|
299
|
-
className={cn(
|
|
300
|
-
"h-4 w-4 text-muted-foreground hover:text-foreground",
|
|
301
|
-
isSpinning && "animate-[spin_0.5s]",
|
|
302
|
-
)}
|
|
303
|
-
/>
|
|
304
|
-
</Button>
|
|
305
|
-
</Tooltip>
|
|
287
|
+
<RefreshIconButton
|
|
288
|
+
onClick={handleRefreshConnection}
|
|
289
|
+
tooltip="Refresh connection"
|
|
290
|
+
className="ml-auto h-4 p-0"
|
|
291
|
+
iconClassName="h-3.5 w-3.5"
|
|
292
|
+
/>
|
|
306
293
|
)}
|
|
307
294
|
</DatasourceLabel>
|
|
308
295
|
{hasChildren ? (
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { render } from "@testing-library/react";
|
|
3
3
|
import { createStore, Provider } from "jotai";
|
|
4
4
|
import { beforeAll, describe, expect, it } from "vitest";
|
|
5
|
+
import { SetupMocks } from "@/__mocks__/common";
|
|
5
6
|
import { MockNotebook } from "@/__mocks__/notebook";
|
|
6
7
|
import { MockRequestClient } from "@/__mocks__/requests";
|
|
7
8
|
import { TooltipProvider } from "@/components/ui/tooltip";
|
|
@@ -25,17 +26,7 @@ function createTestWrapper() {
|
|
|
25
26
|
}
|
|
26
27
|
|
|
27
28
|
beforeAll(() => {
|
|
28
|
-
|
|
29
|
-
observe() {
|
|
30
|
-
// do nothing
|
|
31
|
-
}
|
|
32
|
-
unobserve() {
|
|
33
|
-
// do nothing
|
|
34
|
-
}
|
|
35
|
-
disconnect() {
|
|
36
|
-
// do nothing
|
|
37
|
-
}
|
|
38
|
-
};
|
|
29
|
+
SetupMocks.resizeObserver();
|
|
39
30
|
global.HTMLDivElement.prototype.scrollIntoView = () => {
|
|
40
31
|
// do nothing
|
|
41
32
|
};
|
|
@@ -27,6 +27,7 @@ export interface ActionButton {
|
|
|
27
27
|
handleHeadless?: (event?: Event) => void;
|
|
28
28
|
divider?: boolean;
|
|
29
29
|
dropdown?: ActionButton[];
|
|
30
|
+
additionalKeywords?: string[];
|
|
30
31
|
}
|
|
31
32
|
|
|
32
33
|
export function isParentAction(
|
|
@@ -51,6 +52,10 @@ export function flattenActions(
|
|
|
51
52
|
if (isParentAction(action)) {
|
|
52
53
|
return flattenActions(action.dropdown, `${prevLabel + action.label} > `);
|
|
53
54
|
}
|
|
54
|
-
return {
|
|
55
|
+
return {
|
|
56
|
+
...action,
|
|
57
|
+
label: prevLabel + action.label,
|
|
58
|
+
additionalKeywords: action.additionalKeywords,
|
|
59
|
+
};
|
|
55
60
|
});
|
|
56
61
|
}
|
|
@@ -31,6 +31,7 @@ import {
|
|
|
31
31
|
LayoutTemplateIcon,
|
|
32
32
|
LinkIcon,
|
|
33
33
|
MessagesSquareIcon,
|
|
34
|
+
NotebookIcon,
|
|
34
35
|
PanelLeftIcon,
|
|
35
36
|
PowerSquareIcon,
|
|
36
37
|
PresentationIcon,
|
|
@@ -123,8 +124,13 @@ export function useNotebookActions() {
|
|
|
123
124
|
const setCommandPaletteOpen = useSetAtom(commandPaletteAtom);
|
|
124
125
|
const setSettingsDialogOpen = useSetAtom(settingDialogAtom);
|
|
125
126
|
const setKeyboardShortcutsOpen = useSetAtom(keyboardShortcutsAtom);
|
|
126
|
-
const {
|
|
127
|
-
|
|
127
|
+
const {
|
|
128
|
+
exportAsIPYNB,
|
|
129
|
+
exportAsMarkdown,
|
|
130
|
+
readCode,
|
|
131
|
+
saveCellConfig,
|
|
132
|
+
updateCellOutputs,
|
|
133
|
+
} = useRequestClient();
|
|
128
134
|
const takeScreenshots = useEnrichCellOutputs();
|
|
129
135
|
|
|
130
136
|
const hasDisabledCells = useAtomValue(hasDisabledCellsAtom);
|
|
@@ -199,6 +205,27 @@ export function useNotebookActions() {
|
|
|
199
205
|
setTimeout(() => window.dispatchEvent(afterprint), 0);
|
|
200
206
|
};
|
|
201
207
|
|
|
208
|
+
const handleDownloadAsIPYNB = async () => {
|
|
209
|
+
if (!filename) {
|
|
210
|
+
toastNotebookMustBeNamed();
|
|
211
|
+
return;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
const runDownload = async (progress: ProgressState) => {
|
|
215
|
+
await updateCellOutputsWithScreenshots({
|
|
216
|
+
takeScreenshots: () => takeScreenshots({ progress }),
|
|
217
|
+
updateCellOutputs,
|
|
218
|
+
});
|
|
219
|
+
const ipynb = await exportAsIPYNB({ download: false });
|
|
220
|
+
downloadBlob(
|
|
221
|
+
new Blob([ipynb], { type: "application/x-ipynb+json" }),
|
|
222
|
+
Filenames.toIPYNB(document.title),
|
|
223
|
+
);
|
|
224
|
+
};
|
|
225
|
+
|
|
226
|
+
await withLoadingToast("Downloading IPYNB...", runDownload);
|
|
227
|
+
};
|
|
228
|
+
|
|
202
229
|
const actions: ActionButton[] = [
|
|
203
230
|
{
|
|
204
231
|
icon: <DownloadIcon size={14} strokeWidth={1.5} />,
|
|
@@ -240,6 +267,11 @@ export function useNotebookActions() {
|
|
|
240
267
|
);
|
|
241
268
|
},
|
|
242
269
|
},
|
|
270
|
+
{
|
|
271
|
+
icon: <NotebookIcon size={14} strokeWidth={1.5} />,
|
|
272
|
+
label: "Download as ipynb",
|
|
273
|
+
handle: handleDownloadAsIPYNB,
|
|
274
|
+
},
|
|
243
275
|
{
|
|
244
276
|
icon: <CodeIcon size={14} strokeWidth={1.5} />,
|
|
245
277
|
label: "Download Python code",
|
|
@@ -347,17 +379,20 @@ export function useNotebookActions() {
|
|
|
347
379
|
label: "Helper panel",
|
|
348
380
|
redundant: true,
|
|
349
381
|
handle: NOOP_HANDLER,
|
|
350
|
-
dropdown: PANELS.flatMap(
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
382
|
+
dropdown: PANELS.flatMap(
|
|
383
|
+
({ type: id, Icon, hidden, additionalKeywords }) => {
|
|
384
|
+
if (hidden) {
|
|
385
|
+
return [];
|
|
386
|
+
}
|
|
387
|
+
return {
|
|
388
|
+
label: startCase(id),
|
|
389
|
+
rightElement: renderCheckboxElement(selectedPanel === id),
|
|
390
|
+
icon: <Icon size={14} strokeWidth={1.5} />,
|
|
391
|
+
handle: () => toggleApplication(id),
|
|
392
|
+
additionalKeywords,
|
|
393
|
+
};
|
|
394
|
+
},
|
|
395
|
+
),
|
|
361
396
|
},
|
|
362
397
|
|
|
363
398
|
{
|
|
@@ -478,6 +513,7 @@ export function useNotebookActions() {
|
|
|
478
513
|
label: "Restart kernel",
|
|
479
514
|
variant: "danger",
|
|
480
515
|
handle: restartKernel,
|
|
516
|
+
additionalKeywords: ["reset", "reload", "restart"],
|
|
481
517
|
},
|
|
482
518
|
{
|
|
483
519
|
icon: <FastForwardIcon size={14} strokeWidth={1.5} />,
|
|
@@ -535,6 +571,7 @@ export function useNotebookActions() {
|
|
|
535
571
|
label: "User settings",
|
|
536
572
|
handle: () => setSettingsDialogOpen((open) => !open),
|
|
537
573
|
redundant: true,
|
|
574
|
+
additionalKeywords: ["preferences", "options", "configuration"],
|
|
538
575
|
},
|
|
539
576
|
{
|
|
540
577
|
icon: <ExternalLinkIcon size={14} strokeWidth={1.5} />,
|