@marimo-team/islands 0.22.1-dev4 → 0.22.1-dev40
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-DuD8BVl6.js} +54 -54
- package/dist/{Plot-WhbJAbBh.js → Plot-BxlSHo0G.js} +47 -38
- 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-Cel1kBfc.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-BqnvTmDo.js} +1739 -1708
- 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 +3203 -3105
- 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-DC1TOnIl.js} +3184 -3207
- 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-CD7QaCV-.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-CUqpEbBS.js} +5 -5
- 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-Ch-7Rk2x.js} +4 -4
- package/dist/{useIframeCapabilities-BVQrlRBd.js → useIframeCapabilities-CqhrVue6.js} +1 -1
- package/dist/useLifecycle-4fA1pHoh.js +177 -0
- package/dist/{useTheme-Dm1WaAGy.js → useTheme-MWfxn4oz.js} +4 -5
- package/dist/{vega-component-A6unyUJS.js → vega-component-CPhNLfZZ.js} +25 -25
- 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/__mocks__/common.ts +4 -4
- 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 +71 -24
- package/src/components/chat/acp/agent-selector.tsx +2 -11
- package/src/components/chat/acp/state.ts +15 -3
- package/src/components/chat/chat-history-popover.tsx +1 -1
- 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/__tests__/columns.test.tsx +7 -7
- package/src/components/data-table/cell-hover-template/types.ts +1 -1
- package/src/components/data-table/cell-hover-text/types.ts +1 -1
- package/src/components/data-table/cell-selection/__tests__/feature.test.ts +1 -1
- package/src/components/data-table/cell-selection/types.ts +4 -3
- package/src/components/data-table/cell-styling/types.ts +1 -1
- package/src/components/data-table/charts/chart-spec/altair-generator.ts +2 -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 +5 -4
- package/src/components/data-table/column-header.tsx +4 -2
- package/src/components/data-table/column-summary/legacy-chart-spec.ts +1 -1
- package/src/components/data-table/column-wrapping/types.ts +4 -3
- package/src/components/data-table/columns.tsx +4 -1
- package/src/components/data-table/copy-column/types.ts +4 -3
- package/src/components/data-table/data-table.tsx +16 -11
- package/src/components/data-table/focus-row/types.ts +4 -3
- package/src/components/data-table/loading-table.tsx +5 -2
- package/src/components/data-table/pagination.tsx +1 -1
- package/src/components/data-table/range-focus/__tests__/atoms.test.ts +13 -13
- package/src/components/data-table/range-focus/__tests__/use-cell-range-selection.test.ts +9 -11
- package/src/components/data-table/range-focus/atoms.ts +2 -2
- 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/dependency-graph/dependency-graph-tree.tsx +1 -1
- package/src/components/editor/__tests__/data-attributes.test.tsx +93 -94
- package/src/components/editor/__tests__/dynamic-favicon.test.tsx +1 -1
- package/src/components/editor/actions/name-cell-input.tsx +4 -2
- package/src/components/editor/actions/pair-with-agent-modal.tsx +142 -0
- package/src/components/editor/actions/useCellActionButton.tsx +4 -2
- package/src/components/editor/actions/useNotebookActions.tsx +10 -0
- package/src/components/editor/ai/add-cell-with-ai.tsx +2 -1
- package/src/components/editor/ai/ai-completion-editor.tsx +1 -1
- package/src/components/editor/app-container.tsx +1 -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 +3 -2
- 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/empty-state.tsx +1 -0
- package/src/components/editor/chrome/panels/file-explorer-panel.tsx +0 -10
- package/src/components/editor/chrome/panels/snippets-panel.tsx +1 -1
- package/src/components/editor/chrome/panels/write-secret-modal.tsx +1 -1
- 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/chrome/wrapper/storage.ts +2 -2
- package/src/components/editor/connections/database/as-code.ts +1 -1
- package/src/components/editor/connections/form-renderers.tsx +1 -1
- package/src/components/editor/connections/storage/as-code.ts +1 -1
- package/src/components/editor/controls/keyboard-shortcuts.tsx +1 -1
- package/src/components/editor/header/filename-input.tsx +4 -1
- package/src/components/editor/links/cell-link-list.tsx +1 -1
- package/src/components/editor/navigation/__tests__/navigation.test.ts +1 -1
- package/src/components/editor/navigation/clipboard.ts +1 -1
- package/src/components/editor/navigation/multi-cell-action-toolbar.tsx +2 -2
- package/src/components/editor/navigation/navigation.ts +3 -3
- package/src/components/editor/notebook-cell.tsx +1 -1
- package/src/components/editor/output/JsonOutput.tsx +6 -6
- package/src/components/editor/output/ansi-reduce.ts +2 -2
- package/src/components/editor/output/console/ConsoleOutput.tsx +2 -2
- package/src/components/editor/renderers/cells-renderer.tsx +1 -1
- package/src/components/editor/renderers/grid-layout/grid-layout.tsx +1 -1
- package/src/components/editor/renderers/plugins.ts +1 -1
- package/src/components/editor/renderers/slides-layout/types.ts +2 -2
- package/src/components/editor/renderers/vertical-layout/__tests__/useFocusFirstEditor.test.ts +2 -2
- package/src/components/editor/renderers/vertical-layout/__tests__/vertical-layout.test.ts +1 -1
- package/src/components/editor/renderers/vertical-layout/vertical-layout.tsx +12 -13
- package/src/components/find-replace/find-replace.tsx +3 -1
- package/src/components/forms/form.tsx +1 -1
- package/src/components/forms/options.ts +1 -1
- package/src/components/pages/gallery-page.tsx +1 -1
- package/src/components/static-html/static-banner.tsx +2 -2
- package/src/components/storage/__tests__/storage-snippets.test.ts +4 -6
- package/src/components/terminal/terminal.tsx +4 -4
- 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 +5 -4
- 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 +5 -2
- 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/components/variables/variables-table.tsx +1 -1
- package/src/core/ai/context/providers/__tests__/datasource.test.ts +1 -1
- package/src/core/ai/context/providers/__tests__/error.test.ts +1 -1
- package/src/core/ai/context/providers/__tests__/variable.test.ts +1 -1
- package/src/core/ai/context/providers/cell-output.ts +1 -2
- package/src/core/ai/context/registry.ts +2 -2
- package/src/core/ai/tools/edit-notebook-tool.ts +4 -3
- package/src/core/ai/tools/registry.ts +1 -1
- 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__/cell.test.ts +14 -13
- package/src/core/cells/__tests__/cells.test.ts +2 -2
- package/src/core/cells/__tests__/scrollCellIntoView.test.ts +1 -1
- package/src/core/cells/__tests__/session.test.ts +1 -1
- package/src/core/cells/__tests__/utils.test.ts +1 -1
- package/src/core/cells/cells.ts +2 -2
- package/src/core/cells/ids.ts +1 -1
- package/src/core/cells/logs.ts +1 -1
- package/src/core/codemirror/ai/request.ts +1 -1
- package/src/core/codemirror/cells/__tests__/extensions.test.ts +15 -17
- package/src/core/codemirror/cells/traceback-decorations.ts +1 -1
- package/src/core/codemirror/copilot/__tests__/language-server.test.ts +1 -1
- package/src/core/codemirror/copilot/__tests__/transport.test.ts +129 -3
- package/src/core/codemirror/copilot/client.ts +9 -2
- package/src/core/codemirror/copilot/getCodes.ts +1 -1
- package/src/core/codemirror/copilot/language-server.ts +12 -1
- package/src/core/codemirror/copilot/transport.ts +34 -8
- package/src/core/codemirror/copilot/types.ts +1 -1
- package/src/core/codemirror/facet.ts +1 -1
- package/src/core/codemirror/language/__tests__/sql.test.ts +4 -4
- 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-builder.ts +1 -1
- 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/metadata.ts +1 -1
- package/src/core/codemirror/language/panel/sql.tsx +4 -1
- package/src/core/codemirror/language/types.ts +1 -1
- package/src/core/codemirror/lsp/__tests__/notebook-lsp.test.ts +1 -1
- package/src/core/codemirror/lsp/notebook-lsp.ts +1 -1
- package/src/core/codemirror/misc/__tests__/dnd.test.ts +1 -1
- package/src/core/codemirror/reactive-references/__tests__/analyzer.test.ts +28 -42
- package/src/core/codemirror/rtc/loro/awareness.ts +1 -1
- 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 +1 -3
- package/src/core/datasets/data-source-connections.ts +4 -2
- package/src/core/datasets/state.ts +1 -1
- package/src/core/dom/__tests__/htmlUtils.test.ts +8 -14
- package/src/core/dom/__tests__/outline.test.ts +2 -3
- package/src/core/dom/outline.ts +1 -1
- package/src/core/edit-app.tsx +4 -1
- package/src/core/export/__tests__/hooks.test.ts +1 -1
- package/src/core/hotkeys/__tests__/hotkeys.test.ts +1 -1
- package/src/core/hotkeys/shortcuts.ts +1 -1
- package/src/core/islands/__tests__/bridge.test.ts +2 -2
- package/src/core/islands/__tests__/parse.test.ts +8 -7
- package/src/core/islands/bridge.ts +2 -2
- package/src/core/islands/components/output-wrapper.tsx +1 -1
- package/src/core/islands/parse.ts +1 -1
- package/src/core/lsp/__tests__/transport.test.ts +1 -1
- package/src/core/network/CachingRequestRegistry.ts +1 -1
- package/src/core/network/DeferredRequestRegistry.ts +1 -1
- package/src/core/network/__tests__/requests-network.test.ts +1 -1
- package/src/core/network/api.ts +2 -2
- package/src/core/network/requests-lazy.ts +1 -1
- package/src/core/network/requests-toasting.tsx +1 -1
- package/src/core/runtime/runtime.ts +1 -0
- 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/static/files.ts +1 -1
- package/src/core/vscode/vscode-bindings.ts +1 -1
- package/src/core/wasm/bridge.ts +3 -3
- package/src/core/wasm/worker/tracer.ts +1 -1
- package/src/core/websocket/useWebSocket.tsx +5 -3
- package/src/css/app/Cell.css +25 -1
- package/src/css/globals.css +18 -16
- package/src/css/table.css +17 -0
- package/src/custom.d.ts +1 -1
- package/src/hooks/__tests__/useDuplicateShortcuts.test.ts +3 -3
- package/src/hooks/debug.ts +3 -3
- package/src/hooks/useDebounce.ts +1 -1
- package/src/hooks/useEventListener.ts +1 -1
- package/src/hooks/useHotkey.ts +1 -1
- package/src/hooks/useLifecycle.ts +2 -2
- package/src/hooks/useNonce.ts +1 -1
- package/src/hooks/useResizeObserver.ts +2 -2
- package/src/main.tsx +1 -1
- package/src/plugins/core/BadPlugin.tsx +7 -6
- package/src/plugins/core/RenderHTML.tsx +3 -3
- package/src/plugins/core/__test__/registerReactComponent.test.ts +1 -1
- package/src/plugins/core/registerReactComponent.tsx +4 -4
- package/src/plugins/core/rpc.ts +1 -1
- package/src/plugins/impl/CheckboxPlugin.tsx +4 -1
- package/src/plugins/impl/DataEditorPlugin.tsx +8 -3
- package/src/plugins/impl/DataTablePlugin.tsx +6 -2
- package/src/plugins/impl/FileBrowserPlugin.tsx +1 -1
- package/src/plugins/impl/FormPlugin.tsx +2 -3
- package/src/plugins/impl/__tests__/DataTablePlugin.test.tsx +4 -1
- package/src/plugins/impl/__tests__/MatrixPlugin.test.tsx +1 -1
- package/src/plugins/impl/__tests__/SliderPlugin.test.tsx +43 -15
- package/src/plugins/impl/anywidget/AnyWidgetPlugin.tsx +3 -12
- package/src/plugins/impl/anywidget/__tests__/model.test.ts +2 -2
- package/src/plugins/impl/anywidget/model.ts +1 -1
- package/src/plugins/impl/anywidget/types.ts +2 -2
- package/src/plugins/impl/anywidget/widget-binding.ts +1 -1
- package/src/plugins/impl/chat/ChatPlugin.tsx +1 -1
- package/src/plugins/impl/chat/chat-ui.tsx +5 -2
- package/src/plugins/impl/data-editor/glide-data-editor.tsx +2 -2
- package/src/plugins/impl/data-explorer/ConnectedDataExplorerComponent.tsx +2 -2
- package/src/plugins/impl/data-explorer/components/query-form.tsx +1 -1
- package/src/plugins/impl/data-explorer/functions/function.ts +1 -1
- package/src/plugins/impl/data-explorer/queries/types.ts +1 -1
- package/src/plugins/impl/data-frames/DataFramePlugin.tsx +1 -1
- package/src/plugins/impl/data-frames/forms/__tests__/form.test.tsx +7 -9
- package/src/plugins/impl/data-frames/forms/renderers.tsx +1 -1
- package/src/plugins/impl/data-frames/utils/operators.ts +1 -1
- package/src/plugins/impl/matplotlib/MatplotlibPlugin.tsx +1 -1
- package/src/plugins/impl/mpl-interactive/MplInteractivePlugin.tsx +1 -1
- package/src/plugins/impl/panel/PanelPlugin.tsx +2 -2
- package/src/plugins/impl/plotly/Plot.tsx +3 -3
- package/src/plugins/impl/plotly/PlotlyPlugin.tsx +65 -103
- package/src/plugins/impl/plotly/__tests__/PlotlyPlugin.test.tsx +114 -0
- package/src/plugins/impl/plotly/__tests__/selection.test.ts +199 -0
- package/src/plugins/impl/plotly/selection.ts +333 -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/batched.ts +1 -1
- package/src/plugins/impl/vega/make-selectable.ts +3 -3
- package/src/plugins/impl/vega/types.ts +1 -1
- package/src/plugins/impl/vega/utils.ts +14 -5
- package/src/plugins/impl/vega/vega.css +2 -1
- package/src/plugins/layout/DownloadPlugin.tsx +1 -1
- package/src/plugins/layout/ImageComparisonPlugin.tsx +1 -3
- package/src/plugins/layout/LazyPlugin.tsx +1 -1
- package/src/plugins/layout/RoutesPlugin.tsx +1 -1
- package/src/plugins/layout/mermaid/mermaid.tsx +1 -1
- package/src/plugins/plugins.ts +1 -1
- package/src/plugins/stateless-plugin.ts +4 -2
- package/src/stories/data-explorer.stories.tsx +1 -1
- package/src/stories/dataframe.stories.tsx +1 -1
- package/src/stories/editor.stories.tsx +1 -1
- package/src/stories/select.stories.tsx +1 -1
- package/src/stories/switchable-multi-select.stories.tsx +1 -1
- package/src/utils/Logger.ts +1 -1
- package/src/utils/__tests__/arrays.test.ts +1 -1
- package/src/utils/__tests__/blob.test.ts +1 -1
- package/src/utils/__tests__/cell-urls.test.ts +24 -21
- package/src/utils/__tests__/dates.test.ts +1 -1
- package/src/utils/__tests__/errors.test.ts +1 -1
- package/src/utils/__tests__/filenames.test.ts +15 -14
- package/src/utils/__tests__/json-parser.test.ts +14 -21
- package/src/utils/__tests__/multi-map.test.ts +3 -3
- package/src/utils/__tests__/objects.test.ts +3 -3
- package/src/utils/__tests__/path.test.ts +34 -31
- package/src/utils/__tests__/urls.test.ts +19 -18
- package/src/utils/__tests__/versions.test.ts +5 -5
- package/src/utils/__tests__/waitForWs.test.ts +1 -1
- package/src/utils/arrays.ts +2 -2
- package/src/utils/assertNever.ts +1 -1
- package/src/utils/batch-requests.ts +2 -2
- package/src/utils/createReducer.ts +2 -2
- package/src/utils/id-tree.tsx +2 -2
- package/src/utils/idle.ts +1 -1
- package/src/utils/invariant.ts +1 -2
- package/src/utils/json/base64.ts +2 -5
- package/src/utils/maps.ts +1 -1
- package/src/utils/math.ts +0 -1
- package/src/utils/mime-types.ts +1 -1
- package/src/utils/multi-map.ts +1 -1
- package/src/utils/objects.ts +1 -1
- package/src/utils/once.ts +2 -2
- package/src/utils/staticImplements.ts +1 -1
- package/src/utils/storage/jotai.ts +1 -1
- package/src/utils/tracer.ts +3 -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/useLifecycle-Dids8BPm.js +0 -173
- /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
|
@@ -9,6 +9,35 @@ import { store } from "@/core/state/jotai";
|
|
|
9
9
|
import type { IPluginProps } from "../../types";
|
|
10
10
|
import { SliderPlugin } from "../SliderPlugin";
|
|
11
11
|
|
|
12
|
+
vi.mock("@/components/ui/slider", () => ({
|
|
13
|
+
Slider: ({
|
|
14
|
+
disabled,
|
|
15
|
+
onValueChange,
|
|
16
|
+
onValueCommit,
|
|
17
|
+
value,
|
|
18
|
+
}: {
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
onValueChange?: (value: number[]) => void;
|
|
21
|
+
onValueCommit?: (value: number[]) => void;
|
|
22
|
+
value: number[];
|
|
23
|
+
}) => (
|
|
24
|
+
<div>
|
|
25
|
+
<button
|
|
26
|
+
aria-label="Slider change"
|
|
27
|
+
disabled={disabled}
|
|
28
|
+
onClick={() => onValueChange?.([value[0] + 1])}
|
|
29
|
+
type="button"
|
|
30
|
+
/>
|
|
31
|
+
<button
|
|
32
|
+
aria-label="Slider commit"
|
|
33
|
+
disabled={disabled}
|
|
34
|
+
onClick={() => onValueCommit?.(value)}
|
|
35
|
+
type="button"
|
|
36
|
+
/>
|
|
37
|
+
</div>
|
|
38
|
+
),
|
|
39
|
+
}));
|
|
40
|
+
|
|
12
41
|
SetupMocks.resizeObserver();
|
|
13
42
|
|
|
14
43
|
describe("SliderPlugin", () => {
|
|
@@ -51,46 +80,45 @@ describe("SliderPlugin", () => {
|
|
|
51
80
|
const plugin = new SliderPlugin();
|
|
52
81
|
const setValue = vi.fn();
|
|
53
82
|
const props = createProps(false, false, setValue);
|
|
54
|
-
const {
|
|
83
|
+
const { getByRole } = render(plugin.render(props));
|
|
55
84
|
|
|
56
85
|
act(() => {
|
|
57
86
|
vi.advanceTimersByTime(0);
|
|
58
87
|
});
|
|
59
88
|
|
|
60
|
-
const
|
|
61
|
-
expect(thumb).toBeTruthy();
|
|
89
|
+
const changeButton = getByRole("button", { name: "Slider change" });
|
|
62
90
|
|
|
63
|
-
// Radix UI Slider updates on keyboard ArrowRight/ArrowLeft
|
|
64
91
|
act(() => {
|
|
65
|
-
(
|
|
66
|
-
fireEvent.keyDown(thumb!, { key: "ArrowRight" });
|
|
92
|
+
fireEvent.click(changeButton);
|
|
67
93
|
});
|
|
68
94
|
|
|
69
95
|
expect(setValue).toHaveBeenCalledWith(6);
|
|
70
96
|
});
|
|
71
97
|
|
|
72
|
-
it("slider
|
|
98
|
+
it("slider waits until commit before calling setValue when debounce is true", () => {
|
|
73
99
|
const plugin = new SliderPlugin();
|
|
74
100
|
const setValue = vi.fn();
|
|
75
101
|
const props = createProps(true, false, setValue);
|
|
76
|
-
const {
|
|
102
|
+
const { getByRole } = render(plugin.render(props));
|
|
77
103
|
|
|
78
104
|
act(() => {
|
|
79
105
|
vi.advanceTimersByTime(0);
|
|
80
106
|
});
|
|
81
107
|
|
|
82
|
-
const
|
|
108
|
+
const changeButton = getByRole("button", { name: "Slider change" });
|
|
109
|
+
const commitButton = getByRole("button", { name: "Slider commit" });
|
|
83
110
|
|
|
84
111
|
act(() => {
|
|
85
|
-
(
|
|
86
|
-
// Simulate just a programmatic change that Radix would trigger via pointer move
|
|
87
|
-
// which fires onValueChange but not onValueCommit yet
|
|
88
|
-
// Because we can't easily separated Radix's internal pointer events in jsdom, we
|
|
89
|
-
// test the main issue: editable input. We can trust Radix's onValueChange vs onValueCommit.
|
|
112
|
+
fireEvent.click(changeButton);
|
|
90
113
|
});
|
|
91
114
|
|
|
92
|
-
// We verified above that NumberField works when debounce=true
|
|
93
115
|
expect(setValue).not.toHaveBeenCalled();
|
|
116
|
+
|
|
117
|
+
act(() => {
|
|
118
|
+
fireEvent.click(commitButton);
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
expect(setValue).toHaveBeenCalledWith(6);
|
|
94
122
|
});
|
|
95
123
|
|
|
96
124
|
it("editable input triggers setValue immediately even when slider debounce is true", () => {
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
|
-
/*
|
|
2
|
+
/* oxlint-disable typescript/no-explicit-any */
|
|
3
3
|
|
|
4
4
|
import type { AnyWidget } from "@anywidget/types";
|
|
5
5
|
import { useEffect, useRef } from "react";
|
|
6
6
|
import { z } from "zod";
|
|
7
|
-
import { RANDOM_ID_ATTR } from "@/core/dom/ui-element-constants";
|
|
8
7
|
import { useAsyncData } from "@/hooks/useAsyncData";
|
|
9
8
|
import type { HTMLElementNotDerivedFromRef } from "@/hooks/useEventListener";
|
|
10
9
|
import { createPlugin } from "@/plugins/core/builder";
|
|
@@ -145,18 +144,10 @@ const AnyWidgetSlot = (props: IPluginProps<ModelIdRef, Data>) => {
|
|
|
145
144
|
return <ErrorBanner error={error} />;
|
|
146
145
|
}
|
|
147
146
|
|
|
148
|
-
// Find the closest parent element with an attribute of `random-id`
|
|
149
|
-
const randomId = props.host
|
|
150
|
-
.closest(`[${RANDOM_ID_ATTR}]`)
|
|
151
|
-
?.getAttribute(RANDOM_ID_ATTR);
|
|
152
|
-
const key = randomId ?? jsUrl;
|
|
153
|
-
|
|
154
147
|
return (
|
|
155
148
|
<LoadedSlot
|
|
156
|
-
//
|
|
157
|
-
|
|
158
|
-
// so it is safer to just re-render.
|
|
159
|
-
key={key}
|
|
149
|
+
// Force remount when the widget module or model changes (cell re-run).
|
|
150
|
+
key={`${jsHash}:${modelId}`}
|
|
160
151
|
widget={jsModule.default}
|
|
161
152
|
modelId={modelId}
|
|
162
153
|
host={host}
|
|
@@ -58,13 +58,13 @@ describe("Model", () => {
|
|
|
58
58
|
describe("public API", () => {
|
|
59
59
|
it("should only expose AFM-compliant interface", () => {
|
|
60
60
|
// Get all enumerable own properties
|
|
61
|
-
const ownProperties = Object.keys(model).
|
|
61
|
+
const ownProperties = Object.keys(model).toSorted();
|
|
62
62
|
// Get prototype methods (excluding constructor)
|
|
63
63
|
const prototypeMethods = Object.getOwnPropertyNames(
|
|
64
64
|
Object.getPrototypeOf(model),
|
|
65
65
|
)
|
|
66
66
|
.filter((name) => name !== "constructor")
|
|
67
|
-
.
|
|
67
|
+
.toSorted();
|
|
68
68
|
|
|
69
69
|
// Snapshot the public API to catch accidental leaks of internal methods
|
|
70
70
|
expect({ ownProperties, prototypeMethods }).toMatchInlineSnapshot(`
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import type { Base64String } from "@/utils/json/base64";
|
|
3
3
|
import type { TypedString } from "@/utils/typed";
|
|
4
4
|
|
|
5
|
-
//
|
|
5
|
+
// oxlint-disable-next-line typescript/no-explicit-any
|
|
6
6
|
export type EventHandler = (...args: any[]) => void;
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -13,7 +13,7 @@ export type WidgetModelId = TypedString<"WidgetModelId">;
|
|
|
13
13
|
/**
|
|
14
14
|
* AnyWidget model state with buffers.
|
|
15
15
|
*/
|
|
16
|
-
//
|
|
16
|
+
// oxlint-disable-next-line typescript/no-explicit-any
|
|
17
17
|
export type ModelState = Record<string | number, any>;
|
|
18
18
|
|
|
19
19
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
|
-
/*
|
|
2
|
+
/* oxlint-disable typescript/no-explicit-any */
|
|
3
3
|
|
|
4
4
|
import type { AnyWidget, Experimental } from "@anywidget/types";
|
|
5
5
|
import { asRemoteURL } from "@/core/runtime/config";
|
|
@@ -13,7 +13,7 @@ const LazyChatbot = React.lazy(() =>
|
|
|
13
13
|
import("./chat-ui").then((m) => ({ default: m.Chatbot })),
|
|
14
14
|
);
|
|
15
15
|
|
|
16
|
-
//
|
|
16
|
+
// oxlint-disable-next-line typescript/consistent-type-definitions
|
|
17
17
|
export type PluginFunctions = {
|
|
18
18
|
get_chat_history: (req: {}) => Promise<{ messages: UIMessage[] }>;
|
|
19
19
|
delete_chat_history: (req: {}) => Promise<null>;
|
|
@@ -2,7 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
import { type UIMessage, useChat } from "@ai-sdk/react";
|
|
4
4
|
import { ChatBubbleIcon } from "@radix-ui/react-icons";
|
|
5
|
-
import {
|
|
5
|
+
import { Popover as PopoverPrimitive } from "radix-ui";
|
|
6
|
+
|
|
7
|
+
const PopoverAnchor = PopoverPrimitive.Anchor;
|
|
8
|
+
|
|
6
9
|
import type { ReactCodeMirrorRef } from "@uiw/react-codemirror";
|
|
7
10
|
import {
|
|
8
11
|
createUIMessageStreamResponse,
|
|
@@ -466,7 +469,7 @@ export const Chatbot: React.FC<Props> = (props) => {
|
|
|
466
469
|
resetInput();
|
|
467
470
|
}}
|
|
468
471
|
ref={formRef}
|
|
469
|
-
//
|
|
472
|
+
// oxlint-ignore-next-line -- inert is used to disable the entire form
|
|
470
473
|
inert={props.disabled || undefined}
|
|
471
474
|
className={cn(
|
|
472
475
|
"flex w-full border-t border-(--slate-6) px-2 py-1 items-center",
|
|
@@ -218,7 +218,7 @@ export const GlideDataEditor = <T,>({
|
|
|
218
218
|
|
|
219
219
|
// Add new rows in order
|
|
220
220
|
const sortedNewRows = [...newRows.entries()]
|
|
221
|
-
.
|
|
221
|
+
.toSorted(([a], [b]) => a - b)
|
|
222
222
|
.map(([, row]) => row);
|
|
223
223
|
|
|
224
224
|
if (sortedNewRows.length > 0) {
|
|
@@ -227,7 +227,7 @@ export const GlideDataEditor = <T,>({
|
|
|
227
227
|
|
|
228
228
|
// Force re-render to update the total rows
|
|
229
229
|
rerender();
|
|
230
|
-
//
|
|
230
|
+
// oxlint-disable-next-line react-hooks/exhaustive-deps
|
|
231
231
|
}, [data.length]);
|
|
232
232
|
|
|
233
233
|
const getCellContent = useCallback(
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
|
-
/*
|
|
2
|
+
/* oxlint-disable typescript/no-base-to-string */
|
|
3
3
|
import * as cql from "compassql/build/src";
|
|
4
4
|
import { createStore, Provider, useAtomValue } from "jotai";
|
|
5
5
|
import { ListFilterIcon } from "lucide-react";
|
|
@@ -268,7 +268,7 @@ const HorizontalCarouselItem = ({
|
|
|
268
268
|
);
|
|
269
269
|
};
|
|
270
270
|
// Make the plot responsive
|
|
271
|
-
//
|
|
271
|
+
// oxlint-disable-next-line typescript/no-explicit-any
|
|
272
272
|
function makeResponsive(spec: any) {
|
|
273
273
|
// NOTE: for row/column, this applies to the inner plot
|
|
274
274
|
// so we tend to overflow due to the legends,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
|
-
/*
|
|
2
|
+
/* oxlint-disable typescript/no-base-to-string */
|
|
3
3
|
|
|
4
4
|
import { ExpandedType } from "compassql/build/src/query/expandedtype";
|
|
5
5
|
import { PrimitiveType, type Schema } from "compassql/build/src/schema";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
|
-
/*
|
|
2
|
+
/* oxlint-disable typescript/no-base-to-string */
|
|
3
3
|
import type { FieldQuery } from "compassql/build/src/query/encoding";
|
|
4
4
|
import { type FieldFunction, isAggregateOp, type TimeUnitOp } from "./types";
|
|
5
5
|
|
|
@@ -28,7 +28,7 @@ export interface Result {
|
|
|
28
28
|
limit: number;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
//
|
|
31
|
+
// oxlint-disable-next-line typescript/no-explicit-any, typescript/no-redundant-type-constituents
|
|
32
32
|
export type TopLevelFacetedUnitSpec = TopLevel<FacetedUnitSpec<any, any>> & {
|
|
33
33
|
data: NamedData;
|
|
34
34
|
};
|
|
@@ -54,7 +54,7 @@ interface Data {
|
|
|
54
54
|
lazy: boolean;
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
//
|
|
57
|
+
// oxlint-disable-next-line typescript/consistent-type-definitions
|
|
58
58
|
type PluginFunctions = {
|
|
59
59
|
get_dataframe: (req: {}) => Promise<{
|
|
60
60
|
url: string;
|
|
@@ -44,16 +44,14 @@ describe("renderZodSchema", () => {
|
|
|
44
44
|
[...TransformTypeSchema.options],
|
|
45
45
|
(z) => getUnionLiteral(z).value,
|
|
46
46
|
);
|
|
47
|
-
it.each(
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
FieldValues
|
|
52
|
-
>) => {
|
|
53
|
-
const expected = render(<Subject schema={schema} />);
|
|
47
|
+
it.each(Object.entries(options))(
|
|
48
|
+
"should render a form %s",
|
|
49
|
+
(name, schema: z.ZodType<unknown, FieldValues>) => {
|
|
50
|
+
const expected = render(<Subject schema={schema} />);
|
|
54
51
|
|
|
55
|
-
|
|
56
|
-
|
|
52
|
+
expect(expected.asFragment()).toMatchSnapshot();
|
|
53
|
+
},
|
|
54
|
+
);
|
|
57
55
|
});
|
|
58
56
|
|
|
59
57
|
const options = [
|
|
@@ -194,7 +194,7 @@ export function isConditionValueValid(operator: string, value: unknown) {
|
|
|
194
194
|
return possibleSchemas.some((schema) => schema.safeParse(value).success);
|
|
195
195
|
}
|
|
196
196
|
|
|
197
|
-
//
|
|
197
|
+
// oxlint-disable-next-line typescript/no-explicit-any
|
|
198
198
|
const safeGet = (obj: any, key: string): [z.ZodType] | [] => {
|
|
199
199
|
if (obj[key]) {
|
|
200
200
|
return obj[key];
|
|
@@ -57,7 +57,7 @@ const MatplotlibComponent = (props: MatplotlibState) => {
|
|
|
57
57
|
controller.abort();
|
|
58
58
|
instance.current = null;
|
|
59
59
|
};
|
|
60
|
-
//
|
|
60
|
+
// oxlint-disable-next-line react-hooks/exhaustive-deps
|
|
61
61
|
}, []);
|
|
62
62
|
|
|
63
63
|
// No dependency array: intentionally syncs all props into the imperative
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
|
-
/*
|
|
2
|
+
/* oxlint-disable typescript/no-explicit-any */
|
|
3
3
|
|
|
4
4
|
import { useCallback, useEffect, useRef, useState } from "react";
|
|
5
5
|
import { z } from "zod";
|
|
@@ -74,7 +74,7 @@ interface PanelData {
|
|
|
74
74
|
|
|
75
75
|
type T = Record<string, unknown>;
|
|
76
76
|
|
|
77
|
-
//
|
|
77
|
+
// oxlint-disable-next-line typescript/consistent-type-definitions
|
|
78
78
|
type PluginFunctions = {
|
|
79
79
|
send_to_widget: <T>(req: {
|
|
80
80
|
message?: unknown;
|
|
@@ -4,7 +4,7 @@ import type * as PlotlyTypes from "plotly.js";
|
|
|
4
4
|
// Import the pre-built dist bundle, not the source entry point.
|
|
5
5
|
// The source entry point requires Node.js polyfills (e.g. `buffer/`)
|
|
6
6
|
// that are unavailable in the browser/bundler environment.
|
|
7
|
-
//
|
|
7
|
+
// oxlint-disable-next-line typescript/ban-ts-comment
|
|
8
8
|
// @ts-expect-error — no type declarations for dist path, we use PlotlyTypes above
|
|
9
9
|
import Plotly from "plotly.js/dist/plotly";
|
|
10
10
|
import { useEffect, useRef } from "react";
|
|
@@ -107,7 +107,7 @@ export const Plot = (props: PlotProps) => {
|
|
|
107
107
|
|
|
108
108
|
const plotlyEl = el as unknown as PlotlyElement;
|
|
109
109
|
|
|
110
|
-
//
|
|
110
|
+
// oxlint-disable-next-line typescript/ban-types -- Plotly's event API uses generic function references
|
|
111
111
|
const attached: {
|
|
112
112
|
plotlyName: string;
|
|
113
113
|
handler: (...args: never[]) => void;
|
|
@@ -131,7 +131,7 @@ export const Plot = (props: PlotProps) => {
|
|
|
131
131
|
}
|
|
132
132
|
};
|
|
133
133
|
// Re-sync whenever any event handler prop changes
|
|
134
|
-
//
|
|
134
|
+
// oxlint-disable-next-line react-hooks/exhaustive-deps
|
|
135
135
|
},
|
|
136
136
|
EVENT_NAMES.map((name) => props[propName(name)]),
|
|
137
137
|
);
|
|
@@ -14,8 +14,17 @@ import useEvent from "react-use-event-hook";
|
|
|
14
14
|
import { useDeepCompareMemoize } from "@/hooks/useDeepCompareMemoize";
|
|
15
15
|
import { useScript } from "@/hooks/useScript";
|
|
16
16
|
import { Arrays } from "@/utils/arrays";
|
|
17
|
-
import {
|
|
18
|
-
|
|
17
|
+
import {
|
|
18
|
+
extractIndices,
|
|
19
|
+
extractPoints,
|
|
20
|
+
extractSunburstPoints,
|
|
21
|
+
extractTreemapPoints,
|
|
22
|
+
hasPureLineTrace,
|
|
23
|
+
lineSelectionButtons,
|
|
24
|
+
type ModeBarButton,
|
|
25
|
+
mergeModeBarButtonsToAdd,
|
|
26
|
+
shouldHandleClickSelection,
|
|
27
|
+
} from "./selection";
|
|
19
28
|
import { usePlotlyLayout } from "./usePlotlyLayout";
|
|
20
29
|
|
|
21
30
|
interface Data {
|
|
@@ -23,17 +32,18 @@ interface Data {
|
|
|
23
32
|
config: Partial<Plotly.Config>;
|
|
24
33
|
}
|
|
25
34
|
|
|
26
|
-
type AxisName = string;
|
|
27
|
-
type AxisDatum = unknown;
|
|
28
|
-
|
|
29
35
|
type T =
|
|
30
36
|
| {
|
|
31
|
-
points?: Record<
|
|
37
|
+
points?: Record<string, unknown>[] | Plotly.PlotDatum[];
|
|
32
38
|
indices?: number[];
|
|
33
39
|
range?: {
|
|
34
40
|
x?: number[];
|
|
35
41
|
y?: number[];
|
|
36
42
|
};
|
|
43
|
+
lasso?: {
|
|
44
|
+
x?: unknown[];
|
|
45
|
+
y?: unknown[];
|
|
46
|
+
};
|
|
37
47
|
// These are kept in the state to persist selections across re-renders
|
|
38
48
|
// on the frontend, but likely not used in the backend.
|
|
39
49
|
selections?: unknown[];
|
|
@@ -76,23 +86,6 @@ const LazyPlot = lazy(() =>
|
|
|
76
86
|
import("./Plot").then((mod) => ({ default: mod.Plot })),
|
|
77
87
|
);
|
|
78
88
|
|
|
79
|
-
const SUNBURST_DATA_KEYS: (keyof Plotly.SunburstPlotDatum)[] = [
|
|
80
|
-
"color",
|
|
81
|
-
"curveNumber",
|
|
82
|
-
"entry",
|
|
83
|
-
"hovertext",
|
|
84
|
-
"id",
|
|
85
|
-
"label",
|
|
86
|
-
"parent",
|
|
87
|
-
"percentEntry",
|
|
88
|
-
"percentParent",
|
|
89
|
-
"percentRoot",
|
|
90
|
-
"pointNumber",
|
|
91
|
-
"root",
|
|
92
|
-
"value",
|
|
93
|
-
] as const;
|
|
94
|
-
const TREE_MAP_DATA_KEYS = SUNBURST_DATA_KEYS;
|
|
95
|
-
|
|
96
89
|
export const PlotlyComponent = memo(
|
|
97
90
|
({ figure: originalFigure, value, setValue, config }: PlotlyPluginProps) => {
|
|
98
91
|
// Used for rendering LaTeX. TODO: Serve this library from Marimo
|
|
@@ -101,7 +94,7 @@ export const PlotlyComponent = memo(
|
|
|
101
94
|
);
|
|
102
95
|
const isScriptLoaded = scriptStatus === "ready";
|
|
103
96
|
|
|
104
|
-
const { figure, layout, handleReset } = usePlotlyLayout({
|
|
97
|
+
const { figure, layout, setLayout, handleReset } = usePlotlyLayout({
|
|
105
98
|
originalFigure,
|
|
106
99
|
initialValue: value,
|
|
107
100
|
isScriptLoaded,
|
|
@@ -111,31 +104,48 @@ export const PlotlyComponent = memo(
|
|
|
111
104
|
handleReset();
|
|
112
105
|
setValue({});
|
|
113
106
|
});
|
|
107
|
+
const handleSetDragmode = useEvent(
|
|
108
|
+
(dragmode: Plotly.Layout["dragmode"]) => {
|
|
109
|
+
setLayout((prev) => ({ ...prev, dragmode }));
|
|
110
|
+
setValue((prev) => ({ ...prev, dragmode }));
|
|
111
|
+
},
|
|
112
|
+
);
|
|
114
113
|
|
|
115
114
|
const configMemo = useDeepCompareMemoize(config);
|
|
116
115
|
const plotlyConfig = useMemo((): Partial<Plotly.Config> => {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
svg: `
|
|
116
|
+
const hasPureLine = hasPureLineTrace(figure.data);
|
|
117
|
+
const defaultButtons: ModeBarButton[] = [
|
|
118
|
+
// Custom button to reset the state
|
|
119
|
+
{
|
|
120
|
+
name: "reset",
|
|
121
|
+
title: "Reset state",
|
|
122
|
+
icon: {
|
|
123
|
+
svg: `
|
|
126
124
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
|
127
125
|
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-rotate-ccw">
|
|
128
126
|
<path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" />
|
|
129
127
|
<path d="M3 3v5h5" />
|
|
130
128
|
</svg>`,
|
|
131
|
-
},
|
|
132
|
-
click: handleResetWithClear,
|
|
133
129
|
},
|
|
134
|
-
|
|
130
|
+
click: handleResetWithClear,
|
|
131
|
+
},
|
|
132
|
+
];
|
|
133
|
+
if (hasPureLine) {
|
|
134
|
+
defaultButtons.push(...lineSelectionButtons(handleSetDragmode));
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
return {
|
|
138
|
+
displaylogo: false,
|
|
135
139
|
// Prioritize user's config
|
|
136
140
|
...configMemo,
|
|
141
|
+
modeBarButtonsToAdd: mergeModeBarButtonsToAdd(
|
|
142
|
+
defaultButtons,
|
|
143
|
+
configMemo.modeBarButtonsToAdd as
|
|
144
|
+
| readonly ModeBarButton[]
|
|
145
|
+
| undefined,
|
|
146
|
+
),
|
|
137
147
|
};
|
|
138
|
-
}, [handleResetWithClear, configMemo]);
|
|
148
|
+
}, [handleResetWithClear, handleSetDragmode, configMemo, figure.data]);
|
|
139
149
|
|
|
140
150
|
return (
|
|
141
151
|
<LazyPlot
|
|
@@ -170,6 +180,7 @@ export const PlotlyComponent = memo(
|
|
|
170
180
|
points: Arrays.EMPTY,
|
|
171
181
|
indices: Arrays.EMPTY,
|
|
172
182
|
range: undefined,
|
|
183
|
+
lasso: undefined,
|
|
173
184
|
};
|
|
174
185
|
});
|
|
175
186
|
})}
|
|
@@ -180,9 +191,7 @@ export const PlotlyComponent = memo(
|
|
|
180
191
|
|
|
181
192
|
setValue((prev) => ({
|
|
182
193
|
...prev,
|
|
183
|
-
points: evt.points
|
|
184
|
-
Objects.pick(point, TREE_MAP_DATA_KEYS),
|
|
185
|
-
),
|
|
194
|
+
points: extractTreemapPoints(evt.points),
|
|
186
195
|
}));
|
|
187
196
|
})}
|
|
188
197
|
onSunburstClick={useEvent((evt: Readonly<Plotly.PlotMouseEvent>) => {
|
|
@@ -192,9 +201,7 @@ export const PlotlyComponent = memo(
|
|
|
192
201
|
|
|
193
202
|
setValue((prev) => ({
|
|
194
203
|
...prev,
|
|
195
|
-
points: evt.points
|
|
196
|
-
Objects.pick(point, SUNBURST_DATA_KEYS),
|
|
197
|
-
),
|
|
204
|
+
points: extractSunburstPoints(evt.points),
|
|
198
205
|
}));
|
|
199
206
|
})}
|
|
200
207
|
config={plotlyConfig}
|
|
@@ -202,18 +209,20 @@ export const PlotlyComponent = memo(
|
|
|
202
209
|
if (!evt) {
|
|
203
210
|
return;
|
|
204
211
|
}
|
|
205
|
-
//
|
|
206
|
-
// (
|
|
207
|
-
|
|
208
|
-
(point) => point.data?.type === "heatmap",
|
|
209
|
-
);
|
|
210
|
-
if (!isHeatmap) {
|
|
212
|
+
// Handle clicks for chart types where box/lasso selection
|
|
213
|
+
// is limited or unavailable (e.g. bar, heatmaps, histograms, pure line traces).
|
|
214
|
+
if (!shouldHandleClickSelection(evt.points)) {
|
|
211
215
|
return;
|
|
212
216
|
}
|
|
217
|
+
const extractedPoints = extractPoints(evt.points);
|
|
218
|
+
const extractedIndices = extractIndices(evt.points);
|
|
213
219
|
setValue((prev) => ({
|
|
214
220
|
...prev,
|
|
215
|
-
|
|
216
|
-
|
|
221
|
+
selections: Arrays.EMPTY,
|
|
222
|
+
range: undefined,
|
|
223
|
+
lasso: undefined,
|
|
224
|
+
points: extractedPoints,
|
|
225
|
+
indices: extractedIndices,
|
|
217
226
|
}));
|
|
218
227
|
})}
|
|
219
228
|
onSelected={useEvent((evt: Readonly<Plotly.PlotSelectionEvent>) => {
|
|
@@ -226,8 +235,12 @@ export const PlotlyComponent = memo(
|
|
|
226
235
|
selections:
|
|
227
236
|
"selections" in evt ? (evt.selections as unknown[]) : [],
|
|
228
237
|
points: extractPoints(evt.points),
|
|
229
|
-
indices: evt.points
|
|
238
|
+
indices: extractIndices(evt.points),
|
|
230
239
|
range: evt.range,
|
|
240
|
+
lasso:
|
|
241
|
+
"lassoPoints" in evt
|
|
242
|
+
? (evt.lassoPoints as { x?: unknown[]; y?: unknown[] })
|
|
243
|
+
: undefined,
|
|
231
244
|
}));
|
|
232
245
|
})}
|
|
233
246
|
className="w-full"
|
|
@@ -241,54 +254,3 @@ export const PlotlyComponent = memo(
|
|
|
241
254
|
},
|
|
242
255
|
);
|
|
243
256
|
PlotlyComponent.displayName = "PlotlyComponent";
|
|
244
|
-
|
|
245
|
-
/**
|
|
246
|
-
* This is a hack to extract the points with their original keys,
|
|
247
|
-
* instead of the ones that Plotly uses internally,
|
|
248
|
-
* by using the hovertemplate.
|
|
249
|
-
*/
|
|
250
|
-
const STANDARD_POINT_KEYS: string[] = [
|
|
251
|
-
"x",
|
|
252
|
-
"y",
|
|
253
|
-
"z",
|
|
254
|
-
"lat",
|
|
255
|
-
"lon",
|
|
256
|
-
"curveNumber",
|
|
257
|
-
"pointNumber",
|
|
258
|
-
"pointNumbers",
|
|
259
|
-
"pointIndex",
|
|
260
|
-
];
|
|
261
|
-
|
|
262
|
-
function extractPoints(
|
|
263
|
-
points: Plotly.PlotDatum[],
|
|
264
|
-
): Record<AxisName, AxisDatum>[] {
|
|
265
|
-
if (!points) {
|
|
266
|
-
return [];
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
let parser: PlotlyTemplateParser | undefined;
|
|
270
|
-
|
|
271
|
-
return points.map((point) => {
|
|
272
|
-
const standardPointFields = Objects.pick(point, STANDARD_POINT_KEYS);
|
|
273
|
-
|
|
274
|
-
// Get the first hovertemplate
|
|
275
|
-
const hovertemplate = Array.isArray(point.data.hovertemplate)
|
|
276
|
-
? point.data.hovertemplate[0]
|
|
277
|
-
: point.data.hovertemplate;
|
|
278
|
-
|
|
279
|
-
// For chart types with standard point keys (e.g. heatmaps),
|
|
280
|
-
// or when there's no hovertemplate, pick keys directly from the point.
|
|
281
|
-
if (!hovertemplate || point.data?.type === "heatmap") {
|
|
282
|
-
return standardPointFields;
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
// Update or create a parser
|
|
286
|
-
parser = parser
|
|
287
|
-
? parser.update(hovertemplate)
|
|
288
|
-
: createParser(hovertemplate);
|
|
289
|
-
return {
|
|
290
|
-
...standardPointFields,
|
|
291
|
-
...parser.parse(point),
|
|
292
|
-
};
|
|
293
|
-
});
|
|
294
|
-
}
|