@marimo-team/frontend 0.16.0-dev96986 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/ConnectedDataExplorerComponent-BErMbWvG.js +19 -0
- package/dist/assets/{ImageComparisonComponent-SX7fDaTK.js → ImageComparisonComponent-fTHv1Ih0.js} +1 -1
- package/dist/assets/{VegaLite-MJUW3b7C.js → VegaLite-Bdi-TyfY.js} +1 -1
- package/dist/assets/_baseEach-CNBxBxvS.js +1 -0
- package/dist/assets/_baseMap-D1WHjKrd.js +1 -0
- package/dist/assets/_baseUniq-CCgDNtZb.js +1 -0
- package/dist/assets/{_createAggregator-ZRm2b6Zm.js → _createAggregator-DcD0kTA5.js} +1 -1
- package/dist/assets/{agent-panel-BBd11wNX.js → agent-panel-Crv430aI.js} +57 -76
- package/dist/assets/{any-language-editor-DwAaEQfS.js → any-language-editor-CQh552Wu.js} +1 -1
- package/dist/assets/{architectureDiagram-W76B3OCA-BJmVXUoW.js → architectureDiagram-W76B3OCA-BAJeBxzt.js} +1 -1
- package/dist/assets/{between-horizontal-start-KiwU-a3C.js → between-horizontal-start-Boxgxbt_.js} +1 -1
- package/dist/assets/{blockDiagram-QIGZ2CNN-DzxZjE7B.js → blockDiagram-QIGZ2CNN-CL-1svEK.js} +1 -1
- package/dist/assets/{c4Diagram-FPNF74CW-DjmldG_J.js → c4Diagram-FPNF74CW-BbEqbCTl.js} +1 -1
- package/dist/assets/channel-_2eNSz0n.js +1 -0
- package/dist/assets/chat-panel-CXh5Wl6C.js +3 -0
- package/dist/assets/{chunk-4BX2VUAB-EUTQThiZ.js → chunk-4BX2VUAB-C--8TXeE.js} +1 -1
- package/dist/assets/{chunk-55IACEB6-DZAiDJxy.js → chunk-55IACEB6-Bj00HDqq.js} +1 -1
- package/dist/assets/{chunk-FMBD7UC4-Bd0Czs-J.js → chunk-FMBD7UC4-C-lhB6hN.js} +1 -1
- package/dist/assets/{chunk-K7UQS3LO-DEKMIknX.js → chunk-K7UQS3LO-B-pGTXPt.js} +1 -1
- package/dist/assets/{chunk-QN33PNHL-E0jwHU_n.js → chunk-QN33PNHL-DqUzGhvm.js} +1 -1
- package/dist/assets/{chunk-QZHKN3VN-BzaIHJbq.js → chunk-QZHKN3VN-TntJHfSk.js} +1 -1
- package/dist/assets/{chunk-TVAH2DTR-CZFYvqnm.js → chunk-TVAH2DTR-HUJb1psV.js} +1 -1
- package/dist/assets/{chunk-TZMSLE5B-BNqnFjtv.js → chunk-TZMSLE5B-BK3C__t3.js} +1 -1
- package/dist/assets/{circle-play-D3J_mYrF.js → circle-play-DBLOv1Yu.js} +1 -1
- package/dist/assets/classDiagram-KNZD7YFC-BGmh9POF.js +1 -0
- package/dist/assets/classDiagram-v2-RKCZMP56-BGmh9POF.js +1 -0
- package/dist/assets/{clear-button-ifzRuAR3.js → clear-button-BeoFbEKH.js} +1 -1
- package/dist/assets/clone-BFDSPAj3.js +1 -0
- package/dist/assets/{command-palette-D2fdVSET.js → command-palette-CXZiSv0I.js} +1 -1
- package/dist/assets/{common-Ku-cF_2J.js → common-C7oJcmCT.js} +1 -1
- package/dist/assets/{compile-BgZlHW1c.js → compile-7L0MwhyI.js} +1 -1
- package/dist/assets/{cose-bilkent-S5V4N54A-CVM83SqK.js → cose-bilkent-S5V4N54A-BMkGLcVC.js} +1 -1
- package/dist/assets/{dagre-5GWH7T2D-ouQPkxT3.js → dagre-5GWH7T2D-BJtRienS.js} +1 -1
- package/dist/assets/{data-grid-overlay-editor-B47j5GJJ.js → data-grid-overlay-editor-DBkmGtNs.js} +1 -1
- package/dist/assets/datasources-panel-B7FbYLiy.js +1 -0
- package/dist/assets/{dependency-graph-panel-CZC_B7pK.js → dependency-graph-panel-DEdOxp2X.js} +1 -1
- package/dist/assets/{diagram-N5W7TBWH-CQ817ZdR.js → diagram-N5W7TBWH-CmECY3nb.js} +1 -1
- package/dist/assets/{diagram-QEK2KX5R-DOK_psUO.js → diagram-QEK2KX5R-DMOVSNKD.js} +1 -1
- package/dist/assets/{diagram-S2PKOQOG-CVljmOW8.js → diagram-S2PKOQOG-BiJ96PNQ.js} +1 -1
- package/dist/assets/{documentation-panel-C7yIvGg1.js → documentation-panel-xULhaEv3.js} +1 -1
- package/dist/assets/edit-page-BrYda9VE.js +129 -0
- package/dist/assets/{ellipsis-vertical-C7FjlUsY.js → ellipsis-vertical-BBqXIlc2.js} +1 -1
- package/dist/assets/{empty-state-DIOGM_CU.js → empty-state-B3dA3G5P.js} +1 -1
- package/dist/assets/{erDiagram-AWTI2OKA-DYu8cEdc.js → erDiagram-AWTI2OKA-MP1DiFRo.js} +1 -1
- package/dist/assets/{error-panel-Ddb8RkFG.js → error-panel-Cc1sv-Ag.js} +1 -1
- package/dist/assets/file-explorer-panel-Bw59Kva1.js +1 -0
- package/dist/assets/{flowDiagram-PVAE7QVJ-CmvW5iTb.js → flowDiagram-PVAE7QVJ-BX7caPp7.js} +1 -1
- package/dist/assets/{ganttDiagram-OWAHRB6G-BaKQlCaT.js → ganttDiagram-OWAHRB6G-B462g4Yf.js} +4 -4
- package/dist/assets/{gitGraphDiagram-NY62KEGX-CWO24eP6.js → gitGraphDiagram-NY62KEGX-CGgvZ9-9.js} +1 -1
- package/dist/assets/{glide-data-editor-CNDLEJ9a.js → glide-data-editor-C0gUFZON.js} +11 -11
- package/dist/assets/{graph-BZKTtxsc.js → graph-CHRVBzY5.js} +1 -1
- package/dist/assets/home-page-Fb2osjys.js +9 -0
- package/dist/assets/{index-zrSUQXha.js → index-BVgAenPd.js} +1 -1
- package/dist/assets/{index-Brf2DwUM.js → index-BY93Ejhl.js} +1 -1
- package/dist/assets/{index-CerjupfZ.js → index-C-8WADat.js} +1 -1
- package/dist/assets/{index-DZhOPkOB.js → index-C-GhZ7ti.js} +1 -1
- package/dist/assets/{index-CZaurnA9.js → index-C1v_Z9et.js} +1 -1
- package/dist/assets/{index-0XOUPdwT.js → index-C4Tn5NvJ.js} +1 -1
- package/dist/assets/{index-B_d_JZGI.js → index-C77h_TXN.js} +1 -1
- package/dist/assets/{index-BJVyzkx5.js → index-CQDrxQ0j.js} +1 -1
- package/dist/assets/{index-DFrGFNW1.js → index-CWMgowgL.js} +1 -1
- package/dist/assets/{index-DmgwT3sx.js → index-Clbi_Yaq.js} +1 -1
- package/dist/assets/{index-D-tZfElD.js → index-CpTPJo4k.js} +1 -1
- package/dist/assets/index-Cx0bsY1w.css +1 -0
- package/dist/assets/{index-DkntzpX4.js → index-D1vmG6DS.js} +1 -1
- package/dist/assets/{index-D3PqGupX.js → index-D9UKkrr2.js} +1 -1
- package/dist/assets/{index-BgXbBA39.js → index-DEQvTChO.js} +1 -1
- package/dist/assets/index-DKEudB02.js +578 -0
- package/dist/assets/{index-DCkzth56.js → index-DRMm6SNo.js} +1 -1
- package/dist/assets/{index-WXJFkQHg.js → index-DoRmcrKM.js} +1 -1
- package/dist/assets/{index-qE8lHQ-N.js → index-lYa_leQE.js} +1 -1
- package/dist/assets/{index-CXrWwFX6.js → index-vmICa5KN.js} +1 -1
- package/dist/assets/{index-BH7f3aiU.js → index-z9bohSQJ.js} +1 -1
- package/dist/assets/infoDiagram-STP46IZ2-CVyrdLc8.js +2 -0
- package/dist/assets/{isEmpty-D1t7Gran.js → isEmpty-DU_ogP_D.js} +1 -1
- package/dist/assets/{journeyDiagram-BIP6EPQ6-D4Rp6H_h.js → journeyDiagram-BIP6EPQ6-C6EgLP_Q.js} +1 -1
- package/dist/assets/{kanban-definition-6OIFK2YF-DFt9DftA.js → kanban-definition-6OIFK2YF-BXzYO1yj.js} +1 -1
- package/dist/assets/{layout-D8WXi2_g.js → layout-jihVw5-i.js} +1 -1
- package/dist/assets/{linear-BwY8e5hA.js → linear-C4blANlC.js} +1 -1
- package/dist/assets/links-D59GIweI.js +7 -0
- package/dist/assets/{logs-panel-Dxiyt7dO.js → logs-panel-D401qzZh.js} +1 -1
- package/dist/assets/{markdown-renderer-VDu-NBKB.js → markdown-renderer-Cd9eYyaL.js} +20 -20
- package/dist/assets/{mermaid-B-O-Puyi.js → mermaid-BEVuRz_O.js} +1 -1
- package/dist/assets/{mermaid.core-BFFCqfOn.js → mermaid.core-CaSnaLH0.js} +4 -4
- package/dist/assets/min-DUMu_zeK.js +1 -0
- package/dist/assets/{mindmap-definition-Q6HEUPPD-kyvIY8Dg.js → mindmap-definition-Q6HEUPPD-BXUM5MT2.js} +1 -1
- package/dist/assets/{number-overlay-editor-GjLB2UK4.js → number-overlay-editor-4uWXGlPG.js} +1 -1
- package/dist/assets/outline-panel-DIzkvm2I.js +1 -0
- package/dist/assets/{packages-panel-nfXB-bKW.js → packages-panel-CJL0MVlj.js} +1 -1
- package/dist/assets/{pieDiagram-ADFJNKIX-D8JFQcWR.js → pieDiagram-ADFJNKIX-Dxt5PVNo.js} +1 -1
- package/dist/assets/{quadrantDiagram-LMRXKWRM-Nf8GzxXG.js → quadrantDiagram-LMRXKWRM-D4pUaA31.js} +1 -1
- package/dist/assets/{react-plotly-CnW9p7ZA.js → react-plotly-cJZ0VWBq.js} +1 -1
- package/dist/assets/{requirementDiagram-4UW4RH46-CCUxF8BZ.js → requirementDiagram-4UW4RH46-DVRTjgas.js} +1 -1
- package/dist/assets/{run-page-Bl4p3AbZ.js → run-page-BUEnMC9w.js} +1 -1
- package/dist/assets/{sankeyDiagram-GR3RE2ED-Sr8kDwP1.js → sankeyDiagram-GR3RE2ED-CVFnD9C-.js} +1 -1
- package/dist/assets/{scratchpad-panel-Ja1Mu-W3.js → scratchpad-panel-BIgRENkI.js} +1 -1
- package/dist/assets/{secrets-panel-B-3fcSyP.js → secrets-panel-xY5-V_BD.js} +1 -1
- package/dist/assets/{sequenceDiagram-C3RYC4MD-CBJ152Q3.js → sequenceDiagram-C3RYC4MD-_lY4ZN_S.js} +1 -1
- package/dist/assets/{slides-component-C-LoGC1U.css → slides-component-DMjQomc3.css} +1 -1
- package/dist/assets/{slides-component-DGtsVP5o.js → slides-component-Xjymwj7X.js} +1 -1
- package/dist/assets/snippets-panel-CTPYW41n.js +1 -0
- package/dist/assets/sortBy-BNZKwiq_.js +1 -0
- package/dist/assets/{state-B_RCHTH5.js → state-C4NiC9tO.js} +1 -1
- package/dist/assets/{stateDiagram-KXAO66HF-BlBFSAZr.js → stateDiagram-KXAO66HF-Da0JQWCn.js} +1 -1
- package/dist/assets/stateDiagram-v2-UMBNRL4Z-D5lYZOOt.js +1 -0
- package/dist/assets/storage-CMdLzB_c.js +26 -0
- package/dist/assets/{terminal-CATzv5Hd.js → terminal-BPwTkXae.js} +1 -1
- package/dist/assets/{time-CsYqILfB.js → time-Dv5_Ouz_.js} +1 -1
- package/dist/assets/{timeline-definition-XQNQX7LJ-CGrhjuAs.js → timeline-definition-XQNQX7LJ-Dxh5Zu2e.js} +1 -1
- package/dist/assets/tracing-BCIurUfa.js +2 -0
- package/dist/assets/{tracing-panel-DmzqPUtc.js → tracing-panel-DAzrzNmm.js} +2 -2
- package/dist/assets/{trash-rxdjLzkf.js → trash-Dc6DSjz_.js} +1 -1
- package/dist/assets/{tree-C2Ul1h1C.js → tree-jheoerAX.js} +1 -1
- package/dist/assets/{treemap-75Q7IDZK-N9hyUpyj.js → treemap-75Q7IDZK-IgpxeGaf.js} +27 -27
- package/dist/assets/variable-panel-DYAiLBmF.js +1 -0
- package/dist/assets/{vega-component-CR_MHOBT.js → vega-component-BpfpiPKI.js} +1 -1
- package/dist/assets/worker-X5rxzQGQ.js +1 -0
- package/dist/assets/{xychartDiagram-6GGTOJPD-jdLZsMb2.js → xychartDiagram-6GGTOJPD-CmNigJ31.js} +1 -1
- package/dist/index.html +2 -2
- package/package.json +2 -3
- package/src/components/app-config/user-config-form.tsx +1 -46
- package/src/components/chat/acp/__tests__/__snapshots__/prompt.test.ts.snap +43 -62
- package/src/components/chat/acp/__tests__/atoms.test.ts +1 -1
- package/src/components/chat/acp/__tests__/state.test.ts +36 -36
- package/src/components/chat/acp/agent-panel.tsx +27 -24
- package/src/components/chat/acp/blocks.tsx +6 -6
- package/src/components/chat/acp/prompt.ts +43 -62
- package/src/components/chat/chat-panel.tsx +1 -5
- package/src/components/chat/markdown-renderer.tsx +10 -6
- package/src/components/chat/tool-call-accordion.tsx +20 -52
- package/src/components/data-table/SearchBar.tsx +7 -8
- package/src/components/data-table/__tests__/column_formatting.test.ts +35 -50
- package/src/components/data-table/__tests__/data-table.test.tsx +1 -39
- package/src/components/data-table/charts/components/form-fields.tsx +37 -41
- package/src/components/data-table/charts/forms/common-chart.tsx +2 -2
- package/src/components/data-table/column-explorer-panel/column-explorer.tsx +2 -5
- package/src/components/data-table/column-formatting/feature.ts +29 -62
- package/src/components/data-table/column-formatting/types.ts +0 -1
- package/src/components/data-table/column-header.tsx +1 -3
- package/src/components/data-table/column-summary/chart-spec-model.tsx +7 -24
- package/src/components/data-table/column-summary/column-summary.tsx +9 -18
- package/src/components/data-table/columns.tsx +18 -42
- package/src/components/data-table/data-table.tsx +2 -10
- package/src/components/data-table/date-popover.tsx +75 -85
- package/src/components/data-table/filter-pills.tsx +9 -14
- package/src/components/data-table/header-items.tsx +1 -5
- package/src/components/data-table/pagination.tsx +13 -20
- package/src/components/data-table/renderers.tsx +0 -28
- package/src/components/data-table/row-viewer-panel/row-viewer.tsx +8 -10
- package/src/components/datasources/column-preview.tsx +2 -6
- package/src/components/datasources/datasources.tsx +12 -8
- package/src/components/editor/ai/transport/chat-transport.tsx +1 -4
- package/src/components/editor/cell/CellStatus.tsx +20 -23
- package/src/components/editor/cell/CreateCellButton.tsx +4 -3
- package/src/components/editor/cell/code/language-toggle.tsx +4 -3
- package/src/components/editor/chrome/wrapper/footer-items/machine-stats.tsx +28 -39
- package/src/components/editor/controls/notebook-menu-dropdown.tsx +2 -4
- package/src/components/editor/file-tree/requesting-tree.tsx +8 -14
- package/src/components/editor/renderers/CellArray.tsx +4 -3
- package/src/components/editor/renderers/slides-layout/slides-layout.tsx +3 -3
- package/src/components/editor/renderers/slides-layout/types.ts +0 -1
- package/src/components/pages/home-page.tsx +1 -4
- package/src/components/slides/slides-component.tsx +1 -1
- package/src/components/slides/slides.css +0 -6
- package/src/components/terminal/theme.tsx +0 -1
- package/src/components/tracing/tracing-spec.ts +4 -5
- package/src/components/ui/range-slider.tsx +2 -4
- package/src/components/ui/slider.tsx +1 -3
- package/src/components/variables/variables-table.tsx +0 -3
- package/src/core/MarimoApp.tsx +6 -9
- package/src/core/ai/context/__tests__/registry.test.ts +4 -6
- package/src/core/ai/context/providers/cell-output.ts +2 -3
- package/src/core/ai/context/providers/error.ts +1 -3
- package/src/core/ai/context/providers/file.ts +2 -7
- package/src/core/ai/context/providers/tables.ts +2 -3
- package/src/core/ai/context/providers/variable.ts +4 -6
- package/src/core/cells/logs.ts +1 -1
- package/src/core/codemirror/find-replace/search-highlight.ts +1 -3
- package/src/core/codemirror/language/LanguageAdapters.ts +3 -9
- package/src/core/codemirror/lsp/notebook-lsp.ts +2 -8
- package/src/core/codemirror/readonly/__tests__/extension.test.ts +1 -1
- package/src/core/codemirror/rtc/loro/awareness.ts +17 -52
- package/src/core/codemirror/rtc/loro/sync.ts +4 -12
- package/src/core/config/config-schema.ts +0 -1
- package/src/core/config/config.ts +0 -4
- package/src/core/hotkeys/hotkeys.ts +4 -8
- package/src/core/islands/components/web-components.tsx +10 -13
- package/src/core/kernel/RuntimeState.ts +1 -4
- package/src/core/kernel/messages.ts +2 -2
- package/src/core/network/DeferredRequestRegistry.ts +4 -16
- package/src/core/runtime/runtime.ts +4 -5
- package/src/core/wasm/bridge.ts +1 -5
- package/src/core/wasm/store.ts +1 -4
- package/src/core/wasm/worker/message-buffer.ts +2 -3
- package/src/core/websocket/types.ts +16 -22
- package/src/hooks/useTimer.ts +5 -8
- package/src/plugins/core/registerReactComponent.tsx +10 -16
- package/src/plugins/impl/DataTablePlugin.tsx +0 -4
- package/src/plugins/impl/RangeSliderPlugin.tsx +3 -5
- package/src/plugins/impl/SliderPlugin.tsx +1 -3
- package/src/plugins/impl/anywidget/model.ts +5 -16
- package/src/plugins/impl/data-editor/types.ts +5 -7
- package/src/plugins/impl/data-explorer/components/column-summary.tsx +13 -20
- package/src/plugins/impl/panel/utils.ts +4 -6
- package/src/plugins/layout/StatPlugin.tsx +1 -4
- package/src/plugins/plugins.ts +0 -2
- package/src/utils/__tests__/dates.test.ts +24 -45
- package/src/utils/__tests__/numbers.test.ts +30 -42
- package/src/utils/dates.ts +10 -15
- package/src/utils/edit-distance.ts +6 -8
- package/src/utils/errors.ts +1 -1
- package/src/utils/id-tree.tsx +10 -21
- package/src/utils/localStorage.ts +4 -13
- package/src/utils/numbers.ts +11 -11
- package/src/utils/once.ts +0 -32
- package/src/utils/paths.ts +1 -4
- package/src/utils/pluralize.ts +5 -12
- package/src/utils/python-poet/poet.ts +15 -30
- package/src/utils/time.ts +1 -5
- package/dist/assets/ConnectedDataExplorerComponent-CNLoZkWr.js +0 -19
- package/dist/assets/_baseEach-9_logFrf.js +0 -1
- package/dist/assets/_baseMap-NzEbKt5c.js +0 -1
- package/dist/assets/_baseUniq-C5LFcyNC.js +0 -1
- package/dist/assets/channel-DHcKBVM4.js +0 -1
- package/dist/assets/chat-panel-DgJZr0eS.js +0 -3
- package/dist/assets/classDiagram-KNZD7YFC-D-xwLnlX.js +0 -1
- package/dist/assets/classDiagram-v2-RKCZMP56-D-xwLnlX.js +0 -1
- package/dist/assets/clone-CSxIll62.js +0 -1
- package/dist/assets/datasources-panel-Bt41Zir-.js +0 -1
- package/dist/assets/edit-page-CyTMQV2u.js +0 -129
- package/dist/assets/file-explorer-panel-Oy9DbyFP.js +0 -1
- package/dist/assets/home-page-Bvwppn9N.js +0 -9
- package/dist/assets/index-DadI618h.css +0 -1
- package/dist/assets/index-PmY0x4Zd.js +0 -578
- package/dist/assets/infoDiagram-STP46IZ2-CAuVVehw.js +0 -2
- package/dist/assets/links-4B6ldZ5P.js +0 -7
- package/dist/assets/min-DtVSfYKl.js +0 -1
- package/dist/assets/outline-panel-CMJjOoN7.js +0 -1
- package/dist/assets/snippets-panel-ClNnwKBM.js +0 -1
- package/dist/assets/sortBy-D47H6Vyl.js +0 -1
- package/dist/assets/stateDiagram-v2-UMBNRL4Z-DbA-iToo.js +0 -1
- package/dist/assets/storage-BNcWOH3-.js +0 -26
- package/dist/assets/tracing-DUbJtOyq.js +0 -2
- package/dist/assets/variable-panel-BbgupOdG.js +0 -1
- package/dist/assets/worker-fHbtoWvT.js +0 -1
- package/src/components/data-table/cell-hover-template/feature.ts +0 -14
- package/src/components/data-table/cell-hover-template/types.ts +0 -11
- package/src/core/i18n/__tests__/locale-provider.test.tsx +0 -176
- package/src/core/i18n/locale-provider.tsx +0 -35
- package/src/core/i18n/with-locale.tsx +0 -12
- package/src/hooks/useFormatting.ts +0 -97
- package/src/plugins/layout/OutlinePlugin.tsx +0 -69
- package/src/utils/__tests__/once.test.ts +0 -187
|
@@ -5,7 +5,6 @@ import {
|
|
|
5
5
|
RefreshCwIcon,
|
|
6
6
|
WorkflowIcon,
|
|
7
7
|
} from "lucide-react";
|
|
8
|
-
import { useDateFormatter } from "react-aria";
|
|
9
8
|
import { MultiIcon } from "@/components/icons/multi-icon";
|
|
10
9
|
import { Logger } from "@/utils/Logger";
|
|
11
10
|
import type { CellRuntimeState } from "../../../core/cells/types";
|
|
@@ -29,6 +28,26 @@ export interface CellStatusComponentProps
|
|
|
29
28
|
uninstantiated: boolean;
|
|
30
29
|
}
|
|
31
30
|
|
|
31
|
+
// Looks like HH:MM:SS.SSS AM/PM
|
|
32
|
+
const timeFormatter = new Intl.DateTimeFormat("en-US", {
|
|
33
|
+
hour: "numeric",
|
|
34
|
+
minute: "numeric",
|
|
35
|
+
second: "numeric",
|
|
36
|
+
fractionalSecondDigits: 3,
|
|
37
|
+
hour12: true,
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
// Looks like MM/DD HH:MM:SS.SSS AM/PM
|
|
41
|
+
const dateTimeFormatter = new Intl.DateTimeFormat("en-US", {
|
|
42
|
+
month: "numeric",
|
|
43
|
+
day: "numeric",
|
|
44
|
+
hour: "numeric",
|
|
45
|
+
minute: "numeric",
|
|
46
|
+
second: "numeric",
|
|
47
|
+
fractionalSecondDigits: 3,
|
|
48
|
+
hour12: true,
|
|
49
|
+
});
|
|
50
|
+
|
|
32
51
|
export const CellStatusComponent: React.FC<CellStatusComponentProps> = ({
|
|
33
52
|
editing,
|
|
34
53
|
status,
|
|
@@ -310,32 +329,10 @@ export const ElapsedTime = (props: { elapsedTime: string }) => {
|
|
|
310
329
|
const LastRanTime = (props: { lastRanTime: number }) => {
|
|
311
330
|
const date = new Date(props.lastRanTime * 1000);
|
|
312
331
|
const today = new Date();
|
|
313
|
-
|
|
314
|
-
// Looks like HH:MM:SS.SSS AM/PM
|
|
315
|
-
const timeFormatter = useDateFormatter({
|
|
316
|
-
hour: "numeric",
|
|
317
|
-
minute: "numeric",
|
|
318
|
-
second: "numeric",
|
|
319
|
-
fractionalSecondDigits: 3,
|
|
320
|
-
hour12: true,
|
|
321
|
-
});
|
|
322
|
-
|
|
323
|
-
// Looks like MM/DD HH:MM:SS.SSS AM/PM
|
|
324
|
-
const dateTimeFormatter = useDateFormatter({
|
|
325
|
-
month: "numeric",
|
|
326
|
-
day: "numeric",
|
|
327
|
-
hour: "numeric",
|
|
328
|
-
minute: "numeric",
|
|
329
|
-
second: "numeric",
|
|
330
|
-
fractionalSecondDigits: 3,
|
|
331
|
-
hour12: true,
|
|
332
|
-
});
|
|
333
|
-
|
|
334
332
|
const formatter =
|
|
335
333
|
date.toDateString() === today.toDateString()
|
|
336
334
|
? timeFormatter
|
|
337
335
|
: dateTimeFormatter;
|
|
338
|
-
|
|
339
336
|
return (
|
|
340
337
|
<span>
|
|
341
338
|
Ran at{" "}
|
|
@@ -9,7 +9,8 @@ import {
|
|
|
9
9
|
} from "@/components/ui/context-menu";
|
|
10
10
|
import { maybeAddMarimoImport } from "@/core/cells/add-missing-import";
|
|
11
11
|
import { useCellActions } from "@/core/cells/cells";
|
|
12
|
-
import {
|
|
12
|
+
import { MarkdownLanguageAdapter } from "@/core/codemirror/language/languages/markdown";
|
|
13
|
+
import { SQLLanguageAdapter } from "@/core/codemirror/language/languages/sql/sql";
|
|
13
14
|
import {
|
|
14
15
|
getConnectionTooltip,
|
|
15
16
|
isAppInteractionDisabled,
|
|
@@ -102,7 +103,7 @@ const CreateCellButtonContextMenu = (props: {
|
|
|
102
103
|
evt.stopPropagation();
|
|
103
104
|
maybeAddMarimoImport({ autoInstantiate: true, createNewCell });
|
|
104
105
|
onClick({
|
|
105
|
-
code:
|
|
106
|
+
code: new MarkdownLanguageAdapter().defaultCode,
|
|
106
107
|
hideCode: true,
|
|
107
108
|
});
|
|
108
109
|
}}
|
|
@@ -117,7 +118,7 @@ const CreateCellButtonContextMenu = (props: {
|
|
|
117
118
|
onSelect={(evt) => {
|
|
118
119
|
evt.stopPropagation();
|
|
119
120
|
maybeAddMarimoImport({ autoInstantiate: true, createNewCell });
|
|
120
|
-
onClick({ code:
|
|
121
|
+
onClick({ code: new SQLLanguageAdapter().defaultCode });
|
|
121
122
|
}}
|
|
122
123
|
>
|
|
123
124
|
<div className="mr-3 text-muted-foreground">
|
|
@@ -7,7 +7,8 @@ import { useMemo } from "react";
|
|
|
7
7
|
import { Button } from "@/components/ui/button";
|
|
8
8
|
import { Tooltip } from "@/components/ui/tooltip";
|
|
9
9
|
import { switchLanguage } from "@/core/codemirror/language/extension";
|
|
10
|
-
import {
|
|
10
|
+
import { MarkdownLanguageAdapter } from "@/core/codemirror/language/languages/markdown";
|
|
11
|
+
import { SQLLanguageAdapter } from "@/core/codemirror/language/languages/sql/sql";
|
|
11
12
|
import type { LanguageAdapter } from "@/core/codemirror/language/types";
|
|
12
13
|
import { Functions } from "@/utils/functions";
|
|
13
14
|
import { MarkdownIcon, PythonIcon } from "./icons";
|
|
@@ -26,11 +27,11 @@ export const LanguageToggles: React.FC<LanguageTogglesProps> = ({
|
|
|
26
27
|
onAfterToggle,
|
|
27
28
|
}) => {
|
|
28
29
|
const canUseMarkdown = useMemo(
|
|
29
|
-
() =>
|
|
30
|
+
() => new MarkdownLanguageAdapter().isSupported(code) || code.trim() === "",
|
|
30
31
|
[code],
|
|
31
32
|
);
|
|
32
33
|
const canUseSQL = useMemo(
|
|
33
|
-
() =>
|
|
34
|
+
() => new SQLLanguageAdapter().isSupported(code) || code.trim() === "",
|
|
34
35
|
[code],
|
|
35
36
|
);
|
|
36
37
|
|
|
@@ -4,7 +4,6 @@ import { useAtomValue } from "jotai";
|
|
|
4
4
|
import { CpuIcon, MemoryStickIcon, MicrochipIcon } from "lucide-react";
|
|
5
5
|
import type React from "react";
|
|
6
6
|
import { useState } from "react";
|
|
7
|
-
import { useNumberFormatter } from "react-aria";
|
|
8
7
|
import { Tooltip } from "@/components/ui/tooltip";
|
|
9
8
|
import { connectionAtom } from "@/core/network/connection";
|
|
10
9
|
import { useRequestClient } from "@/core/network/requests";
|
|
@@ -57,42 +56,23 @@ const MemoryUsageBar: React.FC<{
|
|
|
57
56
|
}> = ({ memory, kernel, server }) => {
|
|
58
57
|
const { percent, total, available } = memory;
|
|
59
58
|
const roundedPercent = Math.round(percent);
|
|
60
|
-
|
|
61
|
-
const gbFormatter = useNumberFormatter({
|
|
62
|
-
maximumFractionDigits: 2,
|
|
63
|
-
});
|
|
64
|
-
const mbFormatter = useNumberFormatter({
|
|
65
|
-
maximumFractionDigits: 0,
|
|
66
|
-
});
|
|
67
|
-
|
|
68
|
-
const formatBytes = (bytes: number): string => {
|
|
69
|
-
if (bytes > 1024 * 1024 * 1024) {
|
|
70
|
-
return `${gbFormatter.format(bytes / (1024 * 1024 * 1024))} GB`;
|
|
71
|
-
}
|
|
72
|
-
return `${mbFormatter.format(bytes / (1024 * 1024))} MB`;
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
const formatGB = (bytes: number): string => {
|
|
76
|
-
return gbFormatter.format(bytes / (1024 * 1024 * 1024));
|
|
77
|
-
};
|
|
78
|
-
|
|
79
59
|
return (
|
|
80
60
|
<Tooltip
|
|
81
61
|
delayDuration={200}
|
|
82
62
|
content={
|
|
83
63
|
<div className="flex flex-col gap-1">
|
|
84
64
|
<span>
|
|
85
|
-
<b>computer memory:</b> {
|
|
86
|
-
|
|
65
|
+
<b>computer memory:</b> {asGB(total - available)} / {asGB(total)} GB
|
|
66
|
+
({roundedPercent}%)
|
|
87
67
|
</span>
|
|
88
68
|
{server?.memory && (
|
|
89
69
|
<span>
|
|
90
|
-
<b>marimo server:</b> {
|
|
70
|
+
<b>marimo server:</b> {asGBorMB(server.memory)}
|
|
91
71
|
</span>
|
|
92
72
|
)}
|
|
93
73
|
{kernel?.memory && (
|
|
94
74
|
<span>
|
|
95
|
-
<b>kernel:</b> {
|
|
75
|
+
<b>kernel:</b> {asGBorMB(kernel.memory)}
|
|
96
76
|
</span>
|
|
97
77
|
)}
|
|
98
78
|
</div>
|
|
@@ -142,20 +122,6 @@ const GPUBar: React.FC<{ gpus: GPU[] }> = ({ gpus }) => {
|
|
|
142
122
|
gpus.length,
|
|
143
123
|
);
|
|
144
124
|
|
|
145
|
-
const gbFormatter = useNumberFormatter({
|
|
146
|
-
maximumFractionDigits: 2,
|
|
147
|
-
});
|
|
148
|
-
const mbFormatter = useNumberFormatter({
|
|
149
|
-
maximumFractionDigits: 0,
|
|
150
|
-
});
|
|
151
|
-
|
|
152
|
-
const formatBytes = (bytes: number): string => {
|
|
153
|
-
if (bytes > 1024 * 1024 * 1024) {
|
|
154
|
-
return `${gbFormatter.format(bytes / (1024 * 1024 * 1024))} GB`;
|
|
155
|
-
}
|
|
156
|
-
return `${mbFormatter.format(bytes / (1024 * 1024))} MB`;
|
|
157
|
-
};
|
|
158
|
-
|
|
159
125
|
return (
|
|
160
126
|
<Tooltip
|
|
161
127
|
delayDuration={200}
|
|
@@ -166,7 +132,7 @@ const GPUBar: React.FC<{ gpus: GPU[] }> = ({ gpus }) => {
|
|
|
166
132
|
<b>
|
|
167
133
|
GPU {gpu.index} ({gpu.name}):
|
|
168
134
|
</b>{" "}
|
|
169
|
-
{
|
|
135
|
+
{asGBorMB(gpu.memory.used)} / {asGBorMB(gpu.memory.total)} GB (
|
|
170
136
|
{Math.round(gpu.memory.percent)}%)
|
|
171
137
|
</span>
|
|
172
138
|
))}
|
|
@@ -194,3 +160,26 @@ const Bar: React.FC<{ percent: number; colorClassName?: string }> = ({
|
|
|
194
160
|
</div>
|
|
195
161
|
);
|
|
196
162
|
};
|
|
163
|
+
|
|
164
|
+
function asGBorMB(bytes: number): string {
|
|
165
|
+
if (bytes > 1024 * 1024 * 1024) {
|
|
166
|
+
return `${asGB(bytes)} GB`;
|
|
167
|
+
}
|
|
168
|
+
return `${asMB(bytes)} MB`;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
function asMB(bytes: number) {
|
|
172
|
+
// 0 decimal places
|
|
173
|
+
const format = new Intl.NumberFormat("en-US", {
|
|
174
|
+
maximumFractionDigits: 0,
|
|
175
|
+
});
|
|
176
|
+
return format.format(bytes / (1024 * 1024));
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
function asGB(bytes: number) {
|
|
180
|
+
// At most 2 decimal places
|
|
181
|
+
const format = new Intl.NumberFormat("en-US", {
|
|
182
|
+
maximumFractionDigits: 2,
|
|
183
|
+
});
|
|
184
|
+
return format.format(bytes / (1024 * 1024 * 1024));
|
|
185
|
+
}
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
import { MenuIcon } from "lucide-react";
|
|
4
4
|
import React from "react";
|
|
5
|
-
import { useLocale } from "react-aria";
|
|
6
5
|
import { Button } from "@/components/editor/inputs/Inputs";
|
|
7
6
|
import {
|
|
8
7
|
DropdownMenu,
|
|
@@ -34,7 +33,7 @@ export const NotebookMenuDropdown: React.FC<Props> = ({
|
|
|
34
33
|
tooltip = "Actions",
|
|
35
34
|
}) => {
|
|
36
35
|
const actions = useNotebookActions();
|
|
37
|
-
|
|
36
|
+
|
|
38
37
|
// Create tooltip content with keyboard shortcut decoration
|
|
39
38
|
const tooltipContent = (
|
|
40
39
|
<div className="flex flex-col gap-2">
|
|
@@ -149,8 +148,7 @@ export const NotebookMenuDropdown: React.FC<Props> = ({
|
|
|
149
148
|
);
|
|
150
149
|
})}
|
|
151
150
|
<DropdownMenuSeparator />
|
|
152
|
-
<div className="flex-1 px-2 text-xs text-muted-foreground
|
|
153
|
-
<span>Locale: {locale}</span>
|
|
151
|
+
<div className="flex-1 px-2 text-xs text-muted-foreground">
|
|
154
152
|
<span>Version: {getMarimoVersion()}</span>
|
|
155
153
|
</div>
|
|
156
154
|
</DropdownMenuContent>
|
|
@@ -13,21 +13,15 @@ import { type FilePath, PathBuilder } from "@/utils/paths";
|
|
|
13
13
|
|
|
14
14
|
export class RequestingTree {
|
|
15
15
|
private delegate = new SimpleTree<FileInfo>([]);
|
|
16
|
-
private callbacks: {
|
|
17
|
-
listFiles: EditRequests["sendListFiles"];
|
|
18
|
-
createFileOrFolder: EditRequests["sendCreateFileOrFolder"];
|
|
19
|
-
deleteFileOrFolder: EditRequests["sendDeleteFileOrFolder"];
|
|
20
|
-
renameFileOrFolder: EditRequests["sendRenameFileOrFolder"];
|
|
21
|
-
};
|
|
22
16
|
|
|
23
|
-
constructor(
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
17
|
+
constructor(
|
|
18
|
+
private callbacks: {
|
|
19
|
+
listFiles: EditRequests["sendListFiles"];
|
|
20
|
+
createFileOrFolder: EditRequests["sendCreateFileOrFolder"];
|
|
21
|
+
deleteFileOrFolder: EditRequests["sendDeleteFileOrFolder"];
|
|
22
|
+
renameFileOrFolder: EditRequests["sendRenameFileOrFolder"];
|
|
23
|
+
},
|
|
24
|
+
) {}
|
|
31
25
|
|
|
32
26
|
private rootPath: FilePath = "" as FilePath;
|
|
33
27
|
private onChange: (data: FileInfo[]) => void = Functions.NOOP;
|
|
@@ -20,7 +20,8 @@ import { SortableCellsProvider } from "@/components/sort/SortableCellsProvider";
|
|
|
20
20
|
import { Button } from "@/components/ui/button";
|
|
21
21
|
import { Tooltip } from "@/components/ui/tooltip";
|
|
22
22
|
import { maybeAddMarimoImport } from "@/core/cells/add-missing-import";
|
|
23
|
-
import {
|
|
23
|
+
import { MarkdownLanguageAdapter } from "@/core/codemirror/language/languages/markdown";
|
|
24
|
+
import { SQLLanguageAdapter } from "@/core/codemirror/language/languages/sql/sql";
|
|
24
25
|
import { aiEnabledAtom } from "@/core/config/config";
|
|
25
26
|
import { isConnectedAtom } from "@/core/network/connection";
|
|
26
27
|
import { useBoolean } from "@/hooks/useBoolean";
|
|
@@ -287,7 +288,7 @@ const AddCellButtons: React.FC<{
|
|
|
287
288
|
createNewCell({
|
|
288
289
|
cellId: { type: "__end__", columnId },
|
|
289
290
|
before: false,
|
|
290
|
-
code:
|
|
291
|
+
code: new MarkdownLanguageAdapter().defaultCode,
|
|
291
292
|
hideCode: true,
|
|
292
293
|
});
|
|
293
294
|
}}
|
|
@@ -306,7 +307,7 @@ const AddCellButtons: React.FC<{
|
|
|
306
307
|
createNewCell({
|
|
307
308
|
cellId: { type: "__end__", columnId },
|
|
308
309
|
before: false,
|
|
309
|
-
code:
|
|
310
|
+
code: new SQLLanguageAdapter().defaultCode,
|
|
310
311
|
});
|
|
311
312
|
}}
|
|
312
313
|
>
|
|
@@ -24,7 +24,7 @@ export const SlidesLayoutRenderer: React.FC<Props> = ({
|
|
|
24
24
|
const isReading = mode === "read";
|
|
25
25
|
|
|
26
26
|
const slides = (
|
|
27
|
-
<LazySlidesComponent forceKeyboardNavigation={true}
|
|
27
|
+
<LazySlidesComponent forceKeyboardNavigation={true}>
|
|
28
28
|
{cells.map((cell) => {
|
|
29
29
|
const isOutputEmpty = cell.output == null || cell.output.data === "";
|
|
30
30
|
if (isOutputEmpty) {
|
|
@@ -45,10 +45,10 @@ export const SlidesLayoutRenderer: React.FC<Props> = ({
|
|
|
45
45
|
);
|
|
46
46
|
|
|
47
47
|
if (isReading) {
|
|
48
|
-
return <div className="p-4
|
|
48
|
+
return <div className="p-4">{slides}</div>;
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
return <div className="pr-
|
|
51
|
+
return <div className="pr-9">{slides}</div>;
|
|
52
52
|
};
|
|
53
53
|
|
|
54
54
|
interface SlideProps extends Pick<CellRuntimeState, "output" | "status"> {
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* The serialized form of a slides layout.
|
|
6
6
|
* This must be backwards-compatible as it is stored on the user's disk.
|
|
7
7
|
*/
|
|
8
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
9
8
|
export type SerializedSlidesLayout = {};
|
|
10
9
|
|
|
11
10
|
export interface SlidesLayout extends SerializedSlidesLayout {
|
|
@@ -21,7 +21,6 @@ import {
|
|
|
21
21
|
Tree,
|
|
22
22
|
type TreeApi,
|
|
23
23
|
} from "react-arborist";
|
|
24
|
-
import { useLocale } from "react-aria";
|
|
25
24
|
import { MarkdownIcon } from "@/components/editor/cell/code/icons";
|
|
26
25
|
import { useImperativeModal } from "@/components/modal/ImperativeModal";
|
|
27
26
|
import { AlertDialogDestructiveAction } from "@/components/ui/alert-dialog";
|
|
@@ -384,8 +383,6 @@ const NotebookList: React.FC<{
|
|
|
384
383
|
};
|
|
385
384
|
|
|
386
385
|
const MarimoFileComponent = ({ file }: { file: MarimoFile }) => {
|
|
387
|
-
const { locale } = useLocale();
|
|
388
|
-
|
|
389
386
|
// If path is a sessionId, then it has not been saved yet
|
|
390
387
|
// We want to keep the sessionId in this case
|
|
391
388
|
const isNewNotebook = isSessionId(file.path);
|
|
@@ -430,7 +427,7 @@ const MarimoFileComponent = ({ file }: { file: MarimoFile }) => {
|
|
|
430
427
|
</div>
|
|
431
428
|
{!!file.lastModified && (
|
|
432
429
|
<div className="text-xs text-muted-foreground opacity-80">
|
|
433
|
-
{timeAgo(file.lastModified * 1000
|
|
430
|
+
{timeAgo(file.lastModified * 1000)}
|
|
434
431
|
</div>
|
|
435
432
|
)}
|
|
436
433
|
</div>
|
|
@@ -95,7 +95,7 @@ const SlidesComponent = ({
|
|
|
95
95
|
}}
|
|
96
96
|
className={cn(
|
|
97
97
|
"h-full w-full flex box-border overflow-y-auto overflow-x-hidden",
|
|
98
|
-
isFullscreen ? "p-20" : "p-6
|
|
98
|
+
isFullscreen ? "p-20" : "p-6",
|
|
99
99
|
)}
|
|
100
100
|
>
|
|
101
101
|
<div className="mo-slide-content">{child}</div>
|
|
@@ -68,7 +68,6 @@ so we are resetting this back to initial. */
|
|
|
68
68
|
width: 100%;
|
|
69
69
|
display: flex;
|
|
70
70
|
justify-content: center;
|
|
71
|
-
min-height: fit-content;
|
|
72
71
|
|
|
73
72
|
/* width is normally set to 100%, but we want the content to be centered around
|
|
74
73
|
the width needed. */
|
|
@@ -80,11 +79,6 @@ so we are resetting this back to initial. */
|
|
|
80
79
|
width: unset;
|
|
81
80
|
}
|
|
82
81
|
|
|
83
|
-
/* If the first output is the only child, make it flex 1 */
|
|
84
|
-
> *:only-child > .output:only-child {
|
|
85
|
-
flex: 1;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
82
|
/* Components that should be full width when in slides mode */
|
|
89
83
|
div:has(> marimo-ui-element > marimo-vega) {
|
|
90
84
|
display: block !important;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/* Copyright 2024 Marimo. All rights reserved. */
|
|
2
2
|
|
|
3
3
|
import type { TopLevelSpec } from "vega-lite";
|
|
4
|
-
import type { TimeUnit } from "vega-lite/build/src/timeunit";
|
|
5
4
|
import type { CellId } from "@/core/cells/ids";
|
|
6
5
|
import type { CellRun } from "@/core/cells/runs";
|
|
7
6
|
import type { ResolvedTheme } from "@/theme/useTheme";
|
|
@@ -31,8 +30,6 @@ export function createGanttBaseSpec(
|
|
|
31
30
|
chartPosition: ChartPosition,
|
|
32
31
|
theme: ResolvedTheme,
|
|
33
32
|
): Readonly<TopLevelSpec> {
|
|
34
|
-
// @ts-expect-error - Supported by vega/vega-lite but invalid "TimeUnit" option from exported type
|
|
35
|
-
const timeUnit: TimeUnit = "hoursminutessecondsmilliseconds";
|
|
36
33
|
return {
|
|
37
34
|
$schema: "https://vega.github.io/schema/vega-lite/v5.json",
|
|
38
35
|
background: theme === "dark" ? "black" : undefined,
|
|
@@ -79,13 +76,15 @@ export function createGanttBaseSpec(
|
|
|
79
76
|
{
|
|
80
77
|
field: startTimestampField,
|
|
81
78
|
type: "temporal",
|
|
82
|
-
|
|
79
|
+
// @ts-expect-error - Supported by vega/vega-lite but invalid "TimeUnit" option from exported type
|
|
80
|
+
timeUnit: "hoursminutessecondsmilliseconds",
|
|
83
81
|
title: "Start",
|
|
84
82
|
},
|
|
85
83
|
{
|
|
86
84
|
field: endTimestampField,
|
|
87
85
|
type: "temporal",
|
|
88
|
-
|
|
86
|
+
// @ts-expect-error - Supported by vega/vega-lite but invalid "TimeUnit" option from exported type
|
|
87
|
+
timeUnit: "hoursminutessecondsmilliseconds",
|
|
89
88
|
title: "End",
|
|
90
89
|
},
|
|
91
90
|
],
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
import * as SliderPrimitive from "@radix-ui/react-slider";
|
|
4
4
|
import { TooltipPortal } from "@radix-ui/react-tooltip";
|
|
5
5
|
import * as React from "react";
|
|
6
|
-
import { useLocale } from "react-aria";
|
|
7
6
|
import { cn } from "@/utils/cn";
|
|
8
7
|
import { prettyScientificNumber } from "@/utils/numbers";
|
|
9
8
|
import { useBoolean } from "../../hooks/useBoolean";
|
|
@@ -21,7 +20,6 @@ const RangeSlider = React.forwardRef<
|
|
|
21
20
|
}
|
|
22
21
|
>(({ className, valueMap, ...props }, ref) => {
|
|
23
22
|
const [open, openActions] = useBoolean(false);
|
|
24
|
-
const { locale } = useLocale();
|
|
25
23
|
|
|
26
24
|
return (
|
|
27
25
|
<SliderPrimitive.Root
|
|
@@ -68,7 +66,7 @@ const RangeSlider = React.forwardRef<
|
|
|
68
66
|
<TooltipPortal>
|
|
69
67
|
{props.value != null && props.value.length === 2 && (
|
|
70
68
|
<TooltipContent key={props.value[0]}>
|
|
71
|
-
{prettyScientificNumber(valueMap(props.value[0])
|
|
69
|
+
{prettyScientificNumber(valueMap(props.value[0]))}
|
|
72
70
|
</TooltipContent>
|
|
73
71
|
)}
|
|
74
72
|
</TooltipPortal>
|
|
@@ -89,7 +87,7 @@ const RangeSlider = React.forwardRef<
|
|
|
89
87
|
<TooltipPortal>
|
|
90
88
|
{props.value != null && props.value.length === 2 && (
|
|
91
89
|
<TooltipContent key={props.value[1]}>
|
|
92
|
-
{prettyScientificNumber(valueMap(props.value[1])
|
|
90
|
+
{prettyScientificNumber(valueMap(props.value[1]))}
|
|
93
91
|
</TooltipContent>
|
|
94
92
|
)}
|
|
95
93
|
</TooltipPortal>
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
import * as SliderPrimitive from "@radix-ui/react-slider";
|
|
4
4
|
import { TooltipPortal } from "@radix-ui/react-tooltip";
|
|
5
5
|
import * as React from "react";
|
|
6
|
-
import { useLocale } from "react-aria";
|
|
7
6
|
import { cn } from "@/utils/cn";
|
|
8
7
|
import { prettyScientificNumber } from "@/utils/numbers";
|
|
9
8
|
import { useBoolean } from "../../hooks/useBoolean";
|
|
@@ -21,7 +20,6 @@ const Slider = React.forwardRef<
|
|
|
21
20
|
}
|
|
22
21
|
>(({ className, valueMap, ...props }, ref) => {
|
|
23
22
|
const [open, openActions] = useBoolean(false);
|
|
24
|
-
const { locale } = useLocale();
|
|
25
23
|
|
|
26
24
|
return (
|
|
27
25
|
<SliderPrimitive.Root
|
|
@@ -68,7 +66,7 @@ const Slider = React.forwardRef<
|
|
|
68
66
|
<TooltipPortal>
|
|
69
67
|
{props.value != null && props.value.length === 1 && (
|
|
70
68
|
<TooltipContent key={props.value[0]}>
|
|
71
|
-
{prettyScientificNumber(valueMap(props.value[0])
|
|
69
|
+
{prettyScientificNumber(valueMap(props.value[0]))}
|
|
72
70
|
</TooltipContent>
|
|
73
71
|
)}
|
|
74
72
|
</TooltipPortal>
|
|
@@ -14,7 +14,6 @@ import {
|
|
|
14
14
|
import { sortBy } from "lodash-es";
|
|
15
15
|
import { SquareEqualIcon, WorkflowIcon } from "lucide-react";
|
|
16
16
|
import React, { memo, useMemo } from "react";
|
|
17
|
-
import { useLocale } from "react-aria";
|
|
18
17
|
import { CellLink } from "@/components/editor/links/cell-link";
|
|
19
18
|
import { getCellEditorView, useCellNames } from "@/core/cells/cells";
|
|
20
19
|
import type { CellId } from "@/core/cells/ids";
|
|
@@ -234,7 +233,6 @@ export const VariableTable: React.FC<Props> = memo(
|
|
|
234
233
|
const [sorting, setSorting] = React.useState<SortingState>([]);
|
|
235
234
|
const [globalFilter, setGlobalFilter] = React.useState("");
|
|
236
235
|
const cellNames = useCellNames();
|
|
237
|
-
const { locale } = useLocale();
|
|
238
236
|
|
|
239
237
|
const resolvedVariables: ResolvedVariable[] = useMemo(() => {
|
|
240
238
|
const getName = (id: CellId) => {
|
|
@@ -281,7 +279,6 @@ export const VariableTable: React.FC<Props> = memo(
|
|
|
281
279
|
globalFilterFn: "auto",
|
|
282
280
|
// sorting
|
|
283
281
|
manualSorting: true,
|
|
284
|
-
locale: locale,
|
|
285
282
|
onSortingChange: setSorting,
|
|
286
283
|
getSortedRowModel: getSortedRowModel(),
|
|
287
284
|
state: {
|
package/src/core/MarimoApp.tsx
CHANGED
|
@@ -15,7 +15,6 @@ import { ErrorBoundary } from "../components/editor/boundary/ErrorBoundary";
|
|
|
15
15
|
import { ModalProvider } from "../components/modal/ImperativeModal";
|
|
16
16
|
import { Toaster } from "../components/ui/toaster";
|
|
17
17
|
import { TooltipProvider } from "../components/ui/tooltip";
|
|
18
|
-
import { LocaleProvider } from "./i18n/locale-provider";
|
|
19
18
|
import { slotsController } from "./slots/slots";
|
|
20
19
|
|
|
21
20
|
// Force tailwind classnames
|
|
@@ -70,7 +69,7 @@ export const MarimoApp: React.FC = memo(() => {
|
|
|
70
69
|
<CssVariables
|
|
71
70
|
variables={{ "--marimo-code-editor-font-size": editorFontSize }}
|
|
72
71
|
>
|
|
73
|
-
|
|
72
|
+
{renderBody()}
|
|
74
73
|
</CssVariables>
|
|
75
74
|
</Providers>
|
|
76
75
|
);
|
|
@@ -86,13 +85,11 @@ const Providers = memo(({ children }: PropsWithChildren) => {
|
|
|
86
85
|
<Suspense>
|
|
87
86
|
<TooltipProvider>
|
|
88
87
|
<SlotzProvider controller={slotsController}>
|
|
89
|
-
<
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
</ModalProvider>
|
|
95
|
-
</LocaleProvider>
|
|
88
|
+
<ModalProvider>
|
|
89
|
+
{children}
|
|
90
|
+
<Toaster />
|
|
91
|
+
<TailwindIndicator />
|
|
92
|
+
</ModalProvider>
|
|
96
93
|
</SlotzProvider>
|
|
97
94
|
</TooltipProvider>
|
|
98
95
|
</Suspense>
|
|
@@ -101,13 +101,11 @@ class AttachmentContextProvider extends AIContextProvider<MockContextItem> {
|
|
|
101
101
|
readonly mentionPrefix = "@";
|
|
102
102
|
readonly contextType = "attachment";
|
|
103
103
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
104
|
+
constructor(
|
|
105
|
+
private items: MockContextItem[] = [],
|
|
106
|
+
private attachments: FileUIPart[] = [],
|
|
107
|
+
) {
|
|
108
108
|
super();
|
|
109
|
-
this.items = items;
|
|
110
|
-
this.attachments = attachments;
|
|
111
109
|
}
|
|
112
110
|
|
|
113
111
|
getItems(): MockContextItem[] {
|
|
@@ -86,10 +86,9 @@ export class CellOutputContextProvider extends AIContextProvider<CellOutputConte
|
|
|
86
86
|
readonly title = "Cell Outputs";
|
|
87
87
|
readonly mentionPrefix = "@";
|
|
88
88
|
readonly contextType = "cell-output";
|
|
89
|
-
|
|
90
|
-
constructor(store: JotaiStore) {
|
|
89
|
+
|
|
90
|
+
constructor(private store: JotaiStore) {
|
|
91
91
|
super();
|
|
92
|
-
this.store = store;
|
|
93
92
|
}
|
|
94
93
|
|
|
95
94
|
getItems(): CellOutputContextItem[] {
|
|
@@ -64,11 +64,9 @@ export class ErrorContextProvider extends AIContextProvider<ErrorContextItem> {
|
|
|
64
64
|
readonly title = "Errors";
|
|
65
65
|
readonly mentionPrefix = "@";
|
|
66
66
|
readonly contextType = "error";
|
|
67
|
-
private store: JotaiStore;
|
|
68
67
|
|
|
69
|
-
constructor(store: JotaiStore) {
|
|
68
|
+
constructor(private store: JotaiStore) {
|
|
70
69
|
super();
|
|
71
|
-
this.store = store;
|
|
72
70
|
}
|
|
73
71
|
|
|
74
72
|
getItems(): ErrorContextItem[] {
|
|
@@ -43,16 +43,11 @@ export class FileContextProvider extends AIContextProvider<FileContextItem> {
|
|
|
43
43
|
readonly mentionPrefix = "#";
|
|
44
44
|
readonly contextType = "file";
|
|
45
45
|
|
|
46
|
-
private apiRequests: EditRequests & RunRequests;
|
|
47
|
-
private config: FileSearchConfig;
|
|
48
|
-
|
|
49
46
|
constructor(
|
|
50
|
-
apiRequests: EditRequests & RunRequests,
|
|
51
|
-
config: FileSearchConfig = DEFAULT_FILE_SEARCH_CONFIG,
|
|
47
|
+
private apiRequests: EditRequests & RunRequests,
|
|
48
|
+
private config: FileSearchConfig = DEFAULT_FILE_SEARCH_CONFIG,
|
|
52
49
|
) {
|
|
53
50
|
super();
|
|
54
|
-
this.apiRequests = apiRequests;
|
|
55
|
-
this.config = config;
|
|
56
51
|
}
|
|
57
52
|
|
|
58
53
|
/**
|
|
@@ -17,10 +17,9 @@ export class TableContextProvider extends AIContextProvider<TableContextItem> {
|
|
|
17
17
|
readonly title = "Tables";
|
|
18
18
|
readonly mentionPrefix = "@";
|
|
19
19
|
readonly contextType = "data";
|
|
20
|
-
|
|
21
|
-
constructor(tablesMap: DatasetTablesMap) {
|
|
20
|
+
|
|
21
|
+
constructor(private tablesMap: DatasetTablesMap) {
|
|
22
22
|
super();
|
|
23
|
-
this.tablesMap = tablesMap;
|
|
24
23
|
}
|
|
25
24
|
|
|
26
25
|
getItems(): TableContextItem[] {
|