@marimo-team/islands 0.25.3-dev24 → 0.25.3-dev244
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-DfG3PRaJ.js → ConnectedDataExplorerComponent-BBihxHrr.js} +120 -116
- package/dist/{ErrorBoundary-LHjDFqXG.js → ErrorBoundary-DKniGLW9.js} +16 -16
- package/dist/_baseSet-BfI5FjBM.js +328 -0
- package/dist/{abnfDiagram-VCTEODGH-B3w-XWX8.js → abnfDiagram-VCTEODGH-DBcJVxYP.js} +2 -2
- package/dist/any-language-editor-jGaR0EAo.js +75 -0
- package/dist/{architectureDiagram-5GKGNRK7-C18U9A6k.js → architectureDiagram-5GKGNRK7-BcHZXF4S.js} +1 -1
- package/dist/{arrays-CN1djC4k.js → arrays-DoQ-AILx.js} +15 -27
- package/dist/assets/__vite-browser-external-BKBpimif.js +1 -0
- package/dist/assets/worker-CgoMtD-_.js +113 -0
- package/dist/{blockDiagram-I7D4REHJ-Cg25UrxT.js → blockDiagram-I7D4REHJ-Dkhe6_PP.js} +1 -1
- package/dist/{button-CvjkwdSk.js → button-B6RjDKJx.js} +227 -217
- package/dist/{capabilities-CQ5IjhzL.js → capabilities-CkVzWJEX.js} +2 -2
- package/dist/{chat-ui-w8SVynkn.js → chat-ui-DgaVxFrc.js} +1309 -1307
- package/dist/{check-BMKBBrdc.js → check-Z_vtI3OL.js} +1 -1
- package/dist/{chunk-IMKFNOWR-CrS5bzqW.js → chunk-IMKFNOWR-CTZlwBAA.js} +1 -1
- package/dist/{chunk-SHT3W25Y-StpvPvUG.js → chunk-SHT3W25Y-53g_RZHm.js} +1 -1
- package/dist/{chunk-SVP7TREG-CBXjbYZC.js → chunk-SVP7TREG-P6abNGV_.js} +1 -1
- package/dist/{chunk-TICWLB2K-Dp6bIb-q.js → chunk-TICWLB2K-BTJJqkyF.js} +1 -1
- package/dist/{chunk-YOKDWASO-DPZk8vhS.js → chunk-YOKDWASO-DKplTrBY.js} +20 -20
- package/dist/{classDiagram-ZZMXUADV-BFYuxV5g.js → classDiagram-ZZMXUADV-BUGqOrTm.js} +2 -2
- package/dist/{classDiagram-v2-VYDZK3BY-D_tjXVMl.js → classDiagram-v2-VYDZK3BY-CXpQvO-s.js} +2 -2
- package/dist/code-visibility-CIUgREo9.js +134 -0
- package/dist/{common-1pRFQo1N.js → common-DzCPFBsv.js} +9917 -9686
- package/dist/config-DbjzjwxX.js +636 -0
- package/dist/{copy-icon-BgUO8jsi.js → copy-icon-CG57cxwb.js} +3 -3
- package/dist/createReducer-DePYJ0F3.js +63 -0
- package/dist/{cynefinDiagram-5FMLGOSQ-DSgYrHB2.js → cynefinDiagram-5FMLGOSQ-DOcnl8wW.js} +1 -1
- package/dist/{dagre-GXQ25YYZ-GYlruCBf.js → dagre-GXQ25YYZ-CuHR9QfG.js} +3 -3
- package/dist/{dagre-BGSfXNEb.js → dagre-mqiMAsFY.js} +531 -680
- package/dist/{data-grid-overlay-editor-UR0x91Ij.js → data-grid-overlay-editor-PstJqwhX.js} +5 -5
- package/dist/{data-grid-types-BH_r7g7l.js → data-grid-types-0PJ-9N5n.js} +1 -1
- package/dist/{debounce-C3jyATpc.js → debounce-DrhhziJv.js} +2 -2
- package/dist/{diagram-S7CK7UJ4-DRu5LX5_.js → diagram-S7CK7UJ4-BPiG4kso.js} +1 -1
- package/dist/{diagram-UQ7AKVKN-DD7uiejP.js → diagram-UQ7AKVKN-_piBOvOC.js} +1 -1
- package/dist/{diagram-VX7I27RA-ByH9KAJJ.js → diagram-VX7I27RA-DCzVeJ8M.js} +1 -1
- package/dist/{diagram-Z3DM3KII-BsQHPRke.js → diagram-Z3DM3KII-D64CF1jQ.js} +1 -1
- package/dist/{dialog-Cc479ZEH.js → dialog-DsZ49mmU.js} +26 -26
- package/dist/{dist-Bvs24R_E.js → dist-11T5wq3_.js} +31 -30
- package/dist/{dist-F8Ep36rk.js → dist-17ugwGZc.js} +59 -58
- package/dist/{dist-BMQf5zIS.js → dist-7cRjf--y.js} +123 -122
- package/dist/{dist-diIx5qJW.js → dist-B8pkfkzc.js} +31 -30
- package/dist/{dist-CN_BeG2I.js → dist-B9UoM_wq.js} +58 -57
- package/dist/{dist-CLdpGQVr.js → dist-BGuMTs1i.js} +118 -117
- package/dist/{dist-BK4Oj99o.js → dist-BHW11fni.js} +18 -17
- package/dist/dist-BLY4m1Wi.js +850 -0
- package/dist/{dist-PXYI_yuP.js → dist-BNlcVoxs.js} +24 -23
- package/dist/{dist-D6d86eNJ.js → dist-BQYe5Bju.js} +47 -46
- package/dist/{dist-CkTTIdBe.js → dist-BX1mn8na.js} +337 -337
- package/dist/{dist-DiDibOYr.js → dist-Bh0PTKUW.js} +151 -150
- package/dist/{dist-CSJ0MDRw.js → dist-CKaXK92p.js} +56 -55
- package/dist/{dist-C8fAKSH1.js → dist-CLhwfhpJ.js} +53 -52
- package/dist/{dist-DoE4XJBC.js → dist-CYeqK4Xw.js} +9801 -10649
- package/dist/{dist-BLfKmR-l.js → dist-Cxlp3WH6.js} +16 -15
- package/dist/{dist-D-wwqlzJ.js → dist-DSJPGj42.js} +158 -157
- package/dist/{dist-BorMD-uX.js → dist-DU9ICsWZ.js} +75 -74
- package/dist/{dist-DBtSl3sf.js → dist-DWv0ALBi.js} +47 -46
- package/dist/{dist-OR1OnN-y.js → dist-DiBpWEsB.js} +31 -30
- package/dist/{dist-CrSP_H1M.js → dist-DiLFTlnl.js} +242 -242
- package/dist/{dist-DpBpA_n1.js → dist-Lm-D-Vr6.js} +3 -3
- package/dist/{dist-CSbh1PNP.js → dist-cVDV5IuI.js} +23 -22
- package/dist/{dist-BuaRHxOc.js → dist-fRfaOoq8.js} +44 -43
- package/dist/{dist-Cg7gzw-a.js → dist-gTTI-9Px.js} +78 -77
- package/dist/dropdown-menu-BRiE7Vnp.js +6083 -0
- package/dist/{ebnfDiagram-PWID7BFC-CQRK5_eT.js → ebnfDiagram-PWID7BFC-BapQPML-.js} +2 -2
- package/dist/{erDiagram-RLTQ6QDP-BKtWrDVh.js → erDiagram-RLTQ6QDP-CNQvC2_Q.js} +1 -1
- package/dist/{error-banner-CFPHFw4h.js → error-banner-IsonnvA0.js} +84 -83
- package/dist/error-entries-CRPfxMqm.js +2505 -0
- package/dist/{esm-D2gTsXEV.js → esm-BgKjMvWw.js} +530 -529
- package/dist/{esm-AMFssoNp.js → esm-CHjVSexr.js} +328 -329
- package/dist/feedback-button-C0iLkz-H.js +374 -0
- package/dist/{flowDiagram-HODETNUW-1IN-ih2E.js → flowDiagram-HODETNUW-BBt6S6oe.js} +2 -2
- package/dist/{formats-X4mMQWzX.js → formats-BK4VefeF.js} +6 -6
- package/dist/{ganttDiagram-EL5Y4UJY-BQT16JSc.js → ganttDiagram-EL5Y4UJY-Dh_4cBJZ.js} +2 -2
- package/dist/{glide-data-editor-DPjObn47.js → glide-data-editor-8CBjuK8C.js} +417 -415
- package/dist/{glide-utils-DM9zBO4W.js → glide-utils-CQddGpa-.js} +16 -16
- package/dist/{globals-DOHFyDcV.js → globals-M9WsksQz.js} +3 -3
- package/dist/{graphlib-BmY_CCV9.js → graphlib-nlwT3Wvy.js} +177 -220
- package/dist/hasIn-C20JsQ2m.js +28 -0
- package/dist/{highlighted-body-KPVGNVTW-zwjq21tf.js → highlighted-body-KPVGNVTW-3Ziwfz-V.js} +2 -2
- package/dist/{error-entries-Damuuclv.js → html-to-image-Gx4q3ZoD.js} +26911 -26769
- package/dist/{infoDiagram-27XIBGKW-CkB-zr4p.js → infoDiagram-27XIBGKW-Hd8Ifz82.js} +1 -1
- package/dist/isArrayLikeObject-B-HXCsex.js +626 -0
- package/dist/isEmpty-CdX7MTE1.js +14 -0
- package/dist/{ishikawaDiagram-5VMMS53U-wlyLjBmM.js → ishikawaDiagram-5VMMS53U-CP7hnHWx.js} +1 -1
- package/dist/{kanban-definition-UXKFOSKX-C2usY0i-.js → kanban-definition-UXKFOSKX-CX91sa9b.js} +1 -1
- package/dist/{linear-Cnaq3Tfb.js → linear-DWERh7eI.js} +121 -73
- package/dist/{loader-BQOfjTIJ.js → loader-BisjOLiW.js} +12 -12
- package/dist/main.js +10234 -8104
- package/dist/{mermaid-BA-Z6wGL.js → mermaid-Djb3Ni9t.js} +54 -54
- package/dist/mermaid-HWGCJPDP-Du3-HPQA.js +2 -0
- package/dist/{mindmap-definition-YA3MSWOX-nKOWS8RR.js → mindmap-definition-YA3MSWOX-DgCNo07O.js} +1 -1
- package/dist/{now-jM8-M7IR.js → now-BKZCLE5P.js} +12 -13
- package/dist/{number-overlay-editor-B3cSnrr6.js → number-overlay-editor-uvNY9IUz.js} +3 -3
- package/dist/{dist-CN8zI-XC.js → objectWithoutPropertiesLoose-ai5NUqGa.js} +262 -240
- package/dist/{objects-CzUgoMIF.js → objects-DCmMvZtn.js} +1 -3
- package/dist/{once-BtE-wKRL.js → once-NnpX_HnX.js} +1 -1
- package/dist/{pegDiagram-XKGWAZYB-Dac9EIKD.js → pegDiagram-XKGWAZYB-SGJhnIKo.js} +2 -2
- package/dist/pick-tCszMUbm.js +35 -0
- package/dist/{pieDiagram-E7YTZNPT-B7S-DsW_.js → pieDiagram-E7YTZNPT-1stXIWCQ.js} +1 -1
- package/dist/precisionRound-DhAzeRcm.js +49 -0
- package/dist/{process-output-CTPTtxXB.js → process-output-D2ISIyIs.js} +4 -4
- package/dist/{quadrantDiagram-AXDQQJYC-Ccw0xMjN.js → quadrantDiagram-AXDQQJYC-Blrm7V7_.js} +1 -1
- package/dist/{railroadDiagram-O6MQD6OU-Cfa5Q-hr.js → railroadDiagram-O6MQD6OU-DY1mojzB.js} +2 -2
- package/dist/{react-vega-BED0DjiB.js → react-vega-C4T9Rb_w.js} +12284 -12270
- package/dist/{requirementDiagram-BXWQKSXE-d8zXCJIk.js → requirementDiagram-BXWQKSXE-gHzhUp0D.js} +1 -1
- package/dist/{reveal-component-CFFzSsPX.js → reveal-component-GMnfGiUU.js} +430 -407
- package/dist/schemas-CdscWNy_.js +4747 -0
- package/dist/select-BSxlITBo.js +1200 -0
- package/dist/{sequenceDiagram-WJ2MYXX4-b6pei3lJ.js → sequenceDiagram-WJ2MYXX4-rjPtD9fB.js} +1 -1
- package/dist/{spec-BJzgmvVa.js → spec-Dq8RNplp.js} +41 -11
- package/dist/{stateDiagram-D77RDMKH-Be-xSpaZ.js → stateDiagram-D77RDMKH-DMNxjUxV.js} +4 -4
- package/dist/{stateDiagram-v2-MP3YSRHH-5Y-FxesJ.js → stateDiagram-v2-MP3YSRHH-CumAaqGo.js} +2 -2
- package/dist/static-state-BldGd99T.js +72 -0
- package/dist/strings-BGW-fXVJ.js +507 -0
- package/dist/style.css +1 -1
- package/dist/{swimlanes-42K2YHIH-nRRl4NU0.js → swimlanes-42K2YHIH-BU14_Tej.js} +1 -1
- package/dist/{swimlanesDiagram-VR7AAH4N-BS79510V.js → swimlanesDiagram-VR7AAH4N-CieAnPqJ.js} +2 -2
- package/dist/{swiper-component-DKntyn8p.js → swiper-component-Dir1o8ml.js} +2 -2
- package/dist/{time-BieKwdYS.js → time-BaMbJs4z.js} +18 -18
- package/dist/{timeline-definition-24CTP7MA-Cfzf8WPf.js → timeline-definition-24CTP7MA-CrVj4E1K.js} +1 -1
- package/dist/toast-BWIPi3aF.js +491 -0
- package/dist/{tooltip-CtBZ5q8p.js → tooltip-C3UnvsRe.js} +329 -305
- package/dist/use-restore-focus-BWO0z1lo.js +1672 -0
- package/dist/{useAsyncData-BD534XmW.js → useAsyncData-DsZMvNXn.js} +15 -14
- package/dist/{useDateFormatter-DkajGwwd.js → useDateFormatter-ChB4eyim.js} +2 -2
- package/dist/{useDeepCompareMemoize-C72_RNsu.js → useDeepCompareMemoize-KMBBux8C.js} +1 -1
- package/dist/{useIframeCapabilities-DBETvvPl.js → useIframeCapabilities-cMNQ80CK.js} +1 -1
- package/dist/useLifecycle-BquH9ET-.js +112 -0
- package/dist/useTheme-DgOLVISn.js +337 -0
- package/dist/utils-DXkj82sK.js +813 -0
- package/dist/{vega-component-DfcYgj-Y.js → vega-component-Bwg_Kuh-.js} +171 -170
- 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-CeY6Z1xZ.js → vennDiagram-4TSXK5OY-ZLxQ8yhm.js} +1 -1
- package/dist/{wardleyDiagram-VM6X3IG4-Cxs9NtVi.js → wardleyDiagram-VM6X3IG4-D88pcLY1.js} +1 -1
- package/dist/{xychartDiagram-S5SC5T6Z-DNWbvPK7.js → xychartDiagram-S5SC5T6Z-_13d4g8g.js} +2 -2
- package/package.json +16 -20
- package/src/__mocks__/document.tsx +63 -0
- package/src/__mocks__/notebook.ts +3 -4
- package/src/__mocks__/partial.ts +26 -0
- package/src/__mocks__/requests.ts +1 -4
- package/src/__tests__/main.test.tsx +24 -1
- package/src/__tests__/module-entry.test.ts +44 -0
- package/src/__tests__/mount.test.ts +1 -21
- package/src/__tests__/{host-imports.test.ts → replica-imports.test.ts} +12 -11
- package/src/components/ai/__tests__/ai-model-dropdown.test.tsx +63 -0
- package/src/components/ai/ai-model-dropdown.tsx +11 -6
- package/src/components/app-config/ai-config.tsx +155 -149
- package/src/components/app-config/app-config-button.tsx +6 -5
- package/src/components/app-config/app-config-form.tsx +5 -9
- package/src/components/app-config/common.tsx +7 -9
- package/src/components/app-config/data-form.tsx +112 -113
- package/src/components/app-config/mcp-config.tsx +30 -53
- package/src/components/app-config/user-config-form.css +91 -0
- package/src/components/app-config/user-config-form.tsx +266 -349
- package/src/components/chat/__tests__/message-queue.test.tsx +17 -0
- package/src/components/chat/__tests__/notebook-access-selector.test.tsx +64 -0
- package/src/components/chat/acp/__tests__/session-tabs.test.tsx +43 -0
- package/src/components/chat/acp/__tests__/state.test.ts +2 -2
- package/src/components/chat/acp/blocks.tsx +3 -2
- package/src/components/chat/acp/session-tabs.tsx +8 -3
- package/src/components/chat/capabilities-popover.tsx +1 -5
- package/src/components/chat/chat-components.tsx +2 -0
- package/src/components/chat/chat-panel.tsx +23 -104
- package/src/components/chat/chat-utils.ts +4 -8
- package/src/components/chat/notebook-access-selector.stories.tsx +22 -0
- package/src/components/chat/notebook-access-selector.tsx +100 -0
- package/src/components/data-table/TableBottomBar.tsx +4 -1
- package/src/components/data-table/TableTopBar.tsx +2 -0
- package/src/components/data-table/__tests__/chart-spec-model.test.ts +195 -195
- package/src/components/data-table/__tests__/column-explorer.test.tsx +27 -1
- package/src/components/data-table/__tests__/columns.test.tsx +105 -0
- package/src/components/data-table/__tests__/context-menu-interaction.test.tsx +130 -0
- package/src/components/data-table/__tests__/data-table.test.tsx +1 -0
- package/src/components/data-table/__tests__/date-popover.test.tsx +72 -0
- package/src/components/data-table/__tests__/export-actions.test.tsx +105 -0
- package/src/components/data-table/__tests__/keyboard-selection.test.tsx +188 -0
- package/src/components/data-table/__tests__/pagination.test.tsx +28 -1
- package/src/components/data-table/__tests__/search-highlight.test.tsx +109 -0
- package/src/components/data-table/__tests__/url-detector.test.tsx +74 -0
- package/src/components/data-table/cell-selection/feature.ts +2 -2
- package/src/components/data-table/cell-selection/types.ts +2 -2
- package/src/components/data-table/charts/__tests__/chart-panel.test.tsx +74 -1
- package/src/components/data-table/charts/__tests__/spec-snapshot.test.ts +20 -20
- package/src/components/data-table/charts/__tests__/spec.test.ts +78 -52
- package/src/components/data-table/charts/__tests__/storage.test.ts +4 -1
- package/src/components/data-table/charts/chart-spec/spec.ts +68 -43
- package/src/components/data-table/charts/charts.tsx +40 -30
- package/src/components/data-table/charts/storage.ts +16 -5
- package/src/components/data-table/column-explorer-panel/column-explorer.tsx +1 -1
- package/src/components/data-table/column-summary/chart-spec-model.tsx +23 -16
- package/src/components/data-table/column-summary/column-summary.tsx +2 -4
- package/src/components/data-table/column-visibility-dropdown.tsx +8 -13
- package/src/components/data-table/columns.tsx +45 -46
- package/src/components/data-table/context-menu.tsx +36 -20
- package/src/components/data-table/data-table.tsx +17 -1
- package/src/components/data-table/date-popover.tsx +6 -4
- package/src/components/data-table/export-actions.tsx +76 -48
- package/src/components/data-table/pagination.tsx +44 -33
- package/src/components/data-table/range-focus/atoms.ts +4 -6
- package/src/components/data-table/range-focus/use-cell-range-selection.ts +65 -38
- package/src/components/data-table/range-focus/use-scroll-into-view.ts +21 -2
- package/src/components/data-table/renderers.tsx +16 -7
- package/src/components/data-table/row-viewer-panel/__tests__/row-viewer.test.tsx +24 -1
- package/src/components/data-table/row-viewer-panel/row-viewer.tsx +4 -4
- package/src/components/data-table/search-highlight.tsx +79 -0
- package/src/components/data-table/types.ts +1 -0
- package/src/components/data-table/url-detector.tsx +49 -9
- package/src/components/datasources/__tests__/column-actions.test.tsx +97 -0
- package/src/components/datasources/__tests__/column-preview.test.tsx +96 -5
- package/src/components/datasources/__tests__/datasources-interactions.test.tsx +181 -0
- package/src/components/datasources/__tests__/table-list.test.tsx +118 -0
- package/src/components/datasources/__tests__/utils.test.ts +57 -6
- package/src/components/datasources/column-preview.tsx +17 -12
- package/src/components/datasources/datasources.tsx +56 -43
- package/src/components/datasources/utils.ts +32 -23
- package/src/components/debugger/debugger-code.tsx +5 -0
- package/src/components/dependency-graph/custom-node.tsx +1 -1
- package/src/components/dependency-graph/dependency-graph-tree.tsx +8 -8
- package/src/components/dependency-graph/elements.ts +24 -21
- package/src/components/dependency-graph/minimap-content.tsx +13 -19
- package/src/components/dependency-graph/panels.tsx +4 -2
- package/src/components/dependency-graph/utils/__tests__/layout.test.ts +18 -11
- package/src/components/editor/SortableCell.tsx +1 -3
- package/src/components/editor/__tests__/Output.test.tsx +50 -32
- package/src/{core/attachments/__tests__/toast.test.tsx → components/editor/__tests__/agent-toast.test.tsx} +1 -1
- package/src/components/editor/__tests__/data-attributes.test.tsx +28 -14
- package/src/components/editor/__tests__/dynamic-favicon.test.tsx +111 -18
- package/src/components/editor/__tests__/output-persistence.test.tsx +6 -2
- package/src/components/editor/__tests__/package-alert.test.tsx +22 -1
- package/src/components/editor/actions/__tests__/name-cell-input.test.tsx +69 -0
- package/src/components/editor/actions/__tests__/pair-with-agent-commands.test.ts +3 -3
- package/src/components/editor/actions/__tests__/pair-with-agent-modal.test.tsx +40 -10
- package/src/components/editor/actions/__tests__/pair-with-agent.test.tsx +6 -10
- package/src/components/editor/actions/__tests__/useCellActionButton.test.tsx +113 -0
- package/src/components/editor/actions/name-cell-input.tsx +4 -3
- package/src/components/editor/actions/pair-with-agent-commands.ts +10 -6
- package/src/components/editor/actions/pair-with-agent-modal.tsx +24 -21
- package/src/components/editor/actions/pair-with-agent.tsx +15 -10
- package/src/components/editor/actions/useCellActionButton.tsx +36 -31
- package/src/components/editor/actions/useConfigActions.tsx +3 -4
- package/src/components/editor/actions/useNotebookActions.tsx +25 -29
- package/src/components/editor/actions/useRestartKernel.tsx +1 -1
- package/src/components/editor/actions/useSetCodeVisibility.ts +11 -12
- package/src/components/editor/actions/useSetOutputsExpanded.ts +14 -19
- package/src/components/editor/ai/add-cell-with-ai.tsx +3 -3
- package/src/components/editor/ai/ai-completion-editor.tsx +1 -0
- package/src/components/editor/alerts/__tests__/connection-notice.test.tsx +1 -1
- package/src/components/editor/alerts/connection-notice.tsx +1 -1
- package/src/components/editor/alerts/startup-logs-alert.tsx +1 -0
- package/src/components/editor/alerts/stdin-blocking-alert.tsx +1 -1
- package/src/components/editor/app-container.tsx +1 -1
- package/src/components/editor/boundary/__tests__/ErrorBoundary.test.tsx +1 -1
- package/src/components/editor/cell/CreateCellButton.tsx +15 -21
- package/src/components/editor/cell/DeleteButton.tsx +3 -2
- package/src/components/editor/cell/RunButton.tsx +2 -2
- package/src/components/editor/cell/StagedAICell.tsx +10 -2
- package/src/components/editor/cell/StopButton.tsx +2 -2
- package/src/components/editor/cell/__tests__/StagedAICell.test.tsx +4 -2
- package/src/components/editor/cell/__tests__/useShouldShowInterrupt.test.ts +39 -0
- package/src/components/editor/cell/cell-actions.tsx +12 -1
- package/src/components/editor/cell/code/__tests__/language-toggle.test.tsx +54 -0
- package/src/components/editor/cell/code/cell-editor.tsx +46 -165
- package/src/components/editor/cell/code/language-toggle.tsx +8 -7
- package/src/components/editor/cell/collapse.tsx +11 -4
- package/src/components/editor/cell/useAddCell.ts +4 -8
- package/src/components/editor/cell/useDeleteCell.tsx +10 -36
- package/src/components/editor/cell/useRunCells.ts +2 -5
- package/src/components/editor/cell/useShouldShowInterrupt.ts +2 -12
- package/src/components/editor/cell/useSplitCell.tsx +10 -6
- package/src/components/editor/chrome/components/__tests__/feedback-button.test.tsx +1 -1
- package/src/components/editor/chrome/components/feedback-button.tsx +2 -8
- package/src/components/editor/chrome/panels/__tests__/packages-panel.test.tsx +31 -2
- package/src/components/editor/chrome/panels/__tests__/runtime-details.test.tsx +1 -1
- package/src/components/editor/chrome/panels/__tests__/sandbox-recovery.test.tsx +1 -1
- package/src/components/editor/chrome/panels/cache-panel.tsx +1 -0
- package/src/components/editor/chrome/panels/dependency-graph-panel.tsx +1 -1
- package/src/components/editor/chrome/panels/logs-panel.tsx +2 -1
- package/src/components/editor/chrome/panels/outline/__tests__/outline-keyboard.test.tsx +84 -0
- package/src/components/editor/chrome/panels/outline/floating-outline.tsx +39 -14
- package/src/components/editor/chrome/panels/outline/useActiveOutline.tsx +3 -2
- package/src/components/editor/chrome/panels/packages-panel.tsx +4 -7
- package/src/components/editor/chrome/panels/secrets-panel.tsx +1 -0
- package/src/components/editor/chrome/panels/session-panel.tsx +1 -1
- package/src/components/editor/chrome/panels/snippets-panel.tsx +10 -12
- package/src/components/editor/chrome/panels/variable-panel.tsx +1 -5
- package/src/components/editor/chrome/wrapper/__tests__/attachment-status.test.tsx +6 -9
- package/src/components/editor/chrome/wrapper/__tests__/document-sync-status.test.tsx +92 -0
- package/src/components/editor/chrome/wrapper/__tests__/pending-ai-cells.test.tsx +62 -3
- package/src/components/editor/chrome/wrapper/footer-items/attachment-status.tsx +4 -4
- package/src/components/editor/chrome/wrapper/footer-items/backend-status.tsx +1 -1
- package/src/components/editor/chrome/wrapper/footer-items/document-sync-status.tsx +54 -0
- package/src/components/editor/chrome/wrapper/footer-items/lsp-status.tsx +1 -1
- package/src/components/editor/chrome/wrapper/footer-items/machine-stats.tsx +1 -1
- package/src/components/editor/chrome/wrapper/footer-items/runtime-settings.tsx +1 -7
- package/src/components/editor/chrome/wrapper/footer.tsx +2 -2
- package/src/components/editor/chrome/wrapper/minimap-state.ts +1 -1
- package/src/components/editor/chrome/wrapper/pending-ai-cells.tsx +12 -2
- package/src/components/editor/chrome/wrapper/storage.ts +1 -1
- package/src/components/editor/columns/__tests__/cell-column.test.tsx +1 -1
- package/src/components/editor/columns/cell-column.tsx +1 -1
- package/src/components/editor/columns/sortable-column.tsx +2 -2
- package/src/components/editor/connections/components.tsx +5 -10
- package/src/components/editor/controls/Controls.tsx +4 -4
- package/src/components/editor/controls/__tests__/command-palette.test.tsx +53 -0
- package/src/components/editor/controls/__tests__/keyboard-shortcuts.test.tsx +61 -0
- package/src/components/editor/controls/__tests__/notebook-menu-dropdown.test.tsx +10 -4
- package/src/components/editor/controls/command-palette.tsx +22 -10
- package/src/components/editor/controls/keyboard-shortcuts.tsx +14 -5
- package/src/components/editor/documentation.css +34 -11
- package/src/components/editor/dynamic-favicon.tsx +21 -40
- package/src/components/editor/errors/__tests__/send-error-report-button.test.tsx +25 -20
- package/src/components/editor/errors/auto-fix.tsx +4 -8
- package/src/components/editor/errors/send-error-report-button.tsx +3 -6
- package/src/components/editor/file-tree/__tests__/file-explorer-interactions.test.tsx +6 -0
- package/src/components/editor/file-tree/__tests__/file-explorer-navigation.test.tsx +47 -0
- package/src/components/editor/file-tree/__tests__/use-file-search.test.tsx +91 -0
- package/src/components/editor/file-tree/file-explorer.tsx +48 -15
- package/src/components/editor/file-tree/file-name-input.tsx +1 -0
- 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/header/__tests__/filename-form.test.tsx +1 -4
- package/src/components/editor/header/__tests__/status.test.tsx +5 -3
- package/src/components/editor/header/app-header.tsx +1 -1
- package/src/components/editor/header/filename-form.tsx +1 -1
- package/src/components/editor/header/status.tsx +40 -20
- package/src/components/editor/links/__tests__/cell-link.test.tsx +148 -0
- package/src/components/editor/links/cell-link-list.tsx +1 -1
- package/src/components/editor/links/cell-link.tsx +17 -7
- package/src/components/editor/navigation/__tests__/clipboard.test.ts +60 -38
- package/src/components/editor/navigation/__tests__/navigation.test.ts +108 -85
- package/src/components/editor/navigation/__tests__/selection.test.ts +43 -21
- package/src/components/editor/navigation/clipboard.ts +17 -14
- package/src/components/editor/navigation/focus-utils.ts +23 -4
- package/src/components/editor/navigation/multi-cell-action-toolbar.tsx +17 -33
- package/src/components/editor/navigation/navigation.ts +71 -70
- package/src/components/editor/navigation/selection.ts +30 -29
- package/src/components/editor/notebook-banner.tsx +1 -0
- package/src/components/editor/notebook-cell.tsx +29 -32
- package/src/components/editor/output/MarimoErrorOutput.tsx +2 -1
- package/src/components/editor/output/MarimoTracebackOutput.tsx +19 -17
- package/src/components/editor/output/Outputs.css +8 -0
- package/src/components/editor/output/VideoOutput.tsx +6 -0
- package/src/components/editor/output/__tests__/VideoOutput.test.tsx +131 -0
- package/src/components/editor/output/__tests__/traceback.test.tsx +27 -1
- package/src/components/editor/output/ansi-reduce.ts +33 -20
- package/src/components/editor/output/console/ConsoleOutput.tsx +19 -25
- package/src/components/editor/output/console/__tests__/ConsoleOutput.test.tsx +125 -69
- package/src/components/editor/package-alert.tsx +14 -7
- package/src/components/editor/renderers/cell-array.tsx +22 -33
- package/src/components/editor/renderers/grid-layout/grid-layout.tsx +12 -6
- package/src/components/editor/renderers/slides-layout/__tests__/plugin.test.ts +0 -1
- package/src/components/editor/renderers/slides-layout/slides-layout.tsx +1 -1
- package/src/components/editor/renderers/vertical-layout/__tests__/useFocusFirstEditor.test.ts +4 -4
- package/src/components/editor/renderers/vertical-layout/sidebar/toggle.tsx +7 -1
- package/src/components/editor/renderers/vertical-layout/useFocusFirstEditor.ts +1 -1
- package/src/components/editor/renderers/vertical-layout/vertical-layout.tsx +1 -1
- package/src/components/editor/stdin-blocking-alert.tsx +1 -1
- package/src/components/home/components.tsx +17 -31
- package/src/components/icons/__tests__/large-spinner.test.tsx +39 -0
- package/src/components/icons/large-spinner.tsx +3 -14
- package/src/components/icons/spinner.tsx +1 -1
- package/src/components/markdown/markdown-renderer.tsx +4 -8
- package/src/components/mcp/mcp-status-indicator.tsx +1 -1
- package/src/components/pages/__tests__/home-page.test.tsx +116 -0
- package/src/components/pages/edit-page.tsx +19 -17
- package/src/components/pages/home-page.tsx +164 -91
- package/src/components/scratchpad/scratchpad.test.tsx +89 -0
- package/src/components/scratchpad/scratchpad.tsx +43 -32
- package/src/components/scratchpad/state.ts +7 -0
- package/src/components/slides/__tests__/minimap-actions.test.tsx +22 -29
- package/src/components/slides/__tests__/minimap.test.ts +38 -19
- package/src/components/slides/__tests__/slide-scroll-hint.test.tsx +37 -0
- package/src/components/slides/minimap.tsx +17 -12
- package/src/components/slides/reveal-component.tsx +58 -26
- package/src/components/slides/reveal-slides.css +5 -4
- package/src/components/slides/slide-cell-view.tsx +4 -5
- package/src/components/slides/slide-form.tsx +1 -0
- package/src/components/slides/slide-scroll-hint.tsx +3 -1
- package/src/components/sort/SortableCellsProvider.tsx +8 -25
- package/src/components/tracing/tracing-keyboard.test.tsx +85 -0
- package/src/components/tracing/tracing.tsx +46 -42
- package/src/components/ui/__tests__/draggable-popover.test.tsx +24 -0
- package/src/components/ui/__tests__/fullscreen.test.tsx +44 -2
- package/src/components/ui/__tests__/range-slider.test.tsx +165 -0
- package/src/components/ui/alert-dialog.tsx +1 -1
- package/src/components/ui/draggable-popover.tsx +24 -2
- package/src/components/ui/fullscreen.tsx +25 -1
- package/src/components/ui/range-slider.tsx +22 -9
- package/src/core/MarimoApp.tsx +3 -1
- package/src/core/ai/__tests__/staged-cells.test.ts +32 -33
- package/src/core/ai/context/providers/__tests__/cell-output.test.ts +8 -12
- package/src/core/ai/context/providers/cell-output.ts +2 -2
- package/src/core/ai/context/providers/datasource.ts +6 -2
- package/src/core/ai/staged-cells.ts +18 -19
- package/src/core/ai/tools/__tests__/edit-notebook-tool.test.ts +40 -88
- package/src/core/ai/tools/__tests__/registry.test.ts +17 -0
- package/src/core/ai/tools/base.ts +18 -15
- package/src/core/ai/tools/edit-notebook-tool.ts +86 -80
- package/src/core/ai/tools/registry.ts +13 -10
- package/src/core/ai/tools/sample-tool.ts +6 -7
- package/src/core/cells/__tests__/__snapshots__/cells.test.ts.snap +4 -37
- package/src/core/cells/__tests__/actions.test.ts +624 -35
- package/src/core/cells/__tests__/add-missing-import.test.ts +7 -8
- package/src/core/cells/__tests__/arrange.test.ts +432 -0
- package/src/core/cells/__tests__/cell.test.ts +39 -0
- package/src/core/cells/__tests__/cells.test.ts +251 -2540
- package/src/core/cells/__tests__/collapseConsoleOutputs.test.ts +54 -0
- package/src/core/cells/__tests__/document.test.ts +164 -0
- package/src/core/cells/__tests__/editor.test.ts +57 -0
- package/src/core/cells/__tests__/flush-document.test.ts +40 -0
- package/src/core/cells/__tests__/harness.ts +106 -0
- package/src/core/cells/__tests__/layout.test.ts +177 -0
- package/src/core/cells/__tests__/notebook-outline.test.ts +122 -0
- package/src/core/cells/__tests__/outputs.test.tsx +71 -53
- package/src/core/cells/__tests__/session.test.ts +445 -211
- package/src/core/cells/__tests__/utils.test.ts +9 -108
- package/src/core/cells/actions.ts +675 -6
- package/src/core/cells/add-missing-import.ts +47 -43
- package/src/core/cells/arrange.ts +529 -0
- package/src/core/cells/cell.ts +14 -3
- package/src/core/cells/cells.ts +126 -1363
- package/src/core/cells/columns.ts +38 -0
- package/src/core/cells/document.ts +178 -0
- package/src/core/cells/edit.ts +30 -0
- package/src/core/cells/editor.ts +82 -0
- package/src/core/cells/layout.ts +221 -0
- package/src/core/cells/outputs.ts +12 -28
- package/src/core/cells/pending-delete-service.ts +3 -7
- package/src/core/cells/session.ts +76 -53
- package/src/core/cells/types.ts +22 -6
- package/src/core/cells/utils.ts +10 -8
- package/src/core/codemirror/__tests__/format.test.ts +0 -34
- package/src/core/codemirror/__tests__/setup.test.ts +29 -29
- package/src/core/codemirror/ai/__tests__/resources.test.ts +117 -0
- package/src/core/codemirror/ai/resources.ts +1 -1
- package/src/core/codemirror/cells/__tests__/extensions.test.ts +2 -6
- package/src/core/codemirror/cells/extensions.ts +30 -28
- package/src/core/codemirror/cells/state.ts +1 -6
- package/src/core/codemirror/copilot/__tests__/getCodes.test.ts +6 -7
- package/src/core/codemirror/copilot/getCodes.ts +2 -2
- package/src/core/codemirror/format.ts +6 -23
- package/src/core/codemirror/keymaps/vim.ts +4 -8
- package/src/core/codemirror/language/__tests__/sql.test.ts +22 -20
- package/src/core/codemirror/language/__tests__/utils.test.ts +187 -15
- package/src/core/codemirror/language/cell-code.ts +114 -0
- package/src/core/codemirror/language/extension.ts +52 -35
- package/src/core/codemirror/language/languages/markdown.ts +8 -6
- package/src/core/codemirror/language/languages/python.ts +16 -10
- package/src/core/codemirror/language/languages/sql/sql.ts +16 -24
- package/src/core/codemirror/language/panel/panel.tsx +1 -0
- package/src/core/codemirror/language/types.ts +7 -7
- package/src/core/codemirror/language/utils.ts +9 -39
- package/src/core/codemirror/lsp/__tests__/notebook-lsp.test.ts +1 -2
- package/src/core/codemirror/lsp/notebook-lsp.ts +6 -5
- package/src/core/codemirror/lsp/utils.ts +1 -1
- package/src/core/codemirror/misc/__tests__/paste.test.ts +3 -1
- package/src/core/codemirror/misc/paste.ts +1 -1
- package/src/core/codemirror/readonly/__tests__/extension.test.ts +1 -1
- package/src/core/codemirror/readonly/extension.ts +2 -2
- package/src/core/codemirror/utils.ts +1 -0
- package/src/core/config/__tests__/app-config.test.ts +64 -0
- package/src/core/config/__tests__/config-schema.test.ts +56 -6
- package/src/core/config/config-schema.ts +17 -4
- package/src/core/config/config.ts +65 -20
- package/src/core/config/feature-flag.tsx +0 -2
- package/src/core/datasets/__tests__/data-source-discovery.test.ts +5 -5
- package/src/core/datasets/data-source-discovery.ts +4 -6
- package/src/core/documentation/doc-lookup.ts +1 -1
- package/src/core/edit-app.tsx +21 -28
- package/src/core/errors/error-entries.ts +4 -1
- package/src/core/export/hooks.ts +1 -1
- package/src/core/export/layout.ts +2 -2
- package/src/core/hotkeys/actions.ts +2 -4
- package/src/core/islands/__tests__/bootstrap.test.ts +69 -17
- package/src/core/islands/__tests__/bridge.test.ts +85 -27
- package/src/core/islands/bootstrap.ts +46 -53
- package/src/core/islands/bridge.ts +84 -25
- package/src/core/islands/components/__tests__/IslandControls.test.tsx +7 -5
- package/src/core/islands/components/web-components.tsx +1 -1
- package/src/core/islands/worker/__tests__/controller.test.ts +62 -4
- package/src/core/islands/worker/controller.ts +4 -10
- package/src/core/islands/worker/worker.tsx +33 -33
- package/src/core/kernel/__tests__/RuntimeState.test.ts +1 -1
- package/src/core/kernel/__tests__/handlers.test.ts +7 -153
- package/src/core/kernel/handlers.ts +19 -72
- package/src/core/meta/__tests__/code-visibility.test.tsx +78 -70
- package/src/core/meta/code-visibility.ts +18 -9
- package/src/core/network/__tests__/connection.test.ts +1 -1
- package/src/core/network/__tests__/requests-lazy.test.ts +1 -3
- package/src/core/network/connection-notice.ts +1 -1
- package/src/core/network/connection.ts +1 -1
- package/src/core/network/requests-lazy.ts +2 -5
- package/src/core/network/requests-network.ts +5 -31
- package/src/core/network/requests-static.ts +1 -4
- package/src/core/network/requests-toasting.tsx +1 -4
- package/src/core/network/types.ts +6 -14
- package/src/core/network/useConnectionNotice.ts +8 -2
- package/src/core/notebook/__tests__/operations.test.ts +51 -0
- package/src/core/notebook/attachments.ts +38 -0
- package/src/core/notebook/document/__tests__/codemirror.test.ts +758 -0
- package/src/core/notebook/document/__tests__/draft.test.ts +363 -0
- package/src/core/notebook/document/__tests__/fixtures.ts +92 -0
- package/src/core/notebook/document/__tests__/hooks.test.tsx +391 -0
- package/src/core/notebook/document/__tests__/lifecycle-scenarios.test.ts +61 -0
- package/src/core/notebook/document/__tests__/model.test.ts +247 -0
- package/src/core/notebook/document/__tests__/protocol-fixtures.ts +38 -0
- package/src/core/notebook/document/__tests__/recovery-scenarios.test.ts +230 -0
- package/src/core/notebook/document/__tests__/scenario-fixture.ts +43 -0
- package/src/core/notebook/document/__tests__/scenarios.test.ts +205 -0
- package/src/core/notebook/document/__tests__/state.test.ts +459 -0
- package/src/core/notebook/document/__tests__/submission.test.ts +203 -0
- package/src/core/notebook/document/__tests__/test-host.test.ts +92 -0
- package/src/core/notebook/document/__tests__/test-host.ts +247 -0
- package/src/core/notebook/document/__tests__/test-notebook.ts +149 -0
- package/src/core/notebook/document/__tests__/user.ts +61 -0
- package/src/core/notebook/document/codemirror.ts +216 -0
- package/src/core/notebook/document/draft.ts +502 -0
- package/src/core/notebook/document/hooks.tsx +118 -0
- package/src/core/notebook/document/index.ts +24 -0
- package/src/core/notebook/document/model.ts +102 -0
- package/src/core/notebook/document/select.ts +41 -0
- package/src/core/notebook/document/state.ts +378 -0
- package/src/core/notebook/document/sync.ts +369 -0
- package/src/core/notebook/index.ts +19 -0
- package/src/core/notebook/operations.ts +30 -0
- package/src/core/notebook/replica/AGENTS.md +11 -0
- package/src/core/{host → notebook/replica}/__tests__/attachments.test.ts +9 -10
- package/src/core/{host → notebook/replica}/__tests__/document.test.ts +18 -16
- package/src/core/notebook/replica/__tests__/executions.test.ts +201 -0
- package/src/core/notebook/replica/__tests__/fixtures.ts +79 -0
- package/src/core/notebook/replica/__tests__/replica.test.ts +559 -0
- package/src/core/notebook/replica/__tests__/results.test.ts +193 -0
- package/src/core/notebook/replica/__tests__/runtime.test.ts +78 -0
- package/src/core/notebook/replica/backend.ts +19 -0
- package/src/core/notebook/replica/connection.ts +42 -0
- package/src/core/notebook/replica/index.ts +20 -0
- package/src/core/notebook/replica/replica.ts +336 -0
- package/src/core/{host → notebook/replica}/resources/attachments.ts +6 -3
- package/src/core/{host → notebook/replica}/resources/document.ts +3 -3
- package/src/core/notebook/replica/resources/executions.ts +157 -0
- package/src/core/notebook/replica/resources/results.ts +48 -0
- package/src/core/notebook/replica/resources/runtime.ts +14 -0
- package/src/core/packages/__tests__/useSandboxController.test.tsx +1 -1
- package/src/core/packages/useSandboxController.ts +1 -1
- package/src/core/run-app.tsx +48 -51
- package/src/core/runtime/__tests__/adapter.test.ts +1 -1
- package/src/core/runtime/__tests__/createWsUrl.test.ts +77 -7
- package/src/core/runtime/__tests__/runtime.test.ts +32 -74
- package/src/core/runtime/adapter.ts +1 -1
- package/src/core/runtime/config.ts +2 -2
- package/src/core/runtime/runtime.ts +33 -46
- package/src/core/runtime/types.ts +0 -2
- package/src/core/saving/__tests__/document.test.tsx +123 -0
- package/src/core/saving/__tests__/state.test.ts +111 -0
- package/src/core/saving/__tests__/useAutoSave.test.tsx +67 -0
- package/src/core/saving/document.ts +33 -0
- package/src/core/saving/filename.ts +1 -1
- package/src/core/saving/save-component.tsx +39 -60
- package/src/core/saving/state.ts +38 -39
- package/src/core/saving/useAutoSave.ts +17 -53
- package/src/core/session/__tests__/backend.test.ts +236 -0
- package/src/core/session/__tests__/useNotebookReplica.hook.test.tsx +184 -0
- package/src/core/{websocket → session}/__tests__/useNotebookSession.hook.test.tsx +213 -262
- package/src/core/session/active-notebook.ts +28 -0
- package/src/core/session/backend.ts +123 -0
- package/src/core/session/embedded.ts +7 -0
- package/src/core/{websocket → session}/types.ts +2 -2
- package/src/core/session/useNotebookReplica.ts +74 -0
- package/src/core/{websocket → session}/useNotebookSession.tsx +77 -64
- package/src/core/state/__tests__/jotai.test.tsx +108 -0
- package/src/core/state/jotai.ts +1 -1
- package/src/core/static/__tests__/files.test.ts +38 -10
- package/src/core/static/files.ts +2 -0
- package/src/core/{websocket → transports}/__tests__/connection-state.test.ts +1 -13
- package/src/core/transports/__tests__/server.test.ts +408 -0
- package/src/core/transports/__tests__/static.test.ts +306 -0
- package/src/core/transports/__tests__/wasm.test.ts +166 -0
- package/src/core/{websocket → transports}/connection-state.ts +9 -16
- package/src/core/transports/server.ts +152 -0
- package/src/core/transports/static.ts +166 -0
- package/src/core/transports/wasm.ts +97 -0
- package/src/core/vscode/__tests__/vscode-bindings.test.ts +125 -0
- package/src/core/vscode/vscode-bindings.ts +14 -2
- package/src/core/wasm/__tests__/bridge.test.ts +105 -65
- package/src/core/wasm/__tests__/worker.test.ts +187 -0
- package/src/core/wasm/bridge.ts +69 -72
- package/src/core/wasm/rpc.ts +15 -3
- package/src/core/wasm/store.ts +3 -3
- package/src/core/wasm/worker/bootstrap.ts +55 -51
- package/src/core/wasm/worker/getMarimoWheel.ts +1 -1
- package/src/core/wasm/worker/save-worker.ts +9 -10
- package/src/core/wasm/worker/types.ts +29 -18
- package/src/core/wasm/worker/worker.ts +89 -45
- package/src/css/app/codemirror.css +1 -1
- package/src/css/common.css +1 -1
- package/src/css/globals.css +66 -22
- 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 +6 -10
- package/src/hooks/useDeepCompareMemoize.ts +1 -1
- package/src/hooks/useDelayElapsed.ts +14 -10
- package/src/hooks/useElapsedTime.ts +3 -3
- package/src/hooks/useEventListener.ts +1 -2
- 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/mount.tsx +20 -15
- package/src/plugins/__tests__/plugin-object-schemas.test.ts +104 -0
- package/src/plugins/core/registerReactComponent.tsx +1 -1
- package/src/plugins/impl/CodeEditorPlugin.tsx +1 -1
- package/src/plugins/impl/DataEditorPlugin.tsx +1 -1
- package/src/plugins/impl/DataTablePlugin.tsx +69 -37
- 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/RangeSliderPlugin.tsx +16 -2
- package/src/plugins/impl/RefreshPlugin.tsx +1 -0
- package/src/plugins/impl/SliderPlugin.tsx +6 -8
- package/src/plugins/impl/__tests__/DataTablePlugin.test.tsx +387 -1
- package/src/plugins/impl/__tests__/FileBrowserPlugin.test.tsx +45 -0
- package/src/plugins/impl/__tests__/RangeSliderPlugin.test.tsx +109 -0
- package/src/plugins/impl/__tests__/SliderPlugin.test.tsx +24 -3
- package/src/plugins/impl/anywidget/__tests__/registry.test.ts +153 -0
- package/src/plugins/impl/anywidget/__tests__/widget-binding.test.ts +241 -2
- package/src/plugins/impl/anywidget/model.ts +3 -1
- package/src/plugins/impl/anywidget/registry.ts +18 -14
- 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 +14 -11
- 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/data-explorer/ConnectedDataExplorerComponent.tsx +1 -1
- package/src/plugins/impl/data-explorer/components/column-summary.tsx +4 -2
- package/src/plugins/impl/data-explorer/state/reducer.ts +1 -1
- package/src/plugins/impl/data-frames/DataFramePlugin.tsx +1 -2
- package/src/plugins/impl/data-frames/__tests__/sidebar.test.tsx +160 -0
- package/src/plugins/impl/data-frames/forms/__tests__/__snapshots__/form.test.tsx.snap +66 -66
- package/src/plugins/impl/data-frames/panel.tsx +44 -16
- package/src/plugins/impl/mpl-interactive/MplInteractivePlugin.tsx +5 -3
- package/src/plugins/impl/panel/PanelPlugin.tsx +16 -17
- package/src/plugins/impl/panel/__tests__/utils.test.ts +39 -1
- package/src/plugins/impl/panel/utils.ts +17 -0
- package/src/plugins/impl/plotly/PlotlyPlugin.tsx +2 -5
- package/src/plugins/impl/plotly/selection.ts +25 -19
- package/src/plugins/impl/vega/VegaPlugin.tsx +2 -3
- package/src/plugins/impl/vega/make-selectable.ts +4 -7
- package/src/plugins/layout/DownloadPlugin.tsx +7 -11
- package/src/plugins/layout/RoutesPlugin.tsx +1 -1
- package/src/plugins/layout/__test__/DownloadPlugin.test.tsx +196 -0
- package/src/stories/__tests__/editor-story.test.tsx +33 -0
- package/src/stories/button.stories.tsx +1 -0
- package/src/stories/cell.stories.tsx +2 -5
- package/src/stories/data-table.stories.tsx +31 -0
- package/src/stories/editor.stories.tsx +24 -17
- package/src/stories/form-wrapper.stories.tsx +2 -2
- package/src/stories/layout/vertical/one-column.stories.tsx +28 -23
- package/src/stories/runtime-story.tsx +23 -17
- package/src/stories/select.stories.tsx +2 -2
- package/src/stories/switchable-multi-select.stories.tsx +1 -1
- package/src/utils/__tests__/arrays.test.ts +35 -0
- package/src/utils/__tests__/batch-requests.test.ts +3 -3
- package/src/utils/__tests__/{createReducer.test.ts → createReducer.test.tsx} +29 -0
- package/src/utils/__tests__/download.test.tsx +62 -9
- package/src/utils/__tests__/numbers.test.ts +105 -1
- package/src/utils/__tests__/objects.test.ts +21 -0
- package/src/utils/arrays.ts +11 -2
- package/src/utils/blob.ts +1 -1
- package/src/utils/createReducer.ts +53 -26
- package/src/utils/download.ts +55 -3
- package/src/utils/maps.ts +0 -3
- package/src/utils/numbers.ts +79 -18
- package/src/utils/objects.ts +4 -9
- package/src/utils/tracer.ts +9 -5
- package/src/utils/zod-utils.ts +1 -3
- package/dist/_baseMerge-BiGRwuqv.js +0 -165
- package/dist/any-language-editor-D4q-IFcM.js +0 -76
- package/dist/assets/__vite-browser-external-BXYkiFsk.js +0 -1
- package/dist/assets/worker-HPY9fbhz.js +0 -114
- package/dist/code-visibility-HTfE7PV1.js +0 -138
- package/dist/dropdown-menu-DHP9P4VE.js +0 -4678
- package/dist/feedback-button-BL7Ed1J3.js +0 -379
- package/dist/hasIn-o2Us0uVx.js +0 -132
- package/dist/html-to-image-BdA59IUD.js +0 -3251
- package/dist/isArrayLikeObject-BZl-15ir.js +0 -450
- package/dist/isEmpty-BSZ1LaUo.js +0 -35
- package/dist/isSymbol-kQcfYbNX.js +0 -8
- package/dist/label-DoysmLMW.js +0 -281
- package/dist/mermaid-HWGCJPDP-ByCsZnYF.js +0 -2
- package/dist/objectWithoutPropertiesLoose-BRDcTsfB.js +0 -23
- package/dist/pick-CJeoxYOS.js +0 -51
- package/dist/precisionRound-DMIVQrt2.js +0 -97
- package/dist/select-DemoKT4G.js +0 -1344
- package/dist/toDate-B5mIgxwZ.js +0 -1185
- package/dist/toast-PkdZraM8.js +0 -1830
- package/dist/use-restore-focus-CKjfFjLM.js +0 -6369
- package/dist/useLifecycle-BGWzTwHK.js +0 -169
- package/dist/useTheme-BhQvec43.js +0 -904
- package/src/components/editor/cell/code/__tests__/rtc-editor-config.test.ts +0 -50
- package/src/components/editor/chrome/wrapper/footer-items/rtc-status.tsx +0 -65
- package/src/components/editor/navigation/__tests__/state.test.ts +0 -81
- package/src/components/editor/navigation/state.ts +0 -65
- package/src/core/ai/tools/__tests__/run-cells-tool.test.ts +0 -656
- package/src/core/ai/tools/run-cells-tool.ts +0 -303
- package/src/core/attachments/state.ts +0 -18
- package/src/core/cells/__tests__/apply-transaction.test.ts +0 -991
- package/src/core/cells/__tests__/document-changes.test.ts +0 -1140
- package/src/core/cells/__tests__/document-roundtrip.test.ts +0 -392
- package/src/core/cells/document-changes.ts +0 -944
- package/src/core/codemirror/rtc/extension.ts +0 -453
- package/src/core/codemirror/rtc/loro/__tests__/sync.test.ts +0 -52
- package/src/core/codemirror/rtc/loro/awareness.ts +0 -531
- package/src/core/codemirror/rtc/loro/colors.ts +0 -38
- package/src/core/codemirror/rtc/loro/sync.ts +0 -168
- package/src/core/host/AGENTS.md +0 -11
- package/src/core/host/__tests__/events.test.ts +0 -46
- package/src/core/host/__tests__/fixtures.ts +0 -39
- package/src/core/host/__tests__/notebook-client.test.ts +0 -433
- package/src/core/host/__tests__/protocol.test.ts +0 -214
- package/src/core/host/__tests__/stream.test.ts +0 -209
- package/src/core/host/connection.ts +0 -81
- package/src/core/host/events.ts +0 -61
- package/src/core/host/notebook-client.ts +0 -290
- package/src/core/host/protocol.ts +0 -1943
- package/src/core/host/resources/resource.ts +0 -47
- package/src/core/host/stream.ts +0 -211
- package/src/core/rtc/state.ts +0 -34
- package/src/core/state/__tests__/jotai.test.ts +0 -25
- package/src/core/wasm/worker/message-buffer.ts +0 -33
- package/src/core/websocket/__tests__/createConnectionTransport.test.ts +0 -49
- package/src/core/websocket/__tests__/useNotebookClient.hook.test.tsx +0 -170
- package/src/core/websocket/state.ts +0 -7
- package/src/core/websocket/transports/__tests__/basic.test.ts +0 -275
- package/src/core/websocket/transports/__tests__/sse.test.ts +0 -335
- package/src/core/websocket/transports/__tests__/transport.test.ts +0 -308
- package/src/core/websocket/transports/__tests__/ws.test.ts +0 -125
- package/src/core/websocket/transports/basic.ts +0 -102
- package/src/core/websocket/transports/create.ts +0 -31
- package/src/core/websocket/transports/sse.ts +0 -308
- package/src/core/websocket/transports/transport.ts +0 -50
- package/src/core/websocket/transports/ws.ts +0 -98
- package/src/core/websocket/useNotebookClient.ts +0 -88
- package/src/utils/__tests__/id-tree.test.ts +0 -2145
- package/src/utils/id-tree.tsx +0 -1134
- /package/src/{core/attachments/toast.ts → components/editor/agent-toast.ts} +0 -0
- /package/src/core/{websocket → session}/connection-utils.ts +0 -0
|
@@ -0,0 +1,1672 @@
|
|
|
1
|
+
import { a as e } from "./rolldown-runtime-Cb76FRpK.js";
|
|
2
|
+
import { c as t, p as n, u as r } from "./button-B6RjDKJx.js";
|
|
3
|
+
import { t as i } from "./react-sHtZdjeP.js";
|
|
4
|
+
import { t as a } from "./compiler-runtime-CldRdSsv.js";
|
|
5
|
+
import { t as o } from "./react-dom-DUmH0GXv.js";
|
|
6
|
+
import { t as s } from "./jsx-runtime-3BD1kT0s.js";
|
|
7
|
+
//#region ../node_modules/.pnpm/@radix-ui+react-primitive@2.2.0_@types+react-dom@19.3.0_@types+react@19.3.0__@types+rea_c31f5d2e8dd1090b081609bcec07c67f/node_modules/@radix-ui/react-primitive/dist/index.mjs
|
|
8
|
+
var c = /* @__PURE__ */ e(i(), 1), l = /* @__PURE__ */ e(o(), 1), u = s(), d = Object.defineProperty, f = (e, t) => d(e, "name", {
|
|
9
|
+
value: t,
|
|
10
|
+
configurable: !0
|
|
11
|
+
}), p = [
|
|
12
|
+
"a",
|
|
13
|
+
"button",
|
|
14
|
+
"div",
|
|
15
|
+
"form",
|
|
16
|
+
"h2",
|
|
17
|
+
"h3",
|
|
18
|
+
"img",
|
|
19
|
+
"input",
|
|
20
|
+
"label",
|
|
21
|
+
"li",
|
|
22
|
+
"nav",
|
|
23
|
+
"ol",
|
|
24
|
+
"p",
|
|
25
|
+
"select",
|
|
26
|
+
"span",
|
|
27
|
+
"svg",
|
|
28
|
+
"ul"
|
|
29
|
+
].reduce((e, t) => {
|
|
30
|
+
let n = r(`Primitive.${t}`), i = c.forwardRef((e, r) => {
|
|
31
|
+
let { asChild: i, ...a } = e, o = i ? n : t;
|
|
32
|
+
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ (0, u.jsx)(o, {
|
|
33
|
+
...a,
|
|
34
|
+
ref: r
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
return i.displayName = `Primitive.${t}`, {
|
|
38
|
+
...e,
|
|
39
|
+
[t]: i
|
|
40
|
+
};
|
|
41
|
+
}, {});
|
|
42
|
+
function m(e, t) {
|
|
43
|
+
e && l.flushSync(() => e.dispatchEvent(t));
|
|
44
|
+
}
|
|
45
|
+
f(m, "dispatchDiscreteCustomEvent");
|
|
46
|
+
//#endregion
|
|
47
|
+
//#region ../node_modules/.pnpm/@radix-ui+react-context@1.3.0_@types+react@19.3.0_react@19.3.0/node_modules/@radix-ui/react-context/dist/index.mjs
|
|
48
|
+
var h = Object.defineProperty, g = (e, t) => h(e, "name", {
|
|
49
|
+
value: t,
|
|
50
|
+
configurable: !0
|
|
51
|
+
});
|
|
52
|
+
// @__NO_SIDE_EFFECTS__
|
|
53
|
+
function _(e, t) {
|
|
54
|
+
let n = c.createContext(t);
|
|
55
|
+
n.displayName = e + "Context";
|
|
56
|
+
let r = /* @__PURE__ */ g((e) => {
|
|
57
|
+
let { children: t, ...r } = e, i = c.useMemo(() => r, Object.values(r));
|
|
58
|
+
return /* @__PURE__ */ (0, u.jsx)(n.Provider, {
|
|
59
|
+
value: i,
|
|
60
|
+
children: t
|
|
61
|
+
});
|
|
62
|
+
}, "Provider");
|
|
63
|
+
r.displayName = e + "Provider";
|
|
64
|
+
function i(r, i = {}) {
|
|
65
|
+
let { optional: a = !1 } = i, o = c.useContext(n);
|
|
66
|
+
if (o) return o;
|
|
67
|
+
if (t !== void 0) return t;
|
|
68
|
+
if (!a) throw Error(`\`${r}\` must be used within \`${e}\``);
|
|
69
|
+
}
|
|
70
|
+
return g(i, "useContext"), [r, i];
|
|
71
|
+
}
|
|
72
|
+
g(_, "createContext");
|
|
73
|
+
// @__NO_SIDE_EFFECTS__
|
|
74
|
+
function v(e, t = []) {
|
|
75
|
+
let n = [];
|
|
76
|
+
function r(t, r) {
|
|
77
|
+
let i = c.createContext(r);
|
|
78
|
+
i.displayName = t + "Context";
|
|
79
|
+
let a = n.length;
|
|
80
|
+
n = [...n, r];
|
|
81
|
+
let o = /* @__PURE__ */ g((t) => {
|
|
82
|
+
let { scope: n, children: r, ...o } = t, s = n?.[e]?.[a] || i, l = c.useMemo(() => o, Object.values(o));
|
|
83
|
+
return /* @__PURE__ */ (0, u.jsx)(s.Provider, {
|
|
84
|
+
value: l,
|
|
85
|
+
children: r
|
|
86
|
+
});
|
|
87
|
+
}, "Provider");
|
|
88
|
+
o.displayName = t + "Provider";
|
|
89
|
+
function s(n, o, s = {}) {
|
|
90
|
+
let { optional: l = !1 } = s, u = o?.[e]?.[a] || i, d = c.useContext(u);
|
|
91
|
+
if (d) return d;
|
|
92
|
+
if (r !== void 0) return r;
|
|
93
|
+
if (!l) throw Error(`\`${n}\` must be used within \`${t}\``);
|
|
94
|
+
}
|
|
95
|
+
return g(s, "useContext"), [o, s];
|
|
96
|
+
}
|
|
97
|
+
g(r, "createContext");
|
|
98
|
+
let i = /* @__PURE__ */ g(() => {
|
|
99
|
+
let t = n.map((e) => c.createContext(e));
|
|
100
|
+
return /* @__PURE__ */ g(function(n) {
|
|
101
|
+
let r = n?.[e] || t;
|
|
102
|
+
return c.useMemo(() => ({ [`__scope${e}`]: {
|
|
103
|
+
...n,
|
|
104
|
+
[e]: r
|
|
105
|
+
} }), [n, r]);
|
|
106
|
+
}, "useScope");
|
|
107
|
+
}, "createScope");
|
|
108
|
+
return i.scopeName = e, [r, y(i, ...t)];
|
|
109
|
+
}
|
|
110
|
+
g(v, "createContextScope");
|
|
111
|
+
function y(...e) {
|
|
112
|
+
let t = e[0];
|
|
113
|
+
if (e.length === 1) return t;
|
|
114
|
+
let n = /* @__PURE__ */ g(() => {
|
|
115
|
+
let n = e.map((e) => ({
|
|
116
|
+
useScope: e(),
|
|
117
|
+
scopeName: e.scopeName
|
|
118
|
+
}));
|
|
119
|
+
return /* @__PURE__ */ g(function(e) {
|
|
120
|
+
let r = n.reduce((t, { useScope: n, scopeName: r }) => {
|
|
121
|
+
let i = n(e)[`__scope${r}`];
|
|
122
|
+
return {
|
|
123
|
+
...t,
|
|
124
|
+
...i
|
|
125
|
+
};
|
|
126
|
+
}, {});
|
|
127
|
+
return c.useMemo(() => ({ [`__scope${t.scopeName}`]: r }), [r]);
|
|
128
|
+
}, "useComposedScopes");
|
|
129
|
+
}, "createScope");
|
|
130
|
+
return n.scopeName = t.scopeName, n;
|
|
131
|
+
}
|
|
132
|
+
g(y, "composeContextScopes");
|
|
133
|
+
//#endregion
|
|
134
|
+
//#region ../node_modules/.pnpm/@radix-ui+react-use-layout-effect@1.1.4_@types+react@19.3.0_react@19.3.0/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
|
|
135
|
+
var b = globalThis?.document ? c.useLayoutEffect : () => {}, x = Object.defineProperty, S = (e, t) => x(e, "name", {
|
|
136
|
+
value: t,
|
|
137
|
+
configurable: !0
|
|
138
|
+
}), C = !!(typeof window < "u" && window.document && window.document.createElement);
|
|
139
|
+
function w(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
|
|
140
|
+
return /* @__PURE__ */ S(function(r) {
|
|
141
|
+
if (e?.(r), n === !1 || !r || !r.defaultPrevented) return t?.(r);
|
|
142
|
+
}, "handleEvent");
|
|
143
|
+
}
|
|
144
|
+
S(w, "composeEventHandlers");
|
|
145
|
+
function ee(e) {
|
|
146
|
+
if (!C) throw Error("Cannot access window outside of the DOM");
|
|
147
|
+
return e?.ownerDocument?.defaultView ?? window;
|
|
148
|
+
}
|
|
149
|
+
S(ee, "getOwnerWindow");
|
|
150
|
+
function T(e) {
|
|
151
|
+
if (!C) throw Error("Cannot access document outside of the DOM");
|
|
152
|
+
return e?.ownerDocument ?? document;
|
|
153
|
+
}
|
|
154
|
+
S(T, "getOwnerDocument");
|
|
155
|
+
function te(e, t = !1) {
|
|
156
|
+
let { activeElement: n } = T(e);
|
|
157
|
+
if (!n?.nodeName) return null;
|
|
158
|
+
if (ne(n) && n.contentDocument) return te(n.contentDocument.body, t);
|
|
159
|
+
if (t) {
|
|
160
|
+
let e = n.getAttribute("aria-activedescendant");
|
|
161
|
+
if (e) {
|
|
162
|
+
let t = T(n).getElementById(e);
|
|
163
|
+
if (t) return t;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
return n;
|
|
167
|
+
}
|
|
168
|
+
S(te, "getActiveElement");
|
|
169
|
+
function ne(e) {
|
|
170
|
+
return e.tagName === "IFRAME";
|
|
171
|
+
}
|
|
172
|
+
S(ne, "isFrame");
|
|
173
|
+
//#endregion
|
|
174
|
+
//#region ../node_modules/.pnpm/@radix-ui+react-use-effect-event@0.0.5_@types+react@19.3.0_react@19.3.0/node_modules/@radix-ui/react-use-effect-event/dist/index.mjs
|
|
175
|
+
var re = Object.defineProperty, ie = (e, t) => re(e, "name", {
|
|
176
|
+
value: t,
|
|
177
|
+
configurable: !0
|
|
178
|
+
}), E = c.useEffectEvent, ae = c.useInsertionEffect;
|
|
179
|
+
function oe(e) {
|
|
180
|
+
if (typeof E == "function") return E(e);
|
|
181
|
+
let t = c.useRef(() => {
|
|
182
|
+
throw Error("Cannot call an event handler while rendering.");
|
|
183
|
+
});
|
|
184
|
+
return typeof ae == "function" ? ae(() => {
|
|
185
|
+
t.current = e;
|
|
186
|
+
}) : b(() => {
|
|
187
|
+
t.current = e;
|
|
188
|
+
}), c.useMemo(() => ((...e) => t.current?.(...e)), []);
|
|
189
|
+
}
|
|
190
|
+
ie(oe, "useEffectEvent");
|
|
191
|
+
//#endregion
|
|
192
|
+
//#region ../node_modules/.pnpm/@radix-ui+react-use-controllable-state@1.3.0_@types+react@19.3.0_react@19.3.0/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs
|
|
193
|
+
var se = Object.defineProperty, D = (e, t) => se(e, "name", {
|
|
194
|
+
value: t,
|
|
195
|
+
configurable: !0
|
|
196
|
+
}), ce = c.useInsertionEffect || b;
|
|
197
|
+
function le({ prop: e, defaultProp: t, onChange: n = /* @__PURE__ */ D(() => {}, "onChange"), caller: r }) {
|
|
198
|
+
let [i, a, o] = ue({
|
|
199
|
+
defaultProp: t,
|
|
200
|
+
onChange: n
|
|
201
|
+
}), s = e !== void 0;
|
|
202
|
+
return [s ? e : i, c.useCallback((t) => {
|
|
203
|
+
if (s) {
|
|
204
|
+
let n = de(t) ? t(e) : t;
|
|
205
|
+
n !== e && o.current?.(n);
|
|
206
|
+
} else a(t);
|
|
207
|
+
}, [
|
|
208
|
+
s,
|
|
209
|
+
e,
|
|
210
|
+
a,
|
|
211
|
+
o
|
|
212
|
+
])];
|
|
213
|
+
}
|
|
214
|
+
D(le, "useControllableState");
|
|
215
|
+
function ue({ defaultProp: e, onChange: t }) {
|
|
216
|
+
let [n, r] = c.useState(e), i = c.useRef(n), a = c.useRef(t);
|
|
217
|
+
return ce(() => {
|
|
218
|
+
a.current = t;
|
|
219
|
+
}, [t]), c.useEffect(() => {
|
|
220
|
+
i.current !== n && (a.current?.(n), i.current = n);
|
|
221
|
+
}, [n, i]), [
|
|
222
|
+
n,
|
|
223
|
+
r,
|
|
224
|
+
a
|
|
225
|
+
];
|
|
226
|
+
}
|
|
227
|
+
D(ue, "useUncontrolledState");
|
|
228
|
+
function de(e) {
|
|
229
|
+
return typeof e == "function";
|
|
230
|
+
}
|
|
231
|
+
D(de, "isFunction");
|
|
232
|
+
var fe = Symbol("RADIX:SYNC_STATE");
|
|
233
|
+
function pe(e, t, n, r) {
|
|
234
|
+
let { prop: i, defaultProp: a, onChange: o, caller: s } = t, l = i !== void 0, u = oe(o), d = [{
|
|
235
|
+
...n,
|
|
236
|
+
state: a
|
|
237
|
+
}];
|
|
238
|
+
r && d.push(r);
|
|
239
|
+
let [f, p] = c.useReducer((t, n) => {
|
|
240
|
+
if (n.type === fe) return {
|
|
241
|
+
...t,
|
|
242
|
+
state: n.state
|
|
243
|
+
};
|
|
244
|
+
let r = e(t, n);
|
|
245
|
+
return l && !Object.is(r.state, t.state) && u(r.state), r;
|
|
246
|
+
}, ...d), m = f.state, h = c.useRef(m);
|
|
247
|
+
c.useEffect(() => {
|
|
248
|
+
h.current !== m && (h.current = m, l || u(m));
|
|
249
|
+
}, [
|
|
250
|
+
m,
|
|
251
|
+
h,
|
|
252
|
+
l
|
|
253
|
+
]);
|
|
254
|
+
let g = c.useMemo(() => i === void 0 ? f : {
|
|
255
|
+
...f,
|
|
256
|
+
state: i
|
|
257
|
+
}, [f, i]);
|
|
258
|
+
return c.useEffect(() => {
|
|
259
|
+
l && !Object.is(i, f.state) && p({
|
|
260
|
+
type: fe,
|
|
261
|
+
state: i
|
|
262
|
+
});
|
|
263
|
+
}, [
|
|
264
|
+
i,
|
|
265
|
+
f.state,
|
|
266
|
+
l
|
|
267
|
+
]), [g, p];
|
|
268
|
+
}
|
|
269
|
+
D(pe, "useControllableStateReducer");
|
|
270
|
+
//#endregion
|
|
271
|
+
//#region ../node_modules/.pnpm/@radix-ui+react-presence@1.1.11_@types+react-dom@19.3.0_@types+react@19.3.0__@types+rea_fea964e47d1f796c036ae060b7c5470f/node_modules/@radix-ui/react-presence/dist/index.mjs
|
|
272
|
+
var me = Object.defineProperty, O = (e, t) => me(e, "name", {
|
|
273
|
+
value: t,
|
|
274
|
+
configurable: !0
|
|
275
|
+
});
|
|
276
|
+
function he(e, t) {
|
|
277
|
+
return c.useReducer((e, n) => t[e][n] ?? e, e);
|
|
278
|
+
}
|
|
279
|
+
O(he, "useStateMachine");
|
|
280
|
+
var k = /* @__PURE__ */ O((e) => {
|
|
281
|
+
let { present: t, children: n } = e, r = ge(t), i = typeof n == "function" ? n({ present: r.isPresent }) : c.Children.only(n), a = ve(r.ref, ye(i));
|
|
282
|
+
return typeof n == "function" || r.isPresent ? c.cloneElement(i, { ref: a }) : null;
|
|
283
|
+
}, "Presence");
|
|
284
|
+
function ge(e) {
|
|
285
|
+
let [t, n] = c.useState(), r = c.useRef(null), i = c.useRef(e), a = c.useRef("none"), o = c.useRef(void 0), [s, l] = he(e ? "mounted" : "unmounted", {
|
|
286
|
+
mounted: {
|
|
287
|
+
UNMOUNT: "unmounted",
|
|
288
|
+
ANIMATION_OUT: "unmountSuspended"
|
|
289
|
+
},
|
|
290
|
+
unmountSuspended: {
|
|
291
|
+
MOUNT: "mounted",
|
|
292
|
+
ANIMATION_END: "unmounted"
|
|
293
|
+
},
|
|
294
|
+
unmounted: { MOUNT: "mounted" }
|
|
295
|
+
});
|
|
296
|
+
return c.useEffect(() => {
|
|
297
|
+
s === "mounted" ? (a.current = o.current ?? A(r.current), o.current = void 0) : a.current = "none";
|
|
298
|
+
}, [s]), b(() => {
|
|
299
|
+
let t = r.current, n = i.current;
|
|
300
|
+
if (n !== e) {
|
|
301
|
+
let r = a.current, s = A(t);
|
|
302
|
+
e ? (o.current = s, l("MOUNT")) : s === "none" || t?.display === "none" ? l("UNMOUNT") : l(n && r !== s ? "ANIMATION_OUT" : "UNMOUNT"), i.current = e;
|
|
303
|
+
}
|
|
304
|
+
}, [e, l]), b(() => {
|
|
305
|
+
if (t) {
|
|
306
|
+
let e, n = t.ownerDocument.defaultView ?? window, o = /* @__PURE__ */ O((a) => {
|
|
307
|
+
let o = A(r.current).includes(CSS.escape(a.animationName));
|
|
308
|
+
if (a.target === t && o && (l("ANIMATION_END"), !i.current)) {
|
|
309
|
+
let r = t.style.animationFillMode;
|
|
310
|
+
t.style.animationFillMode = "forwards", e = n.setTimeout(() => {
|
|
311
|
+
t.style.animationFillMode === "forwards" && (t.style.animationFillMode = r);
|
|
312
|
+
});
|
|
313
|
+
}
|
|
314
|
+
}, "handleAnimationEnd"), s = /* @__PURE__ */ O((e) => {
|
|
315
|
+
e.target === t && (a.current = A(r.current));
|
|
316
|
+
}, "handleAnimationStart");
|
|
317
|
+
return t.addEventListener("animationstart", s), t.addEventListener("animationcancel", o), t.addEventListener("animationend", o), () => {
|
|
318
|
+
n.clearTimeout(e), t.removeEventListener("animationstart", s), t.removeEventListener("animationcancel", o), t.removeEventListener("animationend", o);
|
|
319
|
+
};
|
|
320
|
+
}
|
|
321
|
+
l("ANIMATION_END");
|
|
322
|
+
}, [t, l]), {
|
|
323
|
+
isPresent: ["mounted", "unmountSuspended"].includes(s),
|
|
324
|
+
ref: c.useCallback((e) => {
|
|
325
|
+
if (e) {
|
|
326
|
+
let t = getComputedStyle(e);
|
|
327
|
+
r.current = t, o.current = A(t);
|
|
328
|
+
} else r.current = null;
|
|
329
|
+
n(e);
|
|
330
|
+
}, [])
|
|
331
|
+
};
|
|
332
|
+
}
|
|
333
|
+
O(ge, "usePresence");
|
|
334
|
+
function _e(e, t) {
|
|
335
|
+
if (typeof e == "function") return e(t);
|
|
336
|
+
e != null && (e.current = t);
|
|
337
|
+
}
|
|
338
|
+
O(_e, "setRef");
|
|
339
|
+
function ve(...e) {
|
|
340
|
+
let t = c.useRef(e);
|
|
341
|
+
return t.current = e, c.useCallback((e) => {
|
|
342
|
+
let n = t.current, r = !1, i = n.map((t) => {
|
|
343
|
+
let n = _e(t, e);
|
|
344
|
+
return !r && typeof n == "function" && (r = !0), n;
|
|
345
|
+
});
|
|
346
|
+
if (r) return () => {
|
|
347
|
+
for (let e = 0; e < i.length; e++) {
|
|
348
|
+
let t = i[e];
|
|
349
|
+
typeof t == "function" ? t() : _e(n[e], null);
|
|
350
|
+
}
|
|
351
|
+
};
|
|
352
|
+
}, []);
|
|
353
|
+
}
|
|
354
|
+
O(ve, "useStableComposedRefs");
|
|
355
|
+
function A(e) {
|
|
356
|
+
return e?.animationName || "none";
|
|
357
|
+
}
|
|
358
|
+
O(A, "getAnimationName");
|
|
359
|
+
function ye(e) {
|
|
360
|
+
let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
361
|
+
return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
362
|
+
}
|
|
363
|
+
O(ye, "getElementRef");
|
|
364
|
+
//#endregion
|
|
365
|
+
//#region ../node_modules/.pnpm/@radix-ui+react-id@1.1.4_@types+react@19.3.0_react@19.3.0/node_modules/@radix-ui/react-id/dist/index.mjs
|
|
366
|
+
var be = Object.defineProperty, xe = (e, t) => be(e, "name", {
|
|
367
|
+
value: t,
|
|
368
|
+
configurable: !0
|
|
369
|
+
}), Se = c.useId || (() => void 0), Ce = 0;
|
|
370
|
+
function j(e) {
|
|
371
|
+
let [t, n] = c.useState(Se());
|
|
372
|
+
return b(() => {
|
|
373
|
+
e || n((e) => e ?? String(Ce++));
|
|
374
|
+
}, [e]), e || (t ? `radix-${t}` : "");
|
|
375
|
+
}
|
|
376
|
+
xe(j, "useId");
|
|
377
|
+
//#endregion
|
|
378
|
+
//#region ../node_modules/.pnpm/@radix-ui+react-use-callback-ref@1.1.5_@types+react@19.3.0_react@19.3.0/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs
|
|
379
|
+
var we = Object.defineProperty, Te = (e, t) => we(e, "name", {
|
|
380
|
+
value: t,
|
|
381
|
+
configurable: !0
|
|
382
|
+
}), Ee = c.useInsertionEffect;
|
|
383
|
+
function M(e) {
|
|
384
|
+
let t = c.useRef(e);
|
|
385
|
+
return typeof Ee == "function" ? Ee(() => {
|
|
386
|
+
t.current = e;
|
|
387
|
+
}) : b(() => {
|
|
388
|
+
t.current = e;
|
|
389
|
+
}), c.useMemo(() => ((...e) => t.current?.(...e)), []);
|
|
390
|
+
}
|
|
391
|
+
Te(M, "useCallbackRef");
|
|
392
|
+
//#endregion
|
|
393
|
+
//#region ../node_modules/.pnpm/@radix-ui+react-dismissable-layer@1.2.1_@types+react-dom@19.3.0_@types+react@19.3.0__@t_2656bb590de67d8af7daa53dbff259b7/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
|
|
394
|
+
var De = Object.defineProperty, N = (e, t) => De(e, "name", {
|
|
395
|
+
value: t,
|
|
396
|
+
configurable: !0
|
|
397
|
+
}), Oe = "dismissableLayer.update", ke = "dismissableLayer.pointerDownOutside", Ae = "dismissableLayer.focusOutside", je, Me = c.createContext({
|
|
398
|
+
layers: /* @__PURE__ */ new Set(),
|
|
399
|
+
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
400
|
+
branches: /* @__PURE__ */ new Set(),
|
|
401
|
+
dismissableSurfaces: /* @__PURE__ */ new Set()
|
|
402
|
+
}), Ne = /* @__PURE__ */ c.forwardRef(/* @__PURE__ */ N(function(e, t) {
|
|
403
|
+
let { disableOutsidePointerEvents: r = !1, deferPointerDownOutside: i = !1, onEscapeKeyDown: a, onPointerDownOutside: o, onFocusOutside: s, onInteractOutside: l, onDismiss: d, ...f } = e, m = c.useContext(Me), [h, g] = c.useState(null), _ = h?.ownerDocument ?? globalThis?.document, [, v] = c.useState({}), y = n(t, g), b = Array.from(m.layers), [x] = [...m.layersWithOutsidePointerEventsDisabled].slice(-1), S = x ? b.indexOf(x) : -1, C = h ? b.indexOf(h) : -1, ee = m.layersWithOutsidePointerEventsDisabled.size > 0, T = C >= S, te = c.useRef(!1), ne = Le((e) => {
|
|
404
|
+
o?.(e), l?.(e), e.defaultPrevented || d?.();
|
|
405
|
+
}, {
|
|
406
|
+
ownerDocument: _,
|
|
407
|
+
deferPointerDownOutside: i,
|
|
408
|
+
isDeferredPointerDownOutsideRef: te,
|
|
409
|
+
dismissableSurfaces: m.dismissableSurfaces,
|
|
410
|
+
shouldHandlePointerDownOutside: c.useCallback((e) => {
|
|
411
|
+
if (!(e instanceof Node)) return !1;
|
|
412
|
+
let t = [...m.branches].some((t) => t.contains(e));
|
|
413
|
+
return T && !t;
|
|
414
|
+
}, [m.branches, T])
|
|
415
|
+
}), re = Re((e) => {
|
|
416
|
+
if (i && te.current) return;
|
|
417
|
+
let t = e.target;
|
|
418
|
+
[...m.branches].some((e) => e.contains(t)) || (s?.(e), l?.(e), e.defaultPrevented || d?.());
|
|
419
|
+
}, _), ie = h ? C === b.length - 1 : !1, E = M((e) => {
|
|
420
|
+
e.key === "Escape" && (a?.(e), !e.defaultPrevented && d && (e.preventDefault(), d()));
|
|
421
|
+
});
|
|
422
|
+
return c.useEffect(() => {
|
|
423
|
+
if (ie) return _.addEventListener("keydown", E, { capture: !0 }), () => _.removeEventListener("keydown", E, { capture: !0 });
|
|
424
|
+
}, [
|
|
425
|
+
_,
|
|
426
|
+
ie,
|
|
427
|
+
E
|
|
428
|
+
]), c.useEffect(() => {
|
|
429
|
+
if (h) return r && (m.layersWithOutsidePointerEventsDisabled.size === 0 && (je = _.body.style.pointerEvents, _.body.style.pointerEvents = "none"), m.layersWithOutsidePointerEventsDisabled.add(h)), m.layers.add(h), ze(), () => {
|
|
430
|
+
r && (m.layersWithOutsidePointerEventsDisabled.delete(h), m.layersWithOutsidePointerEventsDisabled.size === 0 && (_.body.style.pointerEvents = je));
|
|
431
|
+
};
|
|
432
|
+
}, [
|
|
433
|
+
h,
|
|
434
|
+
_,
|
|
435
|
+
r,
|
|
436
|
+
m
|
|
437
|
+
]), c.useEffect(() => () => {
|
|
438
|
+
h && (m.layers.delete(h), m.layersWithOutsidePointerEventsDisabled.delete(h), ze());
|
|
439
|
+
}, [h, m]), c.useEffect(() => {
|
|
440
|
+
let e = /* @__PURE__ */ N(() => v({}), "handleUpdate");
|
|
441
|
+
return document.addEventListener(Oe, e), () => document.removeEventListener(Oe, e);
|
|
442
|
+
}, []), /* @__PURE__ */ (0, u.jsx)(p.div, {
|
|
443
|
+
...f,
|
|
444
|
+
ref: y,
|
|
445
|
+
style: {
|
|
446
|
+
pointerEvents: ee ? T ? "auto" : "none" : void 0,
|
|
447
|
+
...e.style
|
|
448
|
+
},
|
|
449
|
+
onFocusCapture: w(e.onFocusCapture, re.onFocusCapture),
|
|
450
|
+
onBlurCapture: w(e.onBlurCapture, re.onBlurCapture),
|
|
451
|
+
onPointerDownCapture: w(e.onPointerDownCapture, ne.onPointerDownCapture)
|
|
452
|
+
});
|
|
453
|
+
}, "DismissableLayer")), Pe = /* @__PURE__ */ c.forwardRef(/* @__PURE__ */ N(function(e, t) {
|
|
454
|
+
let r = c.useContext(Me), i = c.useRef(null), a = n(t, i);
|
|
455
|
+
return c.useEffect(() => {
|
|
456
|
+
let e = i.current;
|
|
457
|
+
if (e) return r.branches.add(e), () => {
|
|
458
|
+
r.branches.delete(e);
|
|
459
|
+
};
|
|
460
|
+
}, [r.branches]), /* @__PURE__ */ (0, u.jsx)(p.div, {
|
|
461
|
+
...e,
|
|
462
|
+
ref: a
|
|
463
|
+
});
|
|
464
|
+
}, "DismissableLayerBranch"));
|
|
465
|
+
function Fe() {
|
|
466
|
+
let e = c.useContext(Me), [t, n] = c.useState(null);
|
|
467
|
+
return c.useEffect(() => {
|
|
468
|
+
if (t) return e.dismissableSurfaces.add(t), () => {
|
|
469
|
+
e.dismissableSurfaces.delete(t);
|
|
470
|
+
};
|
|
471
|
+
}, [t, e.dismissableSurfaces]), n;
|
|
472
|
+
}
|
|
473
|
+
N(Fe, "useDismissableLayerSurface");
|
|
474
|
+
var Ie = /* @__PURE__ */ N(() => !0, "IS_TRUE");
|
|
475
|
+
function Le(e, t) {
|
|
476
|
+
let { ownerDocument: n = globalThis?.document, deferPointerDownOutside: r = !1, isDeferredPointerDownOutsideRef: i, dismissableSurfaces: a, shouldHandlePointerDownOutside: o = Ie } = t, s = M(e), l = c.useRef(!1), u = c.useRef(!1), d = c.useRef(/* @__PURE__ */ new Map()), f = c.useRef(() => {});
|
|
477
|
+
return c.useEffect(() => {
|
|
478
|
+
function e() {
|
|
479
|
+
u.current = !1, i.current = !1, d.current.clear();
|
|
480
|
+
}
|
|
481
|
+
N(e, "resetOutsideInteraction");
|
|
482
|
+
function t() {
|
|
483
|
+
return Array.from(d.current.values()).some(Boolean);
|
|
484
|
+
}
|
|
485
|
+
N(t, "isOutsideInteractionIntercepted");
|
|
486
|
+
function c(e) {
|
|
487
|
+
if (!u.current) return;
|
|
488
|
+
let t = e.target;
|
|
489
|
+
t instanceof Node && [...a].some((e) => e.contains(t)) || d.current.set(e.type, !0), e.type === "click" && window.setTimeout(() => {
|
|
490
|
+
u.current && f.current();
|
|
491
|
+
}, 0);
|
|
492
|
+
}
|
|
493
|
+
N(c, "handleInteractionCapture");
|
|
494
|
+
function p(e) {
|
|
495
|
+
u.current && d.current.set(e.type, !1);
|
|
496
|
+
}
|
|
497
|
+
N(p, "handleInteractionBubble");
|
|
498
|
+
let m = /* @__PURE__ */ N((a) => {
|
|
499
|
+
if (a.target && !l.current) {
|
|
500
|
+
let c = function() {
|
|
501
|
+
n.removeEventListener("click", f.current);
|
|
502
|
+
let r = t();
|
|
503
|
+
e(), r || Be(ke, s, p, { discrete: !0 });
|
|
504
|
+
};
|
|
505
|
+
if (N(c, "handleAndDispatchPointerDownOutsideEvent"), !o(a.target)) {
|
|
506
|
+
n.removeEventListener("click", f.current), e(), l.current = !1;
|
|
507
|
+
return;
|
|
508
|
+
}
|
|
509
|
+
let p = { originalEvent: a };
|
|
510
|
+
u.current = !0, i.current = r && a.button === 0, d.current.clear(), !r || a.button !== 0 ? c() : (n.removeEventListener("click", f.current), f.current = c, n.addEventListener("click", f.current, { once: !0 }));
|
|
511
|
+
} else n.removeEventListener("click", f.current), e();
|
|
512
|
+
l.current = !1;
|
|
513
|
+
}, "handlePointerDown"), h = [
|
|
514
|
+
"pointerup",
|
|
515
|
+
"mousedown",
|
|
516
|
+
"mouseup",
|
|
517
|
+
"touchstart",
|
|
518
|
+
"touchend",
|
|
519
|
+
"click"
|
|
520
|
+
];
|
|
521
|
+
for (let e of h) n.addEventListener(e, c, !0), n.addEventListener(e, p);
|
|
522
|
+
let g = window.setTimeout(() => {
|
|
523
|
+
n.addEventListener("pointerdown", m);
|
|
524
|
+
}, 0);
|
|
525
|
+
return () => {
|
|
526
|
+
window.clearTimeout(g), n.removeEventListener("pointerdown", m), n.removeEventListener("click", f.current);
|
|
527
|
+
for (let e of h) n.removeEventListener(e, c, !0), n.removeEventListener(e, p);
|
|
528
|
+
};
|
|
529
|
+
}, [
|
|
530
|
+
n,
|
|
531
|
+
s,
|
|
532
|
+
r,
|
|
533
|
+
i,
|
|
534
|
+
a,
|
|
535
|
+
o
|
|
536
|
+
]), { onPointerDownCapture: /* @__PURE__ */ N(() => l.current = !0, "onPointerDownCapture") };
|
|
537
|
+
}
|
|
538
|
+
N(Le, "usePointerDownOutside");
|
|
539
|
+
function Re(e, t = globalThis?.document) {
|
|
540
|
+
let n = M(e), r = c.useRef(!1);
|
|
541
|
+
return c.useEffect(() => {
|
|
542
|
+
let e = /* @__PURE__ */ N((e) => {
|
|
543
|
+
e.target && !r.current && Be(Ae, n, { originalEvent: e }, { discrete: !1 });
|
|
544
|
+
}, "handleFocus");
|
|
545
|
+
return t.addEventListener("focusin", e), () => t.removeEventListener("focusin", e);
|
|
546
|
+
}, [t, n]), {
|
|
547
|
+
onFocusCapture: /* @__PURE__ */ N(() => r.current = !0, "onFocusCapture"),
|
|
548
|
+
onBlurCapture: /* @__PURE__ */ N(() => r.current = !1, "onBlurCapture")
|
|
549
|
+
};
|
|
550
|
+
}
|
|
551
|
+
N(Re, "useFocusOutside");
|
|
552
|
+
function ze() {
|
|
553
|
+
let e = new CustomEvent(Oe);
|
|
554
|
+
document.dispatchEvent(e);
|
|
555
|
+
}
|
|
556
|
+
N(ze, "dispatchUpdate");
|
|
557
|
+
function Be(e, t, n, { discrete: r }) {
|
|
558
|
+
let i = n.originalEvent.target, a = new CustomEvent(e, {
|
|
559
|
+
bubbles: !1,
|
|
560
|
+
cancelable: !0,
|
|
561
|
+
detail: n
|
|
562
|
+
});
|
|
563
|
+
t && i.addEventListener(e, t, { once: !0 }), r ? m(i, a) : i.dispatchEvent(a);
|
|
564
|
+
}
|
|
565
|
+
N(Be, "handleAndDispatchCustomEvent");
|
|
566
|
+
//#endregion
|
|
567
|
+
//#region ../node_modules/.pnpm/@radix-ui+react-focus-scope@1.3.1_@types+react-dom@19.3.0_@types+react@19.3.0__@types+r_c545200fe192271ccc07b707063d52f1/node_modules/@radix-ui/react-focus-scope/dist/index.mjs
|
|
568
|
+
var Ve = Object.defineProperty, P = (e, t) => Ve(e, "name", {
|
|
569
|
+
value: t,
|
|
570
|
+
configurable: !0
|
|
571
|
+
}), He = "focusScope.autoFocusOnMount", Ue = "focusScope.autoFocusOnUnmount", We = {
|
|
572
|
+
bubbles: !1,
|
|
573
|
+
cancelable: !0
|
|
574
|
+
}, Ge = /* @__PURE__ */ c.forwardRef(/* @__PURE__ */ P(function(e, t) {
|
|
575
|
+
let { loop: r = !1, trapped: i = !1, branches: a, onMountAutoFocus: o, onUnmountAutoFocus: s, ...l } = e, [d, f] = c.useState(null), m = M(o), h = M(s), g = c.useRef(null), _ = n(t, f), v = c.useRef(a);
|
|
576
|
+
c.useEffect(() => {
|
|
577
|
+
v.current = a;
|
|
578
|
+
});
|
|
579
|
+
let y = c.useCallback((e) => e ? d?.contains(e) ? !0 : !!v.current?.some((t) => t.contains(e)) : !1, [d]), b = c.useRef({
|
|
580
|
+
paused: !1,
|
|
581
|
+
pause() {
|
|
582
|
+
this.paused = !0;
|
|
583
|
+
},
|
|
584
|
+
resume() {
|
|
585
|
+
this.paused = !1;
|
|
586
|
+
}
|
|
587
|
+
}).current;
|
|
588
|
+
c.useEffect(() => {
|
|
589
|
+
if (i) {
|
|
590
|
+
let e = function(e) {
|
|
591
|
+
if (b.paused || !d) return;
|
|
592
|
+
let t = e.target;
|
|
593
|
+
y(t) ? g.current = t : F(g.current, { select: !0 });
|
|
594
|
+
}, t = function(e) {
|
|
595
|
+
if (b.paused || !d) return;
|
|
596
|
+
let t = e.relatedTarget;
|
|
597
|
+
t !== null && (y(t) || F(g.current, { select: !0 }));
|
|
598
|
+
}, n = function(e) {
|
|
599
|
+
if (document.activeElement === document.body) for (let t of e) t.removedNodes.length > 0 && F(d);
|
|
600
|
+
};
|
|
601
|
+
P(e, "handleFocusIn"), P(t, "handleFocusOut"), P(n, "handleMutations"), document.addEventListener("focusin", e), document.addEventListener("focusout", t);
|
|
602
|
+
let r = new MutationObserver(n);
|
|
603
|
+
return d && r.observe(d, {
|
|
604
|
+
childList: !0,
|
|
605
|
+
subtree: !0
|
|
606
|
+
}), () => {
|
|
607
|
+
document.removeEventListener("focusin", e), document.removeEventListener("focusout", t), r.disconnect();
|
|
608
|
+
};
|
|
609
|
+
}
|
|
610
|
+
}, [
|
|
611
|
+
i,
|
|
612
|
+
d,
|
|
613
|
+
b.paused,
|
|
614
|
+
y
|
|
615
|
+
]), c.useEffect(() => {
|
|
616
|
+
if (d) {
|
|
617
|
+
nt.add(b);
|
|
618
|
+
let e = document.activeElement;
|
|
619
|
+
if (!d.contains(e)) {
|
|
620
|
+
let t = new CustomEvent(He, We);
|
|
621
|
+
d.addEventListener(He, m), d.dispatchEvent(t), t.defaultPrevented || (Xe(at(Qe(d)), { select: !0 }), document.activeElement === e && F(d));
|
|
622
|
+
}
|
|
623
|
+
return () => {
|
|
624
|
+
d.removeEventListener(He, m);
|
|
625
|
+
let t = d.ownerDocument, n = CustomEvent;
|
|
626
|
+
setTimeout(() => {
|
|
627
|
+
let r = new n(Ue, We);
|
|
628
|
+
d.addEventListener(Ue, h), d.dispatchEvent(r), r.defaultPrevented || F(e ?? t.body, { select: !0 }), d.removeEventListener(Ue, h), nt.remove(b);
|
|
629
|
+
}, 0);
|
|
630
|
+
};
|
|
631
|
+
}
|
|
632
|
+
}, [
|
|
633
|
+
d,
|
|
634
|
+
m,
|
|
635
|
+
h,
|
|
636
|
+
b
|
|
637
|
+
]);
|
|
638
|
+
let x = c.useCallback((e) => {
|
|
639
|
+
if (!r && !i || b.paused) return;
|
|
640
|
+
let t = e.key === "Tab" && !e.altKey && !e.ctrlKey && !e.metaKey, n = document.activeElement;
|
|
641
|
+
if (t && n) {
|
|
642
|
+
let t = e.currentTarget, [i, a] = Ze(t);
|
|
643
|
+
i && a ? !e.shiftKey && n === a ? (e.preventDefault(), r && F(i, { select: !0 })) : e.shiftKey && n === i && (e.preventDefault(), r && F(a, { select: !0 })) : n === t && e.preventDefault();
|
|
644
|
+
}
|
|
645
|
+
}, [
|
|
646
|
+
r,
|
|
647
|
+
i,
|
|
648
|
+
b.paused
|
|
649
|
+
]);
|
|
650
|
+
return /* @__PURE__ */ (0, u.jsx)(p.div, {
|
|
651
|
+
tabIndex: -1,
|
|
652
|
+
...l,
|
|
653
|
+
ref: _,
|
|
654
|
+
onKeyDown: x
|
|
655
|
+
});
|
|
656
|
+
}, "FocusScope")), Ke = c.createContext(null);
|
|
657
|
+
function qe({ registry: e, children: t }) {
|
|
658
|
+
return e ? /* @__PURE__ */ (0, u.jsx)(Ke.Provider, {
|
|
659
|
+
value: e,
|
|
660
|
+
children: t
|
|
661
|
+
}) : t;
|
|
662
|
+
}
|
|
663
|
+
P(qe, "FocusScopeBranchProvider");
|
|
664
|
+
function Je() {
|
|
665
|
+
let [e, t] = c.useState([]);
|
|
666
|
+
return {
|
|
667
|
+
nodes: e,
|
|
668
|
+
registry: c.useMemo(() => ({
|
|
669
|
+
add: /* @__PURE__ */ P((e) => t((t) => t.includes(e) ? t : [...t, e]), "add"),
|
|
670
|
+
remove: /* @__PURE__ */ P((e) => t((t) => t.filter((t) => t !== e)), "remove")
|
|
671
|
+
}), [])
|
|
672
|
+
};
|
|
673
|
+
}
|
|
674
|
+
P(Je, "useFocusScopeBranchRegistry");
|
|
675
|
+
function Ye(e) {
|
|
676
|
+
let t = c.useContext(Ke);
|
|
677
|
+
c.useEffect(() => {
|
|
678
|
+
if (!(!e || !t)) return t.add(e), () => t.remove(e);
|
|
679
|
+
}, [e, t]);
|
|
680
|
+
}
|
|
681
|
+
P(Ye, "useFocusScopeBranch");
|
|
682
|
+
function Xe(e, { select: t = !1 } = {}) {
|
|
683
|
+
let n = document.activeElement;
|
|
684
|
+
for (let r of e) if (F(r, { select: t }), document.activeElement !== n) return;
|
|
685
|
+
}
|
|
686
|
+
P(Xe, "focusFirst");
|
|
687
|
+
function Ze(e) {
|
|
688
|
+
let t = Qe(e);
|
|
689
|
+
return [$e(t, e), $e(t.reverse(), e)];
|
|
690
|
+
}
|
|
691
|
+
P(Ze, "getTabbableEdges");
|
|
692
|
+
function Qe(e) {
|
|
693
|
+
let t = [], n = e.ownerDocument.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, { acceptNode: /* @__PURE__ */ P((e) => {
|
|
694
|
+
let t = e.tagName === "INPUT" && e.type === "hidden";
|
|
695
|
+
return e.disabled || e.hidden || t ? NodeFilter.FILTER_SKIP : e.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
696
|
+
}, "acceptNode") });
|
|
697
|
+
for (; n.nextNode();) t.push(n.currentNode);
|
|
698
|
+
return t;
|
|
699
|
+
}
|
|
700
|
+
P(Qe, "getTabbableCandidates");
|
|
701
|
+
function $e(e, t) {
|
|
702
|
+
let n = typeof t.checkVisibility == "function" && t.checkVisibility({ checkVisibilityCSS: !0 });
|
|
703
|
+
for (let r of e) if (!(n ? !r.checkVisibility({ checkVisibilityCSS: !0 }) : et(r, { upTo: t }))) return r;
|
|
704
|
+
}
|
|
705
|
+
P($e, "findVisible");
|
|
706
|
+
function et(e, { upTo: t }) {
|
|
707
|
+
if (getComputedStyle(e).visibility === "hidden") return !0;
|
|
708
|
+
for (; e;) {
|
|
709
|
+
if (t !== void 0 && e === t) return !1;
|
|
710
|
+
if (getComputedStyle(e).display === "none") return !0;
|
|
711
|
+
e = e.parentElement;
|
|
712
|
+
}
|
|
713
|
+
return !1;
|
|
714
|
+
}
|
|
715
|
+
P(et, "isHidden");
|
|
716
|
+
function tt(e) {
|
|
717
|
+
return e.tagName === "INPUT" && typeof e.select == "function";
|
|
718
|
+
}
|
|
719
|
+
P(tt, "isSelectableInput");
|
|
720
|
+
function F(e, { select: t = !1 } = {}) {
|
|
721
|
+
if (e && e.focus) {
|
|
722
|
+
let n = (e.ownerDocument ?? document).activeElement;
|
|
723
|
+
e.focus({ preventScroll: !0 }), e !== n && tt(e) && t && e.select();
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
P(F, "focus");
|
|
727
|
+
var nt = rt();
|
|
728
|
+
function rt() {
|
|
729
|
+
let e = [];
|
|
730
|
+
return {
|
|
731
|
+
add(t) {
|
|
732
|
+
let n = e[0];
|
|
733
|
+
t !== n && n?.pause(), e = it(e, t), e.unshift(t);
|
|
734
|
+
},
|
|
735
|
+
remove(t) {
|
|
736
|
+
e = it(e, t), e[0]?.resume();
|
|
737
|
+
}
|
|
738
|
+
};
|
|
739
|
+
}
|
|
740
|
+
P(rt, "createFocusScopesStack");
|
|
741
|
+
function it(e, t) {
|
|
742
|
+
let n = [...e], r = n.indexOf(t);
|
|
743
|
+
return r !== -1 && n.splice(r, 1), n;
|
|
744
|
+
}
|
|
745
|
+
P(it, "arrayRemove");
|
|
746
|
+
function at(e) {
|
|
747
|
+
return e.filter((e) => e.tagName !== "A");
|
|
748
|
+
}
|
|
749
|
+
P(at, "removeLinks");
|
|
750
|
+
//#endregion
|
|
751
|
+
//#region ../node_modules/.pnpm/@radix-ui+react-portal@1.2.0_@types+react-dom@19.3.0_@types+react@19.3.0__@types+react@_8edac65ad48366ac38478b64ccb751ca/node_modules/@radix-ui/react-portal/dist/index.mjs
|
|
752
|
+
var ot = Object.defineProperty, st = /* @__PURE__ */ c.forwardRef(/* @__PURE__ */ ((e, t) => ot(e, "name", {
|
|
753
|
+
value: t,
|
|
754
|
+
configurable: !0
|
|
755
|
+
}))(function(e, t) {
|
|
756
|
+
let { container: n, ...r } = e, [i, a] = c.useState(!1);
|
|
757
|
+
b(() => a(!0), []);
|
|
758
|
+
let o = n || i && globalThis?.document?.body;
|
|
759
|
+
return o ? l.createPortal(/* @__PURE__ */ (0, u.jsx)(p.div, {
|
|
760
|
+
...r,
|
|
761
|
+
ref: t
|
|
762
|
+
}), o) : null;
|
|
763
|
+
}, "Portal")), ct = Object.defineProperty, lt = (e, t) => ct(e, "name", {
|
|
764
|
+
value: t,
|
|
765
|
+
configurable: !0
|
|
766
|
+
}), I = 0, L = null;
|
|
767
|
+
function ut(e) {
|
|
768
|
+
return dt(), e.children;
|
|
769
|
+
}
|
|
770
|
+
lt(ut, "FocusGuards");
|
|
771
|
+
function dt() {
|
|
772
|
+
c.useEffect(() => {
|
|
773
|
+
L ||= {
|
|
774
|
+
start: ft(),
|
|
775
|
+
end: ft()
|
|
776
|
+
};
|
|
777
|
+
let { start: e, end: t } = L;
|
|
778
|
+
return document.body.firstElementChild !== e && document.body.insertAdjacentElement("afterbegin", e), document.body.lastElementChild !== t && document.body.insertAdjacentElement("beforeend", t), I++, () => {
|
|
779
|
+
I === 1 && (L?.start.remove(), L?.end.remove(), L = null), I = Math.max(0, I - 1);
|
|
780
|
+
};
|
|
781
|
+
}, []);
|
|
782
|
+
}
|
|
783
|
+
lt(dt, "useFocusGuards");
|
|
784
|
+
function ft() {
|
|
785
|
+
let e = document.createElement("span");
|
|
786
|
+
return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.outline = "none", e.style.opacity = "0", e.style.position = "fixed", e.style.pointerEvents = "none", e;
|
|
787
|
+
}
|
|
788
|
+
lt(ft, "createFocusGuard");
|
|
789
|
+
//#endregion
|
|
790
|
+
//#region ../node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.mjs
|
|
791
|
+
var R = function() {
|
|
792
|
+
return R = Object.assign || function(e) {
|
|
793
|
+
for (var t, n = 1, r = arguments.length; n < r; n++) for (var i in t = arguments[n], t) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
|
|
794
|
+
return e;
|
|
795
|
+
}, R.apply(this, arguments);
|
|
796
|
+
};
|
|
797
|
+
function pt(e, t) {
|
|
798
|
+
var n = {};
|
|
799
|
+
for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
800
|
+
if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(e); i < r.length; i++) t.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[i]) && (n[r[i]] = e[r[i]]);
|
|
801
|
+
return n;
|
|
802
|
+
}
|
|
803
|
+
function mt(e, t, n, r) {
|
|
804
|
+
function i(e) {
|
|
805
|
+
return e instanceof n ? e : new n(function(t) {
|
|
806
|
+
t(e);
|
|
807
|
+
});
|
|
808
|
+
}
|
|
809
|
+
return new (n ||= Promise)(function(n, a) {
|
|
810
|
+
function o(e) {
|
|
811
|
+
try {
|
|
812
|
+
c(r.next(e));
|
|
813
|
+
} catch (e) {
|
|
814
|
+
a(e);
|
|
815
|
+
}
|
|
816
|
+
}
|
|
817
|
+
function s(e) {
|
|
818
|
+
try {
|
|
819
|
+
c(r.throw(e));
|
|
820
|
+
} catch (e) {
|
|
821
|
+
a(e);
|
|
822
|
+
}
|
|
823
|
+
}
|
|
824
|
+
function c(e) {
|
|
825
|
+
e.done ? n(e.value) : i(e.value).then(o, s);
|
|
826
|
+
}
|
|
827
|
+
c((r = r.apply(e, t || [])).next());
|
|
828
|
+
});
|
|
829
|
+
}
|
|
830
|
+
function ht(e, t, n) {
|
|
831
|
+
if (n || arguments.length === 2) for (var r = 0, i = t.length, a; r < i; r++) (a || !(r in t)) && (a ||= Array.prototype.slice.call(t, 0, r), a[r] = t[r]);
|
|
832
|
+
return e.concat(a || Array.prototype.slice.call(t));
|
|
833
|
+
}
|
|
834
|
+
//#endregion
|
|
835
|
+
//#region ../node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@19.3.0_react@19.3.0/node_modules/react-remove-scroll-bar/dist/es2015/constants.js
|
|
836
|
+
var z = "right-scroll-bar-position", B = "width-before-scroll-bar", gt = "with-scroll-bars-hidden", _t = "--removed-body-scroll-bar-size";
|
|
837
|
+
//#endregion
|
|
838
|
+
//#region ../node_modules/.pnpm/use-callback-ref@1.3.3_@types+react@19.3.0_react@19.3.0/node_modules/use-callback-ref/dist/es2015/assignRef.js
|
|
839
|
+
function vt(e, t) {
|
|
840
|
+
return typeof e == "function" ? e(t) : e && (e.current = t), e;
|
|
841
|
+
}
|
|
842
|
+
//#endregion
|
|
843
|
+
//#region ../node_modules/.pnpm/use-callback-ref@1.3.3_@types+react@19.3.0_react@19.3.0/node_modules/use-callback-ref/dist/es2015/useRef.js
|
|
844
|
+
function yt(e, t) {
|
|
845
|
+
var n = (0, c.useState)(function() {
|
|
846
|
+
return {
|
|
847
|
+
value: e,
|
|
848
|
+
callback: t,
|
|
849
|
+
facade: {
|
|
850
|
+
get current() {
|
|
851
|
+
return n.value;
|
|
852
|
+
},
|
|
853
|
+
set current(e) {
|
|
854
|
+
var t = n.value;
|
|
855
|
+
t !== e && (n.value = e, n.callback(e, t));
|
|
856
|
+
}
|
|
857
|
+
}
|
|
858
|
+
};
|
|
859
|
+
})[0];
|
|
860
|
+
return n.callback = t, n.facade;
|
|
861
|
+
}
|
|
862
|
+
//#endregion
|
|
863
|
+
//#region ../node_modules/.pnpm/use-callback-ref@1.3.3_@types+react@19.3.0_react@19.3.0/node_modules/use-callback-ref/dist/es2015/useMergeRef.js
|
|
864
|
+
var bt = typeof window < "u" ? c.useLayoutEffect : c.useEffect, xt = /* @__PURE__ */ new WeakMap();
|
|
865
|
+
function St(e, t) {
|
|
866
|
+
var n = yt(t || null, function(t) {
|
|
867
|
+
return e.forEach(function(e) {
|
|
868
|
+
return vt(e, t);
|
|
869
|
+
});
|
|
870
|
+
});
|
|
871
|
+
return bt(function() {
|
|
872
|
+
var t = xt.get(n);
|
|
873
|
+
if (t) {
|
|
874
|
+
var r = new Set(t), i = new Set(e), a = n.current;
|
|
875
|
+
r.forEach(function(e) {
|
|
876
|
+
i.has(e) || vt(e, null);
|
|
877
|
+
}), i.forEach(function(e) {
|
|
878
|
+
r.has(e) || vt(e, a);
|
|
879
|
+
});
|
|
880
|
+
}
|
|
881
|
+
xt.set(n, e);
|
|
882
|
+
}, [e]), n;
|
|
883
|
+
}
|
|
884
|
+
//#endregion
|
|
885
|
+
//#region ../node_modules/.pnpm/use-sidecar@1.1.3_@types+react@19.3.0_react@19.3.0/node_modules/use-sidecar/dist/es2015/medium.js
|
|
886
|
+
function Ct(e) {
|
|
887
|
+
return e;
|
|
888
|
+
}
|
|
889
|
+
function wt(e, t) {
|
|
890
|
+
t === void 0 && (t = Ct);
|
|
891
|
+
var n = [], r = !1;
|
|
892
|
+
return {
|
|
893
|
+
read: function() {
|
|
894
|
+
if (r) throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");
|
|
895
|
+
return n.length ? n[n.length - 1] : e;
|
|
896
|
+
},
|
|
897
|
+
useMedium: function(e) {
|
|
898
|
+
var i = t(e, r);
|
|
899
|
+
return n.push(i), function() {
|
|
900
|
+
n = n.filter(function(e) {
|
|
901
|
+
return e !== i;
|
|
902
|
+
});
|
|
903
|
+
};
|
|
904
|
+
},
|
|
905
|
+
assignSyncMedium: function(e) {
|
|
906
|
+
for (r = !0; n.length;) {
|
|
907
|
+
var t = n;
|
|
908
|
+
n = [], t.forEach(e);
|
|
909
|
+
}
|
|
910
|
+
n = {
|
|
911
|
+
push: function(t) {
|
|
912
|
+
return e(t);
|
|
913
|
+
},
|
|
914
|
+
filter: function() {
|
|
915
|
+
return n;
|
|
916
|
+
}
|
|
917
|
+
};
|
|
918
|
+
},
|
|
919
|
+
assignMedium: function(e) {
|
|
920
|
+
r = !0;
|
|
921
|
+
var t = [];
|
|
922
|
+
if (n.length) {
|
|
923
|
+
var i = n;
|
|
924
|
+
n = [], i.forEach(e), t = n;
|
|
925
|
+
}
|
|
926
|
+
var a = function() {
|
|
927
|
+
var n = t;
|
|
928
|
+
t = [], n.forEach(e);
|
|
929
|
+
}, o = function() {
|
|
930
|
+
return Promise.resolve().then(a);
|
|
931
|
+
};
|
|
932
|
+
o(), n = {
|
|
933
|
+
push: function(e) {
|
|
934
|
+
t.push(e), o();
|
|
935
|
+
},
|
|
936
|
+
filter: function(e) {
|
|
937
|
+
return t = t.filter(e), n;
|
|
938
|
+
}
|
|
939
|
+
};
|
|
940
|
+
}
|
|
941
|
+
};
|
|
942
|
+
}
|
|
943
|
+
function Tt(e) {
|
|
944
|
+
e === void 0 && (e = {});
|
|
945
|
+
var t = wt(null);
|
|
946
|
+
return t.options = R({
|
|
947
|
+
async: !0,
|
|
948
|
+
ssr: !1
|
|
949
|
+
}, e), t;
|
|
950
|
+
}
|
|
951
|
+
//#endregion
|
|
952
|
+
//#region ../node_modules/.pnpm/use-sidecar@1.1.3_@types+react@19.3.0_react@19.3.0/node_modules/use-sidecar/dist/es2015/exports.js
|
|
953
|
+
var Et = function(e) {
|
|
954
|
+
var t = e.sideCar, n = pt(e, ["sideCar"]);
|
|
955
|
+
if (!t) throw Error("Sidecar: please provide `sideCar` property to import the right car");
|
|
956
|
+
var r = t.read();
|
|
957
|
+
if (!r) throw Error("Sidecar medium not found");
|
|
958
|
+
return c.createElement(r, R({}, n));
|
|
959
|
+
};
|
|
960
|
+
Et.isSideCarExport = !0;
|
|
961
|
+
function Dt(e, t) {
|
|
962
|
+
return e.useMedium(t), Et;
|
|
963
|
+
}
|
|
964
|
+
//#endregion
|
|
965
|
+
//#region ../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.3.0_react@19.3.0/node_modules/react-remove-scroll/dist/es2015/medium.js
|
|
966
|
+
var Ot = Tt(), kt = function() {}, V = c.forwardRef(function(e, t) {
|
|
967
|
+
var n = c.useRef(null), r = c.useState({
|
|
968
|
+
onScrollCapture: kt,
|
|
969
|
+
onWheelCapture: kt,
|
|
970
|
+
onTouchMoveCapture: kt
|
|
971
|
+
}), i = r[0], a = r[1], o = e.forwardProps, s = e.children, l = e.className, u = e.removeScrollBar, d = e.enabled, f = e.shards, p = e.sideCar, m = e.noRelative, h = e.noIsolation, g = e.inert, _ = e.allowPinchZoom, v = e.as, y = v === void 0 ? "div" : v, b = e.gapMode, x = pt(e, [
|
|
972
|
+
"forwardProps",
|
|
973
|
+
"children",
|
|
974
|
+
"className",
|
|
975
|
+
"removeScrollBar",
|
|
976
|
+
"enabled",
|
|
977
|
+
"shards",
|
|
978
|
+
"sideCar",
|
|
979
|
+
"noRelative",
|
|
980
|
+
"noIsolation",
|
|
981
|
+
"inert",
|
|
982
|
+
"allowPinchZoom",
|
|
983
|
+
"as",
|
|
984
|
+
"gapMode"
|
|
985
|
+
]), S = p, C = St([n, t]), w = R(R({}, x), i);
|
|
986
|
+
return c.createElement(c.Fragment, null, d && c.createElement(S, {
|
|
987
|
+
sideCar: Ot,
|
|
988
|
+
removeScrollBar: u,
|
|
989
|
+
shards: f,
|
|
990
|
+
noRelative: m,
|
|
991
|
+
noIsolation: h,
|
|
992
|
+
inert: g,
|
|
993
|
+
setCallbacks: a,
|
|
994
|
+
allowPinchZoom: !!_,
|
|
995
|
+
lockRef: n,
|
|
996
|
+
gapMode: b
|
|
997
|
+
}), o ? c.cloneElement(c.Children.only(s), R(R({}, w), { ref: C })) : c.createElement(y, R({}, w, {
|
|
998
|
+
className: l,
|
|
999
|
+
ref: C
|
|
1000
|
+
}), s));
|
|
1001
|
+
});
|
|
1002
|
+
V.defaultProps = {
|
|
1003
|
+
enabled: !0,
|
|
1004
|
+
removeScrollBar: !0,
|
|
1005
|
+
inert: !1
|
|
1006
|
+
}, V.classNames = {
|
|
1007
|
+
fullWidth: B,
|
|
1008
|
+
zeroRight: z
|
|
1009
|
+
};
|
|
1010
|
+
//#endregion
|
|
1011
|
+
//#region ../node_modules/.pnpm/get-nonce@1.0.1/node_modules/get-nonce/dist/es2015/index.js
|
|
1012
|
+
var At = function() {
|
|
1013
|
+
if (typeof __webpack_nonce__ < "u") return __webpack_nonce__;
|
|
1014
|
+
};
|
|
1015
|
+
//#endregion
|
|
1016
|
+
//#region ../node_modules/.pnpm/react-style-singleton@2.2.3_@types+react@19.3.0_react@19.3.0/node_modules/react-style-singleton/dist/es2015/singleton.js
|
|
1017
|
+
function jt() {
|
|
1018
|
+
if (!document) return null;
|
|
1019
|
+
var e = document.createElement("style");
|
|
1020
|
+
e.type = "text/css";
|
|
1021
|
+
var t = At();
|
|
1022
|
+
return t && e.setAttribute("nonce", t), e;
|
|
1023
|
+
}
|
|
1024
|
+
function Mt(e, t) {
|
|
1025
|
+
e.styleSheet ? e.styleSheet.cssText = t : e.appendChild(document.createTextNode(t));
|
|
1026
|
+
}
|
|
1027
|
+
function Nt(e) {
|
|
1028
|
+
(document.head || document.getElementsByTagName("head")[0]).appendChild(e);
|
|
1029
|
+
}
|
|
1030
|
+
var Pt = function() {
|
|
1031
|
+
var e = 0, t = null;
|
|
1032
|
+
return {
|
|
1033
|
+
add: function(n) {
|
|
1034
|
+
e == 0 && (t = jt()) && (Mt(t, n), Nt(t)), e++;
|
|
1035
|
+
},
|
|
1036
|
+
remove: function() {
|
|
1037
|
+
e--, !e && t && (t.parentNode && t.parentNode.removeChild(t), t = null);
|
|
1038
|
+
}
|
|
1039
|
+
};
|
|
1040
|
+
}, Ft = function() {
|
|
1041
|
+
var e = Pt();
|
|
1042
|
+
return function(t, n) {
|
|
1043
|
+
c.useEffect(function() {
|
|
1044
|
+
return e.add(t), function() {
|
|
1045
|
+
e.remove();
|
|
1046
|
+
};
|
|
1047
|
+
}, [t && n]);
|
|
1048
|
+
};
|
|
1049
|
+
}, It = function() {
|
|
1050
|
+
var e = Ft();
|
|
1051
|
+
return function(t) {
|
|
1052
|
+
var n = t.styles, r = t.dynamic;
|
|
1053
|
+
return e(n, r), null;
|
|
1054
|
+
};
|
|
1055
|
+
}, Lt = {
|
|
1056
|
+
left: 0,
|
|
1057
|
+
top: 0,
|
|
1058
|
+
right: 0,
|
|
1059
|
+
gap: 0
|
|
1060
|
+
}, Rt = function(e) {
|
|
1061
|
+
return parseInt(e || "", 10) || 0;
|
|
1062
|
+
}, zt = function(e) {
|
|
1063
|
+
var t = window.getComputedStyle(document.body), n = t[e === "padding" ? "paddingLeft" : "marginLeft"], r = t[e === "padding" ? "paddingTop" : "marginTop"], i = t[e === "padding" ? "paddingRight" : "marginRight"];
|
|
1064
|
+
return [
|
|
1065
|
+
Rt(n),
|
|
1066
|
+
Rt(r),
|
|
1067
|
+
Rt(i)
|
|
1068
|
+
];
|
|
1069
|
+
}, Bt = function(e) {
|
|
1070
|
+
if (e === void 0 && (e = "margin"), typeof window > "u") return Lt;
|
|
1071
|
+
var t = zt(e), n = document.documentElement.clientWidth, r = window.innerWidth;
|
|
1072
|
+
return {
|
|
1073
|
+
left: t[0],
|
|
1074
|
+
top: t[1],
|
|
1075
|
+
right: t[2],
|
|
1076
|
+
gap: Math.max(0, r - n + t[2] - t[0])
|
|
1077
|
+
};
|
|
1078
|
+
}, Vt = It(), H = "data-scroll-locked", Ht = function(e, t, n, r) {
|
|
1079
|
+
var i = e.left, a = e.top, o = e.right, s = e.gap;
|
|
1080
|
+
return n === void 0 && (n = "margin"), `
|
|
1081
|
+
.${gt} {
|
|
1082
|
+
overflow: hidden ${r};
|
|
1083
|
+
padding-right: ${s}px ${r};
|
|
1084
|
+
}
|
|
1085
|
+
body[${H}] {
|
|
1086
|
+
overflow: hidden ${r};
|
|
1087
|
+
overscroll-behavior: contain;
|
|
1088
|
+
${[
|
|
1089
|
+
t && `position: relative ${r};`,
|
|
1090
|
+
n === "margin" && `
|
|
1091
|
+
padding-left: ${i}px;
|
|
1092
|
+
padding-top: ${a}px;
|
|
1093
|
+
padding-right: ${o}px;
|
|
1094
|
+
margin-left:0;
|
|
1095
|
+
margin-top:0;
|
|
1096
|
+
margin-right: ${s}px ${r};
|
|
1097
|
+
`,
|
|
1098
|
+
n === "padding" && `padding-right: ${s}px ${r};`
|
|
1099
|
+
].filter(Boolean).join("")}
|
|
1100
|
+
}
|
|
1101
|
+
|
|
1102
|
+
.${z} {
|
|
1103
|
+
right: ${s}px ${r};
|
|
1104
|
+
}
|
|
1105
|
+
|
|
1106
|
+
.${B} {
|
|
1107
|
+
margin-right: ${s}px ${r};
|
|
1108
|
+
}
|
|
1109
|
+
|
|
1110
|
+
.${z} .${z} {
|
|
1111
|
+
right: 0 ${r};
|
|
1112
|
+
}
|
|
1113
|
+
|
|
1114
|
+
.${B} .${B} {
|
|
1115
|
+
margin-right: 0 ${r};
|
|
1116
|
+
}
|
|
1117
|
+
|
|
1118
|
+
body[${H}] {
|
|
1119
|
+
${_t}: ${s}px;
|
|
1120
|
+
}
|
|
1121
|
+
`;
|
|
1122
|
+
}, Ut = function() {
|
|
1123
|
+
var e = parseInt(document.body.getAttribute("data-scroll-locked") || "0", 10);
|
|
1124
|
+
return isFinite(e) ? e : 0;
|
|
1125
|
+
}, Wt = function() {
|
|
1126
|
+
c.useEffect(function() {
|
|
1127
|
+
return document.body.setAttribute(H, (Ut() + 1).toString()), function() {
|
|
1128
|
+
var e = Ut() - 1;
|
|
1129
|
+
e <= 0 ? document.body.removeAttribute(H) : document.body.setAttribute(H, e.toString());
|
|
1130
|
+
};
|
|
1131
|
+
}, []);
|
|
1132
|
+
}, Gt = function(e) {
|
|
1133
|
+
var t = e.noRelative, n = e.noImportant, r = e.gapMode, i = r === void 0 ? "margin" : r;
|
|
1134
|
+
Wt();
|
|
1135
|
+
var a = c.useMemo(function() {
|
|
1136
|
+
return Bt(i);
|
|
1137
|
+
}, [i]);
|
|
1138
|
+
return c.createElement(Vt, { styles: Ht(a, !t, i, n ? "" : "!important") });
|
|
1139
|
+
}, Kt = !1;
|
|
1140
|
+
if (typeof window < "u") try {
|
|
1141
|
+
var U = Object.defineProperty({}, "passive", { get: function() {
|
|
1142
|
+
return Kt = !0, !0;
|
|
1143
|
+
} });
|
|
1144
|
+
window.addEventListener("test", U, U), window.removeEventListener("test", U, U);
|
|
1145
|
+
} catch {
|
|
1146
|
+
Kt = !1;
|
|
1147
|
+
}
|
|
1148
|
+
var W = Kt ? { passive: !1 } : !1, qt = function(e) {
|
|
1149
|
+
return e.tagName === "TEXTAREA";
|
|
1150
|
+
}, Jt = function(e, t) {
|
|
1151
|
+
if (!(e instanceof Element)) return !1;
|
|
1152
|
+
var n = window.getComputedStyle(e);
|
|
1153
|
+
return n[t] !== "hidden" && !(n.overflowY === n.overflowX && !qt(e) && n[t] === "visible");
|
|
1154
|
+
}, Yt = function(e) {
|
|
1155
|
+
return Jt(e, "overflowY");
|
|
1156
|
+
}, Xt = function(e) {
|
|
1157
|
+
return Jt(e, "overflowX");
|
|
1158
|
+
}, Zt = function(e, t) {
|
|
1159
|
+
var n = t.ownerDocument, r = t;
|
|
1160
|
+
do {
|
|
1161
|
+
if (typeof ShadowRoot < "u" && r instanceof ShadowRoot && (r = r.host), en(e, r)) {
|
|
1162
|
+
var i = tn(e, r);
|
|
1163
|
+
if (i[1] > i[2]) return !0;
|
|
1164
|
+
}
|
|
1165
|
+
r = r.parentNode;
|
|
1166
|
+
} while (r && r !== n.body);
|
|
1167
|
+
return !1;
|
|
1168
|
+
}, Qt = function(e) {
|
|
1169
|
+
return [
|
|
1170
|
+
e.scrollTop,
|
|
1171
|
+
e.scrollHeight,
|
|
1172
|
+
e.clientHeight
|
|
1173
|
+
];
|
|
1174
|
+
}, $t = function(e) {
|
|
1175
|
+
return [
|
|
1176
|
+
e.scrollLeft,
|
|
1177
|
+
e.scrollWidth,
|
|
1178
|
+
e.clientWidth
|
|
1179
|
+
];
|
|
1180
|
+
}, en = function(e, t) {
|
|
1181
|
+
return e === "v" ? Yt(t) : Xt(t);
|
|
1182
|
+
}, tn = function(e, t) {
|
|
1183
|
+
return e === "v" ? Qt(t) : $t(t);
|
|
1184
|
+
}, nn = function(e, t) {
|
|
1185
|
+
return e === "h" && t === "rtl" ? -1 : 1;
|
|
1186
|
+
}, rn = function(e, t, n, r, i) {
|
|
1187
|
+
var a = nn(e, window.getComputedStyle(t).direction), o = a * r, s = n.target, c = t.contains(s), l = !1, u = o > 0, d = 0, f = 0;
|
|
1188
|
+
do {
|
|
1189
|
+
if (!s) break;
|
|
1190
|
+
var p = tn(e, s), m = p[0], h = p[1] - p[2] - a * m;
|
|
1191
|
+
(m || h) && en(e, s) && (d += h, f += m);
|
|
1192
|
+
var g = s.parentNode;
|
|
1193
|
+
s = g && g.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? g.host : g;
|
|
1194
|
+
} while (!c && s !== document.body || c && (t.contains(s) || t === s));
|
|
1195
|
+
return (u && (i && Math.abs(d) < 1 || !i && o > d) || !u && (i && Math.abs(f) < 1 || !i && -o > f)) && (l = !0), l;
|
|
1196
|
+
}, an = function(e) {
|
|
1197
|
+
return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
|
|
1198
|
+
}, on = function(e) {
|
|
1199
|
+
return [e.deltaX, e.deltaY];
|
|
1200
|
+
}, sn = function(e) {
|
|
1201
|
+
return e && "current" in e ? e.current : e;
|
|
1202
|
+
}, cn = function(e, t) {
|
|
1203
|
+
return e[0] === t[0] && e[1] === t[1];
|
|
1204
|
+
}, ln = function(e) {
|
|
1205
|
+
return `
|
|
1206
|
+
.block-interactivity-${e} {pointer-events: none;}
|
|
1207
|
+
.allow-interactivity-${e} {pointer-events: all;}
|
|
1208
|
+
`;
|
|
1209
|
+
}, un = 0, G = [];
|
|
1210
|
+
function dn(e) {
|
|
1211
|
+
var t = c.useRef([]), n = c.useRef([0, 0]), r = c.useRef(), i = c.useState(un++)[0], a = c.useState(It)[0], o = c.useRef(e);
|
|
1212
|
+
c.useEffect(function() {
|
|
1213
|
+
o.current = e;
|
|
1214
|
+
}, [e]), c.useEffect(function() {
|
|
1215
|
+
if (e.inert) {
|
|
1216
|
+
document.body.classList.add(`block-interactivity-${i}`);
|
|
1217
|
+
var t = ht([e.lockRef.current], (e.shards || []).map(sn), !0).filter(Boolean);
|
|
1218
|
+
return t.forEach(function(e) {
|
|
1219
|
+
return e.classList.add(`allow-interactivity-${i}`);
|
|
1220
|
+
}), function() {
|
|
1221
|
+
document.body.classList.remove(`block-interactivity-${i}`), t.forEach(function(e) {
|
|
1222
|
+
return e.classList.remove(`allow-interactivity-${i}`);
|
|
1223
|
+
});
|
|
1224
|
+
};
|
|
1225
|
+
}
|
|
1226
|
+
}, [
|
|
1227
|
+
e.inert,
|
|
1228
|
+
e.lockRef.current,
|
|
1229
|
+
e.shards
|
|
1230
|
+
]);
|
|
1231
|
+
var s = c.useCallback(function(e, t) {
|
|
1232
|
+
if ("touches" in e && e.touches.length === 2 || e.type === "wheel" && e.ctrlKey) return !o.current.allowPinchZoom;
|
|
1233
|
+
var i = an(e), a = n.current, s = "deltaX" in e ? e.deltaX : a[0] - i[0], c = "deltaY" in e ? e.deltaY : a[1] - i[1], l, u = e.target, d = Math.abs(s) > Math.abs(c) ? "h" : "v";
|
|
1234
|
+
if ("touches" in e && d === "h" && u.type === "range") return !1;
|
|
1235
|
+
var f = window.getSelection(), p = f && f.anchorNode;
|
|
1236
|
+
if (p && (p === u || p.contains(u))) return !1;
|
|
1237
|
+
var m = Zt(d, u);
|
|
1238
|
+
if (!m) return !0;
|
|
1239
|
+
if (m ? l = d : (l = d === "v" ? "h" : "v", m = Zt(d, u)), !m) return !1;
|
|
1240
|
+
if (!r.current && "changedTouches" in e && (s || c) && (r.current = l), !l) return !0;
|
|
1241
|
+
var h = r.current || l;
|
|
1242
|
+
return rn(h, t, e, h === "h" ? s : c, !0);
|
|
1243
|
+
}, []), l = c.useCallback(function(e) {
|
|
1244
|
+
var n = e;
|
|
1245
|
+
if (!(!G.length || G[G.length - 1] !== a)) {
|
|
1246
|
+
var r = "deltaY" in n ? on(n) : an(n), i = t.current.filter(function(e) {
|
|
1247
|
+
return e.name === n.type && (e.target === n.target || n.target === e.shadowParent) && cn(e.delta, r);
|
|
1248
|
+
})[0];
|
|
1249
|
+
if (i && i.should) {
|
|
1250
|
+
n.cancelable && n.preventDefault();
|
|
1251
|
+
return;
|
|
1252
|
+
}
|
|
1253
|
+
if (!i) {
|
|
1254
|
+
var c = (o.current.shards || []).map(sn).filter(Boolean).filter(function(e) {
|
|
1255
|
+
return e.contains(n.target);
|
|
1256
|
+
});
|
|
1257
|
+
(c.length > 0 ? s(n, c[0]) : !o.current.noIsolation) && n.cancelable && n.preventDefault();
|
|
1258
|
+
}
|
|
1259
|
+
}
|
|
1260
|
+
}, []), u = c.useCallback(function(e, n, r, i) {
|
|
1261
|
+
var a = {
|
|
1262
|
+
name: e,
|
|
1263
|
+
delta: n,
|
|
1264
|
+
target: r,
|
|
1265
|
+
should: i,
|
|
1266
|
+
shadowParent: fn(r)
|
|
1267
|
+
};
|
|
1268
|
+
t.current.push(a), setTimeout(function() {
|
|
1269
|
+
t.current = t.current.filter(function(e) {
|
|
1270
|
+
return e !== a;
|
|
1271
|
+
});
|
|
1272
|
+
}, 1);
|
|
1273
|
+
}, []), d = c.useCallback(function(e) {
|
|
1274
|
+
n.current = an(e), r.current = void 0;
|
|
1275
|
+
}, []), f = c.useCallback(function(t) {
|
|
1276
|
+
u(t.type, on(t), t.target, s(t, e.lockRef.current));
|
|
1277
|
+
}, []), p = c.useCallback(function(t) {
|
|
1278
|
+
u(t.type, an(t), t.target, s(t, e.lockRef.current));
|
|
1279
|
+
}, []);
|
|
1280
|
+
c.useEffect(function() {
|
|
1281
|
+
return G.push(a), e.setCallbacks({
|
|
1282
|
+
onScrollCapture: f,
|
|
1283
|
+
onWheelCapture: f,
|
|
1284
|
+
onTouchMoveCapture: p
|
|
1285
|
+
}), document.addEventListener("wheel", l, W), document.addEventListener("touchmove", l, W), document.addEventListener("touchstart", d, W), function() {
|
|
1286
|
+
G = G.filter(function(e) {
|
|
1287
|
+
return e !== a;
|
|
1288
|
+
}), document.removeEventListener("wheel", l, W), document.removeEventListener("touchmove", l, W), document.removeEventListener("touchstart", d, W);
|
|
1289
|
+
};
|
|
1290
|
+
}, []);
|
|
1291
|
+
var m = e.removeScrollBar, h = e.inert;
|
|
1292
|
+
return c.createElement(c.Fragment, null, h ? c.createElement(a, { styles: ln(i) }) : null, m ? c.createElement(Gt, {
|
|
1293
|
+
noRelative: e.noRelative,
|
|
1294
|
+
gapMode: e.gapMode
|
|
1295
|
+
}) : null);
|
|
1296
|
+
}
|
|
1297
|
+
function fn(e) {
|
|
1298
|
+
for (var t = null; e !== null;) e instanceof ShadowRoot && (t = e.host, e = e.host), e = e.parentNode;
|
|
1299
|
+
return t;
|
|
1300
|
+
}
|
|
1301
|
+
//#endregion
|
|
1302
|
+
//#region ../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.3.0_react@19.3.0/node_modules/react-remove-scroll/dist/es2015/sidecar.js
|
|
1303
|
+
var pn = Dt(Ot, dn), mn = c.forwardRef(function(e, t) {
|
|
1304
|
+
return c.createElement(V, R({}, e, {
|
|
1305
|
+
ref: t,
|
|
1306
|
+
sideCar: pn
|
|
1307
|
+
}));
|
|
1308
|
+
});
|
|
1309
|
+
mn.classNames = V.classNames;
|
|
1310
|
+
//#endregion
|
|
1311
|
+
//#region ../node_modules/.pnpm/aria-hidden@1.2.6/node_modules/aria-hidden/dist/es2015/index.js
|
|
1312
|
+
var hn = function(e) {
|
|
1313
|
+
return typeof document > "u" ? null : (Array.isArray(e) ? e[0] : e).ownerDocument.body;
|
|
1314
|
+
}, K = /* @__PURE__ */ new WeakMap(), q = /* @__PURE__ */ new WeakMap(), J = {}, gn = 0, _n = function(e) {
|
|
1315
|
+
return e && (e.host || _n(e.parentNode));
|
|
1316
|
+
}, vn = function(e, t) {
|
|
1317
|
+
return t.map(function(t) {
|
|
1318
|
+
if (e.contains(t)) return t;
|
|
1319
|
+
var n = _n(t);
|
|
1320
|
+
return n && e.contains(n) ? n : (console.error("aria-hidden", t, "in not contained inside", e, ". Doing nothing"), null);
|
|
1321
|
+
}).filter(function(e) {
|
|
1322
|
+
return !!e;
|
|
1323
|
+
});
|
|
1324
|
+
}, yn = function(e, t, n, r) {
|
|
1325
|
+
var i = vn(t, Array.isArray(e) ? e : [e]);
|
|
1326
|
+
J[n] || (J[n] = /* @__PURE__ */ new WeakMap());
|
|
1327
|
+
var a = J[n], o = [], s = /* @__PURE__ */ new Set(), c = new Set(i), l = function(e) {
|
|
1328
|
+
!e || s.has(e) || (s.add(e), l(e.parentNode));
|
|
1329
|
+
};
|
|
1330
|
+
i.forEach(l);
|
|
1331
|
+
var u = function(e) {
|
|
1332
|
+
!e || c.has(e) || Array.prototype.forEach.call(e.children, function(e) {
|
|
1333
|
+
if (s.has(e)) u(e);
|
|
1334
|
+
else try {
|
|
1335
|
+
var t = e.getAttribute(r), i = t !== null && t !== "false", c = (K.get(e) || 0) + 1, l = (a.get(e) || 0) + 1;
|
|
1336
|
+
K.set(e, c), a.set(e, l), o.push(e), c === 1 && i && q.set(e, !0), l === 1 && e.setAttribute(n, "true"), i || e.setAttribute(r, "true");
|
|
1337
|
+
} catch (t) {
|
|
1338
|
+
console.error("aria-hidden: cannot operate on ", e, t);
|
|
1339
|
+
}
|
|
1340
|
+
});
|
|
1341
|
+
};
|
|
1342
|
+
return u(t), s.clear(), gn++, function() {
|
|
1343
|
+
o.forEach(function(e) {
|
|
1344
|
+
var t = K.get(e) - 1, i = a.get(e) - 1;
|
|
1345
|
+
K.set(e, t), a.set(e, i), t || (q.has(e) || e.removeAttribute(r), q.delete(e)), i || e.removeAttribute(n);
|
|
1346
|
+
}), gn--, gn || (K = /* @__PURE__ */ new WeakMap(), K = /* @__PURE__ */ new WeakMap(), q = /* @__PURE__ */ new WeakMap(), J = {});
|
|
1347
|
+
};
|
|
1348
|
+
}, bn = function(e, t, n) {
|
|
1349
|
+
n === void 0 && (n = "data-aria-hidden");
|
|
1350
|
+
var r = Array.from(Array.isArray(e) ? e : [e]), i = t || hn(e);
|
|
1351
|
+
return i ? (r.push.apply(r, Array.from(i.querySelectorAll("[aria-live], script"))), yn(r, i, n, "aria-hidden")) : function() {
|
|
1352
|
+
return null;
|
|
1353
|
+
};
|
|
1354
|
+
}, xn = Object.defineProperty, Y = (e, t) => xn(e, "name", {
|
|
1355
|
+
value: t,
|
|
1356
|
+
configurable: !0
|
|
1357
|
+
}), Sn = "Dialog", [Cn, wn] = /* @__PURE__ */ v(Sn), [Tn, X] = Cn(Sn), En = /* @__PURE__ */ Y((e) => {
|
|
1358
|
+
let { __scopeDialog: t, children: n, open: r, defaultOpen: i, onOpenChange: a, modal: o = !0 } = e, s = c.useRef(null), l = c.useRef(null), { nodes: d, registry: f } = Je(), [p, m] = le({
|
|
1359
|
+
prop: r,
|
|
1360
|
+
defaultProp: i ?? !1,
|
|
1361
|
+
onChange: a,
|
|
1362
|
+
caller: Sn
|
|
1363
|
+
}), [h, g] = c.useState(0), [_, v] = c.useState(0);
|
|
1364
|
+
return /* @__PURE__ */ (0, u.jsx)(Tn, {
|
|
1365
|
+
scope: t,
|
|
1366
|
+
triggerRef: s,
|
|
1367
|
+
contentRef: l,
|
|
1368
|
+
contentId: j(),
|
|
1369
|
+
titleId: j(),
|
|
1370
|
+
descriptionId: j(),
|
|
1371
|
+
titlePresent: h > 0,
|
|
1372
|
+
descriptionPresent: _ > 0,
|
|
1373
|
+
setTitleCount: g,
|
|
1374
|
+
setDescriptionCount: v,
|
|
1375
|
+
open: p,
|
|
1376
|
+
onOpenChange: m,
|
|
1377
|
+
onOpenToggle: c.useCallback(() => m((e) => !e), [m]),
|
|
1378
|
+
modal: o,
|
|
1379
|
+
branchNodes: d,
|
|
1380
|
+
branchRegistry: f,
|
|
1381
|
+
children: n
|
|
1382
|
+
});
|
|
1383
|
+
}, "Dialog"), Dn = "DialogTrigger", On = /* @__PURE__ */ c.forwardRef(/* @__PURE__ */ Y(function(e, t) {
|
|
1384
|
+
let { __scopeDialog: r, ...i } = e, a = X(Dn, r), o = n(t, a.triggerRef);
|
|
1385
|
+
return /* @__PURE__ */ (0, u.jsx)(p.button, {
|
|
1386
|
+
type: "button",
|
|
1387
|
+
"aria-haspopup": "dialog",
|
|
1388
|
+
"aria-expanded": a.open,
|
|
1389
|
+
"aria-controls": a.open ? a.contentId : void 0,
|
|
1390
|
+
"data-state": Kn(a.open),
|
|
1391
|
+
...i,
|
|
1392
|
+
ref: o,
|
|
1393
|
+
onClick: w(e.onClick, a.onOpenToggle)
|
|
1394
|
+
});
|
|
1395
|
+
}, "DialogTrigger")), kn = "DialogPortal", [An, jn] = Cn(kn, { forceMount: void 0 }), Mn = /* @__PURE__ */ Y((e) => {
|
|
1396
|
+
let { __scopeDialog: t, forceMount: n, children: r, container: i } = e, a = X(kn, t);
|
|
1397
|
+
return /* @__PURE__ */ (0, u.jsx)(An, {
|
|
1398
|
+
scope: t,
|
|
1399
|
+
forceMount: n,
|
|
1400
|
+
children: c.Children.map(r, (e) => /* @__PURE__ */ (0, u.jsx)(k, {
|
|
1401
|
+
present: n || a.open,
|
|
1402
|
+
children: /* @__PURE__ */ (0, u.jsx)(st, {
|
|
1403
|
+
asChild: !0,
|
|
1404
|
+
container: i,
|
|
1405
|
+
children: e
|
|
1406
|
+
})
|
|
1407
|
+
}))
|
|
1408
|
+
});
|
|
1409
|
+
}, "DialogPortal"), Nn = "DialogOverlay", Pn = /* @__PURE__ */ c.forwardRef(/* @__PURE__ */ Y(function(e, t) {
|
|
1410
|
+
let n = jn(Nn, e.__scopeDialog), { forceMount: r = n.forceMount, ...i } = e, a = X(Nn, e.__scopeDialog);
|
|
1411
|
+
return a.modal ? /* @__PURE__ */ (0, u.jsx)(k, {
|
|
1412
|
+
present: r || a.open,
|
|
1413
|
+
children: /* @__PURE__ */ (0, u.jsx)(In, {
|
|
1414
|
+
...i,
|
|
1415
|
+
ref: t
|
|
1416
|
+
})
|
|
1417
|
+
}) : null;
|
|
1418
|
+
}, "DialogOverlay")), Fn = r("DialogOverlay.RemoveScroll"), In = /* @__PURE__ */ c.forwardRef(/* @__PURE__ */ Y(function(e, t) {
|
|
1419
|
+
let { __scopeDialog: r, ...i } = e, a = X(Nn, r), o = Fe(), s = n(t, o);
|
|
1420
|
+
return /* @__PURE__ */ (0, u.jsx)(mn, {
|
|
1421
|
+
as: Fn,
|
|
1422
|
+
allowPinchZoom: !0,
|
|
1423
|
+
shards: c.useMemo(() => [a.contentRef, ...a.branchNodes.map((e) => ({ current: e }))], [a.contentRef, a.branchNodes]),
|
|
1424
|
+
children: /* @__PURE__ */ (0, u.jsx)(p.div, {
|
|
1425
|
+
"data-state": Kn(a.open),
|
|
1426
|
+
...i,
|
|
1427
|
+
ref: s,
|
|
1428
|
+
style: {
|
|
1429
|
+
pointerEvents: "auto",
|
|
1430
|
+
...i.style
|
|
1431
|
+
}
|
|
1432
|
+
})
|
|
1433
|
+
});
|
|
1434
|
+
}, "DialogOverlayImpl")), Z = "DialogContent", Ln = /* @__PURE__ */ c.forwardRef(/* @__PURE__ */ Y(function(e, t) {
|
|
1435
|
+
let n = jn(Z, e.__scopeDialog), { forceMount: r = n.forceMount, ...i } = e, a = X(Z, e.__scopeDialog);
|
|
1436
|
+
return /* @__PURE__ */ (0, u.jsx)(k, {
|
|
1437
|
+
present: r || a.open,
|
|
1438
|
+
children: a.modal ? /* @__PURE__ */ (0, u.jsx)(Rn, {
|
|
1439
|
+
...i,
|
|
1440
|
+
ref: t
|
|
1441
|
+
}) : /* @__PURE__ */ (0, u.jsx)(zn, {
|
|
1442
|
+
...i,
|
|
1443
|
+
ref: t
|
|
1444
|
+
})
|
|
1445
|
+
});
|
|
1446
|
+
}, "DialogContent")), Rn = /* @__PURE__ */ c.forwardRef(/* @__PURE__ */ Y(function(e, t) {
|
|
1447
|
+
let r = X(Z, e.__scopeDialog), i = c.useRef(null), a = n(t, r.contentRef, i);
|
|
1448
|
+
return c.useEffect(() => {
|
|
1449
|
+
let e = i.current;
|
|
1450
|
+
if (e) return bn(e);
|
|
1451
|
+
}, []), /* @__PURE__ */ (0, u.jsx)(Bn, {
|
|
1452
|
+
...e,
|
|
1453
|
+
ref: a,
|
|
1454
|
+
trapFocus: r.open,
|
|
1455
|
+
disableOutsidePointerEvents: r.open,
|
|
1456
|
+
onCloseAutoFocus: w(e.onCloseAutoFocus, (e) => {
|
|
1457
|
+
e.preventDefault(), r.triggerRef.current?.focus();
|
|
1458
|
+
}),
|
|
1459
|
+
onPointerDownOutside: w(e.onPointerDownOutside, (e) => {
|
|
1460
|
+
let t = e.detail.originalEvent, n = t.button === 0 && t.ctrlKey === !0;
|
|
1461
|
+
(t.button === 2 || n) && e.preventDefault();
|
|
1462
|
+
}),
|
|
1463
|
+
onFocusOutside: w(e.onFocusOutside, (e) => e.preventDefault())
|
|
1464
|
+
});
|
|
1465
|
+
}, "DialogContentModal")), zn = /* @__PURE__ */ c.forwardRef(/* @__PURE__ */ Y(function(e, t) {
|
|
1466
|
+
let n = X(Z, e.__scopeDialog), r = c.useRef(!1), i = c.useRef(!1);
|
|
1467
|
+
return /* @__PURE__ */ (0, u.jsx)(Bn, {
|
|
1468
|
+
...e,
|
|
1469
|
+
ref: t,
|
|
1470
|
+
trapFocus: !1,
|
|
1471
|
+
disableOutsidePointerEvents: !1,
|
|
1472
|
+
onCloseAutoFocus: (t) => {
|
|
1473
|
+
e.onCloseAutoFocus?.(t), t.defaultPrevented || (r.current || n.triggerRef.current?.focus(), t.preventDefault()), r.current = !1, i.current = !1;
|
|
1474
|
+
},
|
|
1475
|
+
onInteractOutside: (t) => {
|
|
1476
|
+
e.onInteractOutside?.(t), t.defaultPrevented || (r.current = !0, t.detail.originalEvent.type === "pointerdown" && (i.current = !0));
|
|
1477
|
+
let a = t.target;
|
|
1478
|
+
n.triggerRef.current?.contains(a) && t.preventDefault(), t.detail.originalEvent.type === "focusin" && i.current && t.preventDefault();
|
|
1479
|
+
}
|
|
1480
|
+
});
|
|
1481
|
+
}, "DialogContentNonModal")), Bn = /* @__PURE__ */ c.forwardRef(/* @__PURE__ */ Y(function(e, t) {
|
|
1482
|
+
let { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: i, onCloseAutoFocus: a, "aria-describedby": o, children: s, ...c } = e, l = X(Z, n);
|
|
1483
|
+
return dt(), /* @__PURE__ */ (0, u.jsx)(qe, {
|
|
1484
|
+
registry: l.branchRegistry,
|
|
1485
|
+
children: /* @__PURE__ */ (0, u.jsx)(Ge, {
|
|
1486
|
+
asChild: !0,
|
|
1487
|
+
loop: !0,
|
|
1488
|
+
trapped: r,
|
|
1489
|
+
branches: l.branchNodes,
|
|
1490
|
+
onMountAutoFocus: i,
|
|
1491
|
+
onUnmountAutoFocus: a,
|
|
1492
|
+
children: /* @__PURE__ */ (0, u.jsx)(Ne, {
|
|
1493
|
+
role: "dialog",
|
|
1494
|
+
id: l.contentId,
|
|
1495
|
+
"aria-labelledby": l.titlePresent ? l.titleId : void 0,
|
|
1496
|
+
"aria-describedby": l.descriptionPresent ? Gn(o, l.descriptionId) : o,
|
|
1497
|
+
"data-state": Kn(l.open),
|
|
1498
|
+
...c,
|
|
1499
|
+
ref: t,
|
|
1500
|
+
deferPointerDownOutside: !0,
|
|
1501
|
+
onDismiss: () => l.onOpenChange(!1),
|
|
1502
|
+
children: s
|
|
1503
|
+
})
|
|
1504
|
+
})
|
|
1505
|
+
});
|
|
1506
|
+
}, "DialogContentImpl")), Vn = /* @__PURE__ */ c.forwardRef(/* @__PURE__ */ Y(function(e, t) {
|
|
1507
|
+
let { __scopeDialog: n, ...r } = e, i = X("DialogTitle", n), { setTitleCount: a } = i;
|
|
1508
|
+
return b(() => (a((e) => e + 1), () => a((e) => e - 1)), [a]), /* @__PURE__ */ (0, u.jsx)(p.h2, {
|
|
1509
|
+
id: i.titleId,
|
|
1510
|
+
...r,
|
|
1511
|
+
ref: t
|
|
1512
|
+
});
|
|
1513
|
+
}, "DialogTitle")), Hn = /* @__PURE__ */ c.forwardRef(/* @__PURE__ */ Y(function(e, t) {
|
|
1514
|
+
let { __scopeDialog: n, ...r } = e, i = X("DialogDescription", n), { setDescriptionCount: a } = i;
|
|
1515
|
+
return b(() => (a((e) => e + 1), () => a((e) => e - 1)), [a]), /* @__PURE__ */ (0, u.jsx)(p.p, {
|
|
1516
|
+
id: i.descriptionId,
|
|
1517
|
+
...r,
|
|
1518
|
+
ref: t
|
|
1519
|
+
});
|
|
1520
|
+
}, "DialogDescription")), Un = "DialogClose", Wn = /* @__PURE__ */ c.forwardRef(/* @__PURE__ */ Y(function(e, t) {
|
|
1521
|
+
let { __scopeDialog: n, ...r } = e, i = X(Un, n);
|
|
1522
|
+
return /* @__PURE__ */ (0, u.jsx)(p.button, {
|
|
1523
|
+
type: "button",
|
|
1524
|
+
...r,
|
|
1525
|
+
ref: t,
|
|
1526
|
+
onClick: w(e.onClick, () => i.onOpenChange(!1))
|
|
1527
|
+
});
|
|
1528
|
+
}, "DialogClose"));
|
|
1529
|
+
function Gn(...e) {
|
|
1530
|
+
let t = /* @__PURE__ */ new Set();
|
|
1531
|
+
for (let n of e) if (typeof n == "string") for (let e of String(n).trim().split(/\s+/)) e && t.add(e);
|
|
1532
|
+
return t.size > 0 ? Array.from(t).join(" ") : void 0;
|
|
1533
|
+
}
|
|
1534
|
+
Y(Gn, "concatAriaDescribedby");
|
|
1535
|
+
function Kn(e) {
|
|
1536
|
+
return e ? "open" : "closed";
|
|
1537
|
+
}
|
|
1538
|
+
Y(Kn, "getState");
|
|
1539
|
+
//#endregion
|
|
1540
|
+
//#region src/theme/namespace.tsx
|
|
1541
|
+
var Q = a(), qn = { display: "contents" }, Jn = c.forwardRef((e, t) => {
|
|
1542
|
+
let n = (0, Q.c)(3), { children: r } = e, i;
|
|
1543
|
+
return n[0] !== r || n[1] !== t ? (i = /* @__PURE__ */ (0, u.jsx)("div", {
|
|
1544
|
+
ref: t,
|
|
1545
|
+
className: "marimo",
|
|
1546
|
+
style: qn,
|
|
1547
|
+
children: r
|
|
1548
|
+
}), n[0] = r, n[1] = t, n[2] = i) : i = n[2], i;
|
|
1549
|
+
});
|
|
1550
|
+
Jn.displayName = "StyleNamespace";
|
|
1551
|
+
//#endregion
|
|
1552
|
+
//#region src/core/vscode/is-in-vscode.ts
|
|
1553
|
+
function Yn() {
|
|
1554
|
+
return document.querySelector("[data-vscode-theme-kind]") !== null;
|
|
1555
|
+
}
|
|
1556
|
+
//#endregion
|
|
1557
|
+
//#region src/components/ui/fullscreen.tsx
|
|
1558
|
+
var Xn = "[data-vscode-output-container]", Zn = Yn() ? 0 : 30;
|
|
1559
|
+
function Qn() {
|
|
1560
|
+
let e = (0, Q.c)(1), [n, r] = (0, c.useState)(document.fullscreenElement), i;
|
|
1561
|
+
return e[0] === Symbol.for("react.memo_cache_sentinel") ? (i = () => {
|
|
1562
|
+
r(document.fullscreenElement);
|
|
1563
|
+
}, e[0] = i) : i = e[0], t(document, "fullscreenchange", i), n;
|
|
1564
|
+
}
|
|
1565
|
+
var $ = /* @__PURE__ */ new Set();
|
|
1566
|
+
function $n() {
|
|
1567
|
+
for (let e of $) e();
|
|
1568
|
+
}
|
|
1569
|
+
function er(e) {
|
|
1570
|
+
return $.size === 0 && document.addEventListener("fullscreenchange", $n), $.add(e), () => {
|
|
1571
|
+
$.delete(e), $.size === 0 && document.removeEventListener("fullscreenchange", $n);
|
|
1572
|
+
};
|
|
1573
|
+
}
|
|
1574
|
+
function tr(e) {
|
|
1575
|
+
let t = (0, Q.c)(2), n;
|
|
1576
|
+
return t[0] === e ? n = t[1] : (n = () => {
|
|
1577
|
+
let t = document.fullscreenElement;
|
|
1578
|
+
return t !== null && t === e.current;
|
|
1579
|
+
}, t[0] = e, t[1] = n), (0, c.useSyncExternalStore)(er, n);
|
|
1580
|
+
}
|
|
1581
|
+
function nr(e) {
|
|
1582
|
+
let t = (t) => {
|
|
1583
|
+
let n = (0, Q.c)(6), [r, i] = c.useState(null), a = c.useRef(null), o, s;
|
|
1584
|
+
n[0] === Symbol.for("react.memo_cache_sentinel") ? (o = () => {
|
|
1585
|
+
if (!a.current) return;
|
|
1586
|
+
let e = ir(a.current, Xn);
|
|
1587
|
+
i(e);
|
|
1588
|
+
}, s = [], n[0] = o, n[1] = s) : (o = n[0], s = n[1]), c.useLayoutEffect(o, s);
|
|
1589
|
+
let l;
|
|
1590
|
+
n[2] === Symbol.for("react.memo_cache_sentinel") ? (l = /* @__PURE__ */ (0, u.jsx)("div", {
|
|
1591
|
+
ref: a,
|
|
1592
|
+
className: "contents invisible"
|
|
1593
|
+
}), n[2] = l) : l = n[2];
|
|
1594
|
+
let d;
|
|
1595
|
+
return n[3] !== r || n[4] !== t ? (d = /* @__PURE__ */ (0, u.jsxs)(u.Fragment, { children: [l, /* @__PURE__ */ (0, u.jsx)(e, {
|
|
1596
|
+
...t,
|
|
1597
|
+
container: r
|
|
1598
|
+
})] }), n[3] = r, n[4] = t, n[5] = d) : d = n[5], d;
|
|
1599
|
+
}, n = (n) => {
|
|
1600
|
+
let r = (0, Q.c)(7), i = Qn();
|
|
1601
|
+
if (Yn()) {
|
|
1602
|
+
let e;
|
|
1603
|
+
return r[0] === n ? e = r[1] : (e = /* @__PURE__ */ (0, u.jsx)(t, { ...n }), r[0] = n, r[1] = e), e;
|
|
1604
|
+
}
|
|
1605
|
+
if (!i) {
|
|
1606
|
+
let t;
|
|
1607
|
+
return r[2] === n ? t = r[3] : (t = /* @__PURE__ */ (0, u.jsx)(e, { ...n }), r[2] = n, r[3] = t), t;
|
|
1608
|
+
}
|
|
1609
|
+
let a;
|
|
1610
|
+
return r[4] !== i || r[5] !== n ? (a = /* @__PURE__ */ (0, u.jsx)(e, {
|
|
1611
|
+
...n,
|
|
1612
|
+
container: i
|
|
1613
|
+
}), r[4] = i, r[5] = n, r[6] = a) : a = r[6], a;
|
|
1614
|
+
};
|
|
1615
|
+
return n.displayName = e.displayName, n;
|
|
1616
|
+
}
|
|
1617
|
+
function rr(e) {
|
|
1618
|
+
let t = (t) => {
|
|
1619
|
+
let n = (0, Q.c)(6), [r, i] = c.useState(null), a = c.useRef(null), o, s;
|
|
1620
|
+
n[0] === Symbol.for("react.memo_cache_sentinel") ? (o = () => {
|
|
1621
|
+
if (!a.current) return;
|
|
1622
|
+
let e = ir(a.current, Xn);
|
|
1623
|
+
i(e);
|
|
1624
|
+
}, s = [], n[0] = o, n[1] = s) : (o = n[0], s = n[1]), c.useLayoutEffect(o, s);
|
|
1625
|
+
let l;
|
|
1626
|
+
n[2] === Symbol.for("react.memo_cache_sentinel") ? (l = /* @__PURE__ */ (0, u.jsx)("div", {
|
|
1627
|
+
ref: a,
|
|
1628
|
+
className: "contents invisible"
|
|
1629
|
+
}), n[2] = l) : l = n[2];
|
|
1630
|
+
let d;
|
|
1631
|
+
return n[3] !== r || n[4] !== t ? (d = /* @__PURE__ */ (0, u.jsxs)(u.Fragment, { children: [l, /* @__PURE__ */ (0, u.jsx)(e, {
|
|
1632
|
+
...t,
|
|
1633
|
+
collisionBoundary: r
|
|
1634
|
+
})] }), n[3] = r, n[4] = t, n[5] = d) : d = n[5], d;
|
|
1635
|
+
}, n = (n) => {
|
|
1636
|
+
let r = (0, Q.c)(4);
|
|
1637
|
+
if (Yn()) {
|
|
1638
|
+
let e;
|
|
1639
|
+
return r[0] === n ? e = r[1] : (e = /* @__PURE__ */ (0, u.jsx)(t, { ...n }), r[0] = n, r[1] = e), e;
|
|
1640
|
+
}
|
|
1641
|
+
let i;
|
|
1642
|
+
return r[2] === n ? i = r[3] : (i = /* @__PURE__ */ (0, u.jsx)(e, { ...n }), r[2] = n, r[3] = i), i;
|
|
1643
|
+
};
|
|
1644
|
+
return n.displayName = e.displayName, n;
|
|
1645
|
+
}
|
|
1646
|
+
function ir(e, t) {
|
|
1647
|
+
let n = e;
|
|
1648
|
+
for (; n;) {
|
|
1649
|
+
let e = n.closest(t);
|
|
1650
|
+
if (e) return e;
|
|
1651
|
+
let r = n.getRootNode();
|
|
1652
|
+
if (n = r instanceof ShadowRoot ? r.host : n.parentElement, n === r) break;
|
|
1653
|
+
}
|
|
1654
|
+
return null;
|
|
1655
|
+
}
|
|
1656
|
+
//#endregion
|
|
1657
|
+
//#region src/components/ui/use-restore-focus.ts
|
|
1658
|
+
function ar() {
|
|
1659
|
+
let e = (0, Q.c)(3), [t, n] = (0, c.useState)(null), r;
|
|
1660
|
+
e[0] === Symbol.for("react.memo_cache_sentinel") ? (r = () => {
|
|
1661
|
+
n(document.activeElement);
|
|
1662
|
+
}, e[0] = r) : r = e[0];
|
|
1663
|
+
let i = r, a;
|
|
1664
|
+
return e[1] === t ? a = e[2] : (a = {
|
|
1665
|
+
onOpenAutoFocus: i,
|
|
1666
|
+
onCloseAutoFocus: (e) => {
|
|
1667
|
+
document.activeElement === document.body && (t instanceof HTMLElement && t.focus(), e.preventDefault());
|
|
1668
|
+
}
|
|
1669
|
+
}, e[1] = t, e[2] = a), a;
|
|
1670
|
+
}
|
|
1671
|
+
//#endregion
|
|
1672
|
+
export { j as A, Ge as C, Ne as D, Je as E, v as F, p as I, m as L, le as M, w as N, Pe as O, b as P, st as S, Ye as T, wn as _, nr as a, mt as b, Jn as c, Ln as d, Hn as f, On as g, Vn as h, tr as i, k as j, M as k, En as l, Mn as m, Zn as n, rr as o, Pn as p, Qn as r, Yn as s, ar as t, Wn as u, bn as v, qe as w, dt as x, mn as y };
|