@marimo-team/frontend 0.14.18-dev5 → 0.14.18-dev50
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-s7RGpPDV.js → ConnectedDataExplorerComponent-DYTZw6fj.js} +1 -1
- package/dist/assets/{ImageComparisonComponent-CnrulJpr.js → ImageComparisonComponent-BAA_ijuq.js} +1 -1
- package/dist/assets/{VegaLite-C2fs5zc3.js → VegaLite-ClUb-74L.js} +1 -1
- package/dist/assets/{_baseEach-c_dyjc-O.js → _baseEach-3O5Pzq2d.js} +1 -1
- package/dist/assets/_baseMap-DG_WUib9.js +1 -0
- package/dist/assets/{_baseUniq-MHRYxaEh.js → _baseUniq-BXDKAuGS.js} +1 -1
- package/dist/assets/{_createAggregator-BRrHJm-S.js → _createAggregator-BIg6TnU4.js} +1 -1
- package/dist/assets/{any-language-editor-BvO3QFMF.js → any-language-editor-DFx4-Rvw.js} +1 -1
- package/dist/assets/{architectureDiagram-SUXI7LT5-NdrSJuvB.js → architectureDiagram-SUXI7LT5-D81RoqPk.js} +1 -1
- package/dist/assets/{blockDiagram-6J76NXCF-ftx5RUcT.js → blockDiagram-6J76NXCF-3niFsoFZ.js} +1 -1
- package/dist/assets/{c4Diagram-6F6E4RAY-BulMqa-Y.js → c4Diagram-6F6E4RAY-CFI6lih0.js} +1 -1
- package/dist/assets/channel-K-9loUb_.js +1 -0
- package/dist/assets/{chunk-353BL4L5-D5H2iwN7.js → chunk-353BL4L5-C3wPIha_.js} +1 -1
- package/dist/assets/{chunk-67H74DCK-LK08G4lc.js → chunk-67H74DCK-B5azje5L.js} +1 -1
- package/dist/assets/{chunk-AACKK3MU-B9JAiO5u.js → chunk-AACKK3MU-DSI22zXx.js} +1 -1
- package/dist/assets/{chunk-BFAMUDN2-CZKcG7Hk.js → chunk-BFAMUDN2-tuWdobTk.js} +1 -1
- package/dist/assets/{chunk-E2GYISFI-CIXtdUNn.js → chunk-E2GYISFI-i4TQCXIy.js} +1 -1
- package/dist/assets/{chunk-OW32GOEJ-C4FCmwnP.js → chunk-OW32GOEJ-DOaWtR4N.js} +6 -6
- package/dist/assets/{chunk-SKB7J2MH-BaSlr3jl.js → chunk-SKB7J2MH-SgMaVi_f.js} +1 -1
- package/dist/assets/{chunk-SZ463SBG-BwDfdiOo.js → chunk-SZ463SBG-BPCllzKw.js} +1 -1
- package/dist/assets/{circle-play-JsgbRX6G.js → circle-play-D53fEWtA.js} +1 -1
- package/dist/assets/classDiagram-M3E45YP4-Bc9VfZy3.js +1 -0
- package/dist/assets/classDiagram-v2-YAWTLIQI-Bc9VfZy3.js +1 -0
- package/dist/assets/clone-DaATSQka.js +1 -0
- package/dist/assets/common-keywords-Dg3Y2cJS.js +1 -0
- package/dist/assets/{compile-BGbhA30T.js → compile-CHlxx7_2.js} +1 -1
- package/dist/assets/{dagre-JOIXM2OF-B8vUNw1G.js → dagre-JOIXM2OF-DwqsAdzJ.js} +1 -1
- package/dist/assets/{data-grid-overlay-editor-5lo5J1Vt.js → data-grid-overlay-editor-BkxJm21l.js} +1 -1
- package/dist/assets/{diagram-5UYTHUR4-PLDgwO4x.js → diagram-5UYTHUR4-BVgXxq4M.js} +1 -1
- package/dist/assets/{diagram-VMROVX33-B5-7SLna.js → diagram-VMROVX33-BCL8392t.js} +1 -1
- package/dist/assets/{diagram-ZTM2IBQH-BnKr5V6h.js → diagram-ZTM2IBQH-4J4J1CIV.js} +1 -1
- package/dist/assets/duckdb-keywords-CFYiiNsB.js +1 -0
- package/dist/assets/edit-page-NB5wrRh2.js +163 -0
- package/dist/assets/{erDiagram-3M52JZNH-Dk0Y_2Is.js → erDiagram-3M52JZNH-jshUEIJ1.js} +1 -1
- package/dist/assets/{flowDiagram-KYDEHFYC-DM8J3haJ.js → flowDiagram-KYDEHFYC-CyYg3H8Y.js} +1 -1
- package/dist/assets/{ganttDiagram-EK5VF46D-B7MEeaeb.js → ganttDiagram-EK5VF46D-C23Ft8I7.js} +1 -1
- package/dist/assets/{gitGraphDiagram-GW3U2K7C-ciOWHdK1.js → gitGraphDiagram-GW3U2K7C-DiUoj4Ew.js} +1 -1
- package/dist/assets/{glide-data-editor-CeJNWkGL.js → glide-data-editor-yni-i7DD.js} +11 -11
- package/dist/assets/{graph-IzuQV5TV.js → graph-C7JpWu09.js} +1 -1
- package/dist/assets/{home-page-P0hOk_Lu.js → home-page-NDnghZWs.js} +2 -2
- package/dist/assets/{index-DL31Tmv6.js → index--KGGFrne.js} +1 -1
- package/dist/assets/{index-BqqAIR7p.js → index-4OqJ2B3D.js} +1 -1
- package/dist/assets/{index-BtVdSmBr.js → index-B0RXd23s.js} +1 -1
- package/dist/assets/{index-DzmGiDPv.js → index-B31n32p9.js} +1 -1
- package/dist/assets/{index-DzcdkCgc.js → index-BOUSUTRn.js} +1 -1
- package/dist/assets/{index-DVgehULr.js → index-BQIb1OIL.js} +1 -1
- package/dist/assets/{index-VEO6hI2a.js → index-BlatNvpa.js} +1 -1
- package/dist/assets/{index-Bw4_53VL.js → index-BuLzGTRa.js} +211 -201
- package/dist/assets/{index-DWbP9NKv.js → index-Bv-FgWDT.js} +1 -1
- package/dist/assets/{index-vOKQtqij.js → index-C-824auT.js} +1 -1
- package/dist/assets/{index-CTxIrFfM.js → index-CCVnyt35.js} +1 -1
- package/dist/assets/{index-D86OE7I-.js → index-CMwLiUwF.js} +1 -1
- package/dist/assets/{index-ABc3l5O5.js → index-CjurcK2b.js} +1 -1
- package/dist/assets/index-CrH6PPjG.css +1 -0
- package/dist/assets/{index-DyGhL8pb.js → index-DUWmhAdb.js} +1 -1
- package/dist/assets/index-Dhv3kMmj.js +68 -0
- package/dist/assets/{index-DKlX9VbD.js → index-Dtg-n9fy.js} +1 -1
- package/dist/assets/{index--eqo3Nr1.js → index-RFe4ipJ2.js} +1 -1
- package/dist/assets/{index-ZMOxgO0o.js → index-TnI59iGP.js} +1 -1
- package/dist/assets/{index-CvNa254z.js → index-afRA5Gf-.js} +1 -1
- package/dist/assets/{index-CrnLkrsN.js → index-gxc0pSjP.js} +1 -1
- package/dist/assets/infoDiagram-LHK5PUON-CU950EiG.js +2 -0
- package/dist/assets/{journeyDiagram-EWQZEKCU-D-rWvB9c.js → journeyDiagram-EWQZEKCU-D6atx6Lv.js} +1 -1
- package/dist/assets/{kanban-definition-ZSS6B67P-BPrv-lG3.js → kanban-definition-ZSS6B67P-BTifj_eJ.js} +1 -1
- package/dist/assets/{layout-C3NQCD38.js → layout-C7UvAKPj.js} +1 -1
- package/dist/assets/{linear-Dcz3lyvf.js → linear-BZ8OzEjq.js} +1 -1
- package/dist/assets/links-Bi_UYtYJ.js +17 -0
- package/dist/assets/{mermaid-BjMqU7B7.js → mermaid-Ay3yhf1K.js} +26 -26
- package/dist/assets/min-Dp3C_LUW.js +1 -0
- package/dist/assets/{mindmap-definition-6CBA2TL7-BZsnMx2y.js → mindmap-definition-6CBA2TL7-UHMw9HRG.js} +1 -1
- package/dist/assets/{number-overlay-editor-CzX-JKBj.js → number-overlay-editor-Cv-0anBf.js} +2 -2
- package/dist/assets/{pieDiagram-NIOCPIFQ-BjbDT3_7.js → pieDiagram-NIOCPIFQ-B3CqYKDU.js} +3 -3
- package/dist/assets/{quadrantDiagram-2OG54O6I-DwvUEn5y.js → quadrantDiagram-2OG54O6I-kwhcJ1uQ.js} +1 -1
- package/dist/assets/{react-plotly-DsUGZTQl.js → react-plotly-Nf9wyHE6.js} +1 -1
- package/dist/assets/{requirementDiagram-QOLK2EJ7-DnqQ02xB.js → requirementDiagram-QOLK2EJ7-C_ChBtkQ.js} +1 -1
- package/dist/assets/{run-page-Dh1_LBex.js → run-page-CSqmt13E.js} +1 -1
- package/dist/assets/{sankeyDiagram-4UZDY2LN-CGiEg-KK.js → sankeyDiagram-4UZDY2LN-qvwFYofP.js} +1 -1
- package/dist/assets/{sequenceDiagram-SKLFT4DO-Du_9Bhah.js → sequenceDiagram-SKLFT4DO-BzqFOwY5.js} +1 -1
- package/dist/assets/{slides-component-DbRb2vqt.js → slides-component-Cer6VYZ9.js} +1 -1
- package/dist/assets/sortBy-vM-dsQOy.js +1 -0
- package/dist/assets/{stateDiagram-MI5ZYTHO-x_vUiEQz.js → stateDiagram-MI5ZYTHO-Qsx1ctcw.js} +1 -1
- package/dist/assets/stateDiagram-v2-5AN5P6BG-nnL6lLPg.js +1 -0
- package/dist/assets/storage-CgbU7fX_.js +26 -0
- package/dist/assets/{terminal-xOuxdYpY.js → terminal-D9I-qKBb.js} +1 -1
- package/dist/assets/time-B6gEjtOF.js +1 -0
- package/dist/assets/{timeline-definition-MYPXXCX6-8Kv4fcyB.js → timeline-definition-MYPXXCX6-CDn-7Ziv.js} +1 -1
- package/dist/assets/{tracing-BAj6E74_.js → tracing-BlsNYoEA.js} +2 -2
- package/dist/assets/{trash-65Vbt3F6.js → trash-DN3yrUwY.js} +1 -1
- package/dist/assets/{treemap-75Q7IDZK-DtSMjk1Y.js → treemap-75Q7IDZK-BU7RneXW.js} +1 -1
- package/dist/assets/{vega-component-C3aywWbx.js → vega-component-B88TrcEz.js} +1 -1
- package/dist/assets/{xychartDiagram-H2YORKM3-D33F1MLE.js → xychartDiagram-H2YORKM3-0c94DCtR.js} +1 -1
- package/dist/index.html +2 -2
- package/package.json +12 -6
- package/src/README.md +18 -0
- package/src/__mocks__/common.ts +160 -0
- package/src/__mocks__/notebook.ts +76 -0
- package/src/__mocks__/requests.ts +72 -0
- package/src/__mocks__/tracebacks.ts +32 -0
- package/src/__tests__/CellStatus.test.tsx +263 -0
- package/src/__tests__/__snapshots__/CellStatus.test.tsx.snap +523 -0
- package/src/__tests__/chat-utils.test.ts +234 -0
- package/src/__tests__/lru.test.ts +74 -0
- package/src/__tests__/main.test.tsx +174 -0
- package/src/__tests__/setup.ts +17 -0
- package/src/__tests__/test-helpers.ts +24 -0
- package/src/assets/circle-check.ico +0 -0
- package/src/assets/circle-play.ico +0 -0
- package/src/assets/circle-x.ico +0 -0
- package/src/assets/gradient.png +0 -0
- package/src/assets/icon-16x16.png +0 -0
- package/src/assets/icon-32x32.png +0 -0
- package/src/assets/noise.png +0 -0
- package/src/components/ai/ai-model-dropdown.tsx +280 -0
- package/src/components/ai/ai-provider-icon.tsx +54 -0
- package/src/components/app-config/ai-config.tsx +855 -0
- package/src/components/app-config/app-config-button.tsx +100 -0
- package/src/components/app-config/app-config-form.tsx +307 -0
- package/src/components/app-config/common.tsx +48 -0
- package/src/components/app-config/constants.ts +13 -0
- package/src/components/app-config/incorrect-model-id.tsx +43 -0
- package/src/components/app-config/is-overridden.tsx +119 -0
- package/src/components/app-config/optional-features.tsx +251 -0
- package/src/components/app-config/state.ts +18 -0
- package/src/components/app-config/user-config-form.tsx +1361 -0
- package/src/components/audio/audio-recorder.tsx +63 -0
- package/src/components/buttons/clear-button.tsx +23 -0
- package/src/components/buttons/undo-button.tsx +35 -0
- package/src/components/chat/chat-panel.tsx +715 -0
- package/src/components/chat/markdown-renderer.tsx +217 -0
- package/src/components/chat/reasoning-accordion.tsx +50 -0
- package/src/components/chat/tool-call-accordion.tsx +118 -0
- package/src/components/data-table/SearchBar.tsx +66 -0
- package/src/components/data-table/TableActions.tsx +183 -0
- package/src/components/data-table/__tests__/__snapshots__/chart-spec-model.test.ts.snap +1079 -0
- package/src/components/data-table/__tests__/chart-spec-model.test.ts +707 -0
- package/src/components/data-table/__tests__/column_formatting.test.ts +115 -0
- package/src/components/data-table/__tests__/columns.test.tsx +341 -0
- package/src/components/data-table/__tests__/data-table.test.tsx +60 -0
- package/src/components/data-table/__tests__/pagination.test.tsx +152 -0
- package/src/components/data-table/__tests__/types.test.ts +44 -0
- package/src/components/data-table/__tests__/url-detector.test.tsx +169 -0
- package/src/components/data-table/__tests__/useColumnPinning.test.ts +76 -0
- package/src/components/data-table/cell-selection/__tests__/feature.test.ts +187 -0
- package/src/components/data-table/cell-selection/feature.ts +123 -0
- package/src/components/data-table/cell-selection/types.ts +49 -0
- package/src/components/data-table/cell-styling/feature.ts +40 -0
- package/src/components/data-table/cell-styling/types.ts +26 -0
- package/src/components/data-table/charts/README.md +65 -0
- package/src/components/data-table/charts/__tests__/__snapshots__/spec-snapshot.test.ts.snap +47 -0
- package/src/components/data-table/charts/__tests__/altair-generator.test.ts +425 -0
- package/src/components/data-table/charts/__tests__/renderer.test.ts +20 -0
- package/src/components/data-table/charts/__tests__/spec-snapshot.test.ts +83 -0
- package/src/components/data-table/charts/__tests__/spec.test.ts +997 -0
- package/src/components/data-table/charts/__tests__/storage.test.ts +103 -0
- package/src/components/data-table/charts/chart-spec/altair-generator.ts +162 -0
- package/src/components/data-table/charts/chart-spec/encodings.ts +173 -0
- package/src/components/data-table/charts/chart-spec/spec.ts +345 -0
- package/src/components/data-table/charts/chart-spec/tooltips.ts +168 -0
- package/src/components/data-table/charts/chart-spec/types.ts +77 -0
- package/src/components/data-table/charts/charts.tsx +492 -0
- package/src/components/data-table/charts/components/chart-items.tsx +369 -0
- package/src/components/data-table/charts/components/chart-states.tsx +37 -0
- package/src/components/data-table/charts/components/form-fields.tsx +872 -0
- package/src/components/data-table/charts/components/layouts.tsx +118 -0
- package/src/components/data-table/charts/constants.ts +159 -0
- package/src/components/data-table/charts/context.ts +20 -0
- package/src/components/data-table/charts/forms/common-chart.tsx +202 -0
- package/src/components/data-table/charts/forms/heatmap.tsx +44 -0
- package/src/components/data-table/charts/forms/pie.tsx +70 -0
- package/src/components/data-table/charts/lazy-chart.tsx +56 -0
- package/src/components/data-table/charts/schemas.ts +140 -0
- package/src/components/data-table/charts/storage.ts +88 -0
- package/src/components/data-table/charts/types.ts +124 -0
- package/src/components/data-table/column-explorer-panel/column-explorer.tsx +227 -0
- package/src/components/data-table/column-formatting/feature.ts +247 -0
- package/src/components/data-table/column-formatting/types.ts +54 -0
- package/src/components/data-table/column-header.tsx +672 -0
- package/src/components/data-table/column-summary/chart-skeleton.tsx +57 -0
- package/src/components/data-table/column-summary/chart-spec-model.tsx +916 -0
- package/src/components/data-table/column-summary/column-summary.tsx +166 -0
- package/src/components/data-table/column-summary/legacy-chart-spec.ts +242 -0
- package/src/components/data-table/column-summary/utils.ts +142 -0
- package/src/components/data-table/column-wrapping/feature.ts +62 -0
- package/src/components/data-table/column-wrapping/types.ts +29 -0
- package/src/components/data-table/columns.tsx +528 -0
- package/src/components/data-table/copy-column/feature.ts +27 -0
- package/src/components/data-table/copy-column/types.ts +19 -0
- package/src/components/data-table/data-table.tsx +298 -0
- package/src/components/data-table/date-popover.tsx +146 -0
- package/src/components/data-table/download-actions.tsx +186 -0
- package/src/components/data-table/filter-pills.tsx +120 -0
- package/src/components/data-table/filters.ts +202 -0
- package/src/components/data-table/focus-row/feature.ts +41 -0
- package/src/components/data-table/focus-row/types.ts +32 -0
- package/src/components/data-table/header-items.tsx +295 -0
- package/src/components/data-table/hooks/use-column-pinning.ts +51 -0
- package/src/components/data-table/hooks/use-panel-ownership.ts +98 -0
- package/src/components/data-table/loading-table.tsx +56 -0
- package/src/components/data-table/mime-cell.tsx +68 -0
- package/src/components/data-table/pagination.tsx +329 -0
- package/src/components/data-table/range-focus/__tests__/atoms.test.ts +907 -0
- package/src/components/data-table/range-focus/__tests__/utils.test.ts +316 -0
- package/src/components/data-table/range-focus/atoms.ts +380 -0
- package/src/components/data-table/range-focus/cell-selection-indicator.tsx +37 -0
- package/src/components/data-table/range-focus/provider.tsx +13 -0
- package/src/components/data-table/range-focus/use-cell-range-selection.ts +119 -0
- package/src/components/data-table/range-focus/use-scroll-into-view.ts +46 -0
- package/src/components/data-table/range-focus/utils.ts +105 -0
- package/src/components/data-table/renderers.tsx +247 -0
- package/src/components/data-table/row-viewer-panel/__tests__/filter-rows.test.ts +82 -0
- package/src/components/data-table/row-viewer-panel/__tests__/row-viewer.test.tsx +58 -0
- package/src/components/data-table/row-viewer-panel/row-viewer.tsx +371 -0
- package/src/components/data-table/types.ts +81 -0
- package/src/components/data-table/uniformSample.tsx +19 -0
- package/src/components/data-table/url-detector.tsx +111 -0
- package/src/components/data-table/utils.ts +46 -0
- package/src/components/databases/display.tsx +66 -0
- package/src/components/databases/engine-variable.tsx +51 -0
- package/src/components/databases/icon.tsx +91 -0
- package/src/components/databases/icons/clickhouse.svg +1 -0
- package/src/components/databases/icons/databricks.svg +1 -0
- package/src/components/databases/icons/datafusion.png +0 -0
- package/src/components/databases/icons/duckdb.svg +1 -0
- package/src/components/databases/icons/googlebigquery.svg +1 -0
- package/src/components/databases/icons/iceberg.png +0 -0
- package/src/components/databases/icons/motherduck.svg +9 -0
- package/src/components/databases/icons/mysql.svg +1 -0
- package/src/components/databases/icons/postgresql.svg +1 -0
- package/src/components/databases/icons/redshift.svg +1 -0
- package/src/components/databases/icons/snowflake.svg +1 -0
- package/src/components/databases/icons/spark.svg +1 -0
- package/src/components/databases/icons/sqlalchemy.svg +1 -0
- package/src/components/databases/icons/sqlite.svg +1 -0
- package/src/components/databases/icons/timeplus.svg +17 -0
- package/src/components/databases/icons/trino.svg +1 -0
- package/src/components/datasets/icons.tsx +55 -0
- package/src/components/datasources/__tests__/install-package-button.test.tsx +85 -0
- package/src/components/datasources/__tests__/utils.test.ts +171 -0
- package/src/components/datasources/column-preview.tsx +269 -0
- package/src/components/datasources/components.tsx +100 -0
- package/src/components/datasources/datasources.tsx +782 -0
- package/src/components/datasources/install-package-button.tsx +46 -0
- package/src/components/datasources/utils.ts +62 -0
- package/src/components/debug/indicator.tsx +19 -0
- package/src/components/debugger/debugger-code.css +3 -0
- package/src/components/debugger/debugger-code.tsx +222 -0
- package/src/components/dependency-graph/custom-node.tsx +89 -0
- package/src/components/dependency-graph/dependency-graph-minimap.tsx +197 -0
- package/src/components/dependency-graph/dependency-graph-tree.tsx +181 -0
- package/src/components/dependency-graph/dependency-graph.css +17 -0
- package/src/components/dependency-graph/dependency-graph.tsx +66 -0
- package/src/components/dependency-graph/elements.ts +185 -0
- package/src/components/dependency-graph/panels.tsx +279 -0
- package/src/components/dependency-graph/types.ts +21 -0
- package/src/components/dependency-graph/utils/changes.ts +54 -0
- package/src/components/dependency-graph/utils/layout.ts +45 -0
- package/src/components/dependency-graph/utils/useFitToViewOnDimensionChange.ts +25 -0
- package/src/components/editor/Cell.tsx +1175 -0
- package/src/components/editor/Disconnected.tsx +72 -0
- package/src/components/editor/Output.tsx +462 -0
- package/src/components/editor/RecoveryButton.tsx +161 -0
- package/src/components/editor/SortableCell.tsx +161 -0
- package/src/components/editor/__tests__/data-attributes.test.tsx +173 -0
- package/src/components/editor/__tests__/dynamic-favicon.test.tsx +183 -0
- package/src/components/editor/actions/name-cell-input.tsx +137 -0
- package/src/components/editor/actions/types.ts +53 -0
- package/src/components/editor/actions/useCellActionButton.tsx +422 -0
- package/src/components/editor/actions/useConfigActions.tsx +182 -0
- package/src/components/editor/actions/useCopyNotebook.tsx +41 -0
- package/src/components/editor/actions/useHideAllMarkdownCode.ts +53 -0
- package/src/components/editor/actions/useNotebookActions.tsx +556 -0
- package/src/components/editor/actions/useRestartKernel.tsx +36 -0
- package/src/components/editor/ai/__tests__/completion-utils.test.ts +379 -0
- package/src/components/editor/ai/add-cell-with-ai.tsx +423 -0
- package/src/components/editor/ai/ai-completion-editor.tsx +262 -0
- package/src/components/editor/ai/completion-utils.ts +95 -0
- package/src/components/editor/ai/merge-editor.css +9 -0
- package/src/components/editor/alerts/connecting-alert.tsx +46 -0
- package/src/components/editor/alerts/floating-alert.tsx +47 -0
- package/src/components/editor/alerts/stdin-blocking-alert.tsx +61 -0
- package/src/components/editor/app-container.tsx +53 -0
- package/src/components/editor/boundary/ErrorBoundary.tsx +41 -0
- package/src/components/editor/cell/CellStatus.tsx +371 -0
- package/src/components/editor/cell/CreateCellButton.tsx +132 -0
- package/src/components/editor/cell/DeleteButton.tsx +58 -0
- package/src/components/editor/cell/PendingDeleteConfirmation.tsx +126 -0
- package/src/components/editor/cell/RunButton.tsx +109 -0
- package/src/components/editor/cell/StopButton.tsx +36 -0
- package/src/components/editor/cell/TinyCode.css +10 -0
- package/src/components/editor/cell/TinyCode.tsx +53 -0
- package/src/components/editor/cell/cell-actions.tsx +185 -0
- package/src/components/editor/cell/cell-context-menu.tsx +243 -0
- package/src/components/editor/cell/cell-status.css +21 -0
- package/src/components/editor/cell/code/cell-editor.tsx +546 -0
- package/src/components/editor/cell/code/icons.tsx +31 -0
- package/src/components/editor/cell/code/language-toggle.tsx +140 -0
- package/src/components/editor/cell/collapse.tsx +100 -0
- package/src/components/editor/cell/toolbar.tsx +89 -0
- package/src/components/editor/cell/useAddCell.ts +29 -0
- package/src/components/editor/cell/useDeleteCell.tsx +89 -0
- package/src/components/editor/cell/useRunCells.ts +86 -0
- package/src/components/editor/cell/useShouldShowInterrupt.ts +26 -0
- package/src/components/editor/cell/useSplitCell.tsx +41 -0
- package/src/components/editor/chrome/components/contribute-snippet-button.tsx +138 -0
- package/src/components/editor/chrome/components/feedback-button.tsx +105 -0
- package/src/components/editor/chrome/panels/__tests__/write-secret-modal.test.ts +43 -0
- package/src/components/editor/chrome/panels/constants.ts +2 -0
- package/src/components/editor/chrome/panels/context-aware-panel/atoms.ts +28 -0
- package/src/components/editor/chrome/panels/context-aware-panel/context-aware-panel.tsx +167 -0
- package/src/components/editor/chrome/panels/datasources-panel.tsx +6 -0
- package/src/components/editor/chrome/panels/dependency-graph-panel.tsx +23 -0
- package/src/components/editor/chrome/panels/documentation-panel.tsx +29 -0
- package/src/components/editor/chrome/panels/empty-state.tsx +28 -0
- package/src/components/editor/chrome/panels/error-panel.tsx +35 -0
- package/src/components/editor/chrome/panels/file-explorer-panel.tsx +33 -0
- package/src/components/editor/chrome/panels/logs-panel.tsx +97 -0
- package/src/components/editor/chrome/panels/outline/floating-outline.tsx +129 -0
- package/src/components/editor/chrome/panels/outline/useActiveOutline.tsx +172 -0
- package/src/components/editor/chrome/panels/outline-panel.css +6 -0
- package/src/components/editor/chrome/panels/outline-panel.tsx +39 -0
- package/src/components/editor/chrome/panels/packages-panel.tsx +635 -0
- package/src/components/editor/chrome/panels/packages-state.ts +5 -0
- package/src/components/editor/chrome/panels/scratchpad-panel.tsx +8 -0
- package/src/components/editor/chrome/panels/secrets-panel.tsx +155 -0
- package/src/components/editor/chrome/panels/snippets-panel.css +11 -0
- package/src/components/editor/chrome/panels/snippets-panel.tsx +230 -0
- package/src/components/editor/chrome/panels/tracing-panel.tsx +28 -0
- package/src/components/editor/chrome/panels/variable-panel.tsx +31 -0
- package/src/components/editor/chrome/panels/write-secret-modal.tsx +190 -0
- package/src/components/editor/chrome/state.ts +102 -0
- package/src/components/editor/chrome/types.ts +133 -0
- package/src/components/editor/chrome/wrapper/__tests__/minimap-state.test.ts +209 -0
- package/src/components/editor/chrome/wrapper/__tests__/storage.test.ts +41 -0
- package/src/components/editor/chrome/wrapper/app-chrome.css +22 -0
- package/src/components/editor/chrome/wrapper/app-chrome.tsx +256 -0
- package/src/components/editor/chrome/wrapper/footer-item.tsx +43 -0
- package/src/components/editor/chrome/wrapper/footer-items/ai-status.tsx +47 -0
- package/src/components/editor/chrome/wrapper/footer-items/backend-status.tsx +111 -0
- package/src/components/editor/chrome/wrapper/footer-items/copilot-status.tsx +125 -0
- package/src/components/editor/chrome/wrapper/footer-items/machine-stats.tsx +185 -0
- package/src/components/editor/chrome/wrapper/footer-items/minimap-status.tsx +21 -0
- package/src/components/editor/chrome/wrapper/footer-items/rtc-status.tsx +65 -0
- package/src/components/editor/chrome/wrapper/footer-items/runtime-settings.tsx +370 -0
- package/src/components/editor/chrome/wrapper/footer.tsx +90 -0
- package/src/components/editor/chrome/wrapper/minimap-state.ts +164 -0
- package/src/components/editor/chrome/wrapper/minimap.tsx +443 -0
- package/src/components/editor/chrome/wrapper/panels.tsx +10 -0
- package/src/components/editor/chrome/wrapper/sidebar.tsx +100 -0
- package/src/components/editor/chrome/wrapper/storage.ts +56 -0
- package/src/components/editor/chrome/wrapper/utils.ts +8 -0
- package/src/components/editor/code/readonly-python-code.tsx +160 -0
- package/src/components/editor/columns/__tests__/storage.test.ts +104 -0
- package/src/components/editor/columns/cell-column.tsx +105 -0
- package/src/components/editor/columns/sortable-column.tsx +175 -0
- package/src/components/editor/columns/storage.ts +56 -0
- package/src/components/editor/common.ts +20 -0
- package/src/components/editor/controls/Controls.tsx +225 -0
- package/src/components/editor/controls/command-palette-button.tsx +27 -0
- package/src/components/editor/controls/command-palette.tsx +210 -0
- package/src/components/editor/controls/keyboard-shortcuts.tsx +309 -0
- package/src/components/editor/controls/notebook-menu-dropdown.tsx +157 -0
- package/src/components/editor/controls/shutdown-button.tsx +70 -0
- package/src/components/editor/database/__tests__/__snapshots__/as-code.test.ts.snap +659 -0
- package/src/components/editor/database/__tests__/as-code.test.ts +598 -0
- package/src/components/editor/database/__tests__/secrets.test.ts +38 -0
- package/src/components/editor/database/add-database-form.tsx +395 -0
- package/src/components/editor/database/as-code.ts +786 -0
- package/src/components/editor/database/form-renderers.tsx +211 -0
- package/src/components/editor/database/schemas.ts +485 -0
- package/src/components/editor/database/secrets.ts +25 -0
- package/src/components/editor/documentation.css +139 -0
- package/src/components/editor/dynamic-favicon.tsx +126 -0
- package/src/components/editor/errors/auto-fix.tsx +61 -0
- package/src/components/editor/file-tree/__tests__/requesting-tree.test.ts +321 -0
- package/src/components/editor/file-tree/file-explorer.tsx +679 -0
- package/src/components/editor/file-tree/file-viewer.tsx +283 -0
- package/src/components/editor/file-tree/renderers.tsx +83 -0
- package/src/components/editor/file-tree/requesting-tree.tsx +228 -0
- package/src/components/editor/file-tree/state.tsx +26 -0
- package/src/components/editor/file-tree/types.ts +118 -0
- package/src/components/editor/file-tree/upload.tsx +101 -0
- package/src/components/editor/header/app-header.tsx +28 -0
- package/src/components/editor/header/filename-form.tsx +27 -0
- package/src/components/editor/header/filename-input.css +21 -0
- package/src/components/editor/header/filename-input.tsx +244 -0
- package/src/components/editor/header/status.tsx +72 -0
- package/src/components/editor/inputs/Inputs.css +118 -0
- package/src/components/editor/inputs/Inputs.styles.ts +66 -0
- package/src/components/editor/inputs/Inputs.tsx +34 -0
- package/src/components/editor/kiosk-mode.tsx +25 -0
- package/src/components/editor/links/cell-link-list.tsx +74 -0
- package/src/components/editor/links/cell-link.tsx +128 -0
- package/src/components/editor/navigation/__tests__/clipboard.test.ts +466 -0
- package/src/components/editor/navigation/__tests__/navigation.test.ts +1820 -0
- package/src/components/editor/navigation/__tests__/selection.test.ts +194 -0
- package/src/components/editor/navigation/clipboard.ts +205 -0
- package/src/components/editor/navigation/focus-utils.ts +48 -0
- package/src/components/editor/navigation/multi-cell-action-toolbar.tsx +499 -0
- package/src/components/editor/navigation/navigation.ts +700 -0
- package/src/components/editor/navigation/selection.ts +114 -0
- package/src/components/editor/navigation/state.ts +5 -0
- package/src/components/editor/navigation/vim-bindings.test.ts +109 -0
- package/src/components/editor/navigation/vim-bindings.ts +90 -0
- package/src/components/editor/notebook-banner.tsx +75 -0
- package/src/components/editor/output/CalloutOutput.styles.ts +22 -0
- package/src/components/editor/output/CalloutOutput.tsx +19 -0
- package/src/components/editor/output/ConsoleOutput.tsx +276 -0
- package/src/components/editor/output/EmotionCacheProvider.tsx +32 -0
- package/src/components/editor/output/HtmlOutput.tsx +25 -0
- package/src/components/editor/output/ImageOutput.tsx +25 -0
- package/src/components/editor/output/JsonOutput.tsx +424 -0
- package/src/components/editor/output/MarimoErrorOutput.tsx +511 -0
- package/src/components/editor/output/MarimoTracebackOutput.tsx +233 -0
- package/src/components/editor/output/Outputs.css +102 -0
- package/src/components/editor/output/TextOutput.tsx +42 -0
- package/src/components/editor/output/VideoOutput.tsx +11 -0
- package/src/components/editor/output/__tests__/ansi.test.ts +39 -0
- package/src/components/editor/output/__tests__/json-output.test.ts +269 -0
- package/src/components/editor/output/__tests__/traceback.test.tsx +105 -0
- package/src/components/editor/output/useWrapText.ts +14 -0
- package/src/components/editor/package-alert.tsx +596 -0
- package/src/components/editor/renderMimeIcon.tsx +38 -0
- package/src/components/editor/renderers/CellArray.tsx +352 -0
- package/src/components/editor/renderers/cells-renderer.tsx +96 -0
- package/src/components/editor/renderers/grid-layout/grid-layout.tsx +650 -0
- package/src/components/editor/renderers/grid-layout/plugin.tsx +146 -0
- package/src/components/editor/renderers/grid-layout/styles.css +31 -0
- package/src/components/editor/renderers/grid-layout/types.ts +89 -0
- package/src/components/editor/renderers/layout-select.tsx +86 -0
- package/src/components/editor/renderers/plugins.ts +31 -0
- package/src/components/editor/renderers/slides-layout/plugin.tsx +31 -0
- package/src/components/editor/renderers/slides-layout/slides-layout.tsx +74 -0
- package/src/components/editor/renderers/slides-layout/types.ts +12 -0
- package/src/components/editor/renderers/types.ts +75 -0
- package/src/components/editor/renderers/vertical-layout/__tests__/useDelayVisibility.test.ts +87 -0
- package/src/components/editor/renderers/vertical-layout/__tests__/useFocusFirstEditor.test.ts +123 -0
- package/src/components/editor/renderers/vertical-layout/__tests__/vertical-layout.test.ts +173 -0
- package/src/components/editor/renderers/vertical-layout/sidebar/__tests__/sidebar.test.tsx +56 -0
- package/src/components/editor/renderers/vertical-layout/sidebar/sheet-sidebar.tsx +32 -0
- package/src/components/editor/renderers/vertical-layout/sidebar/sidebar-slot.tsx +10 -0
- package/src/components/editor/renderers/vertical-layout/sidebar/sidebar.css +20 -0
- package/src/components/editor/renderers/vertical-layout/sidebar/sidebar.tsx +30 -0
- package/src/components/editor/renderers/vertical-layout/sidebar/state.ts +46 -0
- package/src/components/editor/renderers/vertical-layout/sidebar/toggle.tsx +25 -0
- package/src/components/editor/renderers/vertical-layout/sidebar/wrapped-with-sidebar.tsx +38 -0
- package/src/components/editor/renderers/vertical-layout/useDelayVisibility.ts +32 -0
- package/src/components/editor/renderers/vertical-layout/useFocusFirstEditor.ts +107 -0
- package/src/components/editor/renderers/vertical-layout/vertical-layout-wrapper.tsx +46 -0
- package/src/components/editor/renderers/vertical-layout/vertical-layout.tsx +451 -0
- package/src/components/editor/stdin-blocking-alert.tsx +83 -0
- package/src/components/export/export-output-button.tsx +14 -0
- package/src/components/find-replace/find-replace.tsx +293 -0
- package/src/components/forms/__tests__/form-utils.test.ts +104 -0
- package/src/components/forms/form-utils.ts +90 -0
- package/src/components/forms/form.tsx +817 -0
- package/src/components/forms/options.ts +59 -0
- package/src/components/forms/switchable-multi-select.tsx +134 -0
- package/src/components/home/components.tsx +189 -0
- package/src/components/home/state.ts +30 -0
- package/src/components/icons/copy-icon.tsx +59 -0
- package/src/components/icons/github-copilot.tsx +17 -0
- package/src/components/icons/large-spinner.tsx +39 -0
- package/src/components/icons/loading-ellipsis.tsx +46 -0
- package/src/components/icons/multi-icon.css +9 -0
- package/src/components/icons/multi-icon.tsx +30 -0
- package/src/components/icons/spinner.tsx +38 -0
- package/src/components/layout/toolbar.tsx +26 -0
- package/src/components/modal/ImperativeModal.tsx +187 -0
- package/src/components/pages/edit-page.tsx +37 -0
- package/src/components/pages/home-page.tsx +514 -0
- package/src/components/pages/run-page.tsx +55 -0
- package/src/components/scratchpad/scratchpad-history.ts +28 -0
- package/src/components/scratchpad/scratchpad.tsx +280 -0
- package/src/components/shortcuts/renderShortcut.tsx +208 -0
- package/src/components/slides/slides-component.tsx +132 -0
- package/src/components/slides/slides.css +100 -0
- package/src/components/sort/SortableCellsProvider.tsx +242 -0
- package/src/components/static-html/share-modal.tsx +181 -0
- package/src/components/static-html/static-banner.tsx +164 -0
- package/src/components/terminal/terminal.tsx +110 -0
- package/src/components/terminal/xterm.css +3 -0
- package/src/components/tracing/tracing-spec.ts +118 -0
- package/src/components/tracing/tracing.test.tsx +66 -0
- package/src/components/tracing/tracing.tsx +410 -0
- package/src/components/ui/accordion.tsx +70 -0
- package/src/components/ui/alert-dialog.tsx +176 -0
- package/src/components/ui/alert.tsx +64 -0
- package/src/components/ui/aria-popover.tsx +43 -0
- package/src/components/ui/badge.tsx +41 -0
- package/src/components/ui/button.tsx +156 -0
- package/src/components/ui/calendar.tsx +231 -0
- package/src/components/ui/card.tsx +83 -0
- package/src/components/ui/checkbox.tsx +33 -0
- package/src/components/ui/combobox.tsx +278 -0
- package/src/components/ui/command.tsx +165 -0
- package/src/components/ui/context-menu.tsx +193 -0
- package/src/components/ui/date-input.tsx +127 -0
- package/src/components/ui/date-picker.tsx +188 -0
- package/src/components/ui/dialog.tsx +155 -0
- package/src/components/ui/draggable-popover.tsx +68 -0
- package/src/components/ui/dropdown-menu.tsx +189 -0
- package/src/components/ui/field.tsx +90 -0
- package/src/components/ui/form.tsx +224 -0
- package/src/components/ui/fullscreen.tsx +38 -0
- package/src/components/ui/input.tsx +208 -0
- package/src/components/ui/kbd.tsx +22 -0
- package/src/components/ui/label.tsx +26 -0
- package/src/components/ui/links.tsx +23 -0
- package/src/components/ui/menu-items.tsx +101 -0
- package/src/components/ui/native-select.tsx +39 -0
- package/src/components/ui/navigation.tsx +154 -0
- package/src/components/ui/number-field.tsx +99 -0
- package/src/components/ui/popover.tsx +63 -0
- package/src/components/ui/progress.tsx +28 -0
- package/src/components/ui/radio-group.tsx +44 -0
- package/src/components/ui/range-slider.tsx +102 -0
- package/src/components/ui/scroll-area.tsx +47 -0
- package/src/components/ui/select.tsx +167 -0
- package/src/components/ui/sheet.tsx +143 -0
- package/src/components/ui/skeleton.tsx +16 -0
- package/src/components/ui/slider.tsx +80 -0
- package/src/components/ui/switch.tsx +54 -0
- package/src/components/ui/table.tsx +122 -0
- package/src/components/ui/tabs.tsx +55 -0
- package/src/components/ui/textarea.tsx +104 -0
- package/src/components/ui/toast.tsx +133 -0
- package/src/components/ui/toaster.tsx +30 -0
- package/src/components/ui/toggle.tsx +49 -0
- package/src/components/ui/tooltip.tsx +87 -0
- package/src/components/ui/typography.tsx +207 -0
- package/src/components/ui/use-restore-focus.ts +28 -0
- package/src/components/ui/use-toast.ts +224 -0
- package/src/components/utils/delay-mount.tsx +81 -0
- package/src/components/utils/lazy-mount.tsx +24 -0
- package/src/components/variables/common.tsx +37 -0
- package/src/components/variables/variables-table.tsx +335 -0
- package/src/core/MarimoApp.tsx +103 -0
- package/src/core/ai/__tests__/model-registry.test.ts +357 -0
- package/src/core/ai/chat-utils.ts +71 -0
- package/src/core/ai/config.ts +76 -0
- package/src/core/ai/context/__tests__/registry.test.ts +516 -0
- package/src/core/ai/context/context.ts +16 -0
- package/src/core/ai/context/providers/__tests__/__snapshots__/tables.test.ts.snap +291 -0
- package/src/core/ai/context/providers/__tests__/__snapshots__/variable.test.ts.snap +378 -0
- package/src/core/ai/context/providers/__tests__/tables.test.ts +271 -0
- package/src/core/ai/context/providers/__tests__/variable.test.ts +312 -0
- package/src/core/ai/context/providers/common.ts +7 -0
- package/src/core/ai/context/providers/tables.ts +208 -0
- package/src/core/ai/context/providers/variable.ts +72 -0
- package/src/core/ai/context/registry.ts +180 -0
- package/src/core/ai/ids/__tests__/ids.test.ts +193 -0
- package/src/core/ai/ids/ids.ts +71 -0
- package/src/core/ai/model-registry.ts +164 -0
- package/src/core/ai/state.ts +58 -0
- package/src/core/alerts/state.ts +75 -0
- package/src/core/cells/__tests__/__snapshots__/cells.test.ts.snap +1312 -0
- package/src/core/cells/__tests__/add-missing-import.test.ts +78 -0
- package/src/core/cells/__tests__/cell.test.ts +193 -0
- package/src/core/cells/__tests__/cells.test.ts +2664 -0
- package/src/core/cells/__tests__/collapseConsoleOutputs.test.ts +239 -0
- package/src/core/cells/__tests__/focus.test.ts +271 -0
- package/src/core/cells/__tests__/ids.test.ts +90 -0
- package/src/core/cells/__tests__/names.test.ts +62 -0
- package/src/core/cells/__tests__/pending-delete-service.test.tsx +202 -0
- package/src/core/cells/__tests__/runs.test.ts +453 -0
- package/src/core/cells/__tests__/session.test.ts +757 -0
- package/src/core/cells/__tests__/utils.test.ts +428 -0
- package/src/core/cells/actions.ts +21 -0
- package/src/core/cells/add-missing-import.ts +114 -0
- package/src/core/cells/cell.ts +243 -0
- package/src/core/cells/cells.ts +1751 -0
- package/src/core/cells/collapseConsoleOutputs.tsx +133 -0
- package/src/core/cells/effects.ts +42 -0
- package/src/core/cells/focus.ts +128 -0
- package/src/core/cells/ids.ts +124 -0
- package/src/core/cells/logs.ts +114 -0
- package/src/core/cells/names.ts +107 -0
- package/src/core/cells/outline.ts +30 -0
- package/src/core/cells/outputs.ts +34 -0
- package/src/core/cells/pending-delete-service.ts +183 -0
- package/src/core/cells/runs.ts +196 -0
- package/src/core/cells/scrollCellIntoView.ts +133 -0
- package/src/core/cells/session.ts +281 -0
- package/src/core/cells/types.ts +128 -0
- package/src/core/cells/utils.ts +141 -0
- package/src/core/codemirror/__tests__/__snapshots__/setup.test.ts.snap +216 -0
- package/src/core/codemirror/__tests__/extensions.test.ts +117 -0
- package/src/core/codemirror/__tests__/format.test.ts +227 -0
- package/src/core/codemirror/__tests__/setup.test.ts +178 -0
- package/src/core/codemirror/ai/request.ts +72 -0
- package/src/core/codemirror/ai/resources.ts +90 -0
- package/src/core/codemirror/cells/extensions.ts +387 -0
- package/src/core/codemirror/cells/state.ts +32 -0
- package/src/core/codemirror/cells/traceback-decorations.ts +111 -0
- package/src/core/codemirror/cm.ts +267 -0
- package/src/core/codemirror/compat/__tests__/jupyter.test.ts +136 -0
- package/src/core/codemirror/compat/jupyter.tsx +244 -0
- package/src/core/codemirror/completion/Autocompleter.ts +172 -0
- package/src/core/codemirror/completion/__tests__/hints.test.ts +84 -0
- package/src/core/codemirror/completion/__tests__/keymap.test.ts +44 -0
- package/src/core/codemirror/completion/completer.ts +58 -0
- package/src/core/codemirror/completion/hints.ts +143 -0
- package/src/core/codemirror/completion/keymap.ts +70 -0
- package/src/core/codemirror/completion/utils.ts +18 -0
- package/src/core/codemirror/completion/variable-completions.ts +100 -0
- package/src/core/codemirror/config/extension.ts +63 -0
- package/src/core/codemirror/config/types.ts +10 -0
- package/src/core/codemirror/copilot/__tests__/copilot.test.ts +260 -0
- package/src/core/codemirror/copilot/__tests__/getCodes.test.ts +209 -0
- package/src/core/codemirror/copilot/__tests__/trim-utils.test.ts +291 -0
- package/src/core/codemirror/copilot/client.ts +123 -0
- package/src/core/codemirror/copilot/copilot-config.tsx +285 -0
- package/src/core/codemirror/copilot/extension.ts +285 -0
- package/src/core/codemirror/copilot/getCodes.ts +130 -0
- package/src/core/codemirror/copilot/language-server.ts +255 -0
- package/src/core/codemirror/copilot/state.ts +66 -0
- package/src/core/codemirror/copilot/trim-utils.ts +33 -0
- package/src/core/codemirror/copilot/types.ts +41 -0
- package/src/core/codemirror/editing/__tests__/commands.test.ts +106 -0
- package/src/core/codemirror/editing/__tests__/debugging.test.ts +193 -0
- package/src/core/codemirror/editing/commands.ts +25 -0
- package/src/core/codemirror/editing/debugging.ts +58 -0
- package/src/core/codemirror/editing/extensions.ts +4 -0
- package/src/core/codemirror/extensions.ts +95 -0
- package/src/core/codemirror/facet.ts +19 -0
- package/src/core/codemirror/find-replace/__tests__/navigate.test.ts +695 -0
- package/src/core/codemirror/find-replace/extension.ts +41 -0
- package/src/core/codemirror/find-replace/navigate.ts +221 -0
- package/src/core/codemirror/find-replace/query.ts +31 -0
- package/src/core/codemirror/find-replace/search-highlight.ts +148 -0
- package/src/core/codemirror/find-replace/state.ts +167 -0
- package/src/core/codemirror/format.ts +120 -0
- package/src/core/codemirror/go-to-definition/__tests__/commands.test.ts +205 -0
- package/src/core/codemirror/go-to-definition/commands.ts +80 -0
- package/src/core/codemirror/go-to-definition/extension.ts +23 -0
- package/src/core/codemirror/go-to-definition/underline.ts +223 -0
- package/src/core/codemirror/go-to-definition/utils.ts +126 -0
- package/src/core/codemirror/keymaps/__tests__/keymaps.test.ts +43 -0
- package/src/core/codemirror/keymaps/__tests__/vimrc.test.ts +121 -0
- package/src/core/codemirror/keymaps/keymaps.ts +163 -0
- package/src/core/codemirror/keymaps/vim.ts +348 -0
- package/src/core/codemirror/keymaps/vimrc.ts +149 -0
- package/src/core/codemirror/language/LanguageAdapters.ts +23 -0
- package/src/core/codemirror/language/__tests__/ast.test.ts +124 -0
- package/src/core/codemirror/language/__tests__/extension.test.ts +260 -0
- package/src/core/codemirror/language/__tests__/indentOneTab.test.ts +31 -0
- package/src/core/codemirror/language/__tests__/markdown.test.ts +495 -0
- package/src/core/codemirror/language/__tests__/sql.test.ts +1640 -0
- package/src/core/codemirror/language/__tests__/utils.test.ts +166 -0
- package/src/core/codemirror/language/commands.ts +59 -0
- package/src/core/codemirror/language/embedded/__tests__/embedded-python.test.ts +163 -0
- package/src/core/codemirror/language/embedded/embedded-python.ts +131 -0
- package/src/core/codemirror/language/embedded/latex.ts +257 -0
- package/src/core/codemirror/language/extension.ts +322 -0
- package/src/core/codemirror/language/languages/markdown.ts +261 -0
- package/src/core/codemirror/language/languages/python.ts +329 -0
- package/src/core/codemirror/language/languages/sql/completion-sources.tsx +99 -0
- package/src/core/codemirror/language/languages/sql/completion-store.ts +191 -0
- package/src/core/codemirror/language/languages/sql/sql.ts +545 -0
- package/src/core/codemirror/language/languages/sql/utils.ts +42 -0
- package/src/core/codemirror/language/metadata.ts +71 -0
- package/src/core/codemirror/language/panel/markdown.tsx +63 -0
- package/src/core/codemirror/language/panel/panel.tsx +197 -0
- package/src/core/codemirror/language/panel/sql.tsx +132 -0
- package/src/core/codemirror/language/types.ts +41 -0
- package/src/core/codemirror/language/utils/ast.ts +84 -0
- package/src/core/codemirror/language/utils/indentOneTab.ts +9 -0
- package/src/core/codemirror/language/utils/quotes.ts +18 -0
- package/src/core/codemirror/language/utils.ts +78 -0
- package/src/core/codemirror/lsp/__tests__/notebook-lsp.test.ts +860 -0
- package/src/core/codemirror/lsp/federated-lsp.ts +235 -0
- package/src/core/codemirror/lsp/lens.ts +130 -0
- package/src/core/codemirror/lsp/notebook-lsp.ts +604 -0
- package/src/core/codemirror/lsp/transports.ts +31 -0
- package/src/core/codemirror/lsp/types.ts +55 -0
- package/src/core/codemirror/lsp/utils.ts +11 -0
- package/src/core/codemirror/markdown/__tests__/commands.test.ts +522 -0
- package/src/core/codemirror/markdown/commands.ts +478 -0
- package/src/core/codemirror/markdown/completions.ts +273 -0
- package/src/core/codemirror/markdown/extension.ts +106 -0
- package/src/core/codemirror/misc/__tests__/dnd.test.ts +111 -0
- package/src/core/codemirror/misc/__tests__/paste.test.ts +239 -0
- package/src/core/codemirror/misc/dnd.ts +48 -0
- package/src/core/codemirror/misc/paste.ts +181 -0
- package/src/core/codemirror/placeholder/__tests__/extensions.test.ts +132 -0
- package/src/core/codemirror/placeholder/extensions.ts +99 -0
- package/src/core/codemirror/react-dom/createPanel.tsx +39 -0
- package/src/core/codemirror/reactive-references/__tests__/analyzer.test.ts +1222 -0
- package/src/core/codemirror/reactive-references/analyzer.ts +608 -0
- package/src/core/codemirror/reactive-references/extension.ts +154 -0
- package/src/core/codemirror/readonly/__tests__/extension.test.ts +55 -0
- package/src/core/codemirror/readonly/extension.ts +187 -0
- package/src/core/codemirror/rtc/extension.ts +450 -0
- package/src/core/codemirror/rtc/loro/awareness.ts +496 -0
- package/src/core/codemirror/rtc/loro/colors.ts +38 -0
- package/src/core/codemirror/rtc/loro/sync.ts +159 -0
- package/src/core/codemirror/theme/__tests__/light.test.ts +136 -0
- package/src/core/codemirror/theme/dark.ts +50 -0
- package/src/core/codemirror/theme/light.ts +58 -0
- package/src/core/codemirror/types.ts +5 -0
- package/src/core/codemirror/utils.ts +103 -0
- package/src/core/codemirror/vim/cursor-visibility.ts +58 -0
- package/src/core/config/__tests__/config-schema.test.ts +232 -0
- package/src/core/config/capabilities.ts +15 -0
- package/src/core/config/config-schema.ts +296 -0
- package/src/core/config/config.ts +105 -0
- package/src/core/config/feature-flag.tsx +62 -0
- package/src/core/config/if-capability.tsx +19 -0
- package/src/core/config/widths.ts +5 -0
- package/src/core/constants.ts +52 -0
- package/src/core/datasets/__tests__/all-tables.test.ts +466 -0
- package/src/core/datasets/__tests__/data-source.test.ts +461 -0
- package/src/core/datasets/data-source-connections.ts +334 -0
- package/src/core/datasets/engines.ts +10 -0
- package/src/core/datasets/request-registry.ts +34 -0
- package/src/core/datasets/state.ts +143 -0
- package/src/core/datasets/types.ts +38 -0
- package/src/core/debugger/state.ts +10 -0
- package/src/core/documentation/state.ts +13 -0
- package/src/core/dom/__tests__/htmlUtils.test.ts +22 -0
- package/src/core/dom/__tests__/outline.test.ts +370 -0
- package/src/core/dom/defineCustomElement.ts +23 -0
- package/src/core/dom/events.ts +94 -0
- package/src/core/dom/htmlUtils.ts +75 -0
- package/src/core/dom/outline.ts +123 -0
- package/src/core/dom/ui-element.css +8 -0
- package/src/core/dom/ui-element.ts +249 -0
- package/src/core/dom/uiregistry.ts +209 -0
- package/src/core/edit-app.tsx +189 -0
- package/src/core/errors/__tests__/errors.test.ts +62 -0
- package/src/core/errors/__tests__/utils.test.ts +108 -0
- package/src/core/errors/errors.ts +96 -0
- package/src/core/errors/state.ts +44 -0
- package/src/core/errors/utils.ts +67 -0
- package/src/core/export/hooks.ts +60 -0
- package/src/core/functions/FunctionRegistry.ts +18 -0
- package/src/core/hotkeys/__tests__/shortcuts.test.ts +166 -0
- package/src/core/hotkeys/actions.ts +38 -0
- package/src/core/hotkeys/hotkeys.ts +511 -0
- package/src/core/hotkeys/shortcuts.ts +117 -0
- package/src/core/islands/__tests__/parse.test.ts +89 -0
- package/src/core/islands/bridge.ts +196 -0
- package/src/core/islands/components/output-wrapper.tsx +154 -0
- package/src/core/islands/components/web-components.tsx +120 -0
- package/src/core/islands/islands.css +14 -0
- package/src/core/islands/main.ts +200 -0
- package/src/core/islands/parse.ts +161 -0
- package/src/core/islands/state.ts +30 -0
- package/src/core/islands/toast.ts +41 -0
- package/src/core/islands/utils.ts +5 -0
- package/src/core/islands/worker/controller.ts +52 -0
- package/src/core/islands/worker/worker.tsx +178 -0
- package/src/core/kernel/RuntimeState.ts +94 -0
- package/src/core/kernel/__tests__/RuntimeState.test.ts +57 -0
- package/src/core/kernel/__tests__/handlers.test.ts +61 -0
- package/src/core/kernel/__tests__/session.test.ts +10 -0
- package/src/core/kernel/handlers.ts +159 -0
- package/src/core/kernel/messages.ts +54 -0
- package/src/core/kernel/queryParamHandlers.ts +39 -0
- package/src/core/kernel/session.ts +50 -0
- package/src/core/layout/layout.ts +99 -0
- package/src/core/layout/useTogglePresenting.ts +50 -0
- package/src/core/meta/globals.ts +25 -0
- package/src/core/meta/state.ts +25 -0
- package/src/core/mime.ts +9 -0
- package/src/core/mode.ts +80 -0
- package/src/core/network/DeferredRequestRegistry.ts +71 -0
- package/src/core/network/__tests__/DeferredRequestRegistry.test.ts +37 -0
- package/src/core/network/__tests__/api.test.ts +80 -0
- package/src/core/network/api.ts +145 -0
- package/src/core/network/auth.ts +13 -0
- package/src/core/network/connection.ts +33 -0
- package/src/core/network/requests-network.ts +398 -0
- package/src/core/network/requests-static.ts +88 -0
- package/src/core/network/requests-toasting.ts +91 -0
- package/src/core/network/requests.ts +24 -0
- package/src/core/network/resolve.ts +17 -0
- package/src/core/network/types.ts +188 -0
- package/src/core/packages/toast-components.tsx +88 -0
- package/src/core/packages/useInstallPackage.ts +46 -0
- package/src/core/rtc/state.ts +20 -0
- package/src/core/run-app.tsx +69 -0
- package/src/core/runtime/__tests__/config.test.ts +173 -0
- package/src/core/runtime/__tests__/createWsUrl.test.ts +61 -0
- package/src/core/runtime/__tests__/runtime.test.ts +603 -0
- package/src/core/runtime/config.ts +49 -0
- package/src/core/runtime/runtime.ts +277 -0
- package/src/core/runtime/types.ts +7 -0
- package/src/core/runtime/utils.ts +9 -0
- package/src/core/saving/file-state.ts +15 -0
- package/src/core/saving/filename.ts +55 -0
- package/src/core/saving/save-component.tsx +274 -0
- package/src/core/saving/state.ts +51 -0
- package/src/core/saving/useAutoSave.ts +68 -0
- package/src/core/secrets/request-registry.ts +16 -0
- package/src/core/slots/slots.ts +9 -0
- package/src/core/state/__tests__/jotai.test.ts +25 -0
- package/src/core/state/jotai.ts +69 -0
- package/src/core/state/observable.ts +23 -0
- package/src/core/static/__tests__/download-html.test.ts +41 -0
- package/src/core/static/__tests__/files.test.ts +494 -0
- package/src/core/static/__tests__/virtual-file-tracker.test.ts +92 -0
- package/src/core/static/download-html.ts +59 -0
- package/src/core/static/files.ts +150 -0
- package/src/core/static/static-state.ts +19 -0
- package/src/core/static/types.ts +8 -0
- package/src/core/static/virtual-file-tracker.ts +83 -0
- package/src/core/variables/__tests__/state.test.ts +148 -0
- package/src/core/variables/state.ts +81 -0
- package/src/core/variables/types.ts +22 -0
- package/src/core/vscode/vscode-bindings.ts +176 -0
- package/src/core/wasm/PyodideLoader.tsx +72 -0
- package/src/core/wasm/__tests__/router.test.ts +57 -0
- package/src/core/wasm/__tests__/share.test.ts +35 -0
- package/src/core/wasm/__tests__/state.test.ts +124 -0
- package/src/core/wasm/__tests__/store.test.ts +55 -0
- package/src/core/wasm/bridge.ts +622 -0
- package/src/core/wasm/router.ts +39 -0
- package/src/core/wasm/rpc.ts +32 -0
- package/src/core/wasm/share.ts +15 -0
- package/src/core/wasm/state.ts +21 -0
- package/src/core/wasm/store.ts +122 -0
- package/src/core/wasm/utils.ts +12 -0
- package/src/core/wasm/worker/bootstrap.ts +223 -0
- package/src/core/wasm/worker/constants.ts +2 -0
- package/src/core/wasm/worker/fs.ts +90 -0
- package/src/core/wasm/worker/getController.ts +16 -0
- package/src/core/wasm/worker/getFS.ts +9 -0
- package/src/core/wasm/worker/getMarimoWheel.ts +15 -0
- package/src/core/wasm/worker/getPyodideVersion.ts +10 -0
- package/src/core/wasm/worker/message-buffer.ts +32 -0
- package/src/core/wasm/worker/save-worker.ts +107 -0
- package/src/core/wasm/worker/tracer.ts +7 -0
- package/src/core/wasm/worker/types.ts +97 -0
- package/src/core/wasm/worker/worker.ts +375 -0
- package/src/core/websocket/StaticWebsocket.ts +61 -0
- package/src/core/websocket/connection-utils.ts +59 -0
- package/src/core/websocket/types.ts +43 -0
- package/src/core/websocket/useMarimoWebSocket.tsx +386 -0
- package/src/core/websocket/useWebSocket.tsx +88 -0
- package/src/css/admonition.css +127 -0
- package/src/css/app/App.css +77 -0
- package/src/css/app/Cell.css +433 -0
- package/src/css/app/Header.css +25 -0
- package/src/css/app/codemirror-completions.css +308 -0
- package/src/css/app/codemirror.css +136 -0
- package/src/css/app/fonts.css +50 -0
- package/src/css/app/print.css +86 -0
- package/src/css/app/reset.css +18 -0
- package/src/css/codehilite.css +354 -0
- package/src/css/common.css +45 -0
- package/src/css/globals.css +176 -0
- package/src/css/index.css +10 -0
- package/src/css/katex-fonts.css +214 -0
- package/src/css/katex.min.css +1182 -0
- package/src/css/md-tooltip.css +52 -0
- package/src/css/md.css +365 -0
- package/src/css/progress.css +93 -0
- package/src/css/table.css +45 -0
- package/src/custom.d.ts +24 -0
- package/src/fonts/Fira_Mono/FiraMono-Bold.ttf +0 -0
- package/src/fonts/Fira_Mono/FiraMono-Medium.ttf +0 -0
- package/src/fonts/Fira_Mono/FiraMono-Regular.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_AMS-Regular.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_AMS-Regular.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_AMS-Regular.woff2 +0 -0
- package/src/fonts/KaTeX/KaTeX_Caligraphic-Bold.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_Caligraphic-Bold.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_Caligraphic-Bold.woff2 +0 -0
- package/src/fonts/KaTeX/KaTeX_Caligraphic-Regular.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_Caligraphic-Regular.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_Caligraphic-Regular.woff2 +0 -0
- package/src/fonts/KaTeX/KaTeX_Fraktur-Bold.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_Fraktur-Bold.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_Fraktur-Bold.woff2 +0 -0
- package/src/fonts/KaTeX/KaTeX_Fraktur-Regular.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_Fraktur-Regular.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_Fraktur-Regular.woff2 +0 -0
- package/src/fonts/KaTeX/KaTeX_Main-Bold.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_Main-Bold.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_Main-Bold.woff2 +0 -0
- package/src/fonts/KaTeX/KaTeX_Main-BoldItalic.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_Main-BoldItalic.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_Main-BoldItalic.woff2 +0 -0
- package/src/fonts/KaTeX/KaTeX_Main-Italic.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_Main-Italic.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_Main-Italic.woff2 +0 -0
- package/src/fonts/KaTeX/KaTeX_Main-Regular.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_Main-Regular.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_Main-Regular.woff2 +0 -0
- package/src/fonts/KaTeX/KaTeX_Math-BoldItalic.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_Math-BoldItalic.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_Math-BoldItalic.woff2 +0 -0
- package/src/fonts/KaTeX/KaTeX_Math-Italic.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_Math-Italic.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_Math-Italic.woff2 +0 -0
- package/src/fonts/KaTeX/KaTeX_SansSerif-Bold.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_SansSerif-Bold.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_SansSerif-Bold.woff2 +0 -0
- package/src/fonts/KaTeX/KaTeX_SansSerif-Italic.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_SansSerif-Italic.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_SansSerif-Italic.woff2 +0 -0
- package/src/fonts/KaTeX/KaTeX_SansSerif-Regular.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_SansSerif-Regular.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_SansSerif-Regular.woff2 +0 -0
- package/src/fonts/KaTeX/KaTeX_Script-Regular.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_Script-Regular.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_Script-Regular.woff2 +0 -0
- package/src/fonts/KaTeX/KaTeX_Size1-Regular.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_Size1-Regular.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_Size1-Regular.woff2 +0 -0
- package/src/fonts/KaTeX/KaTeX_Size2-Regular.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_Size2-Regular.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_Size2-Regular.woff2 +0 -0
- package/src/fonts/KaTeX/KaTeX_Size3-Regular.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_Size3-Regular.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_Size3-Regular.woff2 +0 -0
- package/src/fonts/KaTeX/KaTeX_Size4-Regular.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_Size4-Regular.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_Size4-Regular.woff2 +0 -0
- package/src/fonts/KaTeX/KaTeX_Typewriter-Regular.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_Typewriter-Regular.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_Typewriter-Regular.woff2 +0 -0
- package/src/fonts/Lora/Lora-Italic-VariableFont_wght.ttf +0 -0
- package/src/fonts/Lora/Lora-VariableFont_wght.ttf +0 -0
- package/src/fonts/Lora/static/Lora-Bold.ttf +0 -0
- package/src/fonts/Lora/static/Lora-BoldItalic.ttf +0 -0
- package/src/fonts/Lora/static/Lora-Italic.ttf +0 -0
- package/src/fonts/Lora/static/Lora-Medium.ttf +0 -0
- package/src/fonts/Lora/static/Lora-MediumItalic.ttf +0 -0
- package/src/fonts/Lora/static/Lora-Regular.ttf +0 -0
- package/src/fonts/Lora/static/Lora-SemiBold.ttf +0 -0
- package/src/fonts/Lora/static/Lora-SemiBoldItalic.ttf +0 -0
- package/src/fonts/PT_Sans/PTSans-Bold.ttf +0 -0
- package/src/fonts/PT_Sans/PTSans-BoldItalic.ttf +0 -0
- package/src/fonts/PT_Sans/PTSans-Italic.ttf +0 -0
- package/src/fonts/PT_Sans/PTSans-Regular.ttf +0 -0
- package/src/hooks/__tests__/useBoolean.test.tsx +33 -0
- package/src/hooks/__tests__/useDebounce.test.tsx +182 -0
- package/src/hooks/__tests__/useEffectSkipFirstRender.test.tsx +42 -0
- package/src/hooks/__tests__/useEventListener.test.tsx +148 -0
- package/src/hooks/__tests__/useInternalStateWithSync.test.tsx +76 -0
- package/src/hooks/__tests__/useInterval.test.tsx +70 -0
- package/src/hooks/__tests__/usePackageMetadata.test.tsx +219 -0
- package/src/hooks/__tests__/useResizeHandle.test.tsx +240 -0
- package/src/hooks/__tests__/useResizeObserver.test.tsx +86 -0
- package/src/hooks/__tests__/useTimer.test.tsx +62 -0
- package/src/hooks/debug.ts +116 -0
- package/src/hooks/useAsyncData.ts +392 -0
- package/src/hooks/useAudioRecorder.ts +89 -0
- package/src/hooks/useAutoGrowInputProps.ts +56 -0
- package/src/hooks/useBoolean.ts +26 -0
- package/src/hooks/useCellRenderCount.ts +15 -0
- package/src/hooks/useDebounce.ts +95 -0
- package/src/hooks/useDeepCompareMemoize.ts +22 -0
- package/src/hooks/useEffectSkipFirstRender.ts +24 -0
- package/src/hooks/useElapsedTime.ts +25 -0
- package/src/hooks/useEvent.ts +2 -0
- package/src/hooks/useEventListener.ts +68 -0
- package/src/hooks/useHotkey.ts +77 -0
- package/src/hooks/useInternalStateWithSync.ts +26 -0
- package/src/hooks/useInterval.ts +49 -0
- package/src/hooks/useIsDragging.tsx +39 -0
- package/src/hooks/useLifecycle.ts +20 -0
- package/src/hooks/useLocalStorage.ts +22 -0
- package/src/hooks/useNonce.ts +9 -0
- package/src/hooks/usePackageMetadata.ts +52 -0
- package/src/hooks/useRecentCommands.ts +25 -0
- package/src/hooks/useResizeHandle.ts +110 -0
- package/src/hooks/useResizeObserver.ts +101 -0
- package/src/hooks/useScript.ts +90 -0
- package/src/hooks/useSelectAllContent.ts +42 -0
- package/src/hooks/useTimer.ts +48 -0
- package/src/main.tsx +20 -0
- package/src/mount.tsx +331 -0
- package/src/plugins/core/BadPlugin.tsx +72 -0
- package/src/plugins/core/RenderHTML.tsx +136 -0
- package/src/plugins/core/__test__/RenderHTML.test.ts +146 -0
- package/src/plugins/core/builder.ts +59 -0
- package/src/plugins/core/registerReactComponent.tsx +535 -0
- package/src/plugins/core/rpc.ts +55 -0
- package/src/plugins/core/sidebar-element.tsx +104 -0
- package/src/plugins/impl/ButtonPlugin.tsx +95 -0
- package/src/plugins/impl/CheckboxPlugin.tsx +56 -0
- package/src/plugins/impl/CodeEditorPlugin.tsx +119 -0
- package/src/plugins/impl/DataEditorPlugin.tsx +181 -0
- package/src/plugins/impl/DataTablePlugin.tsx +948 -0
- package/src/plugins/impl/DatePickerPlugin.tsx +74 -0
- package/src/plugins/impl/DateRangePlugin.tsx +82 -0
- package/src/plugins/impl/DateTimePickerPlugin.tsx +76 -0
- package/src/plugins/impl/DictPlugin.tsx +80 -0
- package/src/plugins/impl/DropdownPlugin.tsx +102 -0
- package/src/plugins/impl/FileBrowserPlugin.tsx +500 -0
- package/src/plugins/impl/FileUploadPlugin.tsx +302 -0
- package/src/plugins/impl/FormPlugin.tsx +294 -0
- package/src/plugins/impl/MicrophonePlugin.tsx +58 -0
- package/src/plugins/impl/MultiselectPlugin.tsx +207 -0
- package/src/plugins/impl/NumberPlugin.tsx +84 -0
- package/src/plugins/impl/RadioPlugin.tsx +77 -0
- package/src/plugins/impl/RangeSliderPlugin.tsx +163 -0
- package/src/plugins/impl/RefreshPlugin.tsx +158 -0
- package/src/plugins/impl/SearchableSelect.tsx +122 -0
- package/src/plugins/impl/SliderPlugin.tsx +166 -0
- package/src/plugins/impl/SwitchPlugin.tsx +48 -0
- package/src/plugins/impl/TabsPlugin.tsx +83 -0
- package/src/plugins/impl/TextAreaPlugin.tsx +131 -0
- package/src/plugins/impl/TextInputPlugin.tsx +169 -0
- package/src/plugins/impl/__tests__/DateTimePickerPlugin.test.tsx +45 -0
- package/src/plugins/impl/__tests__/DropdownPlugin.test.tsx +178 -0
- package/src/plugins/impl/__tests__/MultiSelectPlugin.test.ts +41 -0
- package/src/plugins/impl/__tests__/NumberPlugin.test.tsx +144 -0
- package/src/plugins/impl/anywidget/AnyWidgetPlugin.tsx +269 -0
- package/src/plugins/impl/anywidget/__tests__/AnyWidgetPlugin.test.tsx +181 -0
- package/src/plugins/impl/anywidget/__tests__/model.test.ts +370 -0
- package/src/plugins/impl/anywidget/model.ts +314 -0
- package/src/plugins/impl/chat/ChatPlugin.tsx +98 -0
- package/src/plugins/impl/chat/chat-ui.tsx +713 -0
- package/src/plugins/impl/chat/types.ts +39 -0
- package/src/plugins/impl/code/LazyAnyLanguageCodeMirror.tsx +6 -0
- package/src/plugins/impl/code/any-language-editor.tsx +68 -0
- package/src/plugins/impl/common/error-banner.tsx +111 -0
- package/src/plugins/impl/common/intent.ts +18 -0
- package/src/plugins/impl/common/labeled.tsx +69 -0
- package/src/plugins/impl/data-editor/__tests__/data-utils.test.ts +876 -0
- package/src/plugins/impl/data-editor/__tests__/glide-utils.test.ts +452 -0
- package/src/plugins/impl/data-editor/components.tsx +179 -0
- package/src/plugins/impl/data-editor/data-utils.ts +123 -0
- package/src/plugins/impl/data-editor/glide-data-editor.tsx +651 -0
- package/src/plugins/impl/data-editor/glide-utils.ts +200 -0
- package/src/plugins/impl/data-editor/themes.ts +49 -0
- package/src/plugins/impl/data-editor/types.ts +44 -0
- package/src/plugins/impl/data-explorer/ConnectedDataExplorerComponent.tsx +268 -0
- package/src/plugins/impl/data-explorer/DataExplorerPlugin.tsx +31 -0
- package/src/plugins/impl/data-explorer/components/column-summary.tsx +174 -0
- package/src/plugins/impl/data-explorer/components/icons.tsx +30 -0
- package/src/plugins/impl/data-explorer/components/query-form.tsx +296 -0
- package/src/plugins/impl/data-explorer/encoding.ts +107 -0
- package/src/plugins/impl/data-explorer/functions/function.ts +83 -0
- package/src/plugins/impl/data-explorer/functions/types.ts +32 -0
- package/src/plugins/impl/data-explorer/marks.ts +21 -0
- package/src/plugins/impl/data-explorer/queries/field-suggestion.ts +65 -0
- package/src/plugins/impl/data-explorer/queries/histograms.ts +41 -0
- package/src/plugins/impl/data-explorer/queries/queries.ts +204 -0
- package/src/plugins/impl/data-explorer/queries/removeUndefined.ts +11 -0
- package/src/plugins/impl/data-explorer/queries/types.ts +54 -0
- package/src/plugins/impl/data-explorer/queries/utils.ts +85 -0
- package/src/plugins/impl/data-explorer/spec.ts +28 -0
- package/src/plugins/impl/data-explorer/state/reducer.ts +92 -0
- package/src/plugins/impl/data-explorer/state/types.ts +28 -0
- package/src/plugins/impl/data-frames/DataFramePlugin.tsx +303 -0
- package/src/plugins/impl/data-frames/forms/__tests__/__snapshots__/form.test.tsx.snap +1600 -0
- package/src/plugins/impl/data-frames/forms/__tests__/form.test.tsx +67 -0
- package/src/plugins/impl/data-frames/forms/context.ts +13 -0
- package/src/plugins/impl/data-frames/forms/datatype-icon.tsx +43 -0
- package/src/plugins/impl/data-frames/forms/renderers.tsx +518 -0
- package/src/plugins/impl/data-frames/panel.tsx +308 -0
- package/src/plugins/impl/data-frames/schema.ts +211 -0
- package/src/plugins/impl/data-frames/types.ts +91 -0
- package/src/plugins/impl/data-frames/utils/__tests__/getUpdatedColumnTypes.test.ts +191 -0
- package/src/plugins/impl/data-frames/utils/__tests__/operators.test.ts +116 -0
- package/src/plugins/impl/data-frames/utils/getUpdatedColumnTypes.ts +67 -0
- package/src/plugins/impl/data-frames/utils/operators.ts +202 -0
- package/src/plugins/impl/image-comparison/ImageComparisonComponent.tsx +39 -0
- package/src/plugins/impl/multiselectFilterFn.tsx +22 -0
- package/src/plugins/impl/panel/PanelPlugin.tsx +266 -0
- package/src/plugins/impl/panel/__tests__/utils.test.ts +119 -0
- package/src/plugins/impl/panel/utils.ts +104 -0
- package/src/plugins/impl/plotly/PlotlyPlugin.tsx +300 -0
- package/src/plugins/impl/plotly/__tests__/parse-from-template.test.ts +73 -0
- package/src/plugins/impl/plotly/mapbox.css +359 -0
- package/src/plugins/impl/plotly/parse-from-template.ts +58 -0
- package/src/plugins/impl/plotly/plotly.css +280 -0
- package/src/plugins/impl/vega/VegaPlugin.tsx +40 -0
- package/src/plugins/impl/vega/__tests__/__snapshots__/make-selectable.test.ts.snap +1210 -0
- package/src/plugins/impl/vega/__tests__/encodings.test.ts +172 -0
- package/src/plugins/impl/vega/__tests__/loader.test.ts +73 -0
- package/src/plugins/impl/vega/__tests__/make-selectable.test.ts +575 -0
- package/src/plugins/impl/vega/__tests__/params.test.ts +52 -0
- package/src/plugins/impl/vega/__tests__/resolve-data.test.ts +236 -0
- package/src/plugins/impl/vega/__tests__/vega.test.ts +603 -0
- package/src/plugins/impl/vega/batched.ts +41 -0
- package/src/plugins/impl/vega/encodings.ts +111 -0
- package/src/plugins/impl/vega/fix-relative-url.ts +15 -0
- package/src/plugins/impl/vega/formats.ts +25 -0
- package/src/plugins/impl/vega/loader.ts +320 -0
- package/src/plugins/impl/vega/make-selectable.ts +248 -0
- package/src/plugins/impl/vega/marks.ts +36 -0
- package/src/plugins/impl/vega/params.ts +192 -0
- package/src/plugins/impl/vega/resolve-data.ts +101 -0
- package/src/plugins/impl/vega/types.ts +32 -0
- package/src/plugins/impl/vega/utils.ts +46 -0
- package/src/plugins/impl/vega/vega-component.tsx +271 -0
- package/src/plugins/impl/vega/vega-loader.ts +53 -0
- package/src/plugins/impl/vega/vega.css +31 -0
- package/src/plugins/layout/AccordionPlugin.tsx +63 -0
- package/src/plugins/layout/CalloutPlugin.tsx +34 -0
- package/src/plugins/layout/DownloadPlugin.tsx +136 -0
- package/src/plugins/layout/ImageComparisonPlugin.tsx +35 -0
- package/src/plugins/layout/JsonOutputPlugin.tsx +47 -0
- package/src/plugins/layout/LazyPlugin.tsx +98 -0
- package/src/plugins/layout/MimeRenderPlugin.tsx +45 -0
- package/src/plugins/layout/NavigationMenuPlugin.tsx +219 -0
- package/src/plugins/layout/ProgressPlugin.tsx +175 -0
- package/src/plugins/layout/RoutesPlugin.tsx +81 -0
- package/src/plugins/layout/StatPlugin.tsx +100 -0
- package/src/plugins/layout/TexPlugin.tsx +102 -0
- package/src/plugins/layout/__test__/ProgressPlugin.test.ts +26 -0
- package/src/plugins/layout/carousel/CarouselPlugin.tsx +48 -0
- package/src/plugins/layout/mermaid/MermaidPlugin.tsx +26 -0
- package/src/plugins/layout/mermaid/mermaid.tsx +94 -0
- package/src/plugins/layout/navigation-menu.css +37 -0
- package/src/plugins/plugins.ts +116 -0
- package/src/plugins/stateless-plugin.ts +29 -0
- package/src/plugins/types.ts +82 -0
- package/src/stories/__fixtures__/vega.ts +225 -0
- package/src/stories/accordion.stories.tsx +100 -0
- package/src/stories/alert-dialog.mdx +42 -0
- package/src/stories/app-chrome.stories.tsx +26 -0
- package/src/stories/button.stories.tsx +90 -0
- package/src/stories/callout.stories.tsx +73 -0
- package/src/stories/cell-status.stories.tsx +145 -0
- package/src/stories/cell.stories.tsx +336 -0
- package/src/stories/checkbox.stories.tsx +44 -0
- package/src/stories/colors.stories.tsx +156 -0
- package/src/stories/combobox.stories.tsx +133 -0
- package/src/stories/context-menu.mdx +23 -0
- package/src/stories/data-explorer.stories.tsx +30 -0
- package/src/stories/data-table.stories.tsx +130 -0
- package/src/stories/dataframe.stories.tsx +46 -0
- package/src/stories/debugger.stories.tsx +34 -0
- package/src/stories/dialog.stories.tsx +80 -0
- package/src/stories/dropdown-menu.mdx +159 -0
- package/src/stories/editor-inputs.stories.tsx +47 -0
- package/src/stories/editor.stories.tsx +91 -0
- package/src/stories/file-upload.stories.tsx +103 -0
- package/src/stories/form-wrapper.stories.tsx +147 -0
- package/src/stories/input.stories.tsx +56 -0
- package/src/stories/label.mdx +9 -0
- package/src/stories/log-viewer.stories.tsx +74 -0
- package/src/stories/number-field.mdx +17 -0
- package/src/stories/number-field.stories.tsx +41 -0
- package/src/stories/progress-component.stories.tsx +74 -0
- package/src/stories/progress.stories.tsx +33 -0
- package/src/stories/radio-group.mdx +54 -0
- package/src/stories/select-native.stories.tsx +49 -0
- package/src/stories/select.stories.tsx +92 -0
- package/src/stories/slider.stories.tsx +27 -0
- package/src/stories/stat.stories.tsx +123 -0
- package/src/stories/switch.mdx +20 -0
- package/src/stories/switchable-multi-select.stories.tsx +31 -0
- package/src/stories/tabs.mdx +59 -0
- package/src/stories/textarea.stories.tsx +58 -0
- package/src/stories/theme.stories.tsx +111 -0
- package/src/stories/tooltip.mdx +32 -0
- package/src/stories/typography.stories.tsx +80 -0
- package/src/stories/variables.stories.tsx +58 -0
- package/src/stories/vega.stories.tsx +57 -0
- package/src/theme/ThemeProvider.tsx +32 -0
- package/src/theme/namespace.tsx +23 -0
- package/src/theme/useTheme.ts +89 -0
- package/src/utils/Deferred.ts +20 -0
- package/src/utils/Logger.ts +91 -0
- package/src/utils/__tests__/Deferred.test.ts +38 -0
- package/src/utils/__tests__/arrays.test.ts +130 -0
- package/src/utils/__tests__/batch-requests.test.ts +60 -0
- package/src/utils/__tests__/blob.test.ts +52 -0
- package/src/utils/__tests__/cell-urls.test.ts +92 -0
- package/src/utils/__tests__/createReducer.test.ts +184 -0
- package/src/utils/__tests__/data-views.test.ts +112 -0
- package/src/utils/__tests__/dates.test.ts +188 -0
- package/src/utils/__tests__/edit-distance.test.ts +302 -0
- package/src/utils/__tests__/errors.test.ts +54 -0
- package/src/utils/__tests__/filenames.test.ts +30 -0
- package/src/utils/__tests__/id-tree.test.ts +1994 -0
- package/src/utils/__tests__/json-parser.test.ts +79 -0
- package/src/utils/__tests__/local-storage.test.ts +77 -0
- package/src/utils/__tests__/lru.test.ts +74 -0
- package/src/utils/__tests__/maps.test.ts +91 -0
- package/src/utils/__tests__/math.test.ts +29 -0
- package/src/utils/__tests__/multi-map.test.ts +295 -0
- package/src/utils/__tests__/numbers.test.ts +76 -0
- package/src/utils/__tests__/path.test.ts +170 -0
- package/src/utils/__tests__/pluralize.test.ts +47 -0
- package/src/utils/__tests__/routes.test.ts +134 -0
- package/src/utils/__tests__/sets.test.ts +41 -0
- package/src/utils/__tests__/shallow-compare.test.ts +55 -0
- package/src/utils/__tests__/strings.test.ts +68 -0
- package/src/utils/__tests__/time.test.ts +61 -0
- package/src/utils/__tests__/timed-cache.test.ts +142 -0
- package/src/utils/__tests__/timeout.test.ts +153 -0
- package/src/utils/__tests__/traceback.test.ts +34 -0
- package/src/utils/__tests__/url.test.ts +100 -0
- package/src/utils/__tests__/urls.test.ts +10 -0
- package/src/utils/__tests__/versions.test.ts +63 -0
- package/src/utils/__tests__/waitForWs.test.ts +76 -0
- package/src/utils/arrays.ts +75 -0
- package/src/utils/assertExists.ts +12 -0
- package/src/utils/assertNever.ts +20 -0
- package/src/utils/batch-requests.ts +28 -0
- package/src/utils/blob.ts +45 -0
- package/src/utils/cell-urls.ts +31 -0
- package/src/utils/cn.ts +8 -0
- package/src/utils/copy.ts +17 -0
- package/src/utils/createReducer.ts +137 -0
- package/src/utils/data-views.ts +54 -0
- package/src/utils/dates.ts +145 -0
- package/src/utils/dereference.ts +10 -0
- package/src/utils/download.ts +47 -0
- package/src/utils/edit-distance.ts +141 -0
- package/src/utils/errors.ts +63 -0
- package/src/utils/events.ts +85 -0
- package/src/utils/fileToBase64.ts +30 -0
- package/src/utils/filenames.ts +29 -0
- package/src/utils/functions.ts +24 -0
- package/src/utils/id-tree.tsx +1032 -0
- package/src/utils/idle.ts +19 -0
- package/src/utils/invariant.ts +37 -0
- package/src/utils/json/__tests__/base64.test.ts +100 -0
- package/src/utils/json/base64.ts +51 -0
- package/src/utils/json/json-parser.ts +65 -0
- package/src/utils/lazy.ts +30 -0
- package/src/utils/links.ts +11 -0
- package/src/utils/localStorage.ts +132 -0
- package/src/utils/lru.ts +68 -0
- package/src/utils/maps.ts +65 -0
- package/src/utils/math.ts +6 -0
- package/src/utils/mergeRefs.ts +14 -0
- package/src/utils/multi-map.ts +71 -0
- package/src/utils/numbers.ts +124 -0
- package/src/utils/objects.ts +105 -0
- package/src/utils/once.ts +17 -0
- package/src/utils/pathUtils.test.ts +113 -0
- package/src/utils/pathUtils.ts +76 -0
- package/src/utils/paths.ts +67 -0
- package/src/utils/pluralize.ts +35 -0
- package/src/utils/python-poet/__tests__/poet.test.ts +286 -0
- package/src/utils/python-poet/poet.ts +196 -0
- package/src/utils/reload-safe.ts +15 -0
- package/src/utils/repl.ts +23 -0
- package/src/utils/routes.ts +36 -0
- package/src/utils/scroll.ts +38 -0
- package/src/utils/sets.ts +30 -0
- package/src/utils/shallow-compare.ts +30 -0
- package/src/utils/staticImplements.ts +7 -0
- package/src/utils/strings.ts +64 -0
- package/src/utils/time.ts +39 -0
- package/src/utils/timed-cache.ts +52 -0
- package/src/utils/timeout.ts +42 -0
- package/src/utils/traceback.ts +104 -0
- package/src/utils/tracer.ts +106 -0
- package/src/utils/typed.ts +17 -0
- package/src/utils/url.ts +12 -0
- package/src/utils/urls.ts +33 -0
- package/src/utils/uuid.ts +8 -0
- package/src/utils/versions.ts +66 -0
- package/src/utils/vitals.ts +30 -0
- package/src/utils/waitForWs.ts +31 -0
- package/dist/assets/_baseMap-CRSErap7.js +0 -1
- package/dist/assets/channel-DkujgbuA.js +0 -1
- package/dist/assets/classDiagram-M3E45YP4-C27KFaf-.js +0 -1
- package/dist/assets/classDiagram-v2-YAWTLIQI-C27KFaf-.js +0 -1
- package/dist/assets/clone-BcaRetEG.js +0 -1
- package/dist/assets/edit-page-CyEUf7VL.js +0 -163
- package/dist/assets/index-BlxPam9h.css +0 -1
- package/dist/assets/infoDiagram-LHK5PUON-DM8xmmD0.js +0 -2
- package/dist/assets/links-UdVi9TCH.js +0 -17
- package/dist/assets/min-DsZNGHWk.js +0 -1
- package/dist/assets/sortBy-DRXBnSF7.js +0 -1
- package/dist/assets/stateDiagram-v2-5AN5P6BG-BmONtexb.js +0 -1
- package/dist/assets/storage-C6lB9RSO.js +0 -26
- package/dist/assets/time-CjxeuzoW.js +0 -1
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/* Copyright 2024 Marimo. All rights reserved. */
|
|
2
|
+
export function dbDisplayName(name: string) {
|
|
3
|
+
switch (name) {
|
|
4
|
+
case "duckdb":
|
|
5
|
+
return "DuckDB";
|
|
6
|
+
case "motherduck":
|
|
7
|
+
return "MotherDuck";
|
|
8
|
+
case "sqlite":
|
|
9
|
+
return "SQLite";
|
|
10
|
+
case "postgres":
|
|
11
|
+
case "postgresql":
|
|
12
|
+
return "PostgreSQL";
|
|
13
|
+
case "mysql":
|
|
14
|
+
return "MySQL";
|
|
15
|
+
case "mariadb":
|
|
16
|
+
return "MariaDB";
|
|
17
|
+
case "mssql":
|
|
18
|
+
return "Microsoft SQL Server";
|
|
19
|
+
case "oracle":
|
|
20
|
+
return "Oracle";
|
|
21
|
+
case "redshift":
|
|
22
|
+
return "Amazon Redshift";
|
|
23
|
+
case "snowflake":
|
|
24
|
+
return "Snowflake";
|
|
25
|
+
case "bigquery":
|
|
26
|
+
return "Google BigQuery";
|
|
27
|
+
case "clickhouse":
|
|
28
|
+
return "ClickHouse";
|
|
29
|
+
case "timeplus":
|
|
30
|
+
return "Timeplus";
|
|
31
|
+
case "databricks":
|
|
32
|
+
return "Databricks";
|
|
33
|
+
case "db2":
|
|
34
|
+
return "IBM Db2";
|
|
35
|
+
case "hive":
|
|
36
|
+
return "Apache Hive";
|
|
37
|
+
case "impala":
|
|
38
|
+
return "Apache Impala";
|
|
39
|
+
case "presto":
|
|
40
|
+
return "Presto";
|
|
41
|
+
case "trino":
|
|
42
|
+
return "Trino";
|
|
43
|
+
case "cockroachdb":
|
|
44
|
+
return "CockroachDB";
|
|
45
|
+
case "timescaledb":
|
|
46
|
+
return "TimescaleDB";
|
|
47
|
+
case "singlestore":
|
|
48
|
+
return "SingleStore";
|
|
49
|
+
case "cassandra":
|
|
50
|
+
return "Apache Cassandra";
|
|
51
|
+
case "mongodb":
|
|
52
|
+
return "MongoDB";
|
|
53
|
+
case "iceberg":
|
|
54
|
+
return "Apache Iceberg";
|
|
55
|
+
default:
|
|
56
|
+
return name;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function transformDisplayName(displayName: string): string {
|
|
61
|
+
const [dbName, engineName] = displayName.split(" ");
|
|
62
|
+
if (!engineName) {
|
|
63
|
+
return dbDisplayName(displayName);
|
|
64
|
+
}
|
|
65
|
+
return `${dbDisplayName(dbName)} ${engineName}`;
|
|
66
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/* Copyright 2024 Marimo. All rights reserved. */
|
|
2
|
+
import { getCellEditorView } from "@/core/cells/cells";
|
|
3
|
+
import type { CellId } from "@/core/cells/ids";
|
|
4
|
+
import { goToVariableDefinition } from "@/core/codemirror/go-to-definition/commands";
|
|
5
|
+
import { store } from "@/core/state/jotai";
|
|
6
|
+
import { variablesAtom } from "@/core/variables/state";
|
|
7
|
+
import type { VariableName } from "@/core/variables/types";
|
|
8
|
+
import { cn } from "@/utils/cn";
|
|
9
|
+
|
|
10
|
+
interface Props {
|
|
11
|
+
variableName: VariableName;
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export const EngineVariable: React.FC<Props> = ({
|
|
16
|
+
variableName,
|
|
17
|
+
className,
|
|
18
|
+
}) => {
|
|
19
|
+
const onClick = () => {
|
|
20
|
+
const cellId = findCellId(variableName);
|
|
21
|
+
if (!cellId) {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
const editorView = getCellEditorView(cellId);
|
|
25
|
+
if (editorView) {
|
|
26
|
+
goToVariableDefinition(editorView, variableName);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
return (
|
|
31
|
+
<button
|
|
32
|
+
type="button"
|
|
33
|
+
onClick={onClick}
|
|
34
|
+
className={cn(
|
|
35
|
+
"text-link opacity-80 hover:opacity-100 hover:underline",
|
|
36
|
+
className,
|
|
37
|
+
)}
|
|
38
|
+
>
|
|
39
|
+
{variableName}
|
|
40
|
+
</button>
|
|
41
|
+
);
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
function findCellId(variableName: VariableName): CellId | undefined {
|
|
45
|
+
const variables = store.get(variablesAtom);
|
|
46
|
+
const variable = variables[variableName];
|
|
47
|
+
if (!variable) {
|
|
48
|
+
return undefined;
|
|
49
|
+
}
|
|
50
|
+
return variable.declaredBy[0];
|
|
51
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/* Copyright 2024 Marimo. All rights reserved. */
|
|
2
|
+
|
|
3
|
+
import { DatabaseIcon } from "lucide-react";
|
|
4
|
+
import type { FC } from "react";
|
|
5
|
+
import { cn } from "@/utils/cn";
|
|
6
|
+
import ClickhouseIcon from "./icons/clickhouse.svg";
|
|
7
|
+
import DatabricksIcon from "./icons/databricks.svg";
|
|
8
|
+
import DataFusionIcon from "./icons/datafusion.png";
|
|
9
|
+
import DuckDBIcon from "./icons/duckdb.svg";
|
|
10
|
+
import GoogleBigQueryIcon from "./icons/googlebigquery.svg";
|
|
11
|
+
import IcebergIcon from "./icons/iceberg.png";
|
|
12
|
+
import MotherDuckIcon from "./icons/motherduck.svg";
|
|
13
|
+
import MySQLIcon from "./icons/mysql.svg";
|
|
14
|
+
import PostgresQLIcon from "./icons/postgresql.svg";
|
|
15
|
+
import RedshiftIcon from "./icons/redshift.svg";
|
|
16
|
+
import SnowflakeIcon from "./icons/snowflake.svg";
|
|
17
|
+
import PySparkIcon from "./icons/spark.svg";
|
|
18
|
+
import SQLiteIcon from "./icons/sqlite.svg";
|
|
19
|
+
import TimeplusIcon from "./icons/timeplus.svg";
|
|
20
|
+
import TrinoIcon from "./icons/trino.svg";
|
|
21
|
+
|
|
22
|
+
export type DBLogoName =
|
|
23
|
+
| "sqlite"
|
|
24
|
+
| "duckdb"
|
|
25
|
+
| "motherduck"
|
|
26
|
+
| "postgres"
|
|
27
|
+
| "postgresql"
|
|
28
|
+
| "mysql"
|
|
29
|
+
| "snowflake"
|
|
30
|
+
| "databricks"
|
|
31
|
+
| "clickhouse"
|
|
32
|
+
| "timeplus"
|
|
33
|
+
| "bigquery"
|
|
34
|
+
| "trino"
|
|
35
|
+
| "iceberg"
|
|
36
|
+
| "datafusion"
|
|
37
|
+
| "pyspark"
|
|
38
|
+
| "redshift";
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Icons are from https://simpleicons.org/
|
|
42
|
+
*/
|
|
43
|
+
|
|
44
|
+
interface DatabaseLogoProps {
|
|
45
|
+
name: string;
|
|
46
|
+
className?: string;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const URLS: Record<DBLogoName, string | undefined> = {
|
|
50
|
+
sqlite: SQLiteIcon,
|
|
51
|
+
duckdb: DuckDBIcon,
|
|
52
|
+
motherduck: MotherDuckIcon,
|
|
53
|
+
postgres: PostgresQLIcon,
|
|
54
|
+
postgresql: PostgresQLIcon,
|
|
55
|
+
mysql: MySQLIcon,
|
|
56
|
+
snowflake: SnowflakeIcon,
|
|
57
|
+
databricks: DatabricksIcon,
|
|
58
|
+
clickhouse: ClickhouseIcon,
|
|
59
|
+
timeplus: TimeplusIcon,
|
|
60
|
+
bigquery: GoogleBigQueryIcon,
|
|
61
|
+
trino: TrinoIcon,
|
|
62
|
+
iceberg: IcebergIcon,
|
|
63
|
+
datafusion: DataFusionIcon,
|
|
64
|
+
pyspark: PySparkIcon,
|
|
65
|
+
redshift: RedshiftIcon,
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
export const DatabaseLogo: FC<DatabaseLogoProps> = ({ name, className }) => {
|
|
69
|
+
const lowerName = name.toLowerCase();
|
|
70
|
+
|
|
71
|
+
const url = URLS[lowerName as DBLogoName];
|
|
72
|
+
|
|
73
|
+
if (!url) {
|
|
74
|
+
// Shift the icon down a bit to align with the text
|
|
75
|
+
return <DatabaseIcon className={cn("mt-0.5", className)} />;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
return (
|
|
79
|
+
<img
|
|
80
|
+
src={url}
|
|
81
|
+
alt={name}
|
|
82
|
+
className={cn(
|
|
83
|
+
"invert-[.5] dark:invert-[.7]",
|
|
84
|
+
className,
|
|
85
|
+
// Remove filters for PNG icons
|
|
86
|
+
url.endsWith(".png") &&
|
|
87
|
+
"brightness-100 dark:brightness-100 invert-0 dark:invert-0",
|
|
88
|
+
)}
|
|
89
|
+
/>
|
|
90
|
+
);
|
|
91
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>ClickHouse</title><path d="M21.333 10H24v4h-2.667ZM16 1.335h2.667v21.33H16Zm-5.333 0h2.666v21.33h-2.666ZM0 22.665V1.335h2.667v21.33zm5.333-21.33H8v21.33H5.333Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Databricks</title><path d="M.95 14.184L12 20.403l9.919-5.55v2.21L12 22.662l-10.484-5.96-.565.308v.77L12 24l11.05-6.218v-4.317l-.515-.309L12 19.118l-9.867-5.653v-2.21L12 16.805l11.05-6.218V6.32l-.515-.308L12 11.974 2.647 6.681 12 1.388l7.76 4.368.668-.411v-.566L12 0 .95 6.27v.72L12 13.207l9.919-5.55v2.26L12 15.52 1.516 9.56l-.565.308Z"/></svg>
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>DuckDB</title><path d="M12 0C5.363 0 0 5.363 0 12s5.363 12 12 12 12-5.363 12-12S18.637 0 12 0zM9.502 7.03a4.974 4.974 0 0 1 4.97 4.97 4.974 4.974 0 0 1-4.97 4.97A4.974 4.974 0 0 1 4.532 12a4.974 4.974 0 0 1 4.97-4.97zm6.563 3.183h2.351c.98 0 1.787.782 1.787 1.762s-.807 1.789-1.787 1.789h-2.351v-3.551z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Google BigQuery</title><path d="M5.676 10.595h2.052v5.244a5.892 5.892 0 0 1-2.052-2.088v-3.156zm18.179 10.836a.504.504 0 0 1 0 .708l-1.716 1.716a.504.504 0 0 1-.708 0l-4.248-4.248a.206.206 0 0 1-.007-.007c-.02-.02-.028-.045-.043-.066a10.736 10.736 0 0 1-6.334 2.065C4.835 21.599 0 16.764 0 10.799S4.835 0 10.8 0s10.799 4.835 10.799 10.8c0 2.369-.772 4.553-2.066 6.333.025.017.052.028.074.05l4.248 4.248zm-5.028-10.632a8.015 8.015 0 1 0-8.028 8.028h.024a8.016 8.016 0 0 0 8.004-8.028zm-4.86 4.98a6.002 6.002 0 0 0 2.04-2.184v-1.764h-2.04v3.948zm-4.5.948c.442.057.887.08 1.332.072.4.025.8.025 1.2 0V7.692H9.468v9.035z"/></svg>
|
|
Binary file
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<title>MotherDuck</title>
|
|
3
|
+
<g transform="scale(0.85) translate(0, 2)">
|
|
4
|
+
<path fill="#ff9538"
|
|
5
|
+
d="M1.71 15.86s7.45 5.32 7.89 5.59c.44.27 1.08.33 1.64.11.56-.22.98-.71 1.11-1.21s1.85-9.49 1.85-9.49c.02-.12.07-.48-.13-.83-.27-.47-.86-.71-1.38-.57-.42.12-.64.44-.7.55-.09.17-.26.45-.57.7-.24.19-.47.3-.58.34-.96.38-2.02.06-2.61-.72-.38-.48-1.04-.67-1.64-.43-.6.24-.94.84-.89 1.45.11.98-.44 1.94-1.4 2.32-.51.21-1.06.21-1.54.05-.12-.03-.51-.12-.89.09-.48.26-.74.84-.61 1.37.09.39.38.62.48.69z" />
|
|
6
|
+
<path fill="#ff9538"
|
|
7
|
+
d="M14.12 4.21s2.65 8.76 2.83 9.24c.19.48.66.92 1.23 1.09.58.16 1.21.03 1.62-.28.41-.31 7.25-6.39 7.25-6.39.09-.08.35-.34.4-.74.07-.53-.25-1.09-.75-1.29-.4-.16-.78-.04-.89 0-.18.08-.48.2-.88.2-.3.01-.55-.05-.67-.08-.99-.28-1.64-1.18-1.63-2.16-.01-.61-.42-1.17-1.04-1.35-.62-.18-1.26.09-1.59.6-.51.84-1.53 1.27-2.52.99-.53-.15-.96-.48-1.25-.91-.07-.09-.33-.4-.76-.48-.54-.09-1.1.22-1.32.71-.16.37-.08.72-.04.84z" />
|
|
8
|
+
</g>
|
|
9
|
+
</svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>MySQL</title><path d="M16.405 5.501c-.115 0-.193.014-.274.033v.013h.014c.054.104.146.18.214.273.054.107.1.214.154.32l.014-.015c.094-.066.14-.172.14-.333-.04-.047-.046-.094-.08-.14-.04-.067-.126-.1-.18-.153zM5.77 18.695h-.927a50.854 50.854 0 00-.27-4.41h-.008l-1.41 4.41H2.45l-1.4-4.41h-.01a72.892 72.892 0 00-.195 4.41H0c.055-1.966.192-3.81.41-5.53h1.15l1.335 4.064h.008l1.347-4.064h1.095c.242 2.015.384 3.86.428 5.53zm4.017-4.08c-.378 2.045-.876 3.533-1.492 4.46-.482.716-1.01 1.073-1.583 1.073-.153 0-.34-.046-.566-.138v-.494c.11.017.24.026.386.026.268 0 .483-.075.647-.222.197-.18.295-.382.295-.605 0-.155-.077-.47-.23-.944L6.23 14.615h.91l.727 2.36c.164.536.233.91.205 1.123.4-1.064.678-2.227.835-3.483zm12.325 4.08h-2.63v-5.53h.885v4.85h1.745zm-3.32.135l-1.016-.5c.09-.076.177-.158.255-.25.433-.506.648-1.258.648-2.253 0-1.83-.718-2.746-2.155-2.746-.704 0-1.254.232-1.65.697-.43.508-.646 1.256-.646 2.245 0 .972.19 1.686.574 2.14.35.41.877.615 1.583.615.264 0 .506-.033.725-.098l1.325.772.36-.622zM15.5 17.588c-.225-.36-.337-.94-.337-1.736 0-1.393.424-2.09 1.27-2.09.443 0 .77.167.977.5.224.362.336.936.336 1.723 0 1.404-.424 2.108-1.27 2.108-.445 0-.77-.167-.978-.5zm-1.658-.425c0 .47-.172.856-.516 1.156-.344.3-.803.45-1.384.45-.543 0-1.064-.172-1.573-.515l.237-.476c.438.22.833.328 1.19.328.332 0 .593-.073.783-.22a.754.754 0 00.3-.615c0-.33-.23-.61-.648-.845-.388-.213-1.163-.657-1.163-.657-.422-.307-.632-.636-.632-1.177 0-.45.157-.81.47-1.085.315-.278.72-.415 1.22-.415.512 0 .98.136 1.4.41l-.213.476a2.726 2.726 0 00-1.064-.23c-.283 0-.502.068-.654.206a.685.685 0 00-.248.524c0 .328.234.61.666.85.393.215 1.187.67 1.187.67.433.305.648.63.648 1.168zm9.382-5.852c-.535-.014-.95.04-1.297.188-.1.04-.26.04-.274.167.055.053.063.14.11.214.08.134.218.313.346.407.14.11.28.216.427.31.26.16.555.255.81.416.145.094.293.213.44.313.073.05.12.14.214.172v-.02c-.046-.06-.06-.147-.105-.214-.067-.067-.134-.127-.2-.193a3.223 3.223 0 00-.695-.675c-.214-.146-.682-.35-.77-.595l-.013-.014c.146-.013.32-.066.46-.106.227-.06.435-.047.67-.106.106-.027.213-.06.32-.094v-.06c-.12-.12-.21-.283-.334-.395a8.867 8.867 0 00-1.104-.823c-.21-.134-.476-.22-.697-.334-.08-.04-.214-.06-.26-.127-.12-.146-.19-.34-.275-.514a17.69 17.69 0 01-.547-1.163c-.12-.262-.193-.523-.34-.763-.69-1.137-1.437-1.826-2.586-2.5-.247-.14-.543-.2-.856-.274-.167-.008-.334-.02-.5-.027-.11-.047-.216-.174-.31-.235-.38-.24-1.364-.76-1.644-.072-.18.434.267.862.422 1.082.115.153.26.328.34.5.047.116.06.235.107.356.106.294.207.622.347.897.073.14.153.287.247.413.054.073.146.107.167.227-.094.136-.1.334-.154.5-.24.757-.146 1.693.194 2.25.107.166.362.534.703.393.3-.12.234-.5.32-.835.02-.08.007-.133.048-.187v.015c.094.188.188.367.274.555.206.328.566.668.867.895.16.12.287.328.487.402v-.02h-.015c-.043-.058-.1-.086-.154-.133a3.445 3.445 0 01-.35-.4 8.76 8.76 0 01-.747-1.218c-.11-.21-.202-.436-.29-.643-.04-.08-.04-.2-.107-.24-.1.146-.247.273-.32.453-.127.288-.14.642-.188 1.01-.027.007-.014 0-.027.014-.214-.052-.287-.274-.367-.46-.2-.475-.233-1.238-.06-1.785.047-.14.247-.582.167-.716-.042-.127-.174-.2-.247-.303a2.478 2.478 0 01-.24-.427c-.16-.374-.24-.788-.414-1.162-.08-.173-.22-.354-.334-.513-.127-.18-.267-.307-.368-.52-.033-.073-.08-.194-.027-.274.014-.054.042-.075.094-.09.088-.072.335.022.422.062.247.1.455.194.662.334.094.066.195.193.315.226h.14c.214.047.455.014.655.073.355.114.675.28.962.46a5.953 5.953 0 012.085 2.286c.08.154.115.295.188.455.14.33.313.663.455.982.14.315.275.636.476.897.1.14.502.213.682.286.133.06.34.115.46.188.23.14.454.3.67.454.11.076.443.243.463.378z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>PostgreSQL</title><path d="M23.5594 14.7228a.5269.5269 0 0 0-.0563-.1191c-.139-.2632-.4768-.3418-1.0074-.2321-1.6533.3411-2.2935.1312-2.5256-.0191 1.342-2.0482 2.445-4.522 3.0411-6.8297.2714-1.0507.7982-3.5237.1222-4.7316a1.5641 1.5641 0 0 0-.1509-.235C21.6931.9086 19.8007.0248 17.5099.0005c-1.4947-.0158-2.7705.3461-3.1161.4794a9.449 9.449 0 0 0-.5159-.0816 8.044 8.044 0 0 0-1.3114-.1278c-1.1822-.0184-2.2038.2642-3.0498.8406-.8573-.3211-4.7888-1.645-7.2219.0788C.9359 2.1526.3086 3.8733.4302 6.3043c.0409.818.5069 3.334 1.2423 5.7436.4598 1.5065.9387 2.7019 1.4334 3.582.553.9942 1.1259 1.5933 1.7143 1.7895.4474.1491 1.1327.1441 1.8581-.7279.8012-.9635 1.5903-1.8258 1.9446-2.2069.4351.2355.9064.3625 1.39.3772a.0569.0569 0 0 0 .0004.0041 11.0312 11.0312 0 0 0-.2472.3054c-.3389.4302-.4094.5197-1.5002.7443-.3102.064-1.1344.2339-1.1464.8115-.0025.1224.0329.2309.0919.3268.2269.4231.9216.6097 1.015.6331 1.3345.3335 2.5044.092 3.3714-.6787-.017 2.231.0775 4.4174.3454 5.0874.2212.5529.7618 1.9045 2.4692 1.9043.2505 0 .5263-.0291.8296-.0941 1.7819-.3821 2.5557-1.1696 2.855-2.9059.1503-.8707.4016-2.8753.5388-4.1012.0169-.0703.0357-.1207.057-.1362.0007-.0005.0697-.0471.4272.0307a.3673.3673 0 0 0 .0443.0068l.2539.0223.0149.001c.8468.0384 1.9114-.1426 2.5312-.4308.6438-.2988 1.8057-1.0323 1.5951-1.6698zM2.371 11.8765c-.7435-2.4358-1.1779-4.8851-1.2123-5.5719-.1086-2.1714.4171-3.6829 1.5623-4.4927 1.8367-1.2986 4.8398-.5408 6.108-.13-.0032.0032-.0066.0061-.0098.0094-2.0238 2.044-1.9758 5.536-1.9708 5.7495-.0002.0823.0066.1989.0162.3593.0348.5873.0996 1.6804-.0735 2.9184-.1609 1.1504.1937 2.2764.9728 3.0892.0806.0841.1648.1631.2518.2374-.3468.3714-1.1004 1.1926-1.9025 2.1576-.5677.6825-.9597.5517-1.0886.5087-.3919-.1307-.813-.5871-1.2381-1.3223-.4796-.839-.9635-2.0317-1.4155-3.5126zm6.0072 5.0871c-.1711-.0428-.3271-.1132-.4322-.1772.0889-.0394.2374-.0902.4833-.1409 1.2833-.2641 1.4815-.4506 1.9143-1.0002.0992-.126.2116-.2687.3673-.4426a.3549.3549 0 0 0 .0737-.1298c.1708-.1513.2724-.1099.4369-.0417.156.0646.3078.26.3695.4752.0291.1016.0619.2945-.0452.4444-.9043 1.2658-2.2216 1.2494-3.1676 1.0128zm2.094-3.988-.0525.141c-.133.3566-.2567.6881-.3334 1.003-.6674-.0021-1.3168-.2872-1.8105-.8024-.6279-.6551-.9131-1.5664-.7825-2.5004.1828-1.3079.1153-2.4468.079-3.0586-.005-.0857-.0095-.1607-.0122-.2199.2957-.2621 1.6659-.9962 2.6429-.7724.4459.1022.7176.4057.8305.928.5846 2.7038.0774 3.8307-.3302 4.7363-.084.1866-.1633.3629-.2311.5454zm7.3637 4.5725c-.0169.1768-.0358.376-.0618.5959l-.146.4383a.3547.3547 0 0 0-.0182.1077c-.0059.4747-.054.6489-.115.8693-.0634.2292-.1353.4891-.1794 1.0575-.11 1.4143-.8782 2.2267-2.4172 2.5565-1.5155.3251-1.7843-.4968-2.0212-1.2217a6.5824 6.5824 0 0 0-.0769-.2266c-.2154-.5858-.1911-1.4119-.1574-2.5551.0165-.5612-.0249-1.9013-.3302-2.6462.0044-.2932.0106-.5909.019-.8918a.3529.3529 0 0 0-.0153-.1126 1.4927 1.4927 0 0 0-.0439-.208c-.1226-.4283-.4213-.7866-.7797-.9351-.1424-.059-.4038-.1672-.7178-.0869.067-.276.1831-.5875.309-.9249l.0529-.142c.0595-.16.134-.3257.213-.5012.4265-.9476 1.0106-2.2453.3766-5.1772-.2374-1.0981-1.0304-1.6343-2.2324-1.5098-.7207.0746-1.3799.3654-1.7088.5321a5.6716 5.6716 0 0 0-.1958.1041c.0918-1.1064.4386-3.1741 1.7357-4.4823a4.0306 4.0306 0 0 1 .3033-.276.3532.3532 0 0 0 .1447-.0644c.7524-.5706 1.6945-.8506 2.802-.8325.4091.0067.8017.0339 1.1742.081 1.939.3544 3.2439 1.4468 4.0359 2.3827.8143.9623 1.2552 1.9315 1.4312 2.4543-1.3232-.1346-2.2234.1268-2.6797.779-.9926 1.4189.543 4.1729 1.2811 5.4964.1353.2426.2522.4522.2889.5413.2403.5825.5515.9713.7787 1.2552.0696.087.1372.1714.1885.245-.4008.1155-1.1208.3825-1.0552 1.717-.0123.1563-.0423.4469-.0834.8148-.0461.2077-.0702.4603-.0994.7662zm.8905-1.6211c-.0405-.8316.2691-.9185.5967-1.0105a2.8566 2.8566 0 0 0 .135-.0406 1.202 1.202 0 0 0 .1342.103c.5703.3765 1.5823.4213 3.0068.1344-.2016.1769-.5189.3994-.9533.6011-.4098.1903-1.0957.333-1.7473.3636-.7197.0336-1.0859-.0807-1.1721-.151zm.5695-9.2712c-.0059.3508-.0542.6692-.1054 1.0017-.055.3576-.112.7274-.1264 1.1762-.0142.4368.0404.8909.0932 1.3301.1066.887.216 1.8003-.2075 2.7014a3.5272 3.5272 0 0 1-.1876-.3856c-.0527-.1276-.1669-.3326-.3251-.6162-.6156-1.1041-2.0574-3.6896-1.3193-4.7446.3795-.5427 1.3408-.5661 2.1781-.463zm.2284 7.0137a12.3762 12.3762 0 0 0-.0853-.1074l-.0355-.0444c.7262-1.1995.5842-2.3862.4578-3.4385-.0519-.4318-.1009-.8396-.0885-1.2226.0129-.4061.0666-.7543.1185-1.0911.0639-.415.1288-.8443.1109-1.3505.0134-.0531.0188-.1158.0118-.1902-.0457-.4855-.5999-1.938-1.7294-3.253-.6076-.7073-1.4896-1.4972-2.6889-2.0395.5251-.1066 1.2328-.2035 2.0244-.1859 2.0515.0456 3.6746.8135 4.8242 2.2824a.908.908 0 0 1 .0667.1002c.7231 1.3556-.2762 6.2751-2.9867 10.5405zm-8.8166-6.1162c-.025.1794-.3089.4225-.6211.4225a.5821.5821 0 0 1-.0809-.0056c-.1873-.026-.3765-.144-.5059-.3156-.0458-.0605-.1203-.178-.1055-.2844.0055-.0401.0261-.0985.0925-.1488.1182-.0894.3518-.1226.6096-.0867.3163.0441.6426.1938.6113.4186zm7.9305-.4114c.0111.0792-.049.201-.1531.3102-.0683.0717-.212.1961-.4079.2232a.5456.5456 0 0 1-.075.0052c-.2935 0-.5414-.2344-.5607-.3717-.024-.1765.2641-.3106.5611-.352.297-.0414.6111.0088.6356.1851z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Amazon Redshift</title><path d="M16.639 9.932a.822.822 0 0 1-.822-.82.823.823 0 0 1 1.645 0c0 .452-.37.82-.823.82m-2.086 4.994a.823.823 0 0 1-.822-.822.822.822 0 0 1 1.645 0 .822.822 0 0 1-.823.822m-5.004-.833a.822.822 0 1 1 .002-1.644.822.822 0 0 1-.002 1.644m-2.083 4.578a.823.823 0 0 1-.823-.82.823.823 0 0 1 1.645 0c0 .452-.37.82-.822.82m9.173-11.236a1.68 1.68 0 0 0-1.68 1.676c0 .566.285 1.066.718 1.37l-.782 1.982a1.674 1.674 0 0 0-1.923 1.104l-1.753-.398a1.675 1.675 0 0 0-3.348.103c0 .432.169.823.438 1.12l-.764 1.79c-.028-.001-.053-.008-.08-.008a1.68 1.68 0 0 0-1.68 1.676 1.68 1.68 0 0 0 3.36 0c0-.593-.312-1.112-.778-1.41l.674-1.579c.161.052.33.088.508.088.661 0 1.228-.386 1.502-.94l1.856.42a1.68 1.68 0 0 0 3.327-.325c0-.5-.224-.943-.574-1.25l.822-2.083c.053.005.104.016.157.016a1.68 1.68 0 0 0 1.68-1.676 1.68 1.68 0 0 0-1.68-1.676M12 23.145c-4.17 0-7.286-1.252-7.286-2.37V4.79C6.14 5.938 9.131 6.547 12 6.547c2.869 0 5.86-.609 7.286-1.756v15.983c0 1.12-3.116 2.37-7.286 2.37M12 .856c4.293 0 7.286 1.274 7.286 2.419 0 1.143-2.993 2.418-7.286 2.418-4.293 0-7.286-1.275-7.286-2.418C4.714 2.129 7.707.855 12 .855m8.143 2.419C20.143 1.147 15.947 0 12 0 8.052 0 3.857 1.147 3.857 3.274l.002.01h-.002v17.49C3.857 22.87 8.052 24 12 24c3.947 0 8.143-1.13 8.143-3.226V3.284h-.002l.002-.01"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Snowflake</title><path d="M24 3.459c0 .646-.418 1.18-1.141 1.18-.723 0-1.142-.534-1.142-1.18 0-.647.419-1.18 1.142-1.18.723 0 1.141.533 1.141 1.18zm-.228 0c0-.533-.38-.951-.913-.951s-.913.38-.913.95c0 .533.38.952.913.952.57 0 .913-.419.913-.951zm-1.37-.533h.495c.266 0 .456.152.456.38 0 .153-.076.229-.19.305l.19.266v.038h-.266l-.19-.266h-.229v.266h-.266zm.495.228h-.229v.267h.229c.114 0 .152-.038.152-.114.038-.077-.038-.153-.152-.153zM7.602 12.4c.038-.151.076-.304.076-.456 0-.114-.038-.228-.038-.342-.114-.343-.304-.647-.646-.838l-4.87-2.777c-.685-.38-1.56-.152-1.94.533-.381.685-.153 1.56.532 1.94l2.701 1.56-2.701 1.56c-.685.38-.913 1.256-.533 1.94.38.685 1.256.914 1.94.533l4.832-2.777c.343-.267.571-.533.647-.876zm1.332 2.626c-.266-.038-.57.038-.837.19l-4.832 2.777c-.685.38-.913 1.256-.532 1.94.38.686 1.255.914 1.94.533l2.701-1.56v3.12c0 .8.647 1.408 1.446 1.408.799 0 1.407-.647 1.407-1.408v-5.592c0-.761-.57-1.37-1.293-1.408zm4.946-6.088c.266.038.57-.038.837-.19l4.832-2.777c.685-.38.913-1.256.532-1.94-.38-.686-1.255-.914-1.94-.533l-2.701 1.56V1.975c0-.799-.647-1.408-1.446-1.408-.799 0-1.446.609-1.446 1.408V7.53c0 .76.609 1.37 1.332 1.407zM3.265 5.97l4.832 2.777c.266.152.533.19.837.19.723-.038 1.331-.684 1.331-1.407V1.975c0-.799-.646-1.408-1.407-1.408-.799 0-1.446.647-1.446 1.408v3.12l-2.701-1.56c-.685-.38-1.56-.152-1.94.533-.419.646-.19 1.521.494 1.902zm9.093 6.011a.412.412 0 00-.114-.266l-.57-.571a.346.346 0 00-.267-.114.412.412 0 00-.266.114l-.571.57a.411.411 0 00-.114.267c0 .076.038.19.114.267l.57.57a.345.345 0 00.267.114c.076 0 .19-.038.266-.114l.571-.57a.412.412 0 00.114-.267zm1.598.533L11.94 14.53c-.039.038-.153.114-.229.114h-.608a.411.411 0 01-.267-.114L8.82 12.514a.408.408 0 01-.076-.229v-.608c0-.076.038-.19.114-.267l2.016-2.016a.41.41 0 01.267-.114h.608a.41.41 0 01.267.114l2.016 2.016a.347.347 0 01.114.267v.608c-.076.077-.114.19-.19.229zm5.593 5.44l-4.832-2.777c-.266-.152-.57-.19-.837-.152-.723.038-1.332.684-1.332 1.408v5.554c0 .8.647 1.408 1.408 1.408.799 0 1.446-.647 1.446-1.408v-3.12l2.7 1.56c.686.38 1.561.152 1.941-.533.419-.646.19-1.521-.494-1.94zm2.549-7.533l-2.701 1.56 2.7 1.56c.686.38.914 1.256.533 1.94-.38.685-1.255.913-1.94.533l-4.832-2.778a1.644 1.644 0 01-.647-.798c-.037-.153-.076-.305-.076-.457 0-.114.039-.228.039-.342.114-.343.342-.647.646-.837l4.832-2.778c.685-.38 1.56-.152 1.94.533.457.609.19 1.484-.494 1.864"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Apache Spark</title><path d="M10.812 0c-.425.013-.845.215-1.196.605a3.593 3.593 0 00-.493.722c-.355.667-.425 1.415-.556 2.143a551.9 551.9 0 00-.726 4.087c-.027.16-.096.227-.244.273C5.83 8.386 4.06 8.94 2.3 9.514c-.387.125-.773.289-1.114.506-1.042.665-1.196 1.753-.415 2.71.346.422.79.715 1.284.936 1.1.49 2.202.976 3.3 1.47.019.01.036.013.053.019h-.004l1.306.535c0 .023.002.045 0 .073-.2 2.03-.39 4.063-.58 6.095-.04.419-.012.831.134 1.23.317.87 1.065 1.148 1.881.701.372-.204.666-.497.937-.818 1.372-1.623 2.746-3.244 4.113-4.872.111-.133.205-.15.363-.098.349.117.697.231 1.045.347h.001c.02.012.045.02.073.03l.142.042c1.248.416 2.68.775 3.929 1.19.4.132.622.164 1.045.098.311-.048.592-.062.828-.236.602-.33.995-.957.988-1.682-.005-.427-.154-.813-.35-1.186-.82-1.556-1.637-3.113-2.461-4.666-.078-.148-.076-.243.037-.375 1.381-1.615 2.756-3.236 4.133-4.855.272-.32.513-.658.653-1.058.308-.878-.09-1.57-1-1.741a2.783 2.783 0 00-1.235.069c-1.974.521-3.947 1.041-5.918 1.57-.175.047-.26.015-.355-.144a353.08 353.08 0 00-2.421-4.018 4.61 4.61 0 00-.652-.849c-.371-.37-.802-.549-1.227-.536zm.172 3.703a.592.592 0 01.189.211c.87 1.446 1.742 2.89 2.609 4.338.07.118.135.16.277.121 1.525-.41 3.052-.813 4.579-1.217.367-.098.735-.193 1.103-.289a.399.399 0 01-.1.2c-1.259 1.48-2.516 2.962-3.779 4.438-.11.13-.12.22-.04.37.937 1.803 1.768 3.309 2.498 4.76l-3.696-1.019c-.538-.18-1.077-.358-1.615-.539-.163-.055-.25-.03-.36.1-1.248 1.488-2.504 2.97-3.759 4.454a.398.398 0 01-.18.132c.035-.378.068-.757.104-1.136.149-1.572.297-3.144.451-4.716-.03-.318.117-.405-.322-.545-1.493-.593-3.346-1.321-4.816-1.905a.595.595 0 01.24-.134c1.797-.57 3.595-1.14 5.394-1.705.127-.04.199-.092.211-.233.013-.148.05-.294.076-.441.241-1.363.483-2.726.726-4.088.068-.386.14-.771.21-1.157z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>SQLAlchemy</title><path d="M11.8 15.955a44.068 44.068 0 0 1-1.673-.691c-1.736-.757-1.981-.772-2.499-.143-.119.146-.25.236-.287.2-.111-.111.219-.644.617-.993.325-.285.433-.325.791-.285.228.025.985.29 1.682.586 1.573.669 2.034.811 2.635.811.731 0 1.106-.512.876-1.192-.057-.171-.04-.228.074-.228.213 0 .322.797.168 1.255a1.617 1.617 0 0 1-.424.614c-.251.211-.41.257-.879.254a3.853 3.853 0 0 1-1.082-.188h.001Zm.301-2.225c0-.048.179-.134.401-.188l.401-.099.086-1.446c.094-1.599.025-3.172-.148-3.383-.063-.074-.253-.165-.427-.205-.705-.156-.236-.264 1.133-.264 1.368 0 1.803.099 1.152.264-.561.14-.564.148-.564 2.43 0 1.266.046 2.22.111 2.342.092.171.228.207.752.207 1.081 0 1.453-.255 1.747-1.203.088-.284.315-.233.236.054-.037.134-.097.54-.134.91l-.068.669H14.44c-1.286 0-2.339-.04-2.339-.088Zm5.312-.068c0-.086.083-.171.219-.236.183-.086.302-.265.734-1.11.686-1.337 1.767-3.634 1.87-3.978.079-.262.097-.276.392-.31.171-.02.313-.031.316-.025l.527 1.152c.284.628.856 1.824 1.271 2.654.695 1.397.772 1.523 1.005 1.636.142.069.253.174.253.237 0 .099-.122.111-1.175.111-1.056 0-1.175-.012-1.175-.114 0-.068.091-.142.236-.191.134-.043.236-.122.236-.182 0-.057-.139-.432-.31-.834l-.31-.731h-2.35l-.225.495c-.421.928-.43 1.147-.037 1.252.196.054.25.097.227.185-.025.103-.127.117-.867.117-.794.006-.837 0-.837-.128Zm-15.652.025a10.933 10.933 0 0 1-.808-.196l-.549-.154.282-.518.281-.518-.227-.281c-.322-.399-.737-1.272-.74-1.554-.003-.657.851-1.61 1.898-2.122.72-.353 1.291-.362 2.009-.026l.54.253.157-.224c.085-.123.156-.285.156-.356 0-.071.071-.134.157-.134.085 0 .156.023.156.048 0 .063-.629 1.651-.669 1.691-.017.016-.187-.063-.381-.177-.546-.321-1.232-.535-1.764-.549-1.238-.031-1.667 1.178-.794 2.236l.308.373.839-.68c.942-.76 1.05-.777 1.784-.27.825.569.839 1.434.042 2.339-.705.805-1.431 1.027-2.677.819Zm5.984-.165c-.646-.301-1.229-.876-1.565-1.547-.538-1.076-.373-1.765.646-2.695.856-.782 1.556-1.087 2.498-1.087.68 0 .825.037 1.266.307 1.044.646 1.303 1.878.675 3.221-.737 1.577-2.294 2.37-3.52 1.801Zm-3.872-.702c.409-.322.381-.917-.063-1.389-.558-.592-.731-.566-1.713.253-.976.814-.982.783.185 1.155.771.251 1.255.242 1.591-.019Zm6.034-.046c.484-.239.817-1.343.68-2.259-.17-1.13-1.698-1.901-2.819-1.423-1.153.493-1.17 1.804-.037 2.985.791.828 1.471 1.044 2.176.697Zm11.359-1.414c.04-.071-.845-2.003-.928-2.023-.06-.017-.976 1.872-.976 2.014 0 .072 1.861.08 1.904.009Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>SQLite</title><path d="M21.678.521c-1.032-.92-2.28-.55-3.513.544a8.71 8.71 0 0 0-.547.535c-2.109 2.237-4.066 6.38-4.674 9.544.237.48.422 1.093.544 1.561a13.044 13.044 0 0 1 .164.703s-.019-.071-.096-.296l-.05-.146a1.689 1.689 0 0 0-.033-.08c-.138-.32-.518-.995-.686-1.289-.143.423-.27.818-.376 1.176.484.884.778 2.4.778 2.4s-.025-.099-.147-.442c-.107-.303-.644-1.244-.772-1.464-.217.804-.304 1.346-.226 1.478.152.256.296.698.422 1.186.286 1.1.485 2.44.485 2.44l.017.224a22.41 22.41 0 0 0 .056 2.748c.095 1.146.273 2.13.5 2.657l.155-.084c-.334-1.038-.47-2.399-.41-3.967.09-2.398.642-5.29 1.661-8.304 1.723-4.55 4.113-8.201 6.3-9.945-1.993 1.8-4.692 7.63-5.5 9.788-.904 2.416-1.545 4.684-1.931 6.857.666-2.037 2.821-2.912 2.821-2.912s1.057-1.304 2.292-3.166c-.74.169-1.955.458-2.362.629-.6.251-.762.337-.762.337s1.945-1.184 3.613-1.72C21.695 7.9 24.195 2.767 21.678.521m-18.573.543A1.842 1.842 0 0 0 1.27 2.9v16.608a1.84 1.84 0 0 0 1.835 1.834h9.418a22.953 22.953 0 0 1-.052-2.707c-.006-.062-.011-.141-.016-.2a27.01 27.01 0 0 0-.473-2.378c-.121-.47-.275-.898-.369-1.057-.116-.197-.098-.31-.097-.432 0-.12.015-.245.037-.386a9.98 9.98 0 0 1 .234-1.045l.217-.028c-.017-.035-.014-.065-.031-.097l-.041-.381a32.8 32.8 0 0 1 .382-1.194l.2-.019c-.008-.016-.01-.038-.018-.053l-.043-.316c.63-3.28 2.587-7.443 4.8-9.791.066-.069.133-.128.198-.194Z"/></svg>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!-- Generated by Pixelmator Pro 3.6.17 -->
|
|
3
|
+
<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
4
|
+
<g id="Option2SymbolB">
|
|
5
|
+
<g id="Layer1-2">
|
|
6
|
+
<g id="Group" opacity="0.4">
|
|
7
|
+
<path id="Path" fill="#d53c97" stroke="none" d="M 17.016802 12.188573 C 17.016802 9.607646 15.86018 7.293022 14.039526 5.731081 C 13.942595 5.70038 13.844628 5.671406 13.745972 5.645189 C 13.131133 5.809095 12.54265 6.059378 11.998103 6.388559 C 13.964327 7.575191 15.281006 9.730104 15.281006 12.188573 C 15.279476 14.563734 14.033739 16.764488 11.998103 17.988243 C 12.542634 18.317537 13.131119 18.567936 13.745972 18.731958 C 13.844628 18.705742 13.942595 18.67642 14.039526 18.645721 C 15.86018 17.084126 17.016802 14.769501 17.016802 12.188573 Z"/>
|
|
8
|
+
<path id="path1" fill="#d53c97" stroke="none" d="M 13.897406 5.609659 L 13.894991 5.60759 C 13.844973 5.619663 13.7953 5.631737 13.745972 5.645189 C 13.79599 5.631737 13.847043 5.622078 13.897406 5.609659 Z"/>
|
|
9
|
+
<path id="path2" fill="#d53c97" stroke="none" d="M 1.735796 12.188573 C 1.735796 9.164728 3.728925 6.59622 6.470945 5.729357 C 7.554634 4.797861 8.856011 4.155121 10.254373 3.860756 C 9.680216 3.740549 9.095179 3.679977 8.508574 3.68 C 3.816888 3.68 -0 7.496887 -0 12.188573 C -0 16.880259 3.816888 20.697147 8.508574 20.697147 C 9.0952 20.697229 9.680255 20.636539 10.254373 20.516048 C 8.855971 20.221794 7.554568 19.579041 6.470945 18.647446 C 3.728925 17.780582 1.735796 15.213453 1.735796 12.188573 Z"/>
|
|
10
|
+
<path id="path3" fill="#d53c97" stroke="none" d="M 13.745972 18.731958 C 13.7953 18.745068 13.844973 18.757484 13.894991 18.769558 C 13.894991 18.769558 13.896715 18.769558 13.897406 18.767488 C 13.847043 18.754379 13.79599 18.745411 13.745972 18.731958 Z"/>
|
|
11
|
+
</g>
|
|
12
|
+
<path id="path4" fill="#ff3b65" stroke="none" d="M 20.508402 12.188573 C 20.508402 9.606611 19.351088 7.290262 17.5294 5.729357 C 16.301817 5.342468 14.989366 5.313629 13.745972 5.646223 C 16.636665 6.418224 18.772606 9.058484 18.772606 12.189609 C 18.772606 15.320732 16.636665 17.960991 13.745972 18.731958 C 14.98947 19.064316 16.301983 19.034998 17.5294 18.647446 C 19.419907 17.034296 20.508638 14.673781 20.508402 12.188573 Z"/>
|
|
13
|
+
<path id="path5" fill="#ff3b65" stroke="none" d="M 9.962543 18.647446 C 7.220525 17.780582 5.227395 15.213453 5.227395 12.188573 C 5.227395 9.163693 7.220525 6.59622 9.962543 5.729357 C 11.046233 4.797861 12.34761 4.155121 13.745972 3.860756 C 13.171818 3.74053 12.586779 3.679956 12.000173 3.68 C 7.308832 3.68 3.491599 7.496887 3.491599 12.188573 C 3.491599 16.880259 7.308487 20.697147 12.000173 20.697147 C 12.586799 20.697247 13.171857 20.636557 13.745972 20.516048 C 12.34757 20.221794 11.046167 19.579041 9.962543 18.647446 Z"/>
|
|
14
|
+
<path id="path6" fill="#383838" stroke="none" d="M 15.491772 3.68 C 10.800431 3.68 6.983198 7.496887 6.983198 12.188573 C 6.983198 16.880259 10.800086 20.697147 15.491772 20.697147 C 20.183456 20.697147 24 16.880259 24 12.188573 C 24 7.496887 20.183456 3.68 15.491772 3.68 Z M 22.264549 12.188573 C 22.264549 15.923018 19.226215 18.961351 15.491772 18.961351 C 11.757326 18.961351 8.718994 15.923018 8.718994 12.188573 C 8.718994 8.454128 11.757326 5.415796 15.491772 5.415796 C 19.226215 5.415796 22.264549 8.454128 22.264549 12.188573 Z"/>
|
|
15
|
+
</g>
|
|
16
|
+
</g>
|
|
17
|
+
</svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Trino</title><path d="M14.124 16.8529a.1615.1615 0 1 1 .1576.1614.1577.1577 0 0 1-.1576-.1614zm-5.607-.1576a.1614.1614 0 1 0 0 .3228.1614.1614 0 0 0 0-.3228zm10.1341-.6648v1.9869c-.031.5788-.524 1.0237-1.1029.9954h-.3843a5.0596 5.0596 0 0 1-1.1298 1.7178.3192.3192 0 0 0 0 .465l.2382.2191a.3036.3036 0 0 1 .0385.4304c-1.126 1.3835-2.9669 2.1521-5.0498 2.1521a6.575 6.575 0 0 1-4.8192-1.8985c-.0029-.0032-.0059-.0063-.0087-.0096a.6302.6302 0 0 1 .0548-.8896c.137-.1265.1371-.3462 0-.4727a4.944 4.944 0 0 1-1.126-1.714h-.3497c-.5797.0284-1.0737-.416-1.1068-.9954v-1.9869c.0351-.5779.5286-1.02 1.1068-.9915h.2728a5.7648 5.7648 0 0 1 2.0791-3.0936c-.4227-1.0991-1.1529-3.2551-1.226-5.0075C6.0229 4.4705 6.2189.078 7.8253.001c1.6064-.0768 1.3719 4.0275 1.0991 6.6946a32.732 32.732 0 0 0-.123 4.4503 6.994 6.994 0 0 1 2.4826-.4304 7.2414 7.2414 0 0 1 1.7371.2075c.2614-1.2682.8762-3.574 2.0292-5.1958 1.6717-2.352 3.4357-4.7808 4.6116-4.1006 1.176.6802-.3074 3.1398-1.3297 4.4272-1.0222 1.2874-2.7862 3.2089-3.3742 4.2274-.2114.3843-.4304.8032-.5956 1.1529a5.7375 5.7375 0 0 1 2.9169 3.6125h.073v-2.3058a.3075.3075 0 0 0-.1806-.2844.9148.9148 0 0 1-.5573-.8148 1.0184 1.0184 0 0 1 .9045-.9044c.5593-.0598 1.061.3452 1.1208.9044a.9187.9187 0 0 1-.5534.8148.3074.3074 0 0 0-.1691.2844v2.1522a.3113.3113 0 0 0 .1691.2805.9724.9724 0 0 1 .5648.857zm-1.0222-3.9737a.4345.4345 0 0 0 .4612-.4151.4151.4151 0 1 0-.4612.4151zm-.4227 3.4779c.0978.4794.148.9672.1498 1.4565v.3651h.4113a.3228.3228 0 0 0 .3228-.319v-1.0069c-.0111-.2967-.2733-.5256-.5688-.4957h-.3151zm-3.7278-4.481.611.2383a36.6046 36.6046 0 0 1 2.3828-3.8661c1.2874-1.7255 2.3365-3.5817 1.8715-3.8699-.465-.2883-1.6179 1.2297-2.7708 3.109a34.8978 34.8978 0 0 0-2.0945 4.3887zm-4.0544.6726.0154 1.3335c-.0039.2007.1881.3587.3843.3152a6.4317 6.4317 0 0 1 1.4565-.1653 5.995 5.995 0 0 1 1.4527.1729c.1956.0398.3853-.1153.3843-.3151v-1.3412a.319.319 0 0 0-.2421-.3113 6.664 6.664 0 0 0-1.6026-.1845 6.7093 6.7093 0 0 0-1.6025.1845.3188.3188 0 0 0-.246.3113zm1.7063 6.8637v.3843a.6878.6878 0 0 1-.4996.269c-.3074 0-.538-.4189-.538-.4189a.073.073 0 0 0-.1-.0307l-.0024.0013a.0693.0693 0 0 0-.0245.0947c.0115.0231.2806.4957.6649.4957a.7144.7144 0 0 0 .3843-.1268.3267.3267 0 0 1 .3612 0 .8332.8332 0 0 0 .4727.1345.957.957 0 0 0 .6572-.4803.0692.0692 0 0 0-.0269-.0961.0692.0692 0 0 0-.0999.0269c0 .0231-.2191.3843-.5419.4074a.8036.8036 0 0 1-.5765-.269v-.3843a.3154.3154 0 0 1 .1268-.2537c.196-.1499.415-.3958.415-.4919a.538.538 0 0 0-.5764-.4189c-.3766 0-.6533.2498-.6533.4573 0 .1345.2536.3382.4227.4612a.3226.3226 0 0 1 .1346.2383zM7.783 11.6455l.5765-.3074c-.0192-1.126-.0346-3.1436 0-4.5425.0538-2.0368.1537-4.5732-.5226-4.5463S6.6877 4.2285 6.949 7.007a33.0562 33.0562 0 0 0 .834 4.6385zm-3.305 5.3919a.319.319 0 0 0 .319.319h.3997a3.046 3.046 0 0 1 0-.3651 7.546 7.546 0 0 1 .1461-1.4565c-.0493.0002-.34.0005-.3866-.0021a.4881.4881 0 0 0-.4781.4979v1.0068zm.9184 1.4718a5.3254 5.3254 0 0 1-.123-.5573.3228.3228 0 0 0-.319-.2728h-.4957c.0007.0163-.0015.34.0009.355a.5188.5188 0 0 0 .5526.4827l.3842-.0076zm10.1265 2.917-.0884-.0807a.3229.3229 0 0 0-.3843-.0269 6.9823 6.9823 0 0 1-3.8046 1.0068 6.995 6.995 0 0 1-3.7932-1.0068.3228.3228 0 0 0-.3843.0269l-.0884.0807a.3154.3154 0 0 0 0 .4573 6.0305 6.0305 0 0 0 4.2927 1.5988 6.0453 6.0453 0 0 0 4.2889-1.5988.315.315 0 0 0-.0384-.4573zm1.4488-4.4158c0-2.4557-1.1529-4.3273-3.0245-5.2266-.2081-.1022-.4673.0594-.465.2921v1.3297a.3269.3269 0 0 0 .2037.296c1.7332.7109 2.9284 2.1866 2.9284 3.8776 0 2.2712-2.1559 3.8085-5.3419 3.8085-3.1859 0-5.3419-1.5411-5.3419-3.8085 0-1.691 1.1952-3.1667 2.9284-3.8776a.319.319 0 0 0 .2037-.296v-1.322c.0048-.2315-.2536-.3963-.4612-.2921-1.887.8839-3.0399 2.767-3.0399 5.2073 0 2.9899 2.2866 4.996 5.7108 4.996 3.4282.0001 5.6994-2.0098 5.6994-4.9844zm-8.6084-.538h-.0038a.5842.5842 0 1 0 .0038 0zm5.1614.5919c.0063.3226.2615.5789.584.5725a.5842.5842 0 1 0-.584-.5725zm4.5692.6225h-.4996a.3227.3227 0 0 0-.3151.2728c-.0346.173-.0768.3766-.1268.5573.0163.0007.3861-.0014.4012.0009a.5188.5188 0 0 0 .5366-.5004l.0037-.3306z"/></svg>
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/* Copyright 2024 Marimo. All rights reserved. */
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
CalendarClockIcon,
|
|
5
|
+
CalendarIcon,
|
|
6
|
+
ClockIcon,
|
|
7
|
+
CurlyBracesIcon,
|
|
8
|
+
HashIcon,
|
|
9
|
+
type LucideIcon,
|
|
10
|
+
ToggleLeftIcon,
|
|
11
|
+
TypeIcon,
|
|
12
|
+
} from "lucide-react";
|
|
13
|
+
import type { DataType } from "@/core/kernel/messages";
|
|
14
|
+
import { logNever } from "@/utils/assertNever";
|
|
15
|
+
import type { SelectableDataType } from "../data-table/charts/types";
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Maps a data type to an icon.
|
|
19
|
+
*/
|
|
20
|
+
export const DATA_TYPE_ICON: Record<DataType | SelectableDataType, LucideIcon> =
|
|
21
|
+
{
|
|
22
|
+
boolean: ToggleLeftIcon,
|
|
23
|
+
date: CalendarIcon,
|
|
24
|
+
time: ClockIcon,
|
|
25
|
+
datetime: CalendarClockIcon,
|
|
26
|
+
temporal: CalendarClockIcon,
|
|
27
|
+
number: HashIcon,
|
|
28
|
+
string: TypeIcon,
|
|
29
|
+
integer: HashIcon,
|
|
30
|
+
unknown: CurlyBracesIcon,
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export function getDataTypeColor(
|
|
34
|
+
dataType: DataType | SelectableDataType,
|
|
35
|
+
): string {
|
|
36
|
+
switch (dataType) {
|
|
37
|
+
case "boolean":
|
|
38
|
+
return "bg-(--orange-4)";
|
|
39
|
+
case "date":
|
|
40
|
+
case "time":
|
|
41
|
+
case "datetime":
|
|
42
|
+
case "temporal":
|
|
43
|
+
return "bg-(--grass-4) dark:bg-(--grass-5)";
|
|
44
|
+
case "number":
|
|
45
|
+
case "integer":
|
|
46
|
+
return "bg-(--purple-4)";
|
|
47
|
+
case "string":
|
|
48
|
+
return "bg-(--blue-4)";
|
|
49
|
+
case "unknown":
|
|
50
|
+
return "bg-(--slate-4) dark:bg-(--slate-6)";
|
|
51
|
+
default:
|
|
52
|
+
logNever(dataType);
|
|
53
|
+
return "bg-(--slate-4) dark:bg-(--slate-6)";
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/* Copyright 2024 Marimo. All rights reserved. */
|
|
2
|
+
|
|
3
|
+
import { render, screen } from "@testing-library/react";
|
|
4
|
+
import { Provider } from "jotai";
|
|
5
|
+
import React from "react";
|
|
6
|
+
import { beforeEach, describe, expect, it, vi } from "vitest";
|
|
7
|
+
import { MockRequestClient } from "@/__mocks__/requests";
|
|
8
|
+
import { requestClientAtom } from "@/core/network/requests";
|
|
9
|
+
import { store } from "@/core/state/jotai";
|
|
10
|
+
import { InstallPackageButton } from "../install-package-button";
|
|
11
|
+
|
|
12
|
+
const mockOpenApplication = vi.fn();
|
|
13
|
+
vi.mock("@/components/editor/chrome/state", () => ({
|
|
14
|
+
useChromeActions: () => ({
|
|
15
|
+
openApplication: mockOpenApplication,
|
|
16
|
+
}),
|
|
17
|
+
}));
|
|
18
|
+
|
|
19
|
+
vi.mock("@/components/editor/chrome/panels/packages-state", () => ({
|
|
20
|
+
packagesToInstallAtom: {},
|
|
21
|
+
}));
|
|
22
|
+
|
|
23
|
+
const mockRequestAnimationFrame = vi.fn((callback) => {
|
|
24
|
+
callback();
|
|
25
|
+
return 1;
|
|
26
|
+
});
|
|
27
|
+
vi.stubGlobal("requestAnimationFrame", mockRequestAnimationFrame);
|
|
28
|
+
|
|
29
|
+
const mockInput = {
|
|
30
|
+
focus: vi.fn(),
|
|
31
|
+
value: "",
|
|
32
|
+
dispatchEvent: vi.fn(),
|
|
33
|
+
};
|
|
34
|
+
vi.spyOn(document, "getElementById").mockReturnValue(
|
|
35
|
+
mockInput as unknown as HTMLInputElement,
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
function createTestWrapper() {
|
|
39
|
+
const wrapper = ({ children }: { children: React.ReactNode }) => (
|
|
40
|
+
<Provider store={store}>{children}</Provider>
|
|
41
|
+
);
|
|
42
|
+
return { wrapper };
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
describe("InstallPackageButton", () => {
|
|
46
|
+
const { wrapper } = createTestWrapper();
|
|
47
|
+
|
|
48
|
+
beforeEach(() => {
|
|
49
|
+
vi.clearAllMocks();
|
|
50
|
+
store.set(requestClientAtom, MockRequestClient.create());
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
it("should not render when packages is undefined", () => {
|
|
54
|
+
const { container } = render(
|
|
55
|
+
<InstallPackageButton packages={undefined} />,
|
|
56
|
+
{ wrapper },
|
|
57
|
+
);
|
|
58
|
+
expect(container.firstChild).toBeNull();
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
it("should not render when packages is empty", () => {
|
|
62
|
+
const { container } = render(<InstallPackageButton packages={[]} />, {
|
|
63
|
+
wrapper,
|
|
64
|
+
});
|
|
65
|
+
expect(container.firstChild).toBeNull();
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
it("should render with the correct package names", () => {
|
|
69
|
+
render(<InstallPackageButton packages={["altair", "pandas"]} />, {
|
|
70
|
+
wrapper,
|
|
71
|
+
});
|
|
72
|
+
expect(screen.getByText("Install altair, pandas")).toBeInTheDocument();
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
it("should render correct package names when showMaxPackages is set", () => {
|
|
76
|
+
render(
|
|
77
|
+
<InstallPackageButton
|
|
78
|
+
packages={["altair", "pandas"]}
|
|
79
|
+
showMaxPackages={1}
|
|
80
|
+
/>,
|
|
81
|
+
{ wrapper },
|
|
82
|
+
);
|
|
83
|
+
expect(screen.getByText("Install altair")).toBeInTheDocument();
|
|
84
|
+
});
|
|
85
|
+
});
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
/* Copyright 2024 Marimo. All rights reserved. */
|
|
2
|
+
|
|
3
|
+
import { describe, expect, it } from "vitest";
|
|
4
|
+
import type { SQLTableContext } from "@/core/datasets/data-source-connections";
|
|
5
|
+
import { DUCKDB_ENGINE } from "@/core/datasets/engines";
|
|
6
|
+
import type { DataTable, DataTableColumn } from "@/core/kernel/messages";
|
|
7
|
+
import { sqlCode } from "../utils";
|
|
8
|
+
|
|
9
|
+
describe("sqlCode", () => {
|
|
10
|
+
const mockTable: DataTable = {
|
|
11
|
+
name: "users" as const,
|
|
12
|
+
columns: [],
|
|
13
|
+
source: "local",
|
|
14
|
+
source_type: "local",
|
|
15
|
+
type: "table",
|
|
16
|
+
};
|
|
17
|
+
const mockColumn = {
|
|
18
|
+
name: "email" as const,
|
|
19
|
+
} as DataTableColumn;
|
|
20
|
+
|
|
21
|
+
it("should generate basic SQL without sqlTableContext", () => {
|
|
22
|
+
const result = sqlCode({ table: mockTable, columnName: mockColumn.name });
|
|
23
|
+
expect(result).toBe(
|
|
24
|
+
"_df = mo.sql(f'SELECT \"email\" FROM users LIMIT 100')",
|
|
25
|
+
);
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
it("should generate SQL with default schema", () => {
|
|
29
|
+
const sqlTableContext: SQLTableContext = {
|
|
30
|
+
engine: DUCKDB_ENGINE,
|
|
31
|
+
schema: "public",
|
|
32
|
+
defaultSchema: "public",
|
|
33
|
+
defaultDatabase: "mydb",
|
|
34
|
+
database: "mydb",
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
const result = sqlCode({
|
|
38
|
+
table: mockTable,
|
|
39
|
+
columnName: mockColumn.name,
|
|
40
|
+
sqlTableContext,
|
|
41
|
+
});
|
|
42
|
+
expect(result).toBe('_df = mo.sql(f"SELECT email FROM users LIMIT 100")');
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
it("should generate SQL with non-default schema", () => {
|
|
46
|
+
const sqlTableContext: SQLTableContext = {
|
|
47
|
+
engine: DUCKDB_ENGINE,
|
|
48
|
+
schema: "analytics",
|
|
49
|
+
defaultSchema: "public",
|
|
50
|
+
defaultDatabase: "mydb",
|
|
51
|
+
database: "mydb",
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
const result = sqlCode({
|
|
55
|
+
table: mockTable,
|
|
56
|
+
columnName: mockColumn.name,
|
|
57
|
+
sqlTableContext,
|
|
58
|
+
});
|
|
59
|
+
expect(result).toBe(
|
|
60
|
+
'_df = mo.sql(f"SELECT email FROM analytics.users LIMIT 100")',
|
|
61
|
+
);
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
it("should generate SQL with non-default engine", () => {
|
|
65
|
+
const sqlTableContext: SQLTableContext = {
|
|
66
|
+
engine: "snowflake",
|
|
67
|
+
schema: "public",
|
|
68
|
+
defaultSchema: "public",
|
|
69
|
+
defaultDatabase: "mydb",
|
|
70
|
+
database: "mydb",
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
const result = sqlCode({
|
|
74
|
+
table: mockTable,
|
|
75
|
+
columnName: mockColumn.name,
|
|
76
|
+
sqlTableContext,
|
|
77
|
+
});
|
|
78
|
+
expect(result).toBe(
|
|
79
|
+
'_df = mo.sql(f"SELECT email FROM users LIMIT 100", engine=snowflake)',
|
|
80
|
+
);
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
it("should generate SQL with non-default schema and non-default engine", () => {
|
|
84
|
+
const sqlTableContext: SQLTableContext = {
|
|
85
|
+
engine: "bigquery",
|
|
86
|
+
schema: "sales",
|
|
87
|
+
defaultSchema: "public",
|
|
88
|
+
defaultDatabase: "mydb",
|
|
89
|
+
database: "mydb",
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
const result = sqlCode({
|
|
93
|
+
table: mockTable,
|
|
94
|
+
columnName: mockColumn.name,
|
|
95
|
+
sqlTableContext,
|
|
96
|
+
});
|
|
97
|
+
expect(result).toBe(
|
|
98
|
+
'_df = mo.sql(f"SELECT email FROM sales.users LIMIT 100", engine=bigquery)',
|
|
99
|
+
);
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
it("should generate SQL with non-default database", () => {
|
|
103
|
+
const sqlTableContext: SQLTableContext = {
|
|
104
|
+
engine: DUCKDB_ENGINE,
|
|
105
|
+
schema: "public",
|
|
106
|
+
defaultSchema: "public",
|
|
107
|
+
defaultDatabase: "memory",
|
|
108
|
+
database: "remote",
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
const result = sqlCode({
|
|
112
|
+
table: mockTable,
|
|
113
|
+
columnName: mockColumn.name,
|
|
114
|
+
sqlTableContext,
|
|
115
|
+
});
|
|
116
|
+
expect(result).toBe(
|
|
117
|
+
'_df = mo.sql(f"SELECT email FROM remote.users LIMIT 100")',
|
|
118
|
+
);
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
it("should generate SQL with non-default database and non-default schema", () => {
|
|
122
|
+
const sqlTableContext: SQLTableContext = {
|
|
123
|
+
engine: "bigquery",
|
|
124
|
+
schema: "sales",
|
|
125
|
+
defaultSchema: "public",
|
|
126
|
+
defaultDatabase: "mydb",
|
|
127
|
+
database: "remote",
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
const result = sqlCode({
|
|
131
|
+
table: mockTable,
|
|
132
|
+
columnName: mockColumn.name,
|
|
133
|
+
sqlTableContext,
|
|
134
|
+
});
|
|
135
|
+
expect(result).toBe(
|
|
136
|
+
'_df = mo.sql(f"SELECT email FROM remote.sales.users LIMIT 100", engine=bigquery)',
|
|
137
|
+
);
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
it("should generate SQL for schemaless tables", () => {
|
|
141
|
+
const sqlTableContext: SQLTableContext = {
|
|
142
|
+
engine: DUCKDB_ENGINE,
|
|
143
|
+
schema: "",
|
|
144
|
+
defaultDatabase: "mydb",
|
|
145
|
+
database: "mydb",
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
const result = sqlCode({
|
|
149
|
+
table: mockTable,
|
|
150
|
+
columnName: mockColumn.name,
|
|
151
|
+
sqlTableContext,
|
|
152
|
+
});
|
|
153
|
+
expect(result).toBe('_df = mo.sql(f"SELECT email FROM users LIMIT 100")');
|
|
154
|
+
|
|
155
|
+
const sqlTableContext2: SQLTableContext = {
|
|
156
|
+
engine: DUCKDB_ENGINE,
|
|
157
|
+
schema: "",
|
|
158
|
+
defaultDatabase: "remote",
|
|
159
|
+
database: "another_db",
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
const result2 = sqlCode({
|
|
163
|
+
table: mockTable,
|
|
164
|
+
columnName: mockColumn.name,
|
|
165
|
+
sqlTableContext: sqlTableContext2,
|
|
166
|
+
});
|
|
167
|
+
expect(result2).toBe(
|
|
168
|
+
'_df = mo.sql(f"SELECT email FROM another_db.users LIMIT 100")',
|
|
169
|
+
);
|
|
170
|
+
});
|
|
171
|
+
});
|