@marimo-team/islands 0.22.1-dev3 → 0.22.1-dev30
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/{ConnectedDataExplorerComponent-Dl1grr8z.js → ConnectedDataExplorerComponent-DTOsfq2x.js} +54 -54
- package/dist/_basePickBy-Sow3pJjS.js +41 -0
- package/dist/{_baseUniq-B4eL5sTC.js → _baseUniq-C87CckHL.js} +15 -54
- package/dist/{any-language-editor-CT_9yBde.js → any-language-editor-BHH_pQ6M.js} +21 -21
- package/dist/architecture-7HQA4BMR-BHdkAMvZ.js +6 -0
- package/dist/{architectureDiagram-VXUJARFQ-vxgYGIMP.js → architectureDiagram-VXUJARFQ-B3YQo9At.js} +15 -15
- package/dist/{arrays-Du-jRBAy.js → arrays-beUWo8RF.js} +1 -1
- package/dist/assets/__vite-browser-external-WSlCcXn_.js +1 -0
- package/dist/assets/{worker-D10K3OOz.js → worker-DUYMdbtA.js} +2 -2
- package/dist/{blockDiagram-VD42YOAC-C7x6YTH7.js → blockDiagram-VD42YOAC-CpQ3TKEN.js} +7 -7
- package/dist/{button-qsiIHncQ.js → button-DNlNlZY_.js} +82 -84
- package/dist/{c4Diagram-YG6GDRKO-Cx4oseGg.js → c4Diagram-YG6GDRKO-CZSU4uqU.js} +4 -4
- package/dist/{capabilities-26mwv03y.js → capabilities-Coe9eM9T.js} +2 -2
- package/dist/{channel-C_50jIAn.js → channel-X3JKk8gE.js} +1 -1
- package/dist/{chat-ui-CtqUthFR.js → chat-ui-eH46RYWT.js} +147 -146
- package/dist/{check-D_YwHEgY.js → check-CWUkiHmb.js} +1 -1
- package/dist/{chunk-4F5CHEZ2-Dvo_CFnR.js → chunk-4F5CHEZ2-D5mClyDv.js} +1 -1
- package/dist/{chunk-ABZYJK2D-D5YIs71w.js → chunk-ABZYJK2D-CZYCCtLy.js} +1 -1
- package/dist/{chunk-ATLVNIR6-CyOjzOcf.js → chunk-ATLVNIR6-DaOzLLgN.js} +1 -1
- package/dist/{chunk-B2363JML-BzZqINRO.js → chunk-B2363JML-Br0eA2T3.js} +1 -1
- package/dist/{chunk-B4BG7PRW-ZJeV3KdD.js → chunk-B4BG7PRW-4BjV11Br.js} +4 -4
- package/dist/{chunk-DI55MBZ5-Dx_wwX6l.js → chunk-DI55MBZ5-DITY3EyP.js} +4 -4
- package/dist/{chunk-EXTU4WIE-CgefpSXQ.js → chunk-EXTU4WIE-jUPSAk3i.js} +1 -1
- package/dist/{chunk-FRFDVMJY-Derq8UzY.js → chunk-FRFDVMJY-DnEvEFRR.js} +1 -1
- package/dist/{chunk-JA3XYJ7Z-CcIOIFpc.js → chunk-JA3XYJ7Z-BcPEfxk_.js} +2 -2
- package/dist/{chunk-JZLCHNYA-CgO0GG1p.js → chunk-JZLCHNYA-2bnLL3xL.js} +4 -4
- package/dist/{chunk-N4CR4FBY-2qzGzAxT.js → chunk-N4CR4FBY-CpZSuGSU.js} +5 -5
- package/dist/{chunk-PL6DKKU2-KoG71Zin.js → chunk-PL6DKKU2-DnId6G-x.js} +1 -1
- package/dist/{chunk-QN33PNHL-Dp1qBo28.js → chunk-QN33PNHL-B9p5ojHB.js} +1 -1
- package/dist/{chunk-QXUST7PY-BxmmeIwf.js → chunk-QXUST7PY-Ch6F5Obl.js} +5 -5
- package/dist/{chunk-S3R3BYOJ-D3Rys9ZW.js → chunk-S3R3BYOJ-B0UOFJwq.js} +3 -3
- package/dist/{chunk-SJTYNZTY-Co-DhKAG.js → chunk-SJTYNZTY-BsBZnJUj.js} +1 -1
- package/dist/{chunk-TCCFYFTB-BAhzIqBO.js → chunk-TCCFYFTB-Clbl-fTg.js} +8 -7
- package/dist/{chunk-TQ3KTPDO-DxYI735Z.js → chunk-TQ3KTPDO-CFkSQ30e.js} +1 -1
- package/dist/{chunk-TZMSLE5B-Dxumt0wv.js → chunk-TZMSLE5B-D45397J2.js} +1 -1
- package/dist/{chunk-UMXZTB3W-CuahpKin.js → chunk-UMXZTB3W-D-A834Bq.js} +1 -1
- package/dist/{classDiagram-v2-WZHVMYZB-CYoFMQKE.js → classDiagram-2ON5EDUG-C8-zE3Zv.js} +10 -10
- package/dist/{classDiagram-2ON5EDUG-DkOvXRlx.js → classDiagram-v2-WZHVMYZB-DrmbGANl.js} +10 -10
- package/dist/{clone-DDndUqI0.js → clone-DZFQCtFJ.js} +1 -1
- package/dist/{constants-D1Am36hX.js → constants-CvyfaCvs.js} +3 -3
- package/dist/{copy-CBo9JcJW.js → copy-B7781WJ3.js} +2 -2
- package/dist/{dagre-6UL2VRFP-BXBaU8PB.js → dagre-6UL2VRFP-OMItEBnY.js} +12 -12
- package/dist/{dagre-D3dlYz-r.js → dagre-QVd-lCXU.js} +13 -23
- package/dist/{data-grid-overlay-editor-nZux6_d2.js → data-grid-overlay-editor-lKF301ME.js} +1 -1
- package/dist/{diagram-PSM6KHXK-CJxjk4LG.js → diagram-PSM6KHXK-CkKbohWI.js} +16 -16
- package/dist/{diagram-QEK2KX5R-IMILPh_p.js → diagram-QEK2KX5R-DjUMpVcx.js} +14 -14
- package/dist/{diagram-S2PKOQOG-6O0g6Boj.js → diagram-S2PKOQOG-b-c0d-wZ.js} +14 -14
- package/dist/{dist-BkXs8bw0.js → dist--6TSlp8H.js} +1 -1
- package/dist/dist-7K5doRvB.js +6 -0
- package/dist/{dist-CQidOwep.js → dist-B43sbpd0.js} +3 -3
- package/dist/dist-B6I_A2-E.js +8 -0
- package/dist/dist-BEQsmaZY.js +5 -0
- package/dist/dist-BasY2RHp.js +8 -0
- package/dist/{dist-BemtTYzN.js → dist-Bfp1XXWt.js} +5 -5
- package/dist/{dist-v-1kgqZ3.js → dist-BjDuO5JW.js} +1 -1
- package/dist/dist-Bosc00dY.js +5 -0
- package/dist/{dist-DLNKBPsk.js → dist-BrxqmS9Q.js} +4 -4
- package/dist/{dist-DBYL08Lu.js → dist-BvhGByxL.js} +4 -4
- package/dist/{dist-CVqlhD3M.js → dist-C4bq5Ioy.js} +2 -2
- package/dist/{dist-DwmxBUOe.js → dist-CFKdzOIu.js} +2 -2
- package/dist/{dist-5nTQE2yt.js → dist-CIB8w0Fl.js} +2 -2
- package/dist/{dist-C-EcLtO9.js → dist-CNF0QBLR.js} +1 -1
- package/dist/dist-CQMZOn-_.js +8 -0
- package/dist/dist-CViQhWZ8.js +5 -0
- package/dist/{dist-Dg65j0em.js → dist-CcMfr7jD.js} +1 -1
- package/dist/{dist-C0XYIHKJ.js → dist-Ci0CXEFt.js} +1 -1
- package/dist/dist-Cz6rLfwY.js +5 -0
- package/dist/dist-D8eq8st3.js +6 -0
- package/dist/{dist-qoCY8giM.js → dist-DAfcmt-d.js} +2 -2
- package/dist/{dist-B6Op2ogv.js → dist-DD_cYHOl.js} +2 -2
- package/dist/{dist-BUSLKXcu.js → dist-DFK94vuS.js} +2 -2
- package/dist/{dist-DBXPlQ0D.js → dist-DGNtjMZu.js} +1 -1
- package/dist/{dist-C9qF7MRB.js → dist-DJ9F1eHs.js} +2 -2
- package/dist/{dist-Ci_jEudG.js → dist-DJKubHDd.js} +1 -1
- package/dist/{dist-CnFp2Kcl.js → dist-DLafRu9s.js} +2 -2
- package/dist/dist-DM1UDXdl.js +5 -0
- package/dist/dist-DNrtWPgS.js +5 -0
- package/dist/dist-D_UjpfOY.js +1381 -0
- package/dist/{dist-DmFS6KZW.js → dist-DbnBiLNH.js} +3 -3
- package/dist/{dist-BiZZAo22.js → dist-DlSUOIm9.js} +1 -1
- package/dist/{dist-DStU8He1.js → dist-Doy0mQDg.js} +2 -2
- package/dist/{dist-CxAX99oC.js → dist-DpkJHKB8.js} +2 -2
- package/dist/{dist-DjaZNkZ7.js → dist-LhQNUe5A.js} +3 -3
- package/dist/dist-V7q2qnpA.js +5 -0
- package/dist/{dist-BJ3fhRYu.js → dist-VqF3W_ue.js} +2 -2
- package/dist/dist-a5_hPgu2.js +8 -0
- package/dist/{dist-B9KLrfoh.js → dist-ej6AQKaS.js} +1 -1
- package/dist/{dist-Brb6VNc4.js → dist-m9tsXsFf.js} +2 -2
- package/dist/{dist-CBwMSFDu.js → dist-tGk0aZ--.js} +2 -2
- package/dist/dist-uVyZcV1-.js +5 -0
- package/dist/{erDiagram-Q2GNP2WA-sho7Cl9f.js → erDiagram-Q2GNP2WA-CDhLaOZ1.js} +10 -10
- package/dist/{error-banner-Bx9kIgrs.js → error-banner-Cjf0RU9I.js} +79 -79
- package/dist/{esm-CMg2ABu6.js → esm-4wmsH2lp.js} +6 -6
- package/dist/{esm-cqK9POGH.js → esm-CD1iby2n.js} +23 -23
- package/dist/{flowDiagram-NV44I4VS-C4nY4Fbz.js → flowDiagram-NV44I4VS-BDi4O4CL.js} +10 -10
- package/dist/{ganttDiagram-JELNMOA3-CtxNcCM2.js → ganttDiagram-JELNMOA3-BpZE6kVp.js} +3 -3
- package/dist/{gitGraph-G5XIXVHT-SL6TDof6.js → gitGraph-G5XIXVHT-B_c6xFJv.js} +3 -3
- package/dist/{gitGraphDiagram-V2S2FVAM-D9885mxd.js → gitGraphDiagram-V2S2FVAM-iQnXzbPM.js} +13 -13
- package/dist/{glide-data-editor-CkVEV-Gk.js → glide-data-editor-VgPtWvhu.js} +63 -63
- package/dist/{graphlib-CxWdvYQt.js → graphlib-BV1_gi0C.js} +4 -3
- package/dist/hasIn-DnfJcYpY.js +108 -0
- package/dist/{info-VBDWY6EO-6MXPTSmi.js → info-VBDWY6EO-BTyzxmhr.js} +3 -3
- package/dist/{infoDiagram-HS3SLOUP-Bw2FlRwF.js → infoDiagram-HS3SLOUP-OYrX6uO3.js} +13 -13
- package/dist/{input-BSde8uV4.js → input-CFY9gApZ.js} +5055 -5055
- package/dist/{isEmpty-BQtUinxJ.js → isEmpty-B7FX9wKt.js} +1 -1
- package/dist/{isSymbol-DFp8040B.js → isSymbol-DCbjQG_U.js} +1 -1
- package/dist/{journeyDiagram-XKPGCS4Q-BXlCEth8.js → journeyDiagram-XKPGCS4Q-ClPC94aN.js} +3 -3
- package/dist/{kanban-definition-3W4ZIXB7-CorxzSYm.js → kanban-definition-3W4ZIXB7-DHEAKdZt.js} +7 -7
- package/dist/{label-DTNqw9tv.js → label-DbZGAoCH.js} +538 -569
- package/dist/{loader-3c9hT4kT.js → loader-Bd1kgLn7.js} +19 -16
- package/dist/main.js +2602 -2594
- package/dist/{memoize-CuHciEBb.js → memoize-CSTI9eOX.js} +1 -1
- package/dist/{merge-CA_buyY3.js → merge-CVhG7q_o.js} +1 -1
- package/dist/{mermaid-CEKslOkI.js → mermaid-B2HDLx2g.js} +54 -54
- package/dist/{mermaid-parser.core-cq4YDee-.js → mermaid-parser.core-ntCgyx0x.js} +8 -8
- package/dist/min-Ds3gG0Ff.js +96 -0
- package/dist/{mindmap-definition-VGOIOE7T-DRsT8UaN.js → mindmap-definition-VGOIOE7T-CxEUZZvY.js} +9 -9
- package/dist/{now-CXAdKY5k.js → now-nrrrOr01.js} +1 -1
- package/dist/{once-CZno0h-b.js → once-C_TIu-kR.js} +1 -1
- package/dist/{packet-DYOGHKS2-Dw08gMaZ.js → packet-DYOGHKS2-BhvnpoGi.js} +3 -3
- package/dist/{pie-VRWISCQL-C5SPSvT8.js → pie-VRWISCQL-dILuA3iG.js} +3 -3
- package/dist/{pieDiagram-ADFJNKIX-DhJ1Cx2O.js → pieDiagram-ADFJNKIX-U3LrUqAS.js} +14 -14
- package/dist/{process-output-KyzWazB-.js → process-output-BbUNe4iH.js} +3181 -3204
- package/dist/{quadrantDiagram-AYHSOK5B-DXUFIWlz.js → quadrantDiagram-AYHSOK5B-BVWuq-3R.js} +2 -2
- package/dist/{radar-ZZBFDIW7-BvY0bgSg.js → radar-ZZBFDIW7-DwFrOJDj.js} +3 -3
- package/dist/range-fJeId9Ri.js +30 -0
- package/dist/{requirementDiagram-UZGBJVZJ-DO_gtQIb.js → requirementDiagram-UZGBJVZJ-D0zpQnKC.js} +9 -9
- package/dist/{sankeyDiagram-TZEHDZUN-OZzXEkuG.js → sankeyDiagram-TZEHDZUN-CExy1joT.js} +2 -2
- package/dist/{sequenceDiagram-WL72ISMW-K7nZRifV.js → sequenceDiagram-WL72ISMW-D1BJxLjH.js} +4 -4
- package/dist/{slides-component-CIcSvFh7.js → slides-component-CX2JC-Ws.js} +2 -2
- package/dist/{spec-DYaR1rJh.js → spec-CiHus5Bb.js} +3 -3
- package/dist/{stateDiagram-FKZM4ZOC-DzXJZAq7.js → stateDiagram-FKZM4ZOC-B1S8jGMn.js} +12 -12
- package/dist/{stateDiagram-v2-4FDKWEC3-BZBPUmyF.js → stateDiagram-v2-4FDKWEC3-BH5ozUbc.js} +10 -10
- package/dist/stex-CQDv3aS8.js +4 -0
- package/dist/style.css +1 -1
- package/dist/{timeline-definition-IT6M3QCI-DNoLAh-i.js → timeline-definition-IT6M3QCI-BDT9JAmn.js} +2 -2
- package/dist/{toDate-D6VXexnV.js → toDate-BzYZtEK7.js} +4 -4
- package/dist/{toNumber-xFPoy1OI.js → toNumber-55tjPCWr.js} +2 -2
- package/dist/tooltip-BXEpXV3R.js +404 -0
- package/dist/{treemap-GDKQZRPO-C5OoxpmV.js → treemap-GDKQZRPO-bx2ngsgN.js} +3 -3
- package/dist/{types-CQ-RbYxp.js → types-D_ntCXg0.js} +3 -3
- package/dist/{useAsyncData-Cd4Urlww.js → useAsyncData-rN1nzPaS.js} +2 -2
- package/dist/{useDeepCompareMemoize-X7clcrcQ.js → useDeepCompareMemoize-iM1YNTEF.js} +4 -4
- package/dist/{useIframeCapabilities-BVQrlRBd.js → useIframeCapabilities-CqhrVue6.js} +1 -1
- package/dist/{useLifecycle-Dids8BPm.js → useLifecycle-DgDTfOLZ.js} +9 -9
- package/dist/{useTheme-Dm1WaAGy.js → useTheme-MWfxn4oz.js} +4 -5
- package/dist/{vega-component-A6unyUJS.js → vega-component-CkpTXaRx.js} +23 -23
- package/dist/{xychartDiagram-PRI3JC2R-ehVeySMW.js → xychartDiagram-PRI3JC2R-CuAZiqHS.js} +5 -5
- package/dist/{Combination-B--d1_LV.js → zod-C6UGQ3fz.js} +8085 -8151
- package/package.json +8 -41
- package/src/__tests__/branded.ts +6 -0
- package/src/__tests__/main.test.tsx +12 -14
- package/src/components/ai/ai-provider-icon.tsx +3 -2
- package/src/components/app-config/user-config-form.tsx +0 -27
- package/src/components/chat/acp/agent-docs.tsx +3 -3
- package/src/components/chat/acp/agent-panel.tsx +69 -22
- package/src/components/chat/acp/agent-selector.tsx +2 -11
- package/src/components/chat/acp/state.ts +14 -2
- package/src/components/chat/chat-panel.tsx +2 -1
- package/src/components/data-table/TableBottomBar.tsx +12 -1
- package/src/components/data-table/TableTopBar.tsx +31 -35
- package/src/components/data-table/cell-selection/types.ts +3 -2
- package/src/components/data-table/charts/charts.tsx +42 -13
- package/src/components/data-table/charts/components/chart-items.tsx +1 -1
- package/src/components/data-table/column-explorer-panel/column-explorer.tsx +1 -1
- package/src/components/data-table/column-formatting/types.ts +3 -2
- package/src/components/data-table/column-header.tsx +4 -2
- package/src/components/data-table/column-wrapping/types.ts +3 -2
- package/src/components/data-table/columns.tsx +4 -1
- package/src/components/data-table/copy-column/types.ts +3 -2
- package/src/components/data-table/data-table.tsx +6 -1
- package/src/components/data-table/focus-row/types.ts +3 -2
- package/src/components/data-table/loading-table.tsx +4 -1
- package/src/components/data-table/range-focus/__tests__/atoms.test.ts +11 -11
- package/src/components/data-table/range-focus/__tests__/use-cell-range-selection.test.ts +9 -11
- package/src/components/data-table/range-focus/cell-selection-stats.tsx +3 -1
- package/src/components/data-table/row-viewer-panel/row-viewer.tsx +1 -1
- package/src/components/data-table/table-explorer-panel/table-explorer-panel.tsx +2 -2
- package/src/components/editor/__tests__/data-attributes.test.tsx +93 -94
- package/src/components/editor/actions/name-cell-input.tsx +4 -2
- package/src/components/editor/actions/useCellActionButton.tsx +4 -2
- package/src/components/editor/ai/add-cell-with-ai.tsx +2 -1
- package/src/components/editor/cell/CellStatus.tsx +4 -5
- package/src/components/editor/cell/cell-context-menu.tsx +4 -2
- package/src/components/editor/cell/code/cell-editor.tsx +2 -1
- package/src/components/editor/cell/toolbar.tsx +2 -1
- package/src/components/editor/chrome/components/contribute-snippet-button.tsx +4 -1
- package/src/components/editor/chrome/components/feedback-button.tsx +4 -1
- package/src/components/editor/chrome/panels/context-aware-panel/context-aware-panel.tsx +1 -1
- package/src/components/editor/chrome/panels/file-explorer-panel.tsx +0 -10
- package/src/components/editor/chrome/wrapper/app-chrome.tsx +4 -1
- package/src/components/editor/chrome/wrapper/footer-items/lsp-status.tsx +2 -1
- package/src/components/editor/header/filename-input.tsx +4 -1
- package/src/components/editor/renderers/vertical-layout/vertical-layout.tsx +11 -12
- package/src/components/storage/__tests__/storage-snippets.test.ts +4 -6
- package/src/components/tracing/tracing.test.tsx +30 -30
- package/src/components/ui/accordion.tsx +1 -1
- package/src/components/ui/alert-dialog.tsx +1 -1
- package/src/components/ui/badge.tsx +2 -1
- package/src/components/ui/button.tsx +4 -3
- package/src/components/ui/calendar.tsx +3 -2
- package/src/components/ui/checkbox.tsx +1 -1
- package/src/components/ui/combobox.tsx +2 -1
- package/src/components/ui/command.tsx +4 -1
- package/src/components/ui/context-menu.tsx +1 -1
- package/src/components/ui/date-input.tsx +7 -6
- package/src/components/ui/date-picker.tsx +6 -4
- package/src/components/ui/dialog.tsx +1 -1
- package/src/components/ui/draggable-popover.tsx +1 -1
- package/src/components/ui/dropdown-menu.tsx +2 -1
- package/src/components/ui/field.tsx +1 -2
- package/src/components/ui/form.tsx +4 -5
- package/src/components/ui/fullscreen.tsx +4 -1
- package/src/components/ui/label.tsx +1 -1
- package/src/components/ui/navigation.tsx +1 -1
- package/src/components/ui/popover.tsx +1 -1
- package/src/components/ui/progress.tsx +4 -3
- package/src/components/ui/query-param-preserving-link.tsx +4 -2
- package/src/components/ui/radio-group.tsx +1 -1
- package/src/components/ui/range-slider.tsx +1 -1
- package/src/components/ui/scroll-area.tsx +1 -1
- package/src/components/ui/select.tsx +1 -1
- package/src/components/ui/sheet.tsx +3 -2
- package/src/components/ui/slider.tsx +1 -1
- package/src/components/ui/switch.tsx +1 -1
- package/src/components/ui/tabs.tsx +1 -1
- package/src/components/ui/textarea.tsx +1 -2
- package/src/components/ui/toast.tsx +1 -1
- package/src/components/ui/toggle.tsx +1 -1
- package/src/components/ui/tooltip.tsx +1 -1
- package/src/core/ai/context/providers/cell-output.ts +1 -2
- package/src/core/ai/tools/edit-notebook-tool.ts +4 -3
- package/src/core/ai/tools/run-cells-tool.ts +4 -3
- package/src/core/cells/__tests__/add-missing-import.test.ts +23 -22
- package/src/core/cells/__tests__/apply-transaction.test.ts +12 -11
- package/src/core/cells/__tests__/cell.test.ts +14 -13
- package/src/core/cells/document-changes.ts +9 -9
- package/src/core/cells/logs.ts +1 -1
- package/src/core/codemirror/cells/__tests__/extensions.test.ts +15 -17
- package/src/core/codemirror/copilot/__tests__/transport.test.ts +128 -2
- package/src/core/codemirror/copilot/client.ts +9 -2
- package/src/core/codemirror/copilot/language-server.ts +11 -0
- package/src/core/codemirror/copilot/transport.ts +33 -8
- package/src/core/codemirror/language/languages/markdown.ts +1 -3
- package/src/core/codemirror/language/languages/python.ts +4 -0
- package/src/core/codemirror/language/languages/sql/completion-sources.tsx +4 -6
- package/src/core/codemirror/language/languages/sql/sql.ts +1 -3
- package/src/core/codemirror/language/panel/sql.tsx +4 -1
- package/src/core/codemirror/reactive-references/__tests__/analyzer.test.ts +28 -42
- package/src/core/config/__tests__/config-schema.test.ts +2 -6
- package/src/core/config/config-schema.ts +0 -1
- package/src/core/config/feature-flag.tsx +0 -2
- package/src/core/datasets/data-source-connections.ts +4 -2
- package/src/core/dom/__tests__/htmlUtils.test.ts +8 -14
- package/src/core/dom/__tests__/outline.test.ts +2 -3
- package/src/core/edit-app.tsx +4 -1
- package/src/core/islands/__tests__/bridge.test.ts +20 -10
- package/src/core/islands/__tests__/parse.test.ts +8 -7
- package/src/core/network/__tests__/requests-lazy.test.ts +30 -14
- package/src/core/saving/__tests__/filename.test.ts +7 -6
- package/src/core/static/__tests__/download-html.test.ts +16 -15
- package/src/core/static/__tests__/files.test.ts +30 -28
- package/src/core/websocket/useMarimoKernelConnection.tsx +5 -11
- package/src/core/websocket/useWebSocket.tsx +3 -1
- package/src/css/app/Cell.css +25 -1
- package/src/css/globals.css +40 -14
- package/src/css/table.css +17 -0
- package/src/plugins/core/BadPlugin.tsx +7 -6
- package/src/plugins/impl/CheckboxPlugin.tsx +4 -1
- package/src/plugins/impl/DataEditorPlugin.tsx +8 -3
- package/src/plugins/impl/DataTablePlugin.tsx +5 -1
- package/src/plugins/impl/FormPlugin.tsx +1 -2
- package/src/plugins/impl/__tests__/DataTablePlugin.test.tsx +4 -1
- package/src/plugins/impl/__tests__/SliderPlugin.test.tsx +43 -15
- package/src/plugins/impl/anywidget/AnyWidgetPlugin.tsx +2 -11
- package/src/plugins/impl/chat/chat-ui.tsx +4 -1
- package/src/plugins/impl/data-frames/forms/__tests__/form.test.tsx +7 -9
- package/src/plugins/impl/plotly/PlotlyPlugin.tsx +12 -68
- package/src/plugins/impl/plotly/__tests__/selection.test.ts +237 -0
- package/src/plugins/impl/plotly/selection.ts +118 -0
- package/src/plugins/impl/vega/__tests__/make-selectable.test.ts +13 -14
- package/src/plugins/impl/vega/__tests__/utils.test.ts +68 -0
- package/src/plugins/impl/vega/utils.ts +14 -5
- package/src/plugins/impl/vega/vega.css +2 -1
- package/src/plugins/layout/ImageComparisonPlugin.tsx +1 -3
- package/src/plugins/stateless-plugin.ts +4 -2
- package/src/utils/__tests__/cell-urls.test.ts +24 -21
- package/src/utils/__tests__/filenames.test.ts +15 -14
- package/src/utils/__tests__/json-parser.test.ts +14 -21
- package/src/utils/__tests__/path.test.ts +34 -31
- package/src/utils/__tests__/urls.test.ts +19 -18
- package/src/utils/json/base64.ts +2 -5
- package/src/utils/time.ts +4 -2
- package/src/utils/tracer.ts +1 -0
- package/src/utils/typed.ts +2 -2
- package/dist/_basePickBy-QjOmBDRE.js +0 -110
- package/dist/_baseSet-xgn1IbGV.js +0 -27
- package/dist/architecture-7HQA4BMR-BRyVh_Za.js +0 -6
- package/dist/assets/__vite-browser-external-Us1ds95c.js +0 -1
- package/dist/dist-B0R_ZM4-.js +0 -6
- package/dist/dist-B4a9_9pj.js +0 -5
- package/dist/dist-BCSUKEwO.js +0 -5
- package/dist/dist-BONIDQq6.js +0 -5
- package/dist/dist-BYeRx2hb.js +0 -5
- package/dist/dist-D2Rk1j4R.js +0 -1381
- package/dist/dist-DZjX5TYv.js +0 -5
- package/dist/dist-Dkw9x6kc.js +0 -5
- package/dist/dist-Ds6UaXGR.js +0 -6
- package/dist/dist-KuEJ1Q53.js +0 -8
- package/dist/dist-S72WNyTZ.js +0 -5
- package/dist/dist-bTG-yssT.js +0 -5
- package/dist/dist-diF0sguc.js +0 -8
- package/dist/dist-mJ84BIgu.js +0 -8
- package/dist/dist-wSIhFWQz.js +0 -8
- package/dist/get-CqrzlV1v.js +0 -68
- package/dist/range-CYz5jI--.js +0 -17
- package/dist/stex-CZyTRGVB.js +0 -4
- package/dist/tooltip-DGHTbHl5.js +0 -404
- /package/dist/{dist-KZI_BHqV.js → dist-CxZvoNao.js} +0 -0
- /package/dist/{invariant-D4hPsZFI.js → invariant-e8eBgdux.js} +0 -0
- /package/dist/{isArrayLikeObject-C-hFPChh.js → isArrayLikeObject-LXbTYiBa.js} +0 -0
- /package/dist/{main-CvkAPtaq.js → main-XimWhSi_.js} +0 -0
- /package/dist/{purify.es-ukiMXY-F.js → purify.es-hTCfRGdl.js} +0 -0
- /package/dist/{react-dom-BKwCWYPW.js → react-dom-BSUuJjCR.js} +0 -0
- /package/dist/{stex-Ze8D4R_5.js → stex-D887Ylhf.js} +0 -0
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
XIcon,
|
|
14
14
|
} from "lucide-react";
|
|
15
15
|
import type { JSX } from "react";
|
|
16
|
-
import React, { useMemo, useState } from "react";
|
|
16
|
+
import React, { useMemo, useRef, useState } from "react";
|
|
17
17
|
import { type UseFormReturn, useForm } from "react-hook-form";
|
|
18
18
|
import useResizeObserver from "use-resize-observer";
|
|
19
19
|
import { PythonIcon } from "@/components/editor/cell/code/icons";
|
|
@@ -61,6 +61,7 @@ export interface TablePanelProps {
|
|
|
61
61
|
totalRows: number | TooManyRows;
|
|
62
62
|
columns: number;
|
|
63
63
|
displayHeader: boolean;
|
|
64
|
+
onCloseChartBuilder?: () => void;
|
|
64
65
|
getDataUrl?: GetDataUrl;
|
|
65
66
|
fieldTypes?: FieldTypesWithExternalType | null;
|
|
66
67
|
}
|
|
@@ -74,12 +75,33 @@ export const TablePanel: React.FC<TablePanelProps> = ({
|
|
|
74
75
|
getDataUrl,
|
|
75
76
|
fieldTypes,
|
|
76
77
|
displayHeader,
|
|
78
|
+
onCloseChartBuilder,
|
|
77
79
|
}) => {
|
|
78
80
|
const [tabsMap, saveTabsMap] = useAtom(tabsStorageAtom);
|
|
79
81
|
const tabs = cellId ? (tabsMap.get(cellId) ?? []) : [];
|
|
80
82
|
|
|
81
|
-
const [tabNum, setTabNum] = useState(0);
|
|
82
83
|
const [selectedTab, setSelectedTab] = useState(DEFAULT_TAB_NAME);
|
|
84
|
+
const [tabCounter, setTabCounter] = useState(tabs.length);
|
|
85
|
+
const prevDisplayHeader = useRef(displayHeader);
|
|
86
|
+
|
|
87
|
+
// Auto-create a default chart tab when chart builder opens with no tabs
|
|
88
|
+
if (
|
|
89
|
+
displayHeader &&
|
|
90
|
+
!prevDisplayHeader.current &&
|
|
91
|
+
tabs.length === 0 &&
|
|
92
|
+
cellId
|
|
93
|
+
) {
|
|
94
|
+
prevDisplayHeader.current = displayHeader;
|
|
95
|
+
const tabName = getChartTabName(0, NEW_CHART_TYPE);
|
|
96
|
+
const newTabs = new Map(tabsMap);
|
|
97
|
+
newTabs.set(cellId, [
|
|
98
|
+
{ tabName, chartType: NEW_CHART_TYPE, config: getChartDefaults() },
|
|
99
|
+
]);
|
|
100
|
+
saveTabsMap(newTabs);
|
|
101
|
+
setTabCounter(1);
|
|
102
|
+
setSelectedTab(tabName);
|
|
103
|
+
}
|
|
104
|
+
prevDisplayHeader.current = displayHeader;
|
|
83
105
|
|
|
84
106
|
if (!displayHeader || (tabs.length === 0 && !displayHeader)) {
|
|
85
107
|
return dataTable;
|
|
@@ -89,7 +111,7 @@ export const TablePanel: React.FC<TablePanelProps> = ({
|
|
|
89
111
|
if (!cellId) {
|
|
90
112
|
return;
|
|
91
113
|
}
|
|
92
|
-
const tabName = getChartTabName(
|
|
114
|
+
const tabName = getChartTabName(tabCounter, NEW_CHART_TYPE);
|
|
93
115
|
|
|
94
116
|
const newTabs = new Map(tabsMap);
|
|
95
117
|
newTabs.set(cellId, [
|
|
@@ -102,7 +124,7 @@ export const TablePanel: React.FC<TablePanelProps> = ({
|
|
|
102
124
|
]);
|
|
103
125
|
|
|
104
126
|
saveTabsMap(newTabs);
|
|
105
|
-
|
|
127
|
+
setTabCounter(tabCounter + 1);
|
|
106
128
|
setSelectedTab(tabName);
|
|
107
129
|
};
|
|
108
130
|
|
|
@@ -110,14 +132,21 @@ export const TablePanel: React.FC<TablePanelProps> = ({
|
|
|
110
132
|
if (!cellId) {
|
|
111
133
|
return;
|
|
112
134
|
}
|
|
135
|
+
const deletedIndex = tabs.findIndex((tab) => tab.tabName === tabName);
|
|
136
|
+
const remaining = tabs.filter((tab) => tab.tabName !== tabName);
|
|
113
137
|
const newTabs = new Map(tabsMap);
|
|
114
|
-
newTabs.set(
|
|
115
|
-
cellId,
|
|
116
|
-
tabs.filter((tab) => tab.tabName !== tabName),
|
|
117
|
-
);
|
|
138
|
+
newTabs.set(cellId, remaining);
|
|
118
139
|
saveTabsMap(newTabs);
|
|
119
|
-
|
|
120
|
-
|
|
140
|
+
|
|
141
|
+
if (remaining.length === 0) {
|
|
142
|
+
onCloseChartBuilder?.();
|
|
143
|
+
} else if (tabName === selectedTab) {
|
|
144
|
+
if (deletedIndex < remaining.length) {
|
|
145
|
+
setSelectedTab(remaining[deletedIndex].tabName);
|
|
146
|
+
} else {
|
|
147
|
+
setSelectedTab(remaining[remaining.length - 1].tabName);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
121
150
|
};
|
|
122
151
|
|
|
123
152
|
const saveTabChart = ({
|
|
@@ -178,7 +207,7 @@ export const TablePanel: React.FC<TablePanelProps> = ({
|
|
|
178
207
|
|
|
179
208
|
return (
|
|
180
209
|
<Tabs value={selectedTab} className="-mt-1">
|
|
181
|
-
<TabsList>
|
|
210
|
+
<TabsList part="table-tabs">
|
|
182
211
|
<TabsTrigger
|
|
183
212
|
className="text-xs"
|
|
184
213
|
value={DEFAULT_TAB_NAME}
|
|
@@ -228,7 +257,7 @@ export const TablePanel: React.FC<TablePanelProps> = ({
|
|
|
228
257
|
saveTabChartType(tab.tabName, chartType);
|
|
229
258
|
};
|
|
230
259
|
return (
|
|
231
|
-
<TabsContent key={idx} value={tab.tabName} className="h-[400px] mt-
|
|
260
|
+
<TabsContent key={idx} value={tab.tabName} className="h-[400px] mt-0">
|
|
232
261
|
<ChartPanel
|
|
233
262
|
tableData={data}
|
|
234
263
|
chartConfig={tab.config}
|
|
@@ -446,7 +475,7 @@ export const ChartPanel: React.FC<{
|
|
|
446
475
|
);
|
|
447
476
|
|
|
448
477
|
return (
|
|
449
|
-
<div className="flex flex-row gap-2 h-full rounded-md border pr-2">
|
|
478
|
+
<div className="flex flex-row gap-2 h-full rounded-md border-t pr-2">
|
|
450
479
|
<div
|
|
451
480
|
className={`relative flex flex-col gap-2 overflow-auto px-2 py-3 scrollbar-thin transition-width duration-200 ${formCollapsed ? "w-8" : "w-[300px]"}`}
|
|
452
481
|
>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
2
|
|
|
3
|
-
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
4
3
|
import { ChevronDown } from "lucide-react";
|
|
4
|
+
import { Select as SelectPrimitive } from "radix-ui";
|
|
5
5
|
import React from "react";
|
|
6
6
|
import { useFormContext, useWatch } from "react-hook-form";
|
|
7
7
|
import type { z } from "zod";
|
|
@@ -48,8 +48,9 @@ declare module "@tanstack/react-table" {
|
|
|
48
48
|
//merge column formatting's state with the existing table state
|
|
49
49
|
interface TableState extends ColumnFormattingTableState {}
|
|
50
50
|
//merge column formatting's options with the existing table options
|
|
51
|
-
interface TableOptionsResolved<
|
|
52
|
-
extends
|
|
51
|
+
interface TableOptionsResolved<
|
|
52
|
+
TData extends RowData,
|
|
53
|
+
> extends ColumnFormattingOptions {}
|
|
53
54
|
//merge column formatting's instance APIs with the existing table instance APIs
|
|
54
55
|
interface Column<TData extends RowData> extends ColumnFormattingInstance {}
|
|
55
56
|
}
|
|
@@ -63,8 +63,10 @@ import { stringifyUnknownValue } from "./utils";
|
|
|
63
63
|
|
|
64
64
|
const TOP_K_ROWS = 30;
|
|
65
65
|
|
|
66
|
-
interface DataTableColumnHeaderProps<
|
|
67
|
-
|
|
66
|
+
interface DataTableColumnHeaderProps<
|
|
67
|
+
TData,
|
|
68
|
+
TValue,
|
|
69
|
+
> extends React.HTMLAttributes<HTMLDivElement> {
|
|
68
70
|
column: Column<TData, TValue>;
|
|
69
71
|
header: React.ReactNode;
|
|
70
72
|
justify?: "left" | "center" | "right";
|
|
@@ -22,8 +22,9 @@ export interface ColumnWrappingInstance {
|
|
|
22
22
|
declare module "@tanstack/react-table" {
|
|
23
23
|
interface TableState extends ColumnWrappingTableState {}
|
|
24
24
|
|
|
25
|
-
interface TableOptionsResolved<
|
|
26
|
-
extends
|
|
25
|
+
interface TableOptionsResolved<
|
|
26
|
+
TData extends RowData,
|
|
27
|
+
> extends ColumnWrappingOptions {}
|
|
27
28
|
|
|
28
29
|
interface Column<TData extends RowData> extends ColumnWrappingInstance {}
|
|
29
30
|
}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
2
|
"use no memo";
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import { Popover as PopoverPrimitive } from "radix-ui";
|
|
5
|
+
|
|
6
|
+
const PopoverClose = PopoverPrimitive.Close;
|
|
7
|
+
|
|
5
8
|
import type { Column, ColumnDef } from "@tanstack/react-table";
|
|
6
9
|
import { formatDate, isValid } from "date-fns";
|
|
7
10
|
import { useLocale, useNumberFormatter } from "react-aria";
|
|
@@ -12,8 +12,9 @@ export interface CopyColumnInstance {
|
|
|
12
12
|
|
|
13
13
|
// Use declaration merging to add our new feature APIs
|
|
14
14
|
declare module "@tanstack/react-table" {
|
|
15
|
-
interface TableOptionsResolved<
|
|
16
|
-
extends
|
|
15
|
+
interface TableOptionsResolved<
|
|
16
|
+
TData extends RowData,
|
|
17
|
+
> extends CopyColumnOptions {}
|
|
17
18
|
|
|
18
19
|
interface Column<TData extends RowData> extends CopyColumnInstance {}
|
|
19
20
|
}
|
|
@@ -283,7 +283,10 @@ const DataTableInternal = <TData,>({
|
|
|
283
283
|
<div className={cn(wrapperClassName, "flex flex-col space-y-1")}>
|
|
284
284
|
<FilterPills filters={filters} table={table} />
|
|
285
285
|
<CellSelectionProvider>
|
|
286
|
-
<div
|
|
286
|
+
<div
|
|
287
|
+
part="table-wrapper"
|
|
288
|
+
className={cn(className || "rounded-md border overflow-hidden")}
|
|
289
|
+
>
|
|
287
290
|
<TableTopBar
|
|
288
291
|
enableSearch={enableSearch}
|
|
289
292
|
searchQuery={searchQuery}
|
|
@@ -313,6 +316,8 @@ const DataTableInternal = <TData,>({
|
|
|
313
316
|
</Table>
|
|
314
317
|
</div>
|
|
315
318
|
<TableBottomBar
|
|
319
|
+
part="table-footer"
|
|
320
|
+
className="border-t border-border pt-1.5 pb-0.5"
|
|
316
321
|
totalColumns={totalColumns}
|
|
317
322
|
pagination={pagination}
|
|
318
323
|
selection={selection}
|
|
@@ -25,8 +25,9 @@ export interface FocusRowInstance {
|
|
|
25
25
|
declare module "@tanstack/react-table" {
|
|
26
26
|
interface TableState extends FocusRowTableState {}
|
|
27
27
|
|
|
28
|
-
interface TableOptionsResolved<
|
|
29
|
-
extends
|
|
28
|
+
interface TableOptionsResolved<
|
|
29
|
+
TData extends RowData,
|
|
30
|
+
> extends FocusRowOptions {}
|
|
30
31
|
|
|
31
32
|
interface Row<TData extends RowData> extends FocusRowInstance {}
|
|
32
33
|
}
|
|
@@ -24,7 +24,10 @@ export const LoadingTable = ({
|
|
|
24
24
|
|
|
25
25
|
return (
|
|
26
26
|
<div className={cn(wrapperClassName, "flex flex-col space-y-2")}>
|
|
27
|
-
<div
|
|
27
|
+
<div
|
|
28
|
+
part="table-wrapper"
|
|
29
|
+
className={cn(className || "rounded-md border")}
|
|
30
|
+
>
|
|
28
31
|
<Table>
|
|
29
32
|
<TableHeader>
|
|
30
33
|
{Array.from({ length: 1 }).map((_, i) => (
|
|
@@ -56,18 +56,18 @@ function createMockCell(
|
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
function createMockTable(): Table<T> {
|
|
59
|
-
const mockToggleSelected = vi
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
59
|
+
const mockToggleSelected = vi
|
|
60
|
+
.fn()
|
|
61
|
+
.mockImplementation(function (this: { isSelected: boolean }) {
|
|
62
|
+
this.isSelected = !this.isSelected;
|
|
63
|
+
return { isSelected: this.isSelected };
|
|
64
|
+
});
|
|
65
65
|
|
|
66
|
-
const mockGetIsSelected = vi
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
66
|
+
const mockGetIsSelected = vi
|
|
67
|
+
.fn()
|
|
68
|
+
.mockImplementation(function (this: { isSelected: boolean }) {
|
|
69
|
+
return this.isSelected;
|
|
70
|
+
});
|
|
71
71
|
|
|
72
72
|
const rows = [
|
|
73
73
|
{
|
|
@@ -23,17 +23,15 @@ describe("isInteractiveTarget", () => {
|
|
|
23
23
|
expect(isInteractiveTarget(createMouseEvent(span, cell))).toBe(false);
|
|
24
24
|
});
|
|
25
25
|
|
|
26
|
-
it.each([
|
|
27
|
-
"
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
expect(isInteractiveTarget(createMouseEvent(el, cell))).toBe(true);
|
|
36
|
-
});
|
|
26
|
+
it.each(["input", "button", "select", "textarea"])(
|
|
27
|
+
"returns true when clicking a <%s>",
|
|
28
|
+
(tag) => {
|
|
29
|
+
const cell = document.createElement("td");
|
|
30
|
+
const el = document.createElement(tag);
|
|
31
|
+
cell.append(el);
|
|
32
|
+
expect(isInteractiveTarget(createMouseEvent(el, cell))).toBe(true);
|
|
33
|
+
},
|
|
34
|
+
);
|
|
37
35
|
|
|
38
36
|
it("returns true when clicking an <a> link", () => {
|
|
39
37
|
const cell = document.createElement("td");
|
|
@@ -34,7 +34,9 @@ export const CellSelectionStats = <TData,>({
|
|
|
34
34
|
if (dataCellCount < 2) {
|
|
35
35
|
return (
|
|
36
36
|
<Tooltip content="Select multiple cells to see stats">
|
|
37
|
-
<span
|
|
37
|
+
<span
|
|
38
|
+
className={cn("text-xs text-muted-foreground/80 italic", className)}
|
|
39
|
+
>
|
|
38
40
|
No selection
|
|
39
41
|
</span>
|
|
40
42
|
</Tooltip>
|
|
@@ -247,7 +247,7 @@ export const RowViewerPanel: React.FC<RowViewerPanelProps> = ({
|
|
|
247
247
|
|
|
248
248
|
return (
|
|
249
249
|
<div
|
|
250
|
-
className="flex flex-col gap-3
|
|
250
|
+
className="flex flex-col gap-3 focus:outline-hidden"
|
|
251
251
|
ref={panelRef}
|
|
252
252
|
tabIndex={-1}
|
|
253
253
|
onKeyDown={handleKeyDown}
|
|
@@ -42,7 +42,7 @@ export interface TableExplorerPanelProps {
|
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
const tabTriggerClassName =
|
|
45
|
-
"text-
|
|
45
|
+
"text-[13px] uppercase tracking-wide font-semibold cursor-pointer transition-colors";
|
|
46
46
|
const activeClassName = "text-primary";
|
|
47
47
|
const inactiveClassName = "hover:text-foreground";
|
|
48
48
|
|
|
@@ -110,7 +110,7 @@ export const TableExplorerPanel: React.FC<TableExplorerPanelProps> = ({
|
|
|
110
110
|
<Tabs
|
|
111
111
|
value={resolvedTab}
|
|
112
112
|
onValueChange={(value) => onTabChange(value as PanelType)}
|
|
113
|
-
className="
|
|
113
|
+
className="flex flex-col min-w-[350px]"
|
|
114
114
|
>
|
|
115
115
|
<Fill name={SlotNames.CONTEXT_AWARE_PANEL_HEADER}>
|
|
116
116
|
<div className="flex items-center gap-1">
|
|
@@ -33,108 +33,107 @@ beforeAll(() => {
|
|
|
33
33
|
});
|
|
34
34
|
|
|
35
35
|
describe("Cell data attributes", () => {
|
|
36
|
-
it.each([
|
|
37
|
-
"
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
const cid = cellId("test");
|
|
43
|
-
const cellName = "test_cell";
|
|
36
|
+
it.each(["edit", "read", "present"])(
|
|
37
|
+
"should render cell with data-cell-id and data-cell-name in %s mode",
|
|
38
|
+
(mode) => {
|
|
39
|
+
const { store, wrapper } = createTestWrapper();
|
|
40
|
+
const cid = cellId("test");
|
|
41
|
+
const cellName = "test_cell";
|
|
44
42
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
43
|
+
const userConfig: UserConfig = {
|
|
44
|
+
display: {
|
|
45
|
+
cell_output: "below",
|
|
46
|
+
code_editor_font_size: 14,
|
|
47
|
+
dataframes: "rich",
|
|
48
|
+
default_table_page_size: 10,
|
|
49
|
+
default_table_max_columns: 10,
|
|
50
|
+
default_width: "normal",
|
|
51
|
+
theme: "light",
|
|
52
|
+
reference_highlighting: false,
|
|
53
|
+
},
|
|
54
|
+
keymap: { preset: "default" },
|
|
55
|
+
completion: {
|
|
56
|
+
activate_on_typing: true,
|
|
57
|
+
signature_hint_on_typing: false,
|
|
58
|
+
copilot: false,
|
|
59
|
+
},
|
|
60
|
+
formatting: { line_length: 88 },
|
|
61
|
+
package_management: { manager: "pip" },
|
|
62
|
+
runtime: {
|
|
63
|
+
auto_instantiate: false,
|
|
64
|
+
default_sql_output: "native",
|
|
65
|
+
auto_reload: "off",
|
|
66
|
+
on_cell_change: "lazy",
|
|
67
|
+
watcher_on_save: "lazy",
|
|
68
|
+
reactive_tests: true,
|
|
69
|
+
output_max_bytes: 1_000_000,
|
|
70
|
+
std_stream_max_bytes: 1_000_000,
|
|
71
|
+
pythonpath: [],
|
|
72
|
+
dotenv: [".env"],
|
|
73
|
+
},
|
|
74
|
+
server: {
|
|
75
|
+
browser: "default",
|
|
76
|
+
follow_symlink: false,
|
|
77
|
+
},
|
|
78
|
+
save: { autosave: "off", autosave_delay: 1000, format_on_save: false },
|
|
79
|
+
ai: {},
|
|
80
|
+
} as UserConfig;
|
|
83
81
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
82
|
+
const notebook = MockNotebook.notebookState({
|
|
83
|
+
cellData: {
|
|
84
|
+
[cid]: {
|
|
85
|
+
code: "",
|
|
86
|
+
name: cellName,
|
|
87
|
+
edited: false,
|
|
88
|
+
serializedEditorState: null,
|
|
89
|
+
config: {
|
|
90
|
+
disabled: false,
|
|
91
|
+
hide_code: false,
|
|
92
|
+
column: null,
|
|
93
|
+
},
|
|
95
94
|
},
|
|
96
95
|
},
|
|
97
|
-
}
|
|
98
|
-
});
|
|
96
|
+
});
|
|
99
97
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
98
|
+
notebook.cellRuntime[cid] = createCellRuntimeState({
|
|
99
|
+
status: "idle",
|
|
100
|
+
output: null,
|
|
101
|
+
consoleOutputs: [],
|
|
102
|
+
interrupted: false,
|
|
103
|
+
errored: false,
|
|
104
|
+
stopped: false,
|
|
105
|
+
staleInputs: false,
|
|
106
|
+
runStartTimestamp: null,
|
|
107
|
+
lastRunStartTimestamp: null,
|
|
108
|
+
runElapsedTimeMs: null,
|
|
109
|
+
debuggerActive: false,
|
|
110
|
+
outline: null,
|
|
111
|
+
});
|
|
114
112
|
|
|
115
|
-
|
|
113
|
+
store.set(notebookAtom, notebook);
|
|
116
114
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
115
|
+
const { container } = render(
|
|
116
|
+
<TooltipProvider>
|
|
117
|
+
<Cell
|
|
118
|
+
cellId={cid}
|
|
119
|
+
mode={mode as AppMode}
|
|
120
|
+
canDelete={true}
|
|
121
|
+
userConfig={userConfig}
|
|
122
|
+
isCollapsed={false}
|
|
123
|
+
collapseCount={0}
|
|
124
|
+
canMoveX={false}
|
|
125
|
+
theme="light"
|
|
126
|
+
showPlaceholder={false}
|
|
127
|
+
/>
|
|
128
|
+
</TooltipProvider>,
|
|
129
|
+
{ wrapper },
|
|
130
|
+
);
|
|
133
131
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
132
|
+
const cellElement = container.querySelector(`[data-cell-id="${cid}"]`);
|
|
133
|
+
expect(cellElement).toBeTruthy();
|
|
134
|
+
expect(cellElement?.getAttribute("data-cell-name")).toBe(cellName);
|
|
135
|
+
},
|
|
136
|
+
);
|
|
138
137
|
});
|
|
139
138
|
|
|
140
139
|
describe("Output data attributes", () => {
|
|
@@ -14,8 +14,10 @@ import { useOnMount } from "@/hooks/useLifecycle";
|
|
|
14
14
|
import { cn } from "@/utils/cn";
|
|
15
15
|
import { Events } from "@/utils/events";
|
|
16
16
|
|
|
17
|
-
interface Props
|
|
18
|
-
|
|
17
|
+
interface Props extends Omit<
|
|
18
|
+
React.InputHTMLAttributes<HTMLInputElement>,
|
|
19
|
+
"onChange"
|
|
20
|
+
> {
|
|
19
21
|
value: string;
|
|
20
22
|
onChange: (newName: string) => void;
|
|
21
23
|
placeholder?: string;
|
|
@@ -65,8 +65,10 @@ import { useSplitCellCallback } from "../cell/useSplitCell";
|
|
|
65
65
|
import { NameCellInput } from "./name-cell-input";
|
|
66
66
|
import type { ActionButton } from "./types";
|
|
67
67
|
|
|
68
|
-
export interface CellActionButtonProps
|
|
69
|
-
|
|
68
|
+
export interface CellActionButtonProps extends Pick<
|
|
69
|
+
CellData,
|
|
70
|
+
"name" | "config"
|
|
71
|
+
> {
|
|
70
72
|
cellId: CellId;
|
|
71
73
|
status: RuntimeState;
|
|
72
74
|
hasOutput: boolean;
|
|
@@ -122,7 +122,7 @@ export const AddCellWithAI: React.FC<{
|
|
|
122
122
|
transport: new StreamingChunkTransport(
|
|
123
123
|
{
|
|
124
124
|
api: runtimeManager.getAiURL("completion").toString(),
|
|
125
|
-
headers: runtimeManager.headers(),
|
|
125
|
+
headers: () => runtimeManager.headers(),
|
|
126
126
|
prepareSendMessagesRequest: async (options) => {
|
|
127
127
|
const completionBody = await buildCompletionRequestBody(
|
|
128
128
|
options.messages,
|
|
@@ -136,6 +136,7 @@ export const AddCellWithAI: React.FC<{
|
|
|
136
136
|
};
|
|
137
137
|
|
|
138
138
|
return {
|
|
139
|
+
api: runtimeManager.getAiURL("completion").toString(),
|
|
139
140
|
body: body,
|
|
140
141
|
};
|
|
141
142
|
},
|
|
@@ -16,11 +16,10 @@ import "./cell-status.css";
|
|
|
16
16
|
import { formatDistanceToNow } from "date-fns";
|
|
17
17
|
import { Time } from "@/utils/time";
|
|
18
18
|
|
|
19
|
-
export interface CellStatusComponentProps
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
> {
|
|
19
|
+
export interface CellStatusComponentProps extends Pick<
|
|
20
|
+
CellRuntimeState,
|
|
21
|
+
"status" | "runStartTimestamp" | "interrupted" | "lastRunStartTimestamp"
|
|
22
|
+
> {
|
|
24
23
|
editing: boolean;
|
|
25
24
|
edited: boolean;
|
|
26
25
|
disabled: boolean;
|
|
@@ -34,8 +34,10 @@ import {
|
|
|
34
34
|
useCellActionButtons,
|
|
35
35
|
} from "../actions/useCellActionButton";
|
|
36
36
|
|
|
37
|
-
interface Props
|
|
38
|
-
|
|
37
|
+
interface Props extends Pick<
|
|
38
|
+
CellActionButtonProps,
|
|
39
|
+
"cellId" | "getEditorView"
|
|
40
|
+
> {
|
|
39
41
|
children: React.ReactNode;
|
|
40
42
|
}
|
|
41
43
|
|
|
@@ -47,7 +47,8 @@ import { useSplitCellCallback } from "../useSplitCell";
|
|
|
47
47
|
import { LanguageToggles } from "./language-toggle";
|
|
48
48
|
|
|
49
49
|
export interface CellEditorProps
|
|
50
|
-
extends
|
|
50
|
+
extends
|
|
51
|
+
Pick<CellRuntimeState, "status">,
|
|
51
52
|
Pick<CellData, "id" | "code" | "serializedEditorState" | "config"> {
|
|
52
53
|
runCell: () => void;
|
|
53
54
|
theme: Theme;
|
|
@@ -27,7 +27,8 @@ const toolbarItemVariants = cva(
|
|
|
27
27
|
);
|
|
28
28
|
|
|
29
29
|
interface ToolbarItemProps
|
|
30
|
-
extends
|
|
30
|
+
extends
|
|
31
|
+
VariantProps<typeof toolbarItemVariants>,
|
|
31
32
|
React.HTMLAttributes<HTMLButtonElement> {
|
|
32
33
|
tooltip: React.ReactNode;
|
|
33
34
|
disabled?: boolean;
|