@marimo-team/islands 0.26.1-dev6 → 0.26.1-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-DtwVgVpX.js → ConnectedDataExplorerComponent-yQVBQBUW.js} +16 -16
- package/dist/{ErrorBoundary-CLLMEsVD.js → ErrorBoundary-BdXvplK4.js} +19 -19
- package/dist/{abnfDiagram-VCTEODGH-BbZOIueZ.js → abnfDiagram-VCTEODGH-Ck_lXwQR.js} +2 -2
- package/dist/{any-language-editor-yG-YmLaK.js → any-language-editor-Cx4idbgX.js} +5 -5
- package/dist/{architectureDiagram-5GKGNRK7-qjLjxapm.js → architectureDiagram-5GKGNRK7-XeVhic7Z.js} +1 -1
- package/dist/{assertNever-DywGMo-S.js → assertNever-473SFxLt.js} +14 -14
- package/dist/{button-qQhINE7z.js → button-Z2R2272J.js} +34 -31
- package/dist/{capabilities-DKqMqBzm.js → capabilities-ba3Dyv8n.js} +1 -1
- package/dist/{chat-ui-D5YPIONI.js → chat-ui-D1mRz9h6.js} +113 -113
- package/dist/{check-jchHMCfs.js → check-DmTIavbZ.js} +1 -1
- package/dist/{chunk-IMKFNOWR-BzDY1_I7.js → chunk-IMKFNOWR-DdQni67K.js} +1 -1
- package/dist/{chunk-SHT3W25Y-DbHsMKdo.js → chunk-SHT3W25Y-BdK-vMct.js} +1 -1
- package/dist/{chunk-SVP7TREG-CtwnwAE6.js → chunk-SVP7TREG-cpFZk4Ca.js} +1 -1
- package/dist/{chunk-TICWLB2K-C5Z5QMbO.js → chunk-TICWLB2K-DDgQFRgT.js} +1 -1
- package/dist/{classDiagram-ZZMXUADV-B8E5Hn78.js → classDiagram-ZZMXUADV-DeojX9X4.js} +2 -2
- package/dist/{classDiagram-v2-VYDZK3BY-DeGsK9bT.js → classDiagram-v2-VYDZK3BY-DPfTAiQ6.js} +2 -2
- package/dist/{code-visibility-D8sNdSZw.js → code-visibility-BSe8efVJ.js} +28 -28
- package/dist/{common-C1vcGVta.js → common-D4UcPNCP.js} +5102 -5055
- package/dist/{config-qTaTHnpE.js → config-D-lhQq-h.js} +31 -32
- package/dist/{copy-icon-BI7vZHEW.js → copy-icon-DuxRkh7T.js} +3 -3
- package/dist/{createReducer-DdSLRfBT.js → createReducer-D3pBhIVD.js} +2 -2
- package/dist/{cynefinDiagram-5FMLGOSQ-NDedRwsw.js → cynefinDiagram-5FMLGOSQ-DyY9TvuI.js} +1 -1
- package/dist/{dagre-GXQ25YYZ-De0sSZO7.js → dagre-GXQ25YYZ-BPCOgtKg.js} +1 -1
- package/dist/{data-grid-overlay-editor-DbZ4Cn8Q.js → data-grid-overlay-editor-j_uScboj.js} +1 -1
- package/dist/{diagram-S7CK7UJ4-wBtVl61y.js → diagram-S7CK7UJ4-KaF-C6kd.js} +1 -1
- package/dist/{diagram-UQ7AKVKN-CKWE3c1T.js → diagram-UQ7AKVKN-DkeqoSvK.js} +1 -1
- package/dist/{diagram-VX7I27RA-D2Ac5198.js → diagram-VX7I27RA-DExolTAf.js} +1 -1
- package/dist/{diagram-Z3DM3KII-CYaFOQcI.js → diagram-Z3DM3KII-BioFuBF3.js} +1 -1
- package/dist/{dialog-Ic6dh09m.js → dialog-CvyFEwby.js} +32 -32
- package/dist/{dist-BvZpdAuG.js → dist-6B1_Ttbh.js} +1 -1
- package/dist/{dist-D1D56-GS.js → dist-B28poF32.js} +2 -2
- package/dist/{dist-BozTF_gH.js → dist-BBZ7lnMw.js} +2 -2
- package/dist/{dist-BfrgytDR.js → dist-BD8ZKF5t.js} +3 -3
- package/dist/{dist-DNkrY12t.js → dist-BG-7Qpaj.js} +3 -3
- package/dist/{dist-D92tYjLc.js → dist-BIaGGUbU.js} +13 -11
- package/dist/{dist-BagHbFqG.js → dist-BR5PU2Ph.js} +3 -3
- package/dist/{dist-DpYpG8Yc.js → dist-BidYR5m4.js} +3 -3
- package/dist/{dist-D95Cd4xm.js → dist-BkGYCvFX.js} +3 -3
- package/dist/{dist-DneeBk3K.js → dist-BmEyXT7K.js} +2 -2
- package/dist/{dist-BdUitvVW.js → dist-Bt0Wt6m9.js} +2 -2
- package/dist/{dist-CEomphG1.js → dist-CG2Sl0D4.js} +2 -2
- package/dist/{dist-BMz__bo5.js → dist-CQfpgadU.js} +3 -3
- package/dist/{dist-BreKIQqQ.js → dist-CVOPvfzN.js} +3 -3
- package/dist/{dist-BEcpQbZa.js → dist-Cm0iCeQQ.js} +3 -3
- package/dist/{dist-CDVvitRS.js → dist-Cnc14jEq.js} +2 -2
- package/dist/{dist-ChcBm3jk.js → dist-D3KPC38e.js} +4 -4
- package/dist/{dist-B1qu3Bez.js → dist-D7BXk27E.js} +3 -3
- package/dist/{dist-BsE4gQHj.js → dist-D9Qhvxvg.js} +1 -1
- package/dist/{dist-OmeAz0fR.js → dist-DJKajXDB.js} +3 -3
- package/dist/{dist-ObeTgSmf.js → dist-DYbNRTYG.js} +4 -4
- package/dist/{dist-Cshl6jBw.js → dist-DhtDWnzK.js} +2 -2
- package/dist/{dist-BunZKA_9.js → dist-_x2Jks2R.js} +2 -2
- package/dist/{dist-MggMo7OR.js → dist-m0MWV-aw.js} +1 -1
- package/dist/{dist-TGSwzj8a.js → dist-pPbYNVjd.js} +4 -4
- package/dist/{dropdown-menu-Dhv4fcNl.js → dropdown-menu-BiXHfje7.js} +2568 -2568
- package/dist/{ebnfDiagram-PWID7BFC-Ds7f42dj.js → ebnfDiagram-PWID7BFC-BSb9k1ed.js} +2 -2
- package/dist/{erDiagram-RLTQ6QDP-b58Sz2Mc.js → erDiagram-RLTQ6QDP-PWA30a_r.js} +1 -1
- package/dist/{error-banner-CJVLr5_a.js → error-banner-B9HQMSaH.js} +35 -35
- package/dist/{error-entries-BKlEsuk4.js → error-entries-P6Qpq6wP.js} +1032 -867
- package/dist/{esm-B9n0caHs.js → esm-DY8dGAjJ.js} +23 -23
- package/dist/{esm-Bwp_FHP0.js → esm-Dw2ZydG_.js} +3 -3
- package/dist/{feedback-button-CjWyhzBQ.js → feedback-button-DRcg_ZBP.js} +123 -123
- package/dist/{flowDiagram-HODETNUW-BH9U7VZK.js → flowDiagram-HODETNUW-BPtD__Zz.js} +2 -2
- package/dist/{formats-BLNFWWhV.js → formats-BF95BoCT.js} +3 -3
- package/dist/{glide-data-editor-B0vlSuQn.js → glide-data-editor-DkKBZmyu.js} +43 -43
- package/dist/{glide-utils-Ze_7l_91.js → glide-utils-iHKKQPJ8.js} +3 -3
- package/dist/{globals-_GdM0yI_.js → globals-D-LCkcIG.js} +3 -3
- package/dist/{html-to-image-CNM0ZSFD.js → html-to-image-DhrFZL7t.js} +24150 -24028
- package/dist/{infoDiagram-27XIBGKW-xbjwrcNi.js → infoDiagram-27XIBGKW-SJuilBEE.js} +1 -1
- package/dist/{ishikawaDiagram-5VMMS53U-DKtukhGS.js → ishikawaDiagram-5VMMS53U-DjzyxMr8.js} +1 -1
- package/dist/{kanban-definition-UXKFOSKX-BEhlkZBb.js → kanban-definition-UXKFOSKX-D2_qopGt.js} +1 -1
- package/dist/{loader-Bin_dutt.js → loader-qPmiRXZd.js} +1 -1
- package/dist/main.js +8860 -8741
- package/dist/{mermaid-D1CZDNoB.js → mermaid-DcowNmCx.js} +35 -35
- package/dist/{mindmap-definition-YA3MSWOX-DQcnJPcV.js → mindmap-definition-YA3MSWOX-pEra10M0.js} +1 -1
- package/dist/{number-overlay-editor-C9qcz20o.js → number-overlay-editor-xQbbd1Ku.js} +1 -1
- package/dist/{pegDiagram-XKGWAZYB-BFQuPYfI.js → pegDiagram-XKGWAZYB-CHOPKVOf.js} +2 -2
- package/dist/{pencil-DVYzq-iR.js → pencil-FAv6JUvp.js} +1 -1
- package/dist/{pieDiagram-E7YTZNPT-l7aqNrem.js → pieDiagram-E7YTZNPT-yGDhsyEN.js} +1 -1
- package/dist/{process-output-DthYR2Te.js → process-output-CBPqVQBu.js} +4 -4
- package/dist/{railroadDiagram-O6MQD6OU-6R3C1lwQ.js → railroadDiagram-O6MQD6OU-CeKEPdyc.js} +2 -2
- package/dist/{requirementDiagram-BXWQKSXE-DdWYu8fn.js → requirementDiagram-BXWQKSXE-DSAbAzKe.js} +1 -1
- package/dist/{reveal-component-CGGipwgt.js → reveal-component-DUTEhLsR.js} +1018 -1018
- package/dist/{select-CDUxhHZg.js → select-BszV-bbI.js} +135 -135
- package/dist/{sequenceDiagram-WJ2MYXX4-Dzp0dgRc.js → sequenceDiagram-WJ2MYXX4-DVhWj_9H.js} +1 -1
- package/dist/{spec-ZAt4P01J.js → spec-CRfw-lOm.js} +4 -4
- package/dist/{stateDiagram-D77RDMKH-BGnTUhFJ.js → stateDiagram-D77RDMKH-CDQ2MltG.js} +2 -2
- package/dist/{stateDiagram-v2-MP3YSRHH-DsJbmDf1.js → stateDiagram-v2-MP3YSRHH-BQmvwBaz.js} +2 -2
- package/dist/{static-state-C4bAlKTU.js → static-state-BtDNJuc2.js} +7 -7
- package/dist/style.css +1 -1
- package/dist/{swimlanes-42K2YHIH-Bd4Bzh9r.js → swimlanes-42K2YHIH-DLOUTCEL.js} +1 -1
- package/dist/{swimlanesDiagram-VR7AAH4N-BlY12Jf6.js → swimlanesDiagram-VR7AAH4N-BVKrkNJ6.js} +2 -2
- package/dist/{swiper-component-DTdNB9wg.js → swiper-component-B2O8hF7b.js} +2 -2
- package/dist/{timeline-definition-24CTP7MA-m0LanyCH.js → timeline-definition-24CTP7MA-Cb2JoCSd.js} +1 -1
- package/dist/{toast-U3NpO2x3.js → toast-QsOAIPfq.js} +166 -166
- package/dist/{tooltip-UzJukb3F.js → tooltip-BQZ-Bm6h.js} +65 -65
- package/dist/{use-restore-focus-DaTVz6S6.js → use-restore-focus-DT1TZACX.js} +1885 -1877
- package/dist/{useDateFormatter-LQNtoXyh.js → useDateFormatter-D3gyMY-g.js} +2 -2
- package/dist/{useDeepCompareMemoize-CmNbQ9TT.js → useDeepCompareMemoize-CO6rO5Mq.js} +1 -1
- package/dist/{useIframeCapabilities-HTZiVlGV.js → useIframeCapabilities-_0KX0nu_.js} +1 -1
- package/dist/{useLifecycle-DTMczKkf.js → useLifecycle-C9UTzCY8.js} +2 -2
- package/dist/{vega-component-ZTdbCcwI.js → vega-component-i5lZ23n7.js} +19 -19
- package/dist/{vennDiagram-4TSXK5OY-BJ7vqDmn.js → vennDiagram-4TSXK5OY-Cm3EcCcP.js} +1 -1
- package/dist/{wardleyDiagram-VM6X3IG4-D5kWacsn.js → wardleyDiagram-VM6X3IG4-DjlUs2CC.js} +1 -1
- package/dist/{xychartDiagram-S5SC5T6Z-gr15Ws_z.js → xychartDiagram-S5SC5T6Z-DxNDul9l.js} +1 -1
- package/package.json +3 -3
- package/src/__mocks__/animation-frames.ts +31 -0
- package/src/__mocks__/executions.ts +51 -23
- package/src/__mocks__/intersection-observer.ts +45 -0
- package/src/__mocks__/notebook.ts +1 -1
- package/src/__tests__/branded.ts +4 -0
- package/src/__tests__/notebook-analysis.ts +48 -0
- package/src/__tests__/render-tracker.ts +15 -0
- package/src/__tests__/setup.ts +3 -0
- package/src/components/data-table/__tests__/export-actions.test.tsx +79 -0
- package/src/components/data-table/export-actions.tsx +64 -19
- package/src/components/data-table/schemas.ts +1 -0
- package/src/components/databases/engine-variable.tsx +2 -2
- package/src/components/dependency-graph/panels.tsx +2 -2
- package/src/components/editor/__tests__/cell-renders.test.tsx +116 -0
- package/src/components/editor/actions/__tests__/name-cell-input.test.tsx +1 -1
- package/src/components/editor/actions/useCellActionButton.tsx +2 -8
- package/src/components/editor/ai/__tests__/completion-utils.test.ts +28 -61
- package/src/components/editor/cell/CreateCellButton.tsx +69 -40
- package/src/components/editor/cell/__tests__/CreateCellButton.test.tsx +49 -0
- package/src/components/editor/cell/__tests__/cell-context-menu.test.tsx +126 -0
- package/src/components/editor/cell/__tests__/useRunCells.test.tsx +5 -5
- package/src/components/editor/cell/cell-context-menu.tsx +202 -111
- package/src/components/editor/cell/code/__tests__/code-placeholder.test.tsx +40 -0
- package/src/components/editor/cell/code/cell-editor.tsx +49 -108
- package/src/components/editor/cell/code/code-placeholder.css +61 -11
- package/src/components/editor/cell/code/code-placeholder.tsx +52 -27
- package/src/components/editor/cell/collapse.tsx +6 -3
- package/src/components/editor/cell/useSplitCell.tsx +2 -2
- package/src/components/editor/chrome/panels/__tests__/secrets-panel.test.tsx +57 -0
- package/src/components/editor/chrome/panels/secrets-panel.tsx +36 -9
- package/src/components/editor/chrome/panels/secrets-utils.ts +20 -0
- package/src/components/editor/chrome/wrapper/__tests__/document-sync-status.test.tsx +5 -2
- package/src/components/editor/chrome/wrapper/__tests__/pending-ai-cells.test.tsx +6 -10
- package/src/components/editor/errors/auto-fix.tsx +8 -7
- package/src/components/editor/header/status.tsx +5 -2
- package/src/components/editor/navigation/__tests__/navigation.test.ts +3 -16
- package/src/components/editor/navigation/focus-utils.ts +20 -8
- package/src/components/editor/navigation/multi-cell-action-toolbar.tsx +3 -11
- package/src/components/editor/navigation/navigation.ts +2 -2
- package/src/components/editor/notebook-cell.tsx +15 -24
- package/src/components/editor/output/MarimoTracebackOutput.tsx +2 -2
- package/src/components/editor/output/console/ConsoleOutput.tsx +77 -50
- package/src/components/editor/output/console/__tests__/ConsoleOutput.test.tsx +28 -0
- package/src/components/editor/renderers/cells-renderer.tsx +3 -2
- package/src/components/editor/renderers/vertical-layout/__tests__/useFocusFirstEditor.test.ts +6 -9
- package/src/components/editor/renderers/vertical-layout/useFocusFirstEditor.ts +2 -5
- package/src/components/find-replace/find-replace.tsx +3 -7
- package/src/components/icons/__tests__/large-spinner.test.tsx +5 -4
- package/src/components/scratchpad/scratchpad.tsx +2 -2
- package/src/components/tracing/tracing-keyboard.test.tsx +4 -3
- package/src/components/ui/__tests__/button-shortcut.test.tsx +22 -0
- package/src/components/ui/__tests__/fullscreen.test.tsx +83 -1
- package/src/components/ui/button.tsx +5 -1
- package/src/components/ui/fullscreen.tsx +43 -89
- package/src/components/variables/__tests__/variables-table.test.tsx +1 -2
- package/src/core/MarimoApp.tsx +1 -1
- package/src/core/__tests__/MarimoApp.test.tsx +147 -0
- package/src/core/ai/__tests__/staged-cells.test.ts +6 -39
- package/src/core/ai/context/providers/__tests__/error.test.ts +6 -3
- package/src/core/ai/staged-cells.ts +8 -35
- package/src/core/ai/tools/__tests__/edit-notebook-tool.test.ts +15 -13
- package/src/core/ai/tools/edit-notebook-tool.ts +13 -8
- package/src/core/cells/__tests__/actions.test.ts +2 -2
- package/src/core/cells/__tests__/add-missing-import.test.ts +14 -9
- package/src/core/cells/__tests__/arrange.test.ts +1 -1
- package/src/core/cells/__tests__/cell-editor-view.test.ts +44 -0
- package/src/core/cells/__tests__/cells.test.ts +0 -1
- package/src/core/cells/__tests__/focus.test.ts +1 -7
- package/src/core/cells/__tests__/harness.ts +9 -8
- package/src/core/cells/__tests__/layout.test.ts +1 -1
- package/src/core/cells/__tests__/pending-delete-service.test.tsx +121 -11
- package/src/core/cells/__tests__/runs.test.ts +14 -14
- package/src/core/cells/__tests__/utils.test.ts +3 -2
- package/src/core/cells/actions.ts +6 -6
- package/src/core/cells/add-missing-import.ts +2 -3
- package/src/core/cells/cells.ts +40 -27
- package/src/core/cells/document.ts +1 -2
- package/src/core/cells/execution-console.ts +10 -5
- package/src/core/cells/focus.ts +1 -1
- package/src/core/cells/ids.ts +2 -4
- package/src/core/cells/pending-delete-service.ts +97 -85
- package/src/core/cells/runs.ts +7 -5
- package/src/core/cells/scrollCellIntoView.ts +4 -14
- package/src/core/cells/session.ts +8 -5
- package/src/core/cells/utils.ts +0 -13
- package/src/core/codemirror/__tests__/cell-documents.test.ts +79 -0
- package/src/core/codemirror/__tests__/debounced-editor-update.test.ts +72 -0
- package/src/core/codemirror/__tests__/editor-mount-scheduler.test.ts +75 -105
- package/src/core/codemirror/__tests__/format.test.ts +85 -63
- package/src/core/codemirror/__tests__/setup.test.ts +61 -1
- package/src/core/codemirror/__tests__/use-lazy-editor-mount.test.tsx +198 -0
- package/src/core/codemirror/cell-documents.ts +132 -0
- package/src/core/codemirror/cells/debugger-decorations.ts +22 -18
- package/src/core/codemirror/cells/line-timing-decorations.ts +13 -11
- package/src/core/codemirror/cells/traceback-decorations.ts +10 -11
- package/src/core/codemirror/code-lens/__tests__/entities.test.ts +7 -11
- package/src/core/codemirror/code-lens/__tests__/extension.test.ts +38 -12
- package/src/core/codemirror/code-lens/__tests__/perf.test.ts +7 -9
- package/src/core/codemirror/code-lens/extension.ts +21 -13
- package/src/core/codemirror/copilot/__tests__/getCodes.test.ts +9 -14
- package/src/core/codemirror/copilot/getCodes.ts +3 -14
- package/src/core/codemirror/debounced-editor-update.ts +41 -0
- package/src/core/codemirror/editor-mount-scheduler.ts +41 -48
- package/src/core/codemirror/extensions.ts +2 -2
- package/src/core/codemirror/find-replace/__tests__/navigate.test.ts +42 -16
- package/src/core/codemirror/find-replace/__tests__/search-highlight.test.ts +30 -0
- package/src/core/codemirror/find-replace/__tests__/unmounted-cells.test.ts +145 -0
- package/src/core/codemirror/find-replace/navigate.ts +88 -129
- package/src/core/codemirror/find-replace/search-highlight.ts +3 -1
- package/src/core/codemirror/find-replace/state.ts +7 -2
- package/src/core/codemirror/format.ts +25 -31
- package/src/core/codemirror/go-to-definition/__tests__/underline.test.ts +58 -0
- package/src/core/codemirror/go-to-definition/__tests__/utils.test.ts +24 -44
- package/src/core/codemirror/go-to-definition/extension.ts +9 -7
- package/src/core/codemirror/go-to-definition/underline.ts +39 -48
- package/src/core/codemirror/language/__tests__/sql.test.ts +36 -0
- package/src/core/codemirror/language/cell-code.ts +7 -0
- package/src/core/codemirror/language/embedded/__tests__/embedded-python.test.ts +2 -18
- package/src/core/codemirror/language/languages/sql/sql.ts +3 -0
- package/src/core/codemirror/lsp/__tests__/notebook-lsp.test.ts +25 -0
- package/src/core/codemirror/lsp/notebook-lsp.ts +6 -16
- package/src/core/codemirror/placeholder/extensions.ts +26 -24
- package/src/core/codemirror/reactive-references/__tests__/extension.test.ts +54 -0
- package/src/core/codemirror/reactive-references/extension.ts +30 -21
- package/src/core/codemirror/use-lazy-editor-mount.ts +70 -0
- package/src/core/codemirror/utils.ts +2 -6
- package/src/core/datasets/__tests__/data-source.test.ts +15 -17
- package/src/core/datasets/data-source-connections.ts +8 -11
- package/src/core/datasets/state.ts +7 -12
- package/src/core/executions/__tests__/atoms.test.ts +211 -5
- package/src/core/executions/__tests__/freshness.test.ts +65 -56
- package/src/core/executions/__tests__/interrupt.test.ts +5 -3
- package/src/core/executions/__tests__/output-lifecycle.test.ts +95 -7
- package/src/core/executions/__tests__/output.test.ts +5 -3
- package/src/core/executions/__tests__/run.test.ts +4 -4
- package/src/core/executions/__tests__/select.test.ts +108 -69
- package/src/core/executions/atoms.ts +248 -83
- package/src/core/executions/freshness.ts +7 -7
- package/src/core/executions/hooks.ts +15 -59
- package/src/core/executions/index.ts +2 -0
- package/src/core/executions/output.ts +49 -35
- package/src/core/executions/select.ts +90 -37
- package/src/core/export/__tests__/hooks.test.ts +1 -1
- package/src/core/islands/__tests__/bridge.test.ts +1 -1
- package/src/core/islands/bootstrap.ts +7 -7
- package/src/core/islands/bridge.ts +1 -1
- package/src/core/meta/__tests__/code-visibility.test.tsx +3 -2
- package/src/core/notebook/document/__tests__/codemirror.test.ts +8 -6
- package/src/core/notebook/document/__tests__/draft.test.ts +56 -58
- package/src/core/notebook/document/__tests__/fixtures.ts +8 -7
- package/src/core/notebook/document/__tests__/hooks.test.tsx +39 -35
- package/src/core/notebook/document/__tests__/lifecycle-scenarios.test.ts +8 -5
- package/src/core/notebook/document/__tests__/model.test.ts +8 -5
- package/src/core/notebook/document/__tests__/protocol-fixtures.ts +2 -2
- package/src/core/notebook/document/__tests__/recovery-scenarios.test.ts +37 -32
- package/src/core/notebook/document/__tests__/scenarios.test.ts +49 -45
- package/src/core/notebook/document/__tests__/state.test.ts +59 -56
- package/src/core/notebook/document/__tests__/submission.test.ts +15 -12
- package/src/core/notebook/document/__tests__/test-host.ts +3 -2
- package/src/core/notebook/document/__tests__/user.ts +7 -3
- package/src/core/notebook/document/draft.ts +29 -11
- package/src/core/notebook/document/state.ts +7 -6
- package/src/core/notebook/replica/__tests__/document.test.ts +9 -5
- package/src/core/notebook/replica/__tests__/executions.test.ts +90 -25
- package/src/core/notebook/replica/__tests__/fixtures.ts +6 -2
- package/src/core/notebook/replica/__tests__/frame.test.ts +206 -0
- package/src/core/notebook/replica/__tests__/once-per-frame.test.ts +95 -0
- package/src/core/notebook/replica/__tests__/replica.test.ts +53 -9
- package/src/core/notebook/replica/__tests__/results.test.ts +27 -29
- package/src/core/notebook/replica/execution-state.ts +2 -2
- package/src/core/notebook/replica/frame.ts +54 -0
- package/src/core/notebook/replica/index.ts +1 -0
- package/src/core/notebook/replica/once-per-frame.ts +60 -0
- package/src/core/notebook/replica/replica.ts +27 -6
- package/src/core/notebook/replica/resources/analysis.ts +1 -1
- package/src/core/notebook/replica/resources/document.ts +9 -8
- package/src/core/notebook/replica/resources/executions.ts +197 -78
- package/src/core/notebook/replica/resources/results.ts +8 -14
- package/src/core/saving/__tests__/document.test.tsx +1 -1
- package/src/core/saving/__tests__/state.test.ts +2 -2
- package/src/core/session/__tests__/useNotebookReplica.hook.test.tsx +55 -9
- package/src/core/session/__tests__/useNotebookSession.hook.test.tsx +230 -12
- package/src/core/session/active-notebook.ts +4 -1
- package/src/core/session/useNotebookReplica.ts +15 -2
- package/src/core/session/useNotebookSession.tsx +38 -46
- package/src/core/state/__tests__/atom-with-selected-inputs.test.ts +48 -0
- package/src/core/state/__tests__/create-keyed-selector-hook.test.tsx +137 -0
- package/src/core/state/atom-with-selected-inputs.ts +24 -0
- package/src/core/state/create-keyed-atom-hook.ts +18 -0
- package/src/core/state/create-keyed-selector-hook.ts +22 -0
- package/src/core/storage/__tests__/state.test.ts +6 -9
- package/src/core/storage/state.ts +5 -8
- package/src/core/transports/__tests__/static.test.ts +3 -2
- package/src/core/transports/static.ts +2 -2
- package/src/core/variables/state.ts +73 -68
- package/src/core/variables/types.ts +2 -2
- package/src/core/vscode/__tests__/is-in-vscode.test.ts +36 -0
- package/src/core/vscode/is-in-vscode.ts +2 -2
- package/src/core/wasm/__tests__/bridge.test.ts +73 -1
- package/src/core/wasm/bridge.ts +5 -4
- package/src/plugins/impl/TextInputPlugin.tsx +2 -1
- package/src/plugins/impl/__test__/text-labels.test.tsx +46 -1
- package/src/utils/__tests__/lazy.test.tsx +33 -0
- package/src/utils/__tests__/shared-intersection-observer.test.ts +49 -0
- package/src/utils/__tests__/shared-resource.test.ts +107 -0
- package/src/utils/arrays.ts +4 -1
- package/src/utils/lazy.tsx +74 -0
- package/src/utils/shared-intersection-observer.ts +53 -0
- package/src/utils/shared-resource.ts +59 -0
- package/src/core/variables/__tests__/state.test.ts +0 -148
- package/src/utils/lazy.ts +0 -35
|
@@ -1,40 +1,40 @@
|
|
|
1
1
|
import { a as e } from "./rolldown-runtime-BPCzCO3I.js";
|
|
2
|
-
import { h as t,
|
|
2
|
+
import { h as t, i as n, p as r } from "./button-Z2R2272J.js";
|
|
3
3
|
import { t as i } from "./react-Bgs_wQh3.js";
|
|
4
4
|
import { t as a } from "./compiler-runtime-C5KHtL5D.js";
|
|
5
|
-
import { m as o } from "./tooltip-
|
|
6
|
-
import { a as s, s as c } from "./assertNever-
|
|
5
|
+
import { m as o } from "./tooltip-BQZ-Bm6h.js";
|
|
6
|
+
import { a as s, s as c } from "./assertNever-473SFxLt.js";
|
|
7
7
|
import { t as l } from "./react-dom-DdqGVp5N.js";
|
|
8
8
|
import { t as u } from "./jsx-runtime-D8btoEHk.js";
|
|
9
|
-
import { _n as d,
|
|
9
|
+
import { _n as d, bn as f, dn as p, fn as m, gn as h, hn as g, on as _, pn as v, vn as y, xn as b, yn as ee } from "./use-restore-focus-DT1TZACX.js";
|
|
10
10
|
//#region ../node_modules/.pnpm/@radix-ui+react-toast@1.3.1_@types+react-dom@19.3.0_@types+react@19.3.0__@types+react@1_72d2e12f1af98becc17c9660ff8081b2/node_modules/@radix-ui/react-toast/dist/index.mjs
|
|
11
|
-
var
|
|
11
|
+
var x = /* @__PURE__ */ e(i(), 1), te = /* @__PURE__ */ e(l(), 1), S = u(), C = Object.defineProperty, w = (e, t) => C(e, "name", {
|
|
12
12
|
value: t,
|
|
13
13
|
configurable: !0
|
|
14
|
-
}),
|
|
14
|
+
}), T = x.startTransition || (() => void 0), E = "ToastProvider", [D, ne, O] = s("Toast"), k = {
|
|
15
15
|
Up: "up",
|
|
16
16
|
Down: "down",
|
|
17
17
|
Left: "left",
|
|
18
18
|
Right: "right"
|
|
19
|
-
},
|
|
19
|
+
}, re = {
|
|
20
20
|
Foreground: "foreground",
|
|
21
21
|
Background: "background"
|
|
22
|
-
}, [
|
|
23
|
-
function
|
|
24
|
-
typeof
|
|
22
|
+
}, [A, j] = ee("Toast", [O]), [M, N] = A(E);
|
|
23
|
+
function P(e) {
|
|
24
|
+
typeof T == "function" ? T(e) : e();
|
|
25
25
|
}
|
|
26
|
-
|
|
27
|
-
var
|
|
28
|
-
let { __scopeToast: t, label: n = "Notification", duration: r = 5e3, swipeDirection: i =
|
|
29
|
-
|
|
30
|
-
}, []), m =
|
|
31
|
-
|
|
32
|
-
}, []), h =
|
|
33
|
-
|
|
26
|
+
w(P, "scheduleUpdate");
|
|
27
|
+
var F = /* @__PURE__ */ w((e) => {
|
|
28
|
+
let { __scopeToast: t, label: n = "Notification", duration: r = 5e3, swipeDirection: i = k.Right, swipeThreshold: a = 50, announcerContainer: o, children: s } = e, [c, l] = x.useState(null), [u, d] = x.useState(0), f = x.useRef(!1), p = x.useCallback((e) => {
|
|
29
|
+
P(() => l(e));
|
|
30
|
+
}, []), m = x.useCallback(() => {
|
|
31
|
+
P(() => d((e) => e + 1));
|
|
32
|
+
}, []), h = x.useCallback(() => {
|
|
33
|
+
P(() => d((e) => e - 1));
|
|
34
34
|
}, []);
|
|
35
|
-
return n.trim() || console.error(`Invalid prop \`label\` supplied to \`${
|
|
35
|
+
return n.trim() || console.error(`Invalid prop \`label\` supplied to \`${E}\`. Expected non-empty \`string\`.`), /* @__PURE__ */ (0, S.jsx)(D.Provider, {
|
|
36
36
|
scope: t,
|
|
37
|
-
children: /* @__PURE__ */ (0,
|
|
37
|
+
children: /* @__PURE__ */ (0, S.jsx)(M, {
|
|
38
38
|
scope: t,
|
|
39
39
|
label: n,
|
|
40
40
|
duration: r,
|
|
@@ -50,47 +50,47 @@ var I = /* @__PURE__ */ T((e) => {
|
|
|
50
50
|
children: s
|
|
51
51
|
})
|
|
52
52
|
});
|
|
53
|
-
}, "ToastProvider"),
|
|
54
|
-
let { __scopeToast:
|
|
55
|
-
|
|
56
|
-
let e = /* @__PURE__ */
|
|
57
|
-
i.length !== 0 && i.every((t) => e[t] || e.code === t) &&
|
|
53
|
+
}, "ToastProvider"), I = "ToastViewport", L = ["F8"], R = "toast.viewportPause", z = "toast.viewportResume", B = /* @__PURE__ */ x.forwardRef(/* @__PURE__ */ w(function(e, t) {
|
|
54
|
+
let { __scopeToast: n, hotkey: i = L, label: a = "Notifications ({hotkey})", ...o } = e, s = N(I, n), c = ne(n), l = x.useRef(null), u = x.useRef(null), d = x.useRef(null), p = x.useRef(null), h = r(t, p, s.onViewportChange), g = i.join("+").replace(/Key/g, "").replace(/Digit/g, ""), _ = s.toastCount > 0;
|
|
55
|
+
x.useEffect(() => {
|
|
56
|
+
let e = /* @__PURE__ */ w((e) => {
|
|
57
|
+
i.length !== 0 && i.every((t) => e[t] || e.code === t) && p.current?.focus();
|
|
58
58
|
}, "handleKeyDown");
|
|
59
59
|
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
60
|
-
}, [i]),
|
|
61
|
-
let e = l.current, t =
|
|
62
|
-
if (
|
|
63
|
-
let n = /* @__PURE__ */
|
|
60
|
+
}, [i]), x.useEffect(() => {
|
|
61
|
+
let e = l.current, t = p.current;
|
|
62
|
+
if (_ && e && t) {
|
|
63
|
+
let n = /* @__PURE__ */ w(() => {
|
|
64
64
|
if (!s.isClosePausedRef.current) {
|
|
65
|
-
let e = new CustomEvent(
|
|
65
|
+
let e = new CustomEvent(R);
|
|
66
66
|
t.dispatchEvent(e), s.isClosePausedRef.current = !0;
|
|
67
67
|
}
|
|
68
|
-
}, "handlePause"), r = /* @__PURE__ */
|
|
68
|
+
}, "handlePause"), r = /* @__PURE__ */ w(() => {
|
|
69
69
|
if (s.isClosePausedRef.current) {
|
|
70
|
-
let e = new CustomEvent(
|
|
70
|
+
let e = new CustomEvent(z);
|
|
71
71
|
t.dispatchEvent(e), s.isClosePausedRef.current = !1;
|
|
72
72
|
}
|
|
73
|
-
}, "handleResume"), i = /* @__PURE__ */
|
|
73
|
+
}, "handleResume"), i = /* @__PURE__ */ w((t) => {
|
|
74
74
|
e.contains(t.relatedTarget) || r();
|
|
75
|
-
}, "handleFocusOutResume"), a = /* @__PURE__ */
|
|
75
|
+
}, "handleFocusOutResume"), a = /* @__PURE__ */ w(() => {
|
|
76
76
|
e.contains(document.activeElement) || r();
|
|
77
77
|
}, "handlePointerLeaveResume");
|
|
78
78
|
return e.addEventListener("focusin", n), e.addEventListener("focusout", i), e.addEventListener("pointermove", n), e.addEventListener("pointerleave", a), window.addEventListener("blur", n), window.addEventListener("focus", r), () => {
|
|
79
79
|
e.removeEventListener("focusin", n), e.removeEventListener("focusout", i), e.removeEventListener("pointermove", n), e.removeEventListener("pointerleave", a), window.removeEventListener("blur", n), window.removeEventListener("focus", r);
|
|
80
80
|
};
|
|
81
81
|
}
|
|
82
|
-
}, [
|
|
83
|
-
let
|
|
82
|
+
}, [_, s.isClosePausedRef]);
|
|
83
|
+
let v = x.useCallback(({ tabbingDirection: e }) => {
|
|
84
84
|
let t = c().map((t) => {
|
|
85
85
|
let n = t.ref.current, r = [n, ..._e(n)];
|
|
86
86
|
return e === "forwards" ? r : r.reverse();
|
|
87
87
|
});
|
|
88
88
|
return (e === "forwards" ? t.reverse() : t).flat();
|
|
89
89
|
}, [c]);
|
|
90
|
-
return
|
|
91
|
-
let e =
|
|
90
|
+
return x.useEffect(() => {
|
|
91
|
+
let e = p.current;
|
|
92
92
|
if (e) {
|
|
93
|
-
let t = /* @__PURE__ */
|
|
93
|
+
let t = /* @__PURE__ */ w((t) => {
|
|
94
94
|
let n = t.altKey || t.ctrlKey || t.metaKey;
|
|
95
95
|
if (t.key === "Tab" && !n) {
|
|
96
96
|
let n = document.activeElement, r = t.shiftKey;
|
|
@@ -98,44 +98,44 @@ var I = /* @__PURE__ */ T((e) => {
|
|
|
98
98
|
u.current?.focus();
|
|
99
99
|
return;
|
|
100
100
|
}
|
|
101
|
-
let i =
|
|
101
|
+
let i = v({ tabbingDirection: r ? "backwards" : "forwards" }), a = i.findIndex((e) => e === n);
|
|
102
102
|
Q(i.slice(a + 1)) ? t.preventDefault() : r ? u.current?.focus() : d.current?.focus();
|
|
103
103
|
}
|
|
104
104
|
}, "handleKeyDown");
|
|
105
105
|
return e.addEventListener("keydown", t), () => e.removeEventListener("keydown", t);
|
|
106
106
|
}
|
|
107
|
-
}, [c,
|
|
107
|
+
}, [c, v]), /* @__PURE__ */ (0, S.jsxs)(m, {
|
|
108
108
|
ref: l,
|
|
109
109
|
role: "region",
|
|
110
|
-
"aria-label": a.replace("{hotkey}",
|
|
110
|
+
"aria-label": a.replace("{hotkey}", g),
|
|
111
111
|
tabIndex: -1,
|
|
112
|
-
style: { pointerEvents:
|
|
112
|
+
style: { pointerEvents: _ ? void 0 : "none" },
|
|
113
113
|
children: [
|
|
114
|
-
|
|
114
|
+
_ && /* @__PURE__ */ (0, S.jsx)(H, {
|
|
115
115
|
ref: u,
|
|
116
116
|
onFocusFromOutsideViewport: () => {
|
|
117
|
-
Q(
|
|
117
|
+
Q(v({ tabbingDirection: "forwards" }));
|
|
118
118
|
}
|
|
119
119
|
}),
|
|
120
|
-
/* @__PURE__ */ (0,
|
|
121
|
-
scope:
|
|
122
|
-
children: /* @__PURE__ */ (0,
|
|
120
|
+
/* @__PURE__ */ (0, S.jsx)(D.Slot, {
|
|
121
|
+
scope: n,
|
|
122
|
+
children: /* @__PURE__ */ (0, S.jsx)(f.ol, {
|
|
123
123
|
tabIndex: -1,
|
|
124
124
|
...o,
|
|
125
|
-
ref:
|
|
125
|
+
ref: h
|
|
126
126
|
})
|
|
127
127
|
}),
|
|
128
|
-
|
|
128
|
+
_ && /* @__PURE__ */ (0, S.jsx)(H, {
|
|
129
129
|
ref: d,
|
|
130
130
|
onFocusFromOutsideViewport: () => {
|
|
131
|
-
Q(
|
|
131
|
+
Q(v({ tabbingDirection: "backwards" }));
|
|
132
132
|
}
|
|
133
133
|
})
|
|
134
134
|
]
|
|
135
135
|
});
|
|
136
|
-
}, "ToastViewport")),
|
|
137
|
-
let { __scopeToast: n, onFocusFromOutsideViewport: r, ...i } = e, a =
|
|
138
|
-
return /* @__PURE__ */ (0,
|
|
136
|
+
}, "ToastViewport")), V = "ToastFocusProxy", H = /* @__PURE__ */ x.forwardRef(/* @__PURE__ */ w(function(e, t) {
|
|
137
|
+
let { __scopeToast: n, onFocusFromOutsideViewport: r, ...i } = e, a = N(V, n);
|
|
138
|
+
return /* @__PURE__ */ (0, S.jsx)(o, {
|
|
139
139
|
tabIndex: 0,
|
|
140
140
|
...i,
|
|
141
141
|
ref: t,
|
|
@@ -145,187 +145,187 @@ var I = /* @__PURE__ */ T((e) => {
|
|
|
145
145
|
a.viewport?.contains(t) || r();
|
|
146
146
|
}
|
|
147
147
|
});
|
|
148
|
-
}, "ToastFocusProxy")), U = "Toast", ie = "toast.swipeStart", ae = "toast.swipeMove", oe = "toast.swipeCancel", se = "toast.swipeEnd", W = /* @__PURE__ */
|
|
149
|
-
let { forceMount: n, open: r, defaultOpen: i, onOpenChange: a, ...o } = e, [s, c] =
|
|
148
|
+
}, "ToastFocusProxy")), U = "Toast", ie = "toast.swipeStart", ae = "toast.swipeMove", oe = "toast.swipeCancel", se = "toast.swipeEnd", W = /* @__PURE__ */ x.forwardRef(/* @__PURE__ */ w(function(e, t) {
|
|
149
|
+
let { forceMount: n, open: r, defaultOpen: i, onOpenChange: a, ...o } = e, [s, c] = h({
|
|
150
150
|
prop: r,
|
|
151
151
|
defaultProp: i ?? !0,
|
|
152
152
|
onChange: a,
|
|
153
153
|
caller: U
|
|
154
154
|
});
|
|
155
|
-
return /* @__PURE__ */ (0,
|
|
155
|
+
return /* @__PURE__ */ (0, S.jsx)(g, {
|
|
156
156
|
present: n || s,
|
|
157
|
-
children: /* @__PURE__ */ (0,
|
|
157
|
+
children: /* @__PURE__ */ (0, S.jsx)(ue, {
|
|
158
158
|
open: s,
|
|
159
159
|
...o,
|
|
160
160
|
ref: t,
|
|
161
161
|
onClose: () => c(!1),
|
|
162
|
-
onPause:
|
|
163
|
-
onResume:
|
|
164
|
-
onSwipeStart:
|
|
162
|
+
onPause: v(e.onPause),
|
|
163
|
+
onResume: v(e.onResume),
|
|
164
|
+
onSwipeStart: d(e.onSwipeStart, (e) => {
|
|
165
165
|
e.currentTarget.setAttribute("data-swipe", "start");
|
|
166
166
|
}),
|
|
167
|
-
onSwipeMove:
|
|
167
|
+
onSwipeMove: d(e.onSwipeMove, (e) => {
|
|
168
168
|
let { x: t, y: n } = e.detail.delta;
|
|
169
169
|
e.currentTarget.setAttribute("data-swipe", "move"), e.currentTarget.style.setProperty("--radix-toast-swipe-move-x", `${t}px`), e.currentTarget.style.setProperty("--radix-toast-swipe-move-y", `${n}px`);
|
|
170
170
|
}),
|
|
171
|
-
onSwipeCancel:
|
|
171
|
+
onSwipeCancel: d(e.onSwipeCancel, (e) => {
|
|
172
172
|
e.currentTarget.setAttribute("data-swipe", "cancel"), e.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"), e.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"), e.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"), e.currentTarget.style.removeProperty("--radix-toast-swipe-end-y");
|
|
173
173
|
}),
|
|
174
|
-
onSwipeEnd:
|
|
174
|
+
onSwipeEnd: d(e.onSwipeEnd, (e) => {
|
|
175
175
|
let { x: t, y: n } = e.detail.delta;
|
|
176
176
|
e.currentTarget.setAttribute("data-swipe", "end"), e.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"), e.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"), e.currentTarget.style.setProperty("--radix-toast-swipe-end-x", `${t}px`), e.currentTarget.style.setProperty("--radix-toast-swipe-end-y", `${n}px`), c(!1);
|
|
177
177
|
})
|
|
178
178
|
})
|
|
179
179
|
});
|
|
180
|
-
}, "Toast")), [ce, le] =
|
|
181
|
-
let { __scopeToast:
|
|
182
|
-
|
|
183
|
-
}),
|
|
184
|
-
e && e !== Infinity && (window.clearTimeout(
|
|
185
|
-
}, [
|
|
186
|
-
|
|
187
|
-
let e =
|
|
180
|
+
}, "Toast")), [ce, le] = A(U, { onClose() {} }), ue = /* @__PURE__ */ x.forwardRef(/* @__PURE__ */ w(function(e, t) {
|
|
181
|
+
let { __scopeToast: n, type: i = re.Foreground, duration: a, open: o, onClose: s, onEscapeKeyDown: c, onPause: l, onResume: u, onSwipeStart: m, onSwipeMove: h, onSwipeCancel: g, onSwipeEnd: _, ...y } = e, b = N(U, n), ee = ne(n), [C, T] = x.useState(null), E = r(t, T), O = x.useRef(null), k = x.useRef(null), A = a || b.duration, j = x.useRef(0), M = x.useRef(A), P = x.useRef(0), { onToastAdd: F, onToastRemove: I } = b, L = v(() => {
|
|
182
|
+
C?.contains(document.activeElement) && b.viewport?.focus(), s();
|
|
183
|
+
}), B = x.useCallback((e) => {
|
|
184
|
+
e && e !== Infinity && (window.clearTimeout(P.current), j.current = (/* @__PURE__ */ new Date()).getTime(), P.current = window.setTimeout(L, e));
|
|
185
|
+
}, [L]);
|
|
186
|
+
x.useEffect(() => {
|
|
187
|
+
let e = b.viewport;
|
|
188
188
|
if (e) {
|
|
189
|
-
let t = /* @__PURE__ */
|
|
190
|
-
|
|
191
|
-
}, "handleResume"), n = /* @__PURE__ */
|
|
192
|
-
let e = (/* @__PURE__ */ new Date()).getTime() -
|
|
193
|
-
|
|
189
|
+
let t = /* @__PURE__ */ w(() => {
|
|
190
|
+
B(M.current), u?.();
|
|
191
|
+
}, "handleResume"), n = /* @__PURE__ */ w(() => {
|
|
192
|
+
let e = (/* @__PURE__ */ new Date()).getTime() - j.current;
|
|
193
|
+
M.current -= e, window.clearTimeout(P.current), l?.();
|
|
194
194
|
}, "handlePause");
|
|
195
|
-
return e.addEventListener(
|
|
196
|
-
e.removeEventListener(
|
|
195
|
+
return e.addEventListener(R, n), e.addEventListener(z, t), () => {
|
|
196
|
+
e.removeEventListener(R, n), e.removeEventListener(z, t);
|
|
197
197
|
};
|
|
198
198
|
}
|
|
199
199
|
}, [
|
|
200
|
-
|
|
201
|
-
|
|
200
|
+
b.viewport,
|
|
201
|
+
A,
|
|
202
202
|
l,
|
|
203
203
|
u,
|
|
204
|
-
|
|
205
|
-
]),
|
|
206
|
-
|
|
204
|
+
B
|
|
205
|
+
]), x.useEffect(() => {
|
|
206
|
+
M.current = A, o && !b.isClosePausedRef.current && B(A);
|
|
207
207
|
}, [
|
|
208
208
|
o,
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
]),
|
|
213
|
-
window.clearTimeout(
|
|
214
|
-
}, []),
|
|
215
|
-
let
|
|
216
|
-
return
|
|
217
|
-
__scopeToast:
|
|
209
|
+
A,
|
|
210
|
+
b.isClosePausedRef,
|
|
211
|
+
B
|
|
212
|
+
]), x.useEffect(() => () => {
|
|
213
|
+
window.clearTimeout(P.current);
|
|
214
|
+
}, []), x.useEffect(() => (F(), () => I()), [F, I]);
|
|
215
|
+
let V = x.useMemo(() => C ? X(C) : null, [C]);
|
|
216
|
+
return b.viewport ? /* @__PURE__ */ (0, S.jsxs)(S.Fragment, { children: [V && /* @__PURE__ */ (0, S.jsx)(de, {
|
|
217
|
+
__scopeToast: n,
|
|
218
218
|
role: "status",
|
|
219
|
-
"aria-live": i ===
|
|
220
|
-
children:
|
|
221
|
-
}), /* @__PURE__ */ (0,
|
|
222
|
-
scope:
|
|
223
|
-
onClose:
|
|
224
|
-
children:
|
|
225
|
-
scope:
|
|
226
|
-
children: /* @__PURE__ */ (0,
|
|
219
|
+
"aria-live": i === re.Foreground ? "assertive" : "polite",
|
|
220
|
+
children: V
|
|
221
|
+
}), /* @__PURE__ */ (0, S.jsx)(ce, {
|
|
222
|
+
scope: n,
|
|
223
|
+
onClose: L,
|
|
224
|
+
children: te.createPortal(/* @__PURE__ */ (0, S.jsx)(D.ItemSlot, {
|
|
225
|
+
scope: n,
|
|
226
|
+
children: /* @__PURE__ */ (0, S.jsx)(p, {
|
|
227
227
|
asChild: !0,
|
|
228
|
-
onEscapeKeyDown:
|
|
229
|
-
|
|
228
|
+
onEscapeKeyDown: d(c, (e) => {
|
|
229
|
+
ee().some((t) => t.ref.current?.contains(e.target)) || L();
|
|
230
230
|
}),
|
|
231
|
-
children: /* @__PURE__ */ (0,
|
|
231
|
+
children: /* @__PURE__ */ (0, S.jsx)(f.li, {
|
|
232
232
|
tabIndex: 0,
|
|
233
233
|
"data-state": o ? "open" : "closed",
|
|
234
|
-
"data-swipe-direction":
|
|
235
|
-
...
|
|
236
|
-
ref:
|
|
234
|
+
"data-swipe-direction": b.swipeDirection,
|
|
235
|
+
...y,
|
|
236
|
+
ref: E,
|
|
237
237
|
style: {
|
|
238
238
|
userSelect: "none",
|
|
239
239
|
touchAction: "none",
|
|
240
240
|
...e.style
|
|
241
241
|
},
|
|
242
|
-
onKeyDown:
|
|
243
|
-
e.key === "Escape" && (c?.(e.nativeEvent), e.nativeEvent.defaultPrevented ||
|
|
242
|
+
onKeyDown: d(e.onKeyDown, (e) => {
|
|
243
|
+
e.key === "Escape" && (c?.(e.nativeEvent), e.nativeEvent.defaultPrevented || L());
|
|
244
244
|
}),
|
|
245
|
-
onPointerDown:
|
|
246
|
-
e.button === 0 && (
|
|
245
|
+
onPointerDown: d(e.onPointerDown, (e) => {
|
|
246
|
+
e.button === 0 && (O.current = {
|
|
247
247
|
x: e.clientX,
|
|
248
248
|
y: e.clientY
|
|
249
249
|
});
|
|
250
250
|
}),
|
|
251
|
-
onPointerMove:
|
|
252
|
-
if (!
|
|
253
|
-
let t = e.clientX -
|
|
251
|
+
onPointerMove: d(e.onPointerMove, (e) => {
|
|
252
|
+
if (!O.current) return;
|
|
253
|
+
let t = e.clientX - O.current.x, n = e.clientY - O.current.y, r = !!k.current, i = ["left", "right"].includes(b.swipeDirection), a = ["left", "up"].includes(b.swipeDirection) ? Math.min : Math.max, o = i ? a(0, t) : 0, s = i ? 0 : a(0, n), c = e.pointerType === "touch" ? 10 : 2, l = {
|
|
254
254
|
x: o,
|
|
255
255
|
y: s
|
|
256
256
|
}, u = {
|
|
257
257
|
originalEvent: e,
|
|
258
258
|
delta: l
|
|
259
259
|
};
|
|
260
|
-
r ? (
|
|
260
|
+
r ? (k.current = l, Z(ae, h, u, { discrete: !1 })) : me(l, b.swipeDirection, c) ? (k.current = l, Z(ie, m, u, { discrete: !1 }), e.target.setPointerCapture(e.pointerId)) : (Math.abs(t) > c || Math.abs(n) > c) && (O.current = null);
|
|
261
261
|
}),
|
|
262
|
-
onPointerUp:
|
|
263
|
-
let t =
|
|
264
|
-
if (n.hasPointerCapture(e.pointerId) && n.releasePointerCapture(e.pointerId),
|
|
262
|
+
onPointerUp: d(e.onPointerUp, (e) => {
|
|
263
|
+
let t = k.current, n = e.target;
|
|
264
|
+
if (n.hasPointerCapture(e.pointerId) && n.releasePointerCapture(e.pointerId), k.current = null, O.current = null, t) {
|
|
265
265
|
let n = e.currentTarget, r = {
|
|
266
266
|
originalEvent: e,
|
|
267
267
|
delta: t
|
|
268
268
|
};
|
|
269
|
-
me(t,
|
|
269
|
+
me(t, b.swipeDirection, b.swipeThreshold) ? Z(se, _, r, { discrete: !0 }) : Z(oe, g, r, { discrete: !0 }), n.addEventListener("click", (e) => e.preventDefault(), { once: !0 });
|
|
270
270
|
}
|
|
271
271
|
})
|
|
272
272
|
})
|
|
273
273
|
})
|
|
274
|
-
}),
|
|
274
|
+
}), b.viewport)
|
|
275
275
|
})] }) : null;
|
|
276
|
-
}, "ToastImpl")), de = /* @__PURE__ */
|
|
277
|
-
let { __scopeToast: t, children: n, ...r } = e, i =
|
|
278
|
-
return he(() => s(!0)),
|
|
276
|
+
}, "ToastImpl")), de = /* @__PURE__ */ w((e) => {
|
|
277
|
+
let { __scopeToast: t, children: n, ...r } = e, i = N(U, t), [a, s] = x.useState(!1), [c, l] = x.useState(!1);
|
|
278
|
+
return he(() => s(!0)), x.useEffect(() => {
|
|
279
279
|
let e = window.setTimeout(() => l(!0), 1e3);
|
|
280
280
|
return () => window.clearTimeout(e);
|
|
281
|
-
}, []), c ? null : /* @__PURE__ */ (0,
|
|
281
|
+
}, []), c ? null : /* @__PURE__ */ (0, S.jsx)(_, {
|
|
282
282
|
asChild: !0,
|
|
283
283
|
container: i.announcerContainer || void 0,
|
|
284
|
-
children: /* @__PURE__ */ (0,
|
|
284
|
+
children: /* @__PURE__ */ (0, S.jsx)(o, {
|
|
285
285
|
...r,
|
|
286
|
-
children: a && /* @__PURE__ */ (0,
|
|
286
|
+
children: a && /* @__PURE__ */ (0, S.jsxs)(S.Fragment, { children: [
|
|
287
287
|
i.label,
|
|
288
288
|
" ",
|
|
289
289
|
n
|
|
290
290
|
] })
|
|
291
291
|
})
|
|
292
292
|
});
|
|
293
|
-
}, "ToastAnnounce"), G = /* @__PURE__ */
|
|
293
|
+
}, "ToastAnnounce"), G = /* @__PURE__ */ x.forwardRef(/* @__PURE__ */ w(function(e, t) {
|
|
294
294
|
let { __scopeToast: n, ...r } = e;
|
|
295
|
-
return /* @__PURE__ */ (0,
|
|
295
|
+
return /* @__PURE__ */ (0, S.jsx)(f.div, {
|
|
296
296
|
...r,
|
|
297
297
|
ref: t
|
|
298
298
|
});
|
|
299
|
-
}, "ToastTitle")), K = /* @__PURE__ */
|
|
299
|
+
}, "ToastTitle")), K = /* @__PURE__ */ x.forwardRef(/* @__PURE__ */ w(function(e, t) {
|
|
300
300
|
let { __scopeToast: n, ...r } = e;
|
|
301
|
-
return /* @__PURE__ */ (0,
|
|
301
|
+
return /* @__PURE__ */ (0, S.jsx)(f.div, {
|
|
302
302
|
...r,
|
|
303
303
|
ref: t
|
|
304
304
|
});
|
|
305
|
-
}, "ToastDescription")), fe = "ToastAction", q = /* @__PURE__ */
|
|
305
|
+
}, "ToastDescription")), fe = "ToastAction", q = /* @__PURE__ */ x.forwardRef(/* @__PURE__ */ w(function(e, t) {
|
|
306
306
|
let { altText: n, ...r } = e;
|
|
307
|
-
return n.trim() ? /* @__PURE__ */ (0,
|
|
307
|
+
return n.trim() ? /* @__PURE__ */ (0, S.jsx)(Y, {
|
|
308
308
|
altText: n,
|
|
309
309
|
asChild: !0,
|
|
310
|
-
children: /* @__PURE__ */ (0,
|
|
310
|
+
children: /* @__PURE__ */ (0, S.jsx)(J, {
|
|
311
311
|
...r,
|
|
312
312
|
ref: t
|
|
313
313
|
})
|
|
314
314
|
}) : (console.error(`Invalid prop \`altText\` supplied to \`${fe}\`. Expected non-empty \`string\`.`), null);
|
|
315
|
-
}, "ToastAction")), pe = "ToastClose", J = /* @__PURE__ */
|
|
315
|
+
}, "ToastAction")), pe = "ToastClose", J = /* @__PURE__ */ x.forwardRef(/* @__PURE__ */ w(function(e, t) {
|
|
316
316
|
let { __scopeToast: n, ...r } = e, i = le(pe, n);
|
|
317
|
-
return /* @__PURE__ */ (0,
|
|
317
|
+
return /* @__PURE__ */ (0, S.jsx)(Y, {
|
|
318
318
|
asChild: !0,
|
|
319
|
-
children: /* @__PURE__ */ (0,
|
|
319
|
+
children: /* @__PURE__ */ (0, S.jsx)(f.button, {
|
|
320
320
|
type: "button",
|
|
321
321
|
...r,
|
|
322
322
|
ref: t,
|
|
323
|
-
onClick:
|
|
323
|
+
onClick: d(e.onClick, i.onClose)
|
|
324
324
|
})
|
|
325
325
|
});
|
|
326
|
-
}, "ToastClose")), Y = /* @__PURE__ */
|
|
326
|
+
}, "ToastClose")), Y = /* @__PURE__ */ x.forwardRef(/* @__PURE__ */ w(function(e, t) {
|
|
327
327
|
let { __scopeToast: n, altText: r, ...i } = e;
|
|
328
|
-
return /* @__PURE__ */ (0,
|
|
328
|
+
return /* @__PURE__ */ (0, S.jsx)(f.div, {
|
|
329
329
|
"data-radix-toast-announce-exclude": "",
|
|
330
330
|
"data-radix-toast-announce-alt": r || void 0,
|
|
331
331
|
...i,
|
|
@@ -346,108 +346,108 @@ function X(e) {
|
|
|
346
346
|
}
|
|
347
347
|
}), t;
|
|
348
348
|
}
|
|
349
|
-
|
|
349
|
+
w(X, "getAnnounceTextContent");
|
|
350
350
|
function Z(e, t, n, { discrete: r }) {
|
|
351
351
|
let i = n.originalEvent.currentTarget, a = new CustomEvent(e, {
|
|
352
352
|
bubbles: !0,
|
|
353
353
|
cancelable: !0,
|
|
354
354
|
detail: n
|
|
355
355
|
});
|
|
356
|
-
t && i.addEventListener(e, t, { once: !0 }), r ?
|
|
356
|
+
t && i.addEventListener(e, t, { once: !0 }), r ? b(i, a) : i.dispatchEvent(a);
|
|
357
357
|
}
|
|
358
|
-
|
|
359
|
-
var me = /* @__PURE__ */
|
|
358
|
+
w(Z, "handleAndDispatchCustomEvent");
|
|
359
|
+
var me = /* @__PURE__ */ w((e, t, n = 0) => {
|
|
360
360
|
let r = Math.abs(e.x), i = Math.abs(e.y), a = r > i;
|
|
361
|
-
return t ===
|
|
361
|
+
return t === k.Left || t === k.Right ? a && r > n : !a && i > n;
|
|
362
362
|
}, "isDeltaInDirection");
|
|
363
363
|
function he(e = () => {}) {
|
|
364
|
-
let t =
|
|
365
|
-
|
|
364
|
+
let t = v(e);
|
|
365
|
+
y(() => {
|
|
366
366
|
let e = 0, n = 0;
|
|
367
367
|
return e = window.requestAnimationFrame(() => n = window.requestAnimationFrame(t)), () => {
|
|
368
368
|
window.cancelAnimationFrame(e), window.cancelAnimationFrame(n);
|
|
369
369
|
};
|
|
370
370
|
}, [t]);
|
|
371
371
|
}
|
|
372
|
-
|
|
372
|
+
w(he, "useNextFrame");
|
|
373
373
|
function ge(e) {
|
|
374
374
|
return e.nodeType === e.ELEMENT_NODE;
|
|
375
375
|
}
|
|
376
|
-
|
|
376
|
+
w(ge, "isHTMLElement");
|
|
377
377
|
function _e(e) {
|
|
378
|
-
let t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, { acceptNode: /* @__PURE__ */
|
|
378
|
+
let t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, { acceptNode: /* @__PURE__ */ w((e) => {
|
|
379
379
|
let t = e.tagName === "INPUT" && e.type === "hidden";
|
|
380
380
|
return e.disabled || e.hidden || t ? NodeFilter.FILTER_SKIP : e.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
381
381
|
}, "acceptNode") });
|
|
382
382
|
for (; n.nextNode();) t.push(n.currentNode);
|
|
383
383
|
return t;
|
|
384
384
|
}
|
|
385
|
-
|
|
385
|
+
w(_e, "getTabbableCandidates");
|
|
386
386
|
function Q(e) {
|
|
387
387
|
let t = document.activeElement;
|
|
388
388
|
return e.some((e) => e === t || (e.focus(), document.activeElement !== t));
|
|
389
389
|
}
|
|
390
|
-
|
|
390
|
+
w(Q, "focusFirst");
|
|
391
391
|
//#endregion
|
|
392
392
|
//#region src/components/ui/toast.tsx
|
|
393
|
-
var $ = a(), ve =
|
|
393
|
+
var $ = a(), ve = F, ye = x.forwardRef((e, n) => {
|
|
394
394
|
let r = (0, $.c)(9), i, a;
|
|
395
395
|
r[0] === e ? (i = r[1], a = r[2]) : ({className: i, ...a} = e, r[0] = e, r[1] = i, r[2] = a);
|
|
396
396
|
let o;
|
|
397
397
|
r[3] === i ? o = r[4] : (o = t("fixed top-0 z-100 flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:w-fit md:max-w-[420px]", "print:hidden", i), r[3] = i, r[4] = o);
|
|
398
398
|
let s;
|
|
399
|
-
return r[5] !== a || r[6] !== n || r[7] !== o ? (s = /* @__PURE__ */ (0,
|
|
399
|
+
return r[5] !== a || r[6] !== n || r[7] !== o ? (s = /* @__PURE__ */ (0, S.jsx)(B, {
|
|
400
400
|
ref: n,
|
|
401
401
|
className: o,
|
|
402
402
|
...a
|
|
403
403
|
}), r[5] = a, r[6] = n, r[7] = o, r[8] = s) : s = r[8], s;
|
|
404
404
|
});
|
|
405
|
-
ye.displayName =
|
|
405
|
+
ye.displayName = B.displayName;
|
|
406
406
|
var be = {
|
|
407
407
|
default: "bg-background border forced-colors:border-[CanvasText] forced-colors:bg-[Canvas] forced-colors:text-[CanvasText]",
|
|
408
408
|
danger: "group destructive text-(--red-11) border-destructive bg-(--red-1) shadow-md-solid shadow-error forced-colors:border-[CanvasText] forced-colors:bg-[Canvas] forced-colors:text-[CanvasText]"
|
|
409
|
-
}, xe =
|
|
409
|
+
}, xe = n("data-[swipe=move]:transition-none group relative pointer-events-auto flex w-full items-start justify-between gap-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=move]:translate-x-(--radix-toast-swipe-move-x) data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-(--radix-toast-swipe-end-x) data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=open]:slide-in-from-top-full sm:data-[state=open]:slide-in-from-bottom-full data-[state=closed]:slide-out-to-right-full forced-color-adjust-none", {
|
|
410
410
|
variants: { variant: be },
|
|
411
411
|
defaultVariants: { variant: "default" }
|
|
412
412
|
});
|
|
413
413
|
function Se(e) {
|
|
414
414
|
return typeof e == "string" && e in be;
|
|
415
415
|
}
|
|
416
|
-
var Ce =
|
|
416
|
+
var Ce = x.forwardRef((e, n) => {
|
|
417
417
|
let r = (0, $.c)(11), i, a, o;
|
|
418
418
|
r[0] === e ? (i = r[1], a = r[2], o = r[3]) : ({className: i, variant: o, ...a} = e, r[0] = e, r[1] = i, r[2] = a, r[3] = o);
|
|
419
419
|
let s = Se(o) ? o : "default", c;
|
|
420
420
|
r[4] !== i || r[5] !== s ? (c = t(xe({ variant: s }), "print:hidden", i), r[4] = i, r[5] = s, r[6] = c) : c = r[6];
|
|
421
421
|
let l;
|
|
422
|
-
return r[7] !== a || r[8] !== n || r[9] !== c ? (l = /* @__PURE__ */ (0,
|
|
422
|
+
return r[7] !== a || r[8] !== n || r[9] !== c ? (l = /* @__PURE__ */ (0, S.jsx)(W, {
|
|
423
423
|
ref: n,
|
|
424
424
|
className: c,
|
|
425
425
|
...a
|
|
426
426
|
}), r[7] = a, r[8] = n, r[9] = c, r[10] = l) : l = r[10], l;
|
|
427
427
|
});
|
|
428
428
|
Ce.displayName = W.displayName;
|
|
429
|
-
var we =
|
|
429
|
+
var we = x.forwardRef((e, n) => {
|
|
430
430
|
let r = (0, $.c)(9), i, a;
|
|
431
431
|
r[0] === e ? (i = r[1], a = r[2]) : ({className: i, ...a} = e, r[0] = e, r[1] = i, r[2] = a);
|
|
432
432
|
let o;
|
|
433
433
|
r[3] === i ? o = r[4] : (o = t("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-destructive/30 hover:group-[.destructive]:border-destructive/30 hover:group-[.destructive]:bg-destructive hover:group-[.destructive]:text-destructive-foreground focus-visible:group-[.destructive]:ring-destructive", "forced-color-adjust-none forced-colors:border-[ButtonText] forced-colors:bg-[ButtonFace] forced-colors:text-[ButtonText] forced-colors:hover:bg-[Highlight] forced-colors:hover:text-[HighlightText] forced-colors:disabled:border-[GrayText] forced-colors:disabled:text-[GrayText]", i), r[3] = i, r[4] = o);
|
|
434
434
|
let s;
|
|
435
|
-
return r[5] !== a || r[6] !== n || r[7] !== o ? (s = /* @__PURE__ */ (0,
|
|
435
|
+
return r[5] !== a || r[6] !== n || r[7] !== o ? (s = /* @__PURE__ */ (0, S.jsx)(q, {
|
|
436
436
|
ref: n,
|
|
437
437
|
className: o,
|
|
438
438
|
...a
|
|
439
439
|
}), r[5] = a, r[6] = n, r[7] = o, r[8] = s) : s = r[8], s;
|
|
440
440
|
});
|
|
441
441
|
we.displayName = q.displayName;
|
|
442
|
-
var Te =
|
|
442
|
+
var Te = x.forwardRef((e, n) => {
|
|
443
443
|
let r = (0, $.c)(10), i, a;
|
|
444
444
|
r[0] === e ? (i = r[1], a = r[2]) : ({className: i, ...a} = e, r[0] = e, r[1] = i, r[2] = a);
|
|
445
445
|
let o;
|
|
446
446
|
r[3] === i ? o = r[4] : (o = t("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus-visible:outline-hidden focus-visible:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 hover:group-[.destructive]:text-red-500 focus-visible:group-[.destructive]:ring-red-400 focus-visible:group-[.destructive]:ring-offset-red-600", "forced-colors:text-[CanvasText] forced-colors:hover:text-[CanvasText] forced-colors:group-[.destructive]:text-[CanvasText] forced-colors:hover:group-[.destructive]:text-[CanvasText]", i), r[3] = i, r[4] = o);
|
|
447
447
|
let s;
|
|
448
|
-
r[5] === Symbol.for("react.memo_cache_sentinel") ? (s = /* @__PURE__ */ (0,
|
|
448
|
+
r[5] === Symbol.for("react.memo_cache_sentinel") ? (s = /* @__PURE__ */ (0, S.jsx)(c, { className: "h-4 w-4" }), r[5] = s) : s = r[5];
|
|
449
449
|
let l;
|
|
450
|
-
return r[6] !== a || r[7] !== n || r[8] !== o ? (l = /* @__PURE__ */ (0,
|
|
450
|
+
return r[6] !== a || r[7] !== n || r[8] !== o ? (l = /* @__PURE__ */ (0, S.jsx)(J, {
|
|
451
451
|
ref: n,
|
|
452
452
|
className: o,
|
|
453
453
|
"toast-close": "",
|
|
@@ -456,20 +456,20 @@ var Te = S.forwardRef((e, n) => {
|
|
|
456
456
|
}), r[6] = a, r[7] = n, r[8] = o, r[9] = l) : l = r[9], l;
|
|
457
457
|
});
|
|
458
458
|
Te.displayName = J.displayName;
|
|
459
|
-
var Ee =
|
|
459
|
+
var Ee = x.forwardRef((e, n) => {
|
|
460
460
|
let r = (0, $.c)(9), i, a;
|
|
461
461
|
r[0] === e ? (i = r[1], a = r[2]) : ({className: i, ...a} = e, r[0] = e, r[1] = i, r[2] = a);
|
|
462
462
|
let o;
|
|
463
463
|
r[3] === i ? o = r[4] : (o = t("text-sm font-semibold", i), r[3] = i, r[4] = o);
|
|
464
464
|
let s;
|
|
465
|
-
return r[5] !== a || r[6] !== n || r[7] !== o ? (s = /* @__PURE__ */ (0,
|
|
465
|
+
return r[5] !== a || r[6] !== n || r[7] !== o ? (s = /* @__PURE__ */ (0, S.jsx)(G, {
|
|
466
466
|
ref: n,
|
|
467
467
|
className: o,
|
|
468
468
|
...a
|
|
469
469
|
}), r[5] = a, r[6] = n, r[7] = o, r[8] = s) : s = r[8], s;
|
|
470
470
|
});
|
|
471
471
|
Ee.displayName = G.displayName;
|
|
472
|
-
var De =
|
|
472
|
+
var De = x.forwardRef((e, n) => {
|
|
473
473
|
let r = (0, $.c)(13), i, a, o;
|
|
474
474
|
r[0] === e ? (i = r[1], a = r[2], o = r[3]) : ({className: i, onPointerDown: a, ...o} = e, r[0] = e, r[1] = i, r[2] = a, r[3] = o);
|
|
475
475
|
let s;
|
|
@@ -479,7 +479,7 @@ var De = S.forwardRef((e, n) => {
|
|
|
479
479
|
e.stopPropagation(), a?.(e);
|
|
480
480
|
}, r[6] = a, r[7] = c);
|
|
481
481
|
let l;
|
|
482
|
-
return r[8] !== o || r[9] !== n || r[10] !== s || r[11] !== c ? (l = /* @__PURE__ */ (0,
|
|
482
|
+
return r[8] !== o || r[9] !== n || r[10] !== s || r[11] !== c ? (l = /* @__PURE__ */ (0, S.jsx)(K, {
|
|
483
483
|
ref: n,
|
|
484
484
|
className: s,
|
|
485
485
|
onPointerDown: c,
|