@marimo-team/islands 0.25.3-dev6 → 0.25.3-dev60
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ConnectedDataExplorerComponent-CNMliVzw.js → ConnectedDataExplorerComponent-Da5OoEUL.js} +14 -14
- package/dist/{ErrorBoundary-Ca-Sa492.js → ErrorBoundary-BmHVnL-A.js} +8 -8
- package/dist/{abnfDiagram-VCTEODGH-D-Ez91gV.js → abnfDiagram-VCTEODGH-Bz3mrprX.js} +2 -2
- package/dist/any-language-editor-k2B8YI3Y.js +75 -0
- package/dist/{architectureDiagram-5GKGNRK7-CTpcNtO8.js → architectureDiagram-5GKGNRK7-Cs5ujb9K.js} +1 -1
- package/dist/{arrays-CN1djC4k.js → arrays-R6JsImiT.js} +8 -0
- package/dist/{button-CvjkwdSk.js → button-BxB3RDjN.js} +1 -1
- package/dist/{capabilities-CQ5IjhzL.js → capabilities-BgR0osfN.js} +2 -2
- package/dist/{chat-ui-0lKdOoQ3.js → chat-ui-C0_lCzql.js} +1139 -1140
- package/dist/{check-EDwSwP89.js → check-P35dc2dH.js} +1 -1
- package/dist/{chunk-IMKFNOWR-DGxi-zeo.js → chunk-IMKFNOWR-CcTSaxZt.js} +1 -1
- package/dist/{chunk-SHT3W25Y-CV9J3rAB.js → chunk-SHT3W25Y-DcJcjOaO.js} +1 -1
- package/dist/{chunk-SVP7TREG-BL-9Fqgg.js → chunk-SVP7TREG-BVtDTjaF.js} +1 -1
- package/dist/{chunk-TICWLB2K-Cu_XMjDM.js → chunk-TICWLB2K-BkDFkh8q.js} +1 -1
- package/dist/{chunk-YOKDWASO-DPZk8vhS.js → chunk-YOKDWASO-DKplTrBY.js} +20 -20
- package/dist/{classDiagram-ZZMXUADV-BXXV13Hq.js → classDiagram-ZZMXUADV-CfAt7HT5.js} +2 -2
- package/dist/{classDiagram-v2-VYDZK3BY-B7FXJ1Cp.js → classDiagram-v2-VYDZK3BY-CGEjNYa2.js} +2 -2
- package/dist/{code-visibility-NGRjhbtA.js → code-visibility-BWERlt58.js} +6 -6
- package/dist/{common-B7_ZSg0P.js → common-E2zdIyjs.js} +4960 -4835
- package/dist/{copy-icon-Ft7t9bqz.js → copy-icon-CPoxUG7G.js} +3 -3
- package/dist/{cynefinDiagram-5FMLGOSQ-CH96rwba.js → cynefinDiagram-5FMLGOSQ-BW6NmfJi.js} +1 -1
- package/dist/{dagre-GXQ25YYZ-BD3PmpFY.js → dagre-GXQ25YYZ-CWg3CTuF.js} +1 -1
- package/dist/{data-grid-overlay-editor-B_cmrkBm.js → data-grid-overlay-editor-CHUwPg7P.js} +5 -5
- package/dist/{data-grid-types-BH_r7g7l.js → data-grid-types-0PJ-9N5n.js} +1 -1
- package/dist/{diagram-S7CK7UJ4-BsSJJldB.js → diagram-S7CK7UJ4-BPxtoS-z.js} +1 -1
- package/dist/{diagram-UQ7AKVKN-muQtNZc4.js → diagram-UQ7AKVKN-DA-vJdFL.js} +1 -1
- package/dist/{diagram-VX7I27RA-CdhuZAqR.js → diagram-VX7I27RA-D6bkR84S.js} +1 -1
- package/dist/{diagram-Z3DM3KII-BD8mXjOj.js → diagram-Z3DM3KII-m60g4cAT.js} +1 -1
- package/dist/{dialog-CEBFZNyc.js → dialog-C1PcpCqX.js} +3 -3
- package/dist/{dist-DpBpA_n1.js → dist-Lm-D-Vr6.js} +3 -3
- package/dist/{dropdown-menu-CP_qCYHC.js → dropdown-menu-B3eUiVJB.js} +177 -169
- package/dist/{ebnfDiagram-PWID7BFC-BIN1sweE.js → ebnfDiagram-PWID7BFC-CK99sho2.js} +2 -2
- package/dist/{erDiagram-RLTQ6QDP-Ctp5cfoN.js → erDiagram-RLTQ6QDP-Bryq0tdE.js} +1 -1
- package/dist/{error-banner-D-WCIiMt.js → error-banner-Sl2FlSJ4.js} +2 -2
- package/dist/{error-entries-DSvFWT_M.js → error-entries-CMNtA8NK.js} +959 -959
- package/dist/{feedback-button-CTF2Nj9s.js → feedback-button-DwOUm3jt.js} +29 -29
- package/dist/{flowDiagram-HODETNUW-3EfLrlFb.js → flowDiagram-HODETNUW-D-3aRpfS.js} +2 -2
- package/dist/{formats-CeOmU1MU.js → formats-6pLWWrY2.js} +3 -3
- package/dist/{ganttDiagram-EL5Y4UJY-BQT16JSc.js → ganttDiagram-EL5Y4UJY-Dh_4cBJZ.js} +2 -2
- package/dist/{glide-data-editor-BQHF9puC.js → glide-data-editor-C9WGlA66.js} +370 -368
- package/dist/{glide-utils-DJyqh0EM.js → glide-utils-Bt8_pBa2.js} +16 -16
- package/dist/{globals-Cj8iqMEp.js → globals-BwFL--QV.js} +3 -3
- package/dist/{highlighted-body-KPVGNVTW-zwjq21tf.js → highlighted-body-KPVGNVTW-3Ziwfz-V.js} +2 -2
- package/dist/{html-to-image-B8s5SgGm.js → html-to-image-6xcoTKhC.js} +29 -29
- package/dist/{infoDiagram-27XIBGKW-DipQoHxl.js → infoDiagram-27XIBGKW-s1C1kgfU.js} +1 -1
- package/dist/{ishikawaDiagram-5VMMS53U-DgFMjSGz.js → ishikawaDiagram-5VMMS53U-CCsRgolY.js} +1 -1
- package/dist/{kanban-definition-UXKFOSKX-w1ACVjgl.js → kanban-definition-UXKFOSKX-BrmxDlcc.js} +1 -1
- package/dist/{label-BDKF3Afc.js → label-BRnUC0NX.js} +2 -2
- package/dist/{linear-Cnaq3Tfb.js → linear-DWERh7eI.js} +121 -73
- package/dist/{loader-BQOfjTIJ.js → loader-Bm8cy3e8.js} +12 -12
- package/dist/main.js +3177 -2980
- package/dist/{mermaid-CHo49Yv-.js → mermaid-DKI0869I.js} +38 -38
- package/dist/mermaid-HWGCJPDP-Du3-HPQA.js +2 -0
- package/dist/{mindmap-definition-YA3MSWOX-CrT0KSfX.js → mindmap-definition-YA3MSWOX-641xJysF.js} +1 -1
- package/dist/{number-overlay-editor-DBcnm0SY.js → number-overlay-editor-Ci9h4-h1.js} +3 -3
- package/dist/{objects-CzUgoMIF.js → objects-DCmMvZtn.js} +1 -3
- package/dist/{once-BtE-wKRL.js → once-eG8Vmvjd.js} +1 -1
- package/dist/{pegDiagram-XKGWAZYB-BqvywNJA.js → pegDiagram-XKGWAZYB-keVUAUeS.js} +2 -2
- package/dist/{pieDiagram-E7YTZNPT-BfxJ_XCc.js → pieDiagram-E7YTZNPT-DHktXPO_.js} +1 -1
- package/dist/precisionRound-DhAzeRcm.js +49 -0
- package/dist/{process-output-CKRXyszb.js → process-output-BJRJFobf.js} +4 -4
- package/dist/{quadrantDiagram-AXDQQJYC-Ccw0xMjN.js → quadrantDiagram-AXDQQJYC-Blrm7V7_.js} +1 -1
- package/dist/{railroadDiagram-O6MQD6OU-8vFLVTPu.js → railroadDiagram-O6MQD6OU-BVEF4OV_.js} +2 -2
- package/dist/{react-vega-BED0DjiB.js → react-vega-C4T9Rb_w.js} +12284 -12270
- package/dist/{requirementDiagram-BXWQKSXE-a_MxGvxe.js → requirementDiagram-BXWQKSXE-CWo-UAKV.js} +1 -1
- package/dist/{reveal-component-DTBSuGkC.js → reveal-component-Ay-npdvI.js} +19 -19
- package/dist/{select-BButFi-d.js → select-B0LRDH0g.js} +4 -4
- package/dist/{sequenceDiagram-WJ2MYXX4-CXFMnxGh.js → sequenceDiagram-WJ2MYXX4-CHQvLnq4.js} +1 -1
- package/dist/{spec-BwarBpUJ.js → spec-C-LRKGtT.js} +4 -4
- package/dist/{stateDiagram-D77RDMKH-DQeA_CwI.js → stateDiagram-D77RDMKH-BOJZgbUJ.js} +2 -2
- package/dist/{stateDiagram-v2-MP3YSRHH-BxxQucm1.js → stateDiagram-v2-MP3YSRHH-C53XXdYH.js} +2 -2
- package/dist/style.css +1 -1
- package/dist/{swimlanes-42K2YHIH-Do6L-cYg.js → swimlanes-42K2YHIH-D2o1gOtw.js} +1 -1
- package/dist/{swimlanesDiagram-VR7AAH4N-DUzPvSVU.js → swimlanesDiagram-VR7AAH4N-BHFzN1Wk.js} +2 -2
- package/dist/{swiper-component-DKntyn8p.js → swiper-component-DfhRvAFi.js} +2 -2
- package/dist/{time-BieKwdYS.js → time-BaMbJs4z.js} +18 -18
- package/dist/{timeline-definition-24CTP7MA-D3c46WM5.js → timeline-definition-24CTP7MA-rv7QUa46.js} +1 -1
- package/dist/{toDate-vIXljnsr.js → toDate-CjPuEPou.js} +21 -20
- package/dist/{toast-B9UMEi8u.js → toast-CFWpihJU.js} +4 -4
- package/dist/{tooltip-BO1REbqs.js → tooltip-CKO1pHJo.js} +2 -2
- package/dist/{use-restore-focus-BEM7sFWl.js → use-restore-focus-DBCITLeF.js} +1 -1
- package/dist/{useAsyncData-Deh5kszT.js → useAsyncData-ChgNtdmE.js} +15 -14
- package/dist/{useDateFormatter-D8XruNGG.js → useDateFormatter-c_yJtkAe.js} +2 -2
- package/dist/{useDeepCompareMemoize-DXwzRINI.js → useDeepCompareMemoize-Bet7kSsI.js} +1 -1
- package/dist/{useIframeCapabilities-DBETvvPl.js → useIframeCapabilities-BkdeVdXC.js} +1 -1
- package/dist/{useLifecycle-j7D9uD1o.js → useLifecycle-VVmz_24o.js} +3 -3
- package/dist/{useTheme-CRnjkku0.js → useTheme-DympCsQg.js} +5 -5
- package/dist/{vega-component-DTG6zxaY.js → vega-component-DnfQeoyt.js} +147 -147
- package/dist/{vega-embed-container-BNHE18G9.js → vega-embed-container--LYZqguO.js} +2 -2
- package/dist/{vega-loader.browser-DNST6uVf.js → vega-loader.browser-B9Pz0EGP.js} +298 -507
- package/dist/{vennDiagram-4TSXK5OY-BSZD8JcZ.js → vennDiagram-4TSXK5OY-D36Zk7t-.js} +1 -1
- package/dist/{wardleyDiagram-VM6X3IG4-48cUWkfA.js → wardleyDiagram-VM6X3IG4-BLBolvyQ.js} +1 -1
- package/dist/{xychartDiagram-S5SC5T6Z-CswYgYeu.js → xychartDiagram-S5SC5T6Z-CfH57l0v.js} +2 -2
- package/package.json +4 -4
- package/src/__tests__/host-imports.test.ts +1 -0
- package/src/components/app-config/ai-config.tsx +6 -2
- package/src/components/chat/__tests__/message-queue.test.tsx +17 -0
- package/src/components/chat/chat-panel.tsx +3 -7
- package/src/components/chat/chat-utils.ts +4 -8
- package/src/components/data-table/__tests__/context-menu-interaction.test.tsx +130 -0
- package/src/components/data-table/__tests__/date-popover.test.tsx +72 -0
- package/src/components/data-table/__tests__/export-actions.test.tsx +434 -6
- package/src/components/data-table/charts/charts.tsx +14 -19
- package/src/components/data-table/column-visibility-dropdown.tsx +8 -13
- package/src/components/data-table/columns.tsx +2 -1
- package/src/components/data-table/context-menu.tsx +36 -20
- package/src/components/data-table/date-popover.tsx +6 -4
- package/src/components/data-table/export-actions.tsx +267 -163
- package/src/components/data-table/row-viewer-panel/row-viewer.tsx +2 -2
- package/src/components/data-table/schemas.ts +14 -36
- package/src/components/editor/__tests__/dynamic-favicon.test.tsx +111 -18
- package/src/components/editor/actions/__tests__/pair-with-agent-modal.test.tsx +24 -0
- package/src/components/editor/actions/pair-with-agent-modal.tsx +18 -15
- package/src/components/editor/ai/add-cell-with-ai.tsx +3 -3
- package/src/components/editor/cell/CreateCellButton.tsx +8 -10
- package/src/components/editor/cell/__tests__/useShouldShowInterrupt.test.ts +39 -0
- package/src/components/editor/cell/code/__tests__/language-toggle.test.tsx +54 -0
- package/src/components/editor/cell/code/cell-editor.tsx +1 -1
- package/src/components/editor/cell/code/language-toggle.tsx +8 -7
- package/src/components/editor/cell/useShouldShowInterrupt.ts +2 -12
- package/src/components/editor/chrome/panels/__tests__/packages-panel.test.tsx +30 -1
- package/src/components/editor/chrome/panels/packages-panel.tsx +4 -7
- package/src/components/editor/chrome/wrapper/__tests__/attachment-status.test.tsx +12 -18
- package/src/components/editor/connections/components.tsx +1 -1
- package/src/components/editor/controls/__tests__/command-palette.test.tsx +53 -0
- package/src/components/editor/controls/command-palette.tsx +22 -10
- package/src/components/editor/dynamic-favicon.tsx +21 -40
- package/src/components/editor/errors/__tests__/send-error-report-button.test.tsx +12 -23
- package/src/components/editor/file-tree/__tests__/file-explorer-interactions.test.tsx +6 -0
- package/src/components/editor/file-tree/__tests__/use-file-search.test.tsx +91 -0
- package/src/components/editor/file-tree/file-explorer.tsx +10 -5
- package/src/components/editor/file-tree/file-viewer.tsx +4 -2
- package/src/components/editor/file-tree/use-file-search.ts +35 -21
- package/src/components/editor/output/MarimoTracebackOutput.tsx +1 -1
- package/src/components/editor/output/console/ConsoleOutput.tsx +8 -18
- package/src/components/icons/__tests__/large-spinner.test.tsx +39 -0
- package/src/components/icons/large-spinner.tsx +3 -14
- package/src/components/pages/home-page.tsx +4 -4
- package/src/components/slides/slide-cell-view.tsx +1 -1
- package/src/components/tracing/tracing.tsx +2 -2
- package/src/core/attachments/state.ts +5 -8
- package/src/core/cells/__tests__/notebook-outline.test.ts +113 -0
- package/src/core/cells/cells.ts +2 -1
- package/src/core/cells/pending-delete-service.ts +2 -6
- package/src/core/datasets/__tests__/data-source-discovery.test.ts +4 -4
- package/src/core/datasets/data-source-discovery.ts +4 -6
- package/src/core/edit-app.tsx +2 -2
- package/src/core/host/AGENTS.md +11 -2
- package/src/core/host/__tests__/attachments.test.ts +56 -0
- package/src/core/host/__tests__/document.test.ts +126 -0
- package/src/core/host/__tests__/events.test.ts +49 -0
- package/src/core/host/__tests__/fixtures.ts +41 -0
- package/src/core/host/__tests__/notebook-client.test.ts +496 -0
- package/src/core/host/connection.ts +81 -0
- package/src/core/host/events.ts +68 -0
- package/src/core/host/notebook-client.ts +316 -0
- package/src/core/host/resources/attachments.ts +19 -0
- package/src/core/host/resources/document.ts +101 -0
- package/src/core/hotkeys/actions.ts +2 -4
- package/src/core/islands/__tests__/bootstrap.test.ts +0 -26
- package/src/core/islands/bootstrap.ts +0 -1
- package/src/core/network/connection.ts +4 -2
- package/src/core/network/useConnectionNotice.ts +8 -2
- package/src/core/run-app.tsx +2 -2
- package/src/core/runtime/__tests__/runtime.test.ts +5 -12
- package/src/core/runtime/runtime.ts +5 -5
- package/src/core/static/files.ts +2 -0
- package/src/core/websocket/__tests__/{useMarimoKernelConnection.test.ts → connection-state.test.ts} +15 -17
- package/src/core/websocket/__tests__/{useWebSocket.test.ts → createConnectionTransport.test.ts} +1 -1
- package/src/core/websocket/__tests__/useNotebookClient.hook.test.tsx +149 -0
- package/src/core/websocket/__tests__/{useMarimoKernelConnection.hook.test.tsx → useNotebookSession.hook.test.tsx} +168 -253
- package/src/core/websocket/connection-state.ts +70 -0
- package/src/core/websocket/state.ts +7 -0
- package/src/core/websocket/transports/__tests__/sse.test.ts +18 -4
- package/src/core/websocket/transports/create.ts +31 -0
- package/src/core/websocket/transports/sse.ts +14 -2
- package/src/core/websocket/transports/transport.ts +12 -23
- package/src/core/websocket/types.ts +9 -39
- package/src/core/websocket/useNotebookClient.ts +78 -0
- package/src/core/websocket/{useMarimoKernelConnection.tsx → useNotebookSession.tsx} +53 -233
- package/src/hooks/__tests__/useAsyncData.test.tsx +148 -0
- package/src/hooks/__tests__/useDebounce.test.tsx +51 -0
- package/src/hooks/__tests__/useDeepCompareMemoize.test.tsx +39 -0
- package/src/hooks/__tests__/useDelayElapsed.test.tsx +28 -0
- package/src/hooks/__tests__/useInternalStateWithSync.test.tsx +20 -0
- package/src/hooks/__tests__/useScript.test.tsx +77 -0
- package/src/hooks/__tests__/useStateForKey.test.tsx +257 -0
- package/src/hooks/useAsyncData.ts +3 -3
- package/src/hooks/useDataSourceDiscovery.ts +6 -4
- package/src/hooks/useDebounce.ts +5 -8
- package/src/hooks/useDeepCompareMemoize.ts +1 -1
- package/src/hooks/useDelayElapsed.ts +14 -10
- package/src/hooks/useElapsedTime.ts +3 -3
- package/src/hooks/useInputHistory.ts +4 -7
- package/src/hooks/useInternalStateWithSync.ts +6 -6
- package/src/hooks/useResizeObserver.ts +4 -7
- package/src/hooks/useScript.ts +67 -70
- package/src/hooks/useStateForKey.ts +93 -0
- package/src/plugins/core/registerReactComponent.tsx +1 -1
- package/src/plugins/impl/DataTablePlugin.tsx +14 -15
- package/src/plugins/impl/DropdownPlugin.tsx +2 -6
- package/src/plugins/impl/FileBrowserPlugin.tsx +4 -16
- package/src/plugins/impl/FormPlugin.tsx +1 -1
- package/src/plugins/impl/SliderPlugin.tsx +6 -8
- package/src/plugins/impl/__tests__/DataTablePlugin.test.tsx +201 -1
- package/src/plugins/impl/__tests__/FileBrowserPlugin.test.tsx +45 -0
- package/src/plugins/impl/__tests__/SliderPlugin.test.tsx +24 -3
- package/src/plugins/impl/anywidget/__tests__/registry.test.ts +2 -0
- package/src/plugins/impl/anywidget/__tests__/widget-binding.test.ts +241 -2
- package/src/plugins/impl/anywidget/runtime.ts +21 -9
- package/src/plugins/impl/anywidget/widget-binding.ts +160 -82
- package/src/plugins/impl/chat/__tests__/chat-prompts.test.tsx +93 -0
- package/src/plugins/impl/chat/chat-ui.tsx +10 -9
- package/src/plugins/impl/code/any-language-editor.tsx +2 -2
- package/src/plugins/impl/data-editor/glide-data-editor.tsx +8 -5
- package/src/plugins/impl/data-editor/glide-utils.ts +3 -1
- package/src/plugins/impl/mpl-interactive/MplInteractivePlugin.tsx +5 -3
- package/src/plugins/impl/panel/PanelPlugin.tsx +15 -16
- package/src/plugins/impl/panel/__tests__/utils.test.ts +39 -1
- package/src/plugins/impl/panel/utils.ts +17 -0
- package/src/plugins/impl/vega/make-selectable.ts +3 -6
- package/src/stories/__tests__/editor-story.test.tsx +33 -0
- package/src/stories/editor.stories.tsx +24 -17
- package/src/utils/__tests__/arrays.test.ts +35 -0
- package/src/utils/__tests__/numbers.test.ts +48 -1
- package/src/utils/__tests__/objects.test.ts +21 -0
- package/src/utils/arrays.ts +10 -0
- package/src/utils/numbers.ts +28 -17
- package/src/utils/objects.ts +3 -7
- package/src/utils/once.ts +19 -19
- package/dist/any-language-editor-DZ_YTVus.js +0 -76
- package/dist/mermaid-HWGCJPDP-ByCsZnYF.js +0 -2
- package/dist/precisionRound-DMIVQrt2.js +0 -97
- package/src/core/host/__tests__/protocol.test.ts +0 -214
- package/src/core/host/protocol.ts +0 -1943
- package/src/core/websocket/useWebSocket.tsx +0 -88
|
@@ -3,7 +3,7 @@ import { t } from "./src-CA_m4ONl.js";
|
|
|
3
3
|
import { n } from "./chunk-Y2CYZVJY-DKKS1VyV.js";
|
|
4
4
|
import { $ as r, H as i, K as a, U as o, a as s, b as c, c as l, et as u, f as d, nt as f, tt as p, v as m, w as h, y as g } from "./chunk-DU6HZSFF-BwiyaNpg.js";
|
|
5
5
|
import { t as _ } from "./rough.esm-CtV9AnV1.js";
|
|
6
|
-
import { p as v } from "./mermaid-
|
|
6
|
+
import { p as v } from "./mermaid-DKI0869I.js";
|
|
7
7
|
//#region ../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/methods/transparentize.js
|
|
8
8
|
var y = (e, t) => p(e, "a", -t), b = 1e-10;
|
|
9
9
|
function x(e, t) {
|
|
@@ -2,7 +2,7 @@ import { i as e } from "./chunk-75Z2AOVW-D7gxIs2Q.js";
|
|
|
2
2
|
import { n as t } from "./src-CA_m4ONl.js";
|
|
3
3
|
import { n } from "./chunk-Y2CYZVJY-DKKS1VyV.js";
|
|
4
4
|
import { D as r, H as i, K as a, U as o, a as s, b as c, c as l, v as u, w as d, x as f, y as p } from "./chunk-DU6HZSFF-BwiyaNpg.js";
|
|
5
|
-
import { p as m } from "./mermaid-
|
|
5
|
+
import { p as m } from "./mermaid-DKI0869I.js";
|
|
6
6
|
import { n as h } from "./mermaid-parser.core-DxuSfYwJ.js";
|
|
7
7
|
import { t as g } from "./chunk-JWPE2WC7-DJvv1t8U.js";
|
|
8
8
|
//#region ../node_modules/.pnpm/mermaid@11.17.2/node_modules/mermaid/dist/chunks/mermaid.core/wardleyDiagram-VM6X3IG4.mjs
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "./linear-
|
|
1
|
+
import { t as e } from "./linear-DWERh7eI.js";
|
|
2
2
|
import { n as t } from "./ordinal-c7efuCSS.js";
|
|
3
3
|
import { t as n } from "./range-BAIvbVHp.js";
|
|
4
4
|
import { q as r } from "./cubic-OaEBhQPK.js";
|
|
@@ -9,7 +9,7 @@ import { n as s } from "./chunk-Y2CYZVJY-DKKS1VyV.js";
|
|
|
9
9
|
import { D as c, H as l, K as u, U as d, a as f, b as p, c as m, f as h, v as g, w as _, y as v, z as y } from "./chunk-DU6HZSFF-BwiyaNpg.js";
|
|
10
10
|
import "./chunk-PWAF6VOD-CQw5qATZ.js";
|
|
11
11
|
import { t as b } from "./chunk-GMAD6QVW-BhaJx0X3.js";
|
|
12
|
-
import { p as x } from "./mermaid-
|
|
12
|
+
import { p as x } from "./mermaid-DKI0869I.js";
|
|
13
13
|
//#region ../node_modules/.pnpm/d3-scale@4.0.2/node_modules/d3-scale/src/band.js
|
|
14
14
|
function S() {
|
|
15
15
|
var e = t().unknown(void 0), r = e.domain, i = e.range, o = 0, s = 1, c, l, u = !1, d = 0, f = 0, p = .5;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@marimo-team/islands",
|
|
3
|
-
"version": "0.25.3-
|
|
3
|
+
"version": "0.25.3-dev60",
|
|
4
4
|
"main": "dist/main.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"type": "module",
|
|
@@ -57,6 +57,7 @@
|
|
|
57
57
|
"@marimo-team/codemirror-mcp": "^0.1.7",
|
|
58
58
|
"@marimo-team/codemirror-sql": "^0.3.0",
|
|
59
59
|
"@marimo-team/llm-info": "workspace:*",
|
|
60
|
+
"@marimo-team/client": "workspace:*",
|
|
60
61
|
"@marimo-team/marimo-api": "workspace:*",
|
|
61
62
|
"@marimo-team/react-slotz": "^0.2.0",
|
|
62
63
|
"@marimo-team/smart-cells": "workspace:*",
|
|
@@ -152,6 +153,7 @@
|
|
|
152
153
|
"typescript-memoize": "^1.1.1",
|
|
153
154
|
"use-acp": "0.2.6",
|
|
154
155
|
"use-resize-observer": "^9.1.0",
|
|
156
|
+
"vega": "6.2.0",
|
|
155
157
|
"vega-lite": "6.4.3",
|
|
156
158
|
"vega-loader": "^5.1.3",
|
|
157
159
|
"vega-parser": "^7.1.3",
|
|
@@ -184,8 +186,7 @@
|
|
|
184
186
|
"storybook": "storybook dev -p 6006",
|
|
185
187
|
"build-storybook": "storybook build",
|
|
186
188
|
"sync-katex-css": "node --experimental-strip-types scripts/sync-katex-css.ts",
|
|
187
|
-
"
|
|
188
|
-
"codegen:check": "node --experimental-strip-types scripts/generate-host-protocol.ts --check"
|
|
189
|
+
"doctor": "npx react-doctor@latest"
|
|
189
190
|
},
|
|
190
191
|
"peerDependencies": {
|
|
191
192
|
"react": "^17 || ^18 || ^19",
|
|
@@ -214,7 +215,6 @@
|
|
|
214
215
|
"jsdom": "^24.1.3",
|
|
215
216
|
"msw": "^2.15.0",
|
|
216
217
|
"npm-run-all2": "^6.2.6",
|
|
217
|
-
"orval": "8.40.0",
|
|
218
218
|
"oxc-transform-react": "0.145.0",
|
|
219
219
|
"oxfmt": "^0.68.0",
|
|
220
220
|
"oxlint": "^1.83.0",
|
|
@@ -19,6 +19,7 @@ it("enforces host dependencies for runtime and type imports", () => {
|
|
|
19
19
|
"src/core/host/allowed.ts": `
|
|
20
20
|
import { atom } from "jotai/vanilla";
|
|
21
21
|
import { z } from "zod";
|
|
22
|
+
import * as Protocol from "@marimo-team/client/protocol";
|
|
22
23
|
import { Logger } from "@/utils/Logger";
|
|
23
24
|
import type { Document } from "./document";
|
|
24
25
|
export * from "@/core/host/events";
|
|
@@ -48,6 +48,7 @@ import { DEFAULT_AI_MODEL, type UserConfig } from "@/core/config/config-schema";
|
|
|
48
48
|
import { isWasm } from "@/core/wasm/utils";
|
|
49
49
|
import { cn } from "@/utils/cn";
|
|
50
50
|
import { Events } from "@/utils/events";
|
|
51
|
+
import { Objects } from "@/utils/objects";
|
|
51
52
|
import { Strings } from "@/utils/strings";
|
|
52
53
|
import { AIModelDropdown, getProviderLabel } from "../ai/ai-model-dropdown";
|
|
53
54
|
import {
|
|
@@ -681,7 +682,10 @@ export const CustomProvidersConfig: React.FC<AiConfigProps> = ({
|
|
|
681
682
|
};
|
|
682
683
|
|
|
683
684
|
const removeProvider = (providerName: string) => {
|
|
684
|
-
const
|
|
685
|
+
const rest = Objects.filter(
|
|
686
|
+
customProviders,
|
|
687
|
+
(_, name) => name !== providerName,
|
|
688
|
+
);
|
|
685
689
|
// Reset to clear nested dirty state, then set new value
|
|
686
690
|
form.resetField("ai.custom_providers");
|
|
687
691
|
form.setValue("ai.custom_providers", rest, { shouldDirty: true });
|
|
@@ -1846,7 +1850,7 @@ export const AddModelForm: React.FC<{
|
|
|
1846
1850
|
id={modelNameInputId}
|
|
1847
1851
|
value={modelName}
|
|
1848
1852
|
onChange={(e) => setModelName(e.target.value)}
|
|
1849
|
-
placeholder="gpt-
|
|
1853
|
+
placeholder="gpt-5.6-sol"
|
|
1850
1854
|
className="text-xs mb-0"
|
|
1851
1855
|
/>
|
|
1852
1856
|
</div>
|
|
@@ -77,6 +77,23 @@ describe("useMessageQueue", () => {
|
|
|
77
77
|
expect(result.current.messages).toEqual([]);
|
|
78
78
|
});
|
|
79
79
|
|
|
80
|
+
it("preserves multiple enqueues and flushes before React renders", () => {
|
|
81
|
+
const { result } = renderHook(() => useMessageQueue());
|
|
82
|
+
const send = vi.fn();
|
|
83
|
+
|
|
84
|
+
act(() => {
|
|
85
|
+
result.current.enqueue([textPart("first")]);
|
|
86
|
+
result.current.enqueue([textPart("second")]);
|
|
87
|
+
result.current.flushNext(send);
|
|
88
|
+
result.current.flushNext(send);
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
expect(send).toHaveBeenNthCalledWith(1, [textPart("first")]);
|
|
92
|
+
expect(send).toHaveBeenNthCalledWith(2, [textPart("second")]);
|
|
93
|
+
expect(result.current.messages).toEqual([]);
|
|
94
|
+
expect(result.current.hasQueuedRef.current).toBe(false);
|
|
95
|
+
});
|
|
96
|
+
|
|
80
97
|
it("flushNext on an empty queue is a no-op", () => {
|
|
81
98
|
const { result } = renderHook(() => useMessageQueue());
|
|
82
99
|
const send = vi.fn();
|
|
@@ -716,14 +716,10 @@ const ChatPanelBody = () => {
|
|
|
716
716
|
);
|
|
717
717
|
|
|
718
718
|
const isLoading = status === "submitted" || status === "streaming";
|
|
719
|
-
//
|
|
720
|
-
//
|
|
721
|
-
// closure's `isLoading` may be stale.
|
|
722
|
-
const isLoadingRef = useRef(isLoading);
|
|
723
|
-
isLoadingRef.current = isLoading;
|
|
724
|
-
|
|
719
|
+
// useEvent reads the latest loading state, even when called after an await
|
|
720
|
+
// (e.g. resolving @-context) that outlives the original render's closure.
|
|
725
721
|
const submitOrQueue = useEvent((parts: ChatMessagePart[]) => {
|
|
726
|
-
if (
|
|
722
|
+
if (isLoading || hasQueuedRef.current) {
|
|
727
723
|
enqueueUserMessage(parts);
|
|
728
724
|
} else {
|
|
729
725
|
sendUserMessage(parts);
|
|
@@ -294,16 +294,12 @@ export function useMessageQueue() {
|
|
|
294
294
|
// invoked from a callback (e.g. `onFinish`) in the same tick as `enqueue`.
|
|
295
295
|
const messagesRef = useRef<QueuedUserMessage[]>([]);
|
|
296
296
|
const hasQueuedRef = useRef(false);
|
|
297
|
-
messagesRef.current = messages;
|
|
298
|
-
hasQueuedRef.current = messages.length > 0;
|
|
299
297
|
|
|
300
298
|
const enqueue = useEvent((parts: ChatMessagePart[]) => {
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
return next;
|
|
306
|
-
});
|
|
299
|
+
const next = [...messagesRef.current, { id: generateUUID(), parts }];
|
|
300
|
+
messagesRef.current = next;
|
|
301
|
+
hasQueuedRef.current = true;
|
|
302
|
+
setMessages(next);
|
|
307
303
|
});
|
|
308
304
|
|
|
309
305
|
const flushNext = useEvent((send: (parts: ChatMessagePart[]) => void) => {
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
|
+
|
|
3
|
+
import { type Cell, createTable, getCoreRowModel } from "@tanstack/react-table";
|
|
4
|
+
import { fireEvent, render, screen } from "@testing-library/react";
|
|
5
|
+
import { useRef } from "react";
|
|
6
|
+
import { expect, it, vi } from "vitest";
|
|
7
|
+
import { SetupMocks } from "@/__mocks__/common";
|
|
8
|
+
import { DataTableContextMenu } from "../context-menu";
|
|
9
|
+
|
|
10
|
+
SetupMocks.resizeObserver();
|
|
11
|
+
|
|
12
|
+
const rows = [{ value: "first" }, { value: "second" }];
|
|
13
|
+
const columns = [
|
|
14
|
+
{ accessorKey: "value", meta: { filterType: "text" as const } },
|
|
15
|
+
];
|
|
16
|
+
|
|
17
|
+
function createCells() {
|
|
18
|
+
const table = createTable({
|
|
19
|
+
data: rows,
|
|
20
|
+
columns,
|
|
21
|
+
locale: "en-US",
|
|
22
|
+
getCoreRowModel: getCoreRowModel(),
|
|
23
|
+
onColumnFiltersChange: () => undefined,
|
|
24
|
+
state: {},
|
|
25
|
+
onStateChange: () => undefined,
|
|
26
|
+
renderFallbackValue: null,
|
|
27
|
+
});
|
|
28
|
+
return table.getRowModel().rows.map((row) => row.getAllCells()[0]);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function Harness({ cells }: { cells: Cell<(typeof rows)[number], unknown>[] }) {
|
|
32
|
+
const contextMenuRef = useRef<Cell<(typeof rows)[number], unknown> | null>(
|
|
33
|
+
null,
|
|
34
|
+
);
|
|
35
|
+
const tableRef = useRef<HTMLTableSectionElement>(null);
|
|
36
|
+
const tableBody = (
|
|
37
|
+
<tbody ref={tableRef}>
|
|
38
|
+
<tr>
|
|
39
|
+
<td>empty</td>
|
|
40
|
+
</tr>
|
|
41
|
+
{cells.map((cell) => {
|
|
42
|
+
return (
|
|
43
|
+
<tr key={cell.id}>
|
|
44
|
+
<td
|
|
45
|
+
data-cell-id={cell.id}
|
|
46
|
+
onContextMenu={() => {
|
|
47
|
+
contextMenuRef.current = cell;
|
|
48
|
+
}}
|
|
49
|
+
>
|
|
50
|
+
{String(cell.getValue())}
|
|
51
|
+
</td>
|
|
52
|
+
</tr>
|
|
53
|
+
);
|
|
54
|
+
})}
|
|
55
|
+
</tbody>
|
|
56
|
+
);
|
|
57
|
+
return (
|
|
58
|
+
<table>
|
|
59
|
+
<DataTableContextMenu
|
|
60
|
+
contextMenuRef={contextMenuRef}
|
|
61
|
+
tableRef={tableRef}
|
|
62
|
+
tableBody={tableBody}
|
|
63
|
+
copyAllCells={() => undefined}
|
|
64
|
+
/>
|
|
65
|
+
</table>
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
it("filters the latest right-clicked cell when the menu is already open", () => {
|
|
70
|
+
const onFilter = vi.fn();
|
|
71
|
+
const table = createTable({
|
|
72
|
+
data: rows,
|
|
73
|
+
columns,
|
|
74
|
+
locale: "en-US",
|
|
75
|
+
getCoreRowModel: getCoreRowModel(),
|
|
76
|
+
onColumnFiltersChange: onFilter,
|
|
77
|
+
state: {},
|
|
78
|
+
onStateChange: () => undefined,
|
|
79
|
+
renderFallbackValue: null,
|
|
80
|
+
});
|
|
81
|
+
render(
|
|
82
|
+
<Harness
|
|
83
|
+
cells={table.getRowModel().rows.map((row) => row.getAllCells()[0])}
|
|
84
|
+
/>,
|
|
85
|
+
);
|
|
86
|
+
|
|
87
|
+
const firstCell = screen.getByText("first");
|
|
88
|
+
const secondCell = screen.getByText("second");
|
|
89
|
+
fireEvent.contextMenu(firstCell);
|
|
90
|
+
expect(firstCell).toHaveClass("bg-(--green-4)");
|
|
91
|
+
expect(
|
|
92
|
+
screen.getByRole("menuitem", { name: "Filter by this value" }),
|
|
93
|
+
).toBeInTheDocument();
|
|
94
|
+
fireEvent.contextMenu(secondCell);
|
|
95
|
+
expect(firstCell).not.toHaveClass("bg-(--green-4)");
|
|
96
|
+
expect(secondCell).toHaveClass("bg-(--green-4)");
|
|
97
|
+
fireEvent.click(
|
|
98
|
+
screen.getByRole("menuitem", { name: "Filter by this value" }),
|
|
99
|
+
);
|
|
100
|
+
expect(firstCell).not.toHaveClass("bg-(--green-4)");
|
|
101
|
+
expect(secondCell).not.toHaveClass("bg-(--green-4)");
|
|
102
|
+
|
|
103
|
+
const update = onFilter.mock.calls.at(-1)?.[0];
|
|
104
|
+
expect(update([])).toEqual([
|
|
105
|
+
{
|
|
106
|
+
id: "value",
|
|
107
|
+
value: { type: "text", operator: "equals", text: "second" },
|
|
108
|
+
},
|
|
109
|
+
]);
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
it("does not reuse a previous cell after the menu closes", () => {
|
|
113
|
+
render(<Harness cells={createCells()} />);
|
|
114
|
+
|
|
115
|
+
const firstCell = screen.getByText("first");
|
|
116
|
+
fireEvent.contextMenu(firstCell);
|
|
117
|
+
expect(firstCell).toHaveClass("bg-(--green-4)");
|
|
118
|
+
fireEvent.keyDown(document.activeElement ?? document.body, {
|
|
119
|
+
key: "Escape",
|
|
120
|
+
});
|
|
121
|
+
expect(firstCell).not.toHaveClass("bg-(--green-4)");
|
|
122
|
+
expect(screen.queryByRole("menu")).not.toBeInTheDocument();
|
|
123
|
+
|
|
124
|
+
// Right-clicking outside any data cell must not resurrect the old one
|
|
125
|
+
fireEvent.contextMenu(screen.getByText("empty"));
|
|
126
|
+
expect(firstCell).not.toHaveClass("bg-(--green-4)");
|
|
127
|
+
expect(
|
|
128
|
+
screen.queryByRole("menuitem", { name: "Filter by this value" }),
|
|
129
|
+
).not.toBeInTheDocument();
|
|
130
|
+
});
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
|
+
import { render, screen } from "@testing-library/react";
|
|
3
|
+
import type { ReactNode } from "react";
|
|
4
|
+
import { I18nProvider } from "react-aria";
|
|
5
|
+
import { afterEach, describe, expect, it, vi } from "vitest";
|
|
6
|
+
import { DatePopover } from "../date-popover";
|
|
7
|
+
|
|
8
|
+
vi.mock("@/components/ui/tooltip", () => ({
|
|
9
|
+
Tooltip: ({ content }: { content: ReactNode }) => content,
|
|
10
|
+
}));
|
|
11
|
+
|
|
12
|
+
afterEach(() => {
|
|
13
|
+
vi.restoreAllMocks();
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
describe("DatePopover", () => {
|
|
17
|
+
it.each([0, 123])(
|
|
18
|
+
"updates the local timezone and time on rerender with %i milliseconds",
|
|
19
|
+
(milliseconds) => {
|
|
20
|
+
const NativeDateTimeFormat = Intl.DateTimeFormat;
|
|
21
|
+
let systemTimezone = "America/Los_Angeles";
|
|
22
|
+
vi.spyOn(Intl, "DateTimeFormat").mockImplementation(
|
|
23
|
+
function (locales, options) {
|
|
24
|
+
return new NativeDateTimeFormat(locales, {
|
|
25
|
+
...options,
|
|
26
|
+
timeZone: options?.timeZone ?? systemTimezone,
|
|
27
|
+
});
|
|
28
|
+
},
|
|
29
|
+
);
|
|
30
|
+
|
|
31
|
+
const date = new Date("2026-01-15T12:00:00Z");
|
|
32
|
+
date.setUTCMilliseconds(milliseconds);
|
|
33
|
+
const content = () => (
|
|
34
|
+
<I18nProvider locale="en-US">
|
|
35
|
+
<DatePopover date={date} type="datetime">
|
|
36
|
+
timestamp
|
|
37
|
+
</DatePopover>
|
|
38
|
+
</I18nProvider>
|
|
39
|
+
);
|
|
40
|
+
const { rerender } = render(content());
|
|
41
|
+
const previousTime =
|
|
42
|
+
screen.getByText(systemTimezone).nextElementSibling?.textContent;
|
|
43
|
+
const utcTime = screen.getByText("UTC").nextElementSibling?.textContent;
|
|
44
|
+
|
|
45
|
+
systemTimezone = "Asia/Tokyo";
|
|
46
|
+
rerender(content());
|
|
47
|
+
|
|
48
|
+
const expected = new NativeDateTimeFormat("en-US", {
|
|
49
|
+
timeZone: systemTimezone,
|
|
50
|
+
...(milliseconds
|
|
51
|
+
? {
|
|
52
|
+
year: "numeric",
|
|
53
|
+
month: "2-digit",
|
|
54
|
+
day: "2-digit",
|
|
55
|
+
hour: "2-digit",
|
|
56
|
+
minute: "2-digit",
|
|
57
|
+
second: "2-digit",
|
|
58
|
+
fractionalSecondDigits: 3,
|
|
59
|
+
}
|
|
60
|
+
: { dateStyle: "long", timeStyle: "medium" }),
|
|
61
|
+
}).format(date);
|
|
62
|
+
expect(screen.queryByText("America/Los_Angeles")).toBeNull();
|
|
63
|
+
expect(
|
|
64
|
+
screen.getByText(systemTimezone).nextElementSibling?.textContent,
|
|
65
|
+
).toBe(expected);
|
|
66
|
+
expect(expected).not.toBe(previousTime);
|
|
67
|
+
expect(screen.getByText("UTC").nextElementSibling?.textContent).toBe(
|
|
68
|
+
utcTime,
|
|
69
|
+
);
|
|
70
|
+
},
|
|
71
|
+
);
|
|
72
|
+
});
|