@marimo-team/islands 0.25.3-dev2 → 0.25.3-dev200
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-CNSxdKyJ.js → ConnectedDataExplorerComponent-BsWiIPFk.js} +22 -20
- package/dist/{ErrorBoundary-DWEpirf3.js → ErrorBoundary-UWARECs-.js} +19 -19
- package/dist/{abnfDiagram-VCTEODGH-DQDjNXt3.js → abnfDiagram-VCTEODGH-I2x4Yu25.js} +2 -2
- package/dist/any-language-editor-BVFHDDQ3.js +75 -0
- package/dist/{architectureDiagram-5GKGNRK7-Nmls7Wxn.js → architectureDiagram-5GKGNRK7-1bSQMKzK.js} +1 -1
- package/dist/{arrays-CN1djC4k.js → arrays-DoQ-AILx.js} +15 -27
- package/dist/assets/__vite-browser-external-BCJsx8QS.js +1 -0
- package/dist/assets/worker-DodjWT_Z.js +113 -0
- package/dist/{button-CvjkwdSk.js → button-BQRdqQi1.js} +199 -192
- package/dist/{capabilities-CQ5IjhzL.js → capabilities-C2QUNRXi.js} +2 -2
- package/dist/{chat-ui-BDpymeoe.js → chat-ui-DXDoSuS4.js} +667 -667
- package/dist/{check-EDwSwP89.js → check-C9Mp9eCK.js} +1 -1
- package/dist/{chunk-IMKFNOWR-CoIFEo-1.js → chunk-IMKFNOWR-fsCGAJ9G.js} +1 -1
- package/dist/{chunk-SHT3W25Y-lHiGx3ZC.js → chunk-SHT3W25Y-D2STW4hj.js} +1 -1
- package/dist/{chunk-SVP7TREG-BvsHIrY_.js → chunk-SVP7TREG-CiY7cQG-.js} +1 -1
- package/dist/{chunk-TICWLB2K-BC8YIm_n.js → chunk-TICWLB2K-C_t5RBp9.js} +1 -1
- package/dist/{chunk-YOKDWASO-DPZk8vhS.js → chunk-YOKDWASO-DKplTrBY.js} +20 -20
- package/dist/{classDiagram-ZZMXUADV-Bt98lkkv.js → classDiagram-ZZMXUADV-B2JvZAP4.js} +2 -2
- package/dist/{classDiagram-v2-VYDZK3BY-D9bfbcC3.js → classDiagram-v2-VYDZK3BY-L8VsZG5A.js} +2 -2
- package/dist/{code-visibility-CLNfgCjd.js → code-visibility-33fxfX1p.js} +45 -49
- package/dist/{common-fyD_6mT2.js → common-D09oJJ8Z.js} +7354 -6884
- package/dist/{copy-icon-Ft7t9bqz.js → copy-icon-De584pZ4.js} +3 -3
- package/dist/{cynefinDiagram-5FMLGOSQ-CgWra7wt.js → cynefinDiagram-5FMLGOSQ-DdllC264.js} +1 -1
- package/dist/{dagre-GXQ25YYZ-CFZ8-35c.js → dagre-GXQ25YYZ-BaWHw4_f.js} +1 -1
- package/dist/{data-grid-overlay-editor-BmqASKep.js → data-grid-overlay-editor-lGsInXfR.js} +5 -5
- package/dist/{data-grid-types-BH_r7g7l.js → data-grid-types-0PJ-9N5n.js} +1 -1
- package/dist/{diagram-S7CK7UJ4-lCNQrW7d.js → diagram-S7CK7UJ4-pFt-tUDe.js} +1 -1
- package/dist/{diagram-UQ7AKVKN-CQPQ6pP_.js → diagram-UQ7AKVKN-DqGJiBp4.js} +1 -1
- package/dist/{diagram-VX7I27RA-Cf3b0llz.js → diagram-VX7I27RA-Dr-yzMjf.js} +1 -1
- package/dist/{diagram-Z3DM3KII-Bt4QLrpn.js → diagram-Z3DM3KII-8xzJzv-w.js} +1 -1
- package/dist/{dialog-CEBFZNyc.js → dialog-DVRfQuhD.js} +25 -25
- package/dist/{dist-F8Ep36rk.js → dist-B1M0bGO3.js} +1 -1
- package/dist/{dist-D6d86eNJ.js → dist-BA13RJj5.js} +1 -1
- package/dist/{dist-Bvs24R_E.js → dist-BJtmSgcE.js} +48 -48
- package/dist/{dist-CN_BeG2I.js → dist-Ba2VIn1K.js} +53 -53
- package/dist/{dist-PXYI_yuP.js → dist-Bj4bmwUm.js} +12 -12
- package/dist/{dist-DoE4XJBC.js → dist-BmS-ZGjl.js} +8626 -8626
- package/dist/{dist-BorMD-uX.js → dist-Bzogh7CW.js} +87 -87
- package/dist/{dist-CN8zI-XC.js → dist-CThPVKaP.js} +1385 -1382
- package/dist/{dist-DiDibOYr.js → dist-CTi5FTiV.js} +87 -87
- package/dist/{dist-diIx5qJW.js → dist-Ck_C32ye.js} +2 -2
- package/dist/{dist-BLfKmR-l.js → dist-D1fnFp1J.js} +1 -1
- package/dist/{dist-OR1OnN-y.js → dist-D3x9__Fu.js} +46 -46
- package/dist/{dist-BMQf5zIS.js → dist-D7mrh5sO.js} +36 -36
- package/dist/{dist-CSJ0MDRw.js → dist-D9Q3xjiP.js} +1 -1
- package/dist/{dist-BuaRHxOc.js → dist-DP60Ubh8.js} +2 -2
- package/dist/{dist-CSbh1PNP.js → dist-DTv9KkpW.js} +12 -12
- package/dist/{dist-D-wwqlzJ.js → dist-DVVwOfrD.js} +109 -109
- package/dist/{dist-C8fAKSH1.js → dist-DYXM73-k.js} +36 -36
- package/dist/{dist-DBtSl3sf.js → dist-DjeybPOb.js} +1 -1
- package/dist/{dist-CrSP_H1M.js → dist-DtGn9N4h.js} +197 -197
- package/dist/{dist-CLdpGQVr.js → dist-KN80qWCP.js} +2 -2
- package/dist/{dist-DpBpA_n1.js → dist-Lm-D-Vr6.js} +3 -3
- package/dist/{dist-Cg7gzw-a.js → dist-O0qFpEJh.js} +56 -56
- package/dist/{dist-CkTTIdBe.js → dist-OUle2RT7.js} +207 -207
- package/dist/{dist-BK4Oj99o.js → dist-T5rh6JvL.js} +1 -1
- package/dist/{dropdown-menu-CP_qCYHC.js → dropdown-menu-NlnsmNA6.js} +1481 -1433
- package/dist/{ebnfDiagram-PWID7BFC-D3NAyPFY.js → ebnfDiagram-PWID7BFC-Br04Wy-E.js} +2 -2
- package/dist/{erDiagram-RLTQ6QDP-Tlu09_Nm.js → erDiagram-RLTQ6QDP-D5-XVgvv.js} +1 -1
- package/dist/{error-banner-Da600cwz.js → error-banner-DxJ3s8YO.js} +89 -84
- package/dist/{cells-C8iCYvLU.js → error-entries-C2Ux0Fjt.js} +7970 -8605
- package/dist/{esm-D2gTsXEV.js → esm-Bbw_Njjx.js} +575 -575
- package/dist/{esm-AMFssoNp.js → esm-mDQNEFe_.js} +354 -354
- package/dist/feedback-button-B0CMhVv7.js +374 -0
- package/dist/{flowDiagram-HODETNUW-CAYbpJmV.js → flowDiagram-HODETNUW-CVl2kREF.js} +2 -2
- package/dist/{formats-BGh2thRc.js → formats-BCYthwyc.js} +3 -3
- package/dist/{ganttDiagram-EL5Y4UJY-BQT16JSc.js → ganttDiagram-EL5Y4UJY-Dh_4cBJZ.js} +2 -2
- package/dist/{glide-data-editor-BkjP14aq.js → glide-data-editor-CL535A5q.js} +370 -368
- package/dist/{glide-utils-DJyqh0EM.js → glide-utils-D98laidb.js} +16 -16
- package/dist/{globals-BN2O0F8N.js → globals-Bsr6T2yD.js} +3 -3
- package/dist/{highlighted-body-KPVGNVTW-zwjq21tf.js → highlighted-body-KPVGNVTW-3Ziwfz-V.js} +2 -2
- package/dist/{html-to-image-CZY1pIZH.js → html-to-image-CkH7vdBZ.js} +478 -381
- package/dist/{infoDiagram-27XIBGKW-XrDxhr0x.js → infoDiagram-27XIBGKW-BJ4vNcZE.js} +1 -1
- package/dist/{ishikawaDiagram-5VMMS53U-CD1muzov.js → ishikawaDiagram-5VMMS53U-B_Jy1Dsm.js} +1 -1
- package/dist/{kanban-definition-UXKFOSKX-Dg9W142_.js → kanban-definition-UXKFOSKX-C6MkS9vw.js} +1 -1
- package/dist/{label-BDKF3Afc.js → label-Qvw1E97W.js} +3 -3
- package/dist/{linear-Cnaq3Tfb.js → linear-DWERh7eI.js} +121 -73
- package/dist/{loader-BQOfjTIJ.js → loader-DOVB0Syl.js} +12 -12
- package/dist/main.js +9706 -7708
- package/dist/{mermaid-CiAXjLpA.js → mermaid-Bh918qrq.js} +52 -52
- package/dist/mermaid-HWGCJPDP-Du3-HPQA.js +2 -0
- package/dist/{mindmap-definition-YA3MSWOX-DgCidgYJ.js → mindmap-definition-YA3MSWOX-BP3ZTuir.js} +1 -1
- package/dist/{number-overlay-editor-BEBWJnbL.js → number-overlay-editor-CzbkG4E2.js} +3 -3
- 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-coOYYKB6.js → pegDiagram-XKGWAZYB-nNGOQtnt.js} +2 -2
- package/dist/{pieDiagram-E7YTZNPT-BnXTc3bj.js → pieDiagram-E7YTZNPT-CpRz5BZz.js} +1 -1
- package/dist/precisionRound-DhAzeRcm.js +49 -0
- package/dist/{process-output-e4jj9Ijt.js → process-output-OujAtFW4.js} +4 -4
- package/dist/{quadrantDiagram-AXDQQJYC-Ccw0xMjN.js → quadrantDiagram-AXDQQJYC-Blrm7V7_.js} +1 -1
- package/dist/{railroadDiagram-O6MQD6OU-B28-u83n.js → railroadDiagram-O6MQD6OU-BqOEN4I0.js} +2 -2
- package/dist/{react-vega-BED0DjiB.js → react-vega-C4T9Rb_w.js} +12284 -12270
- package/dist/{requirementDiagram-BXWQKSXE-CdYCTMu0.js → requirementDiagram-BXWQKSXE-CEfg6vu9.js} +1 -1
- package/dist/{reveal-component-DK69bOki.js → reveal-component-CbEK0sNX.js} +733 -710
- package/dist/{select-BButFi-d.js → select-2KOiReNY.js} +536 -457
- package/dist/{sequenceDiagram-WJ2MYXX4-CM3aRAe_.js → sequenceDiagram-WJ2MYXX4-IOmpQcOi.js} +1 -1
- package/dist/{spec-BwarBpUJ.js → spec-Dkp64vVQ.js} +41 -11
- package/dist/{stateDiagram-D77RDMKH-DOZUMVj8.js → stateDiagram-D77RDMKH-tgU-EY9_.js} +2 -2
- package/dist/{stateDiagram-v2-MP3YSRHH-CISYxma6.js → stateDiagram-v2-MP3YSRHH-BofhG6q1.js} +2 -2
- package/dist/style.css +1 -1
- package/dist/{swimlanes-42K2YHIH-BkSppxp8.js → swimlanes-42K2YHIH-DW4vWDBd.js} +1 -1
- package/dist/{swimlanesDiagram-VR7AAH4N-c8G5pGxC.js → swimlanesDiagram-VR7AAH4N-BJcrqUJr.js} +2 -2
- package/dist/{swiper-component-DKntyn8p.js → swiper-component-BVfnhbnt.js} +2 -2
- package/dist/{time-BieKwdYS.js → time-BaMbJs4z.js} +18 -18
- package/dist/{timeline-definition-24CTP7MA-CaMQayqK.js → timeline-definition-24CTP7MA-D_QU3NGs.js} +1 -1
- package/dist/{toDate-BNJf01u1.js → toDate-BNDEXbfV.js} +77 -74
- package/dist/{toast-B9UMEi8u.js → toast-B5t9o6s_.js} +219 -201
- package/dist/{tooltip-BO1REbqs.js → tooltip-s4zZxwKe.js} +325 -301
- package/dist/{use-restore-focus-BEM7sFWl.js → use-restore-focus-BgDTd2tc.js} +1482 -1433
- package/dist/{useAsyncData-Deh5kszT.js → useAsyncData-ASDni9vH.js} +15 -14
- package/dist/{useDateFormatter-D8XruNGG.js → useDateFormatter-D3Tkfzej.js} +2 -2
- package/dist/{useDeepCompareMemoize-DXwzRINI.js → useDeepCompareMemoize-B1Ogyf53.js} +1 -1
- package/dist/{useIframeCapabilities-DBETvvPl.js → useIframeCapabilities-6a_yDNXp.js} +1 -1
- package/dist/{useLifecycle-j7D9uD1o.js → useLifecycle-Bfpa2m7k.js} +28 -25
- package/dist/{useTheme-CRnjkku0.js → useTheme-5TwyOh3B.js} +522 -314
- package/dist/{vega-component-DG29TAB7.js → vega-component-BHS9UOtC.js} +158 -158
- 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-CF8pfaK3.js → vennDiagram-4TSXK5OY-YFYsNIAh.js} +1 -1
- package/dist/{wardleyDiagram-VM6X3IG4-dGPu39d-.js → wardleyDiagram-VM6X3IG4-i_n8mAWC.js} +1 -1
- package/dist/{xychartDiagram-S5SC5T6Z-CP6-9q56.js → xychartDiagram-S5SC5T6Z-BYGN95wW.js} +2 -2
- package/package.json +16 -16
- 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 +0 -3
- package/src/__tests__/fixtures/{pair-preview.ts → pair-config.ts} +3 -2
- package/src/__tests__/main.test.tsx +24 -1
- package/src/__tests__/module-entry.test.ts +44 -0
- package/src/__tests__/mount.test.ts +9 -9
- 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 +7 -2
- package/src/components/app-config/app-config-form.tsx +5 -9
- package/src/components/app-config/user-config-form.tsx +35 -0
- 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/chat-components.tsx +2 -0
- package/src/components/chat/chat-panel.tsx +20 -101
- 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__/context-menu.test.ts +176 -0
- package/src/components/data-table/__tests__/data-table.test.tsx +1 -0
- package/src/components/data-table/__tests__/date-filter-inputs.test.tsx +24 -1
- package/src/components/data-table/__tests__/date-popover.test.tsx +72 -0
- package/src/components/data-table/__tests__/export-actions.test.tsx +434 -6
- package/src/components/data-table/__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 +161 -46
- package/src/components/data-table/data-table.tsx +17 -1
- package/src/components/data-table/date-filter-inputs.tsx +15 -42
- package/src/components/data-table/date-popover.tsx +6 -4
- package/src/components/data-table/export-actions.tsx +267 -163
- package/src/components/data-table/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/schemas.ts +14 -36
- 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/data-table/utils.ts +18 -0
- 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/Output.tsx +9 -2
- package/src/components/editor/SortableCell.tsx +1 -3
- package/src/components/editor/__tests__/Output.test.tsx +50 -32
- package/src/components/editor/__tests__/agent-toast.test.tsx +58 -0
- 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 +80 -252
- package/src/components/editor/actions/__tests__/pair-with-agent-modal.test.tsx +218 -40
- package/src/components/editor/actions/__tests__/pair-with-agent.test.tsx +2 -6
- package/src/components/editor/actions/name-cell-input.tsx +4 -3
- package/src/components/editor/actions/pair-with-agent-commands.ts +44 -53
- package/src/components/editor/actions/pair-with-agent-modal.tsx +101 -38
- package/src/components/editor/actions/useCellActionButton.tsx +26 -31
- package/src/components/editor/actions/useConfigActions.tsx +3 -4
- package/src/components/editor/actions/useNotebookActions.tsx +19 -23
- 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/agent-toast.ts +15 -0
- 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 +3 -1
- 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 +36 -43
- 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/error-panel.tsx +1 -0
- 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 +363 -0
- 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 +61 -2
- package/src/components/editor/chrome/wrapper/footer-item.tsx +32 -24
- package/src/components/editor/chrome/wrapper/footer-items/attachment-status.tsx +237 -0
- 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 +4 -0
- 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 +536 -0
- package/src/components/editor/errors/auto-fix.tsx +4 -8
- package/src/components/editor/errors/send-error-report-button.tsx +66 -0
- 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__/status.test.tsx +5 -3
- package/src/components/editor/header/app-header.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 -31
- package/src/components/editor/output/MarimoErrorOutput.tsx +23 -6
- package/src/components/editor/output/MarimoTracebackOutput.tsx +54 -37
- package/src/components/editor/output/Outputs.css +8 -0
- package/src/components/editor/output/__tests__/ansi-reduce.test.ts +18 -0
- package/src/components/editor/output/__tests__/traceback.test.tsx +27 -1
- package/src/components/editor/output/ansi-reduce.ts +36 -17
- 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 +97 -0
- package/src/components/scratchpad/scratchpad.tsx +20 -11
- 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__/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/range-slider.tsx +22 -9
- package/src/core/MarimoApp.tsx +1 -1
- package/src/core/ai/__tests__/staged-cells.test.ts +27 -26
- 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 +15 -18
- 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 +256 -2477
- package/src/core/cells/__tests__/collapseConsoleOutputs.test.ts +54 -0
- package/src/core/cells/__tests__/document.test.ts +341 -0
- package/src/core/cells/__tests__/editor.test.ts +57 -0
- package/src/core/cells/__tests__/error-report.test.ts +139 -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 +120 -0
- package/src/core/cells/__tests__/outputs.test.tsx +71 -53
- package/src/core/cells/__tests__/session.test.ts +493 -210
- package/src/core/cells/__tests__/utils.test.ts +9 -108
- package/src/core/cells/__tests__/with-document-save.test.ts +67 -0
- package/src/core/cells/actions.ts +636 -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 +120 -1337
- package/src/core/cells/columns.ts +38 -0
- package/src/core/cells/document.ts +289 -0
- package/src/core/cells/edit.ts +30 -0
- package/src/core/cells/editor.ts +82 -0
- package/src/core/cells/error-report.ts +63 -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 +104 -54
- package/src/core/cells/types.ts +22 -6
- package/src/core/cells/utils.ts +10 -8
- 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 +42 -1
- package/src/core/codemirror/cells/extensions.ts +27 -9
- package/src/core/codemirror/cells/state.ts +1 -1
- 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 -5
- 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/readonly/__tests__/extension.test.ts +1 -1
- package/src/core/codemirror/readonly/extension.ts +2 -2
- package/src/core/codemirror/rtc/extension.ts +24 -13
- package/src/core/codemirror/rtc/loro/awareness.ts +34 -19
- package/src/core/codemirror/rtc/loro/sync.ts +1 -0
- 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 +13 -6
- package/src/core/config/config-schema.ts +13 -3
- package/src/core/config/config.ts +26 -12
- package/src/core/config/pair.ts +5 -3
- 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 +72 -25
- package/src/core/islands/bootstrap.ts +46 -53
- package/src/core/islands/bridge.ts +74 -23
- 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 +5 -3
- package/src/core/network/requests-lazy.ts +1 -4
- package/src/core/network/requests-network.ts +0 -25
- package/src/core/network/requests-static.ts +0 -3
- package/src/core/network/requests-toasting.tsx +0 -3
- package/src/core/network/types.ts +0 -12
- 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 +586 -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__/hold.test.ts +88 -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 +105 -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 +418 -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/notebook/replica/__tests__/attachments.test.ts +56 -0
- package/src/core/notebook/replica/__tests__/document.test.ts +126 -0
- package/src/core/notebook/replica/__tests__/fixtures.ts +79 -0
- package/src/core/notebook/replica/__tests__/replica.test.ts +550 -0
- package/src/core/notebook/replica/backend.ts +19 -0
- package/src/core/{websocket/types.ts → notebook/replica/connection.ts} +10 -15
- package/src/core/notebook/replica/index.ts +13 -0
- package/src/core/notebook/replica/replica.ts +286 -0
- package/src/core/notebook/replica/resources/attachments.ts +22 -0
- package/src/core/notebook/replica/resources/document.ts +101 -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 +33 -15
- package/src/core/runtime/adapter.ts +1 -1
- package/src/core/runtime/config.ts +2 -2
- package/src/core/runtime/runtime.ts +39 -30
- package/src/core/saving/__tests__/state.test.ts +111 -0
- package/src/core/saving/__tests__/useAutoSave.test.tsx +67 -0
- package/src/core/saving/filename.ts +1 -1
- package/src/core/saving/save-component.tsx +28 -36
- 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/__tests__/useMarimoKernelConnection.hook.test.tsx → session/__tests__/useNotebookSession.hook.test.tsx} +252 -185
- package/src/core/session/active-notebook.ts +22 -0
- package/src/core/session/backend.ts +123 -0
- package/src/core/session/embedded.ts +7 -0
- package/src/core/session/types.ts +17 -0
- package/src/core/session/useNotebookReplica.ts +74 -0
- package/src/core/{websocket/useMarimoKernelConnection.tsx → session/useNotebookSession.tsx} +120 -273
- 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/__tests__/useMarimoKernelConnection.test.ts → transports/__tests__/connection-state.test.ts} +16 -30
- 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/transports/connection-state.ts +63 -0
- 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/wasm/__tests__/bridge.test.ts +214 -50
- package/src/core/wasm/__tests__/worker.test.ts +187 -0
- package/src/core/wasm/bridge.ts +75 -69
- 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 +88 -44
- 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 +23 -14
- 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 +471 -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 +43 -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/RoutesPlugin.tsx +1 -1
- 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 +2 -5
- 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__/dates.test.ts +116 -0
- 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/dates.ts +94 -0
- package/src/utils/maps.ts +0 -3
- package/src/utils/numbers.ts +79 -18
- package/src/utils/objects.ts +4 -9
- package/src/utils/once.ts +19 -19
- package/src/utils/tracer.ts +9 -5
- package/src/utils/zod-utils.ts +1 -3
- package/dist/any-language-editor-B9REGlD9.js +0 -76
- package/dist/assets/__vite-browser-external-BXYkiFsk.js +0 -1
- package/dist/assets/worker-HPY9fbhz.js +0 -114
- package/dist/error-entries-CzoYkIQZ.js +0 -56
- package/dist/feedback-button-fND8YT59.js +0 -380
- package/dist/mermaid-HWGCJPDP-ByCsZnYF.js +0 -2
- package/dist/precisionRound-DMIVQrt2.js +0 -97
- 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/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/host/AGENTS.md +0 -6
- package/src/core/host/__tests__/protocol.test.ts +0 -214
- package/src/core/host/protocol.ts +0 -1943
- 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__/useWebSocket.test.ts +0 -49
- package/src/core/websocket/transports/__tests__/basic.test.ts +0 -275
- package/src/core/websocket/transports/__tests__/sse.test.ts +0 -338
- 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/sse.ts +0 -308
- package/src/core/websocket/transports/transport.ts +0 -61
- package/src/core/websocket/transports/ws.ts +0 -98
- package/src/core/websocket/useWebSocket.tsx +0 -88
- package/src/utils/__tests__/id-tree.test.ts +0 -2145
- package/src/utils/id-tree.tsx +0 -1134
- /package/src/core/{websocket → session}/connection-utils.ts +0 -0
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { a as e, t } from "./rolldown-runtime-Cb76FRpK.js";
|
|
2
|
-
import { g as n, h as r, p as i, r as a, t as o, u as s } from "./button-
|
|
2
|
+
import { g as n, h as r, p as i, r as a, t as o, u as s } from "./button-BQRdqQi1.js";
|
|
3
3
|
import { t as c } from "./react-sHtZdjeP.js";
|
|
4
4
|
import { t as l } from "./compiler-runtime-CldRdSsv.js";
|
|
5
|
-
import { n as u, t as d } from "./copy-icon-
|
|
6
|
-
import { a as f, c as p, l as m, s as h, t as g } from "./chunk-YOKDWASO-
|
|
7
|
-
import { c as _,
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { t as
|
|
13
|
-
import { Ct as
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import { t as
|
|
5
|
+
import { n as u, t as d } from "./copy-icon-De584pZ4.js";
|
|
6
|
+
import { a as f, c as p, l as m, s as h, t as g } from "./chunk-YOKDWASO-DKplTrBY.js";
|
|
7
|
+
import { c as _, l as v, m as y, s as b, t as x, u as ee } from "./tooltip-s4zZxwKe.js";
|
|
8
|
+
import { $ as te, $t as ne, B as re, Bt as ie, E as ae, Ft as oe, It as se, Lt as ce, Ot as le, Pt as ue, Rt as de, T as fe, a as pe, d as me, j as he, nt as ge, q as _e, z as ve } from "./error-entries-C2Ux0Fjt.js";
|
|
9
|
+
import { D as ye, M as be, k as xe } from "./select-2KOiReNY.js";
|
|
10
|
+
import { J as Se, pt as Ce } from "./dropdown-menu-NlnsmNA6.js";
|
|
11
|
+
import { m as we, y as Te } from "./toDate-BNDEXbfV.js";
|
|
12
|
+
import { t as Ee } from "./jsx-runtime-3BD1kT0s.js";
|
|
13
|
+
import { $ as De, Ct as S, Dt as Oe, Et as C, Ot as ke, Q as Ae, Tt as w, Y as je, _t as Me, bt as Ne, dt as Pe, ft as Fe, gt as Ie, ht as Le, kt as T, mt as Re, tt as ze, vt as Be, wt as Ve, yt as He } from "./use-restore-focus-BgDTd2tc.js";
|
|
14
|
+
import { C as Ue, F as We, M as E, N as Ge, O as Ke, R as qe, b as Je, l as Ye, n as Xe } from "./useTheme-5TwyOh3B.js";
|
|
15
|
+
import { G as Ze } from "./dist-BmS-ZGjl.js";
|
|
16
|
+
import { t as Qe } from "./useAsyncData-ASDni9vH.js";
|
|
17
17
|
//#region ../node_modules/.pnpm/domelementtype@2.3.0/node_modules/domelementtype/lib/index.js
|
|
18
|
-
var
|
|
18
|
+
var $e = /* @__PURE__ */ t(((e) => {
|
|
19
19
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.Doctype = e.CDATA = e.Tag = e.Style = e.Script = e.Comment = e.Directive = e.Text = e.Root = e.isTag = e.ElementType = void 0;
|
|
20
20
|
var t;
|
|
21
21
|
(function(e) {
|
|
@@ -25,7 +25,7 @@ var Ze = /* @__PURE__ */ t(((e) => {
|
|
|
25
25
|
return e.type === t.Tag || e.type === t.Script || e.type === t.Style;
|
|
26
26
|
}
|
|
27
27
|
e.isTag = n, e.Root = t.Root, e.Text = t.Text, e.Directive = t.Directive, e.Comment = t.Comment, e.Script = t.Script, e.Style = t.Style, e.Tag = t.Tag, e.CDATA = t.CDATA, e.Doctype = t.Doctype;
|
|
28
|
-
})),
|
|
28
|
+
})), et = /* @__PURE__ */ t(((e) => {
|
|
29
29
|
var t = e && e.__extends || (function() {
|
|
30
30
|
var e = function(t, n) {
|
|
31
31
|
return e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, t) {
|
|
@@ -49,7 +49,7 @@ var Ze = /* @__PURE__ */ t(((e) => {
|
|
|
49
49
|
}, n.apply(this, arguments);
|
|
50
50
|
};
|
|
51
51
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.cloneNode = e.hasChildren = e.isDocument = e.isDirective = e.isComment = e.isText = e.isCDATA = e.isTag = e.Element = e.Document = e.CDATA = e.NodeWithChildren = e.ProcessingInstruction = e.Comment = e.Text = e.DataNode = e.Node = void 0;
|
|
52
|
-
var r =
|
|
52
|
+
var r = $e(), i = function() {
|
|
53
53
|
function e() {
|
|
54
54
|
this.parent = null, this.prev = null, this.next = null, this.startIndex = null, this.endIndex = null;
|
|
55
55
|
}
|
|
@@ -308,7 +308,7 @@ var Ze = /* @__PURE__ */ t(((e) => {
|
|
|
308
308
|
}), n = 1; n < t.length; n++) t[n].prev = t[n - 1], t[n - 1].next = t[n];
|
|
309
309
|
return t;
|
|
310
310
|
}
|
|
311
|
-
})),
|
|
311
|
+
})), tt = /* @__PURE__ */ t(((e) => {
|
|
312
312
|
var t = e && e.__createBinding || (Object.create ? (function(e, t, n, r) {
|
|
313
313
|
r === void 0 && (r = n);
|
|
314
314
|
var i = Object.getOwnPropertyDescriptor(t, n);
|
|
@@ -324,8 +324,8 @@ var Ze = /* @__PURE__ */ t(((e) => {
|
|
|
324
324
|
for (var r in e) r !== "default" && !Object.prototype.hasOwnProperty.call(n, r) && t(n, e, r);
|
|
325
325
|
};
|
|
326
326
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.DomHandler = void 0;
|
|
327
|
-
var r =
|
|
328
|
-
n(
|
|
327
|
+
var r = $e(), i = et();
|
|
328
|
+
n(et(), e);
|
|
329
329
|
var a = {
|
|
330
330
|
withStartIndices: !1,
|
|
331
331
|
withEndIndices: !1,
|
|
@@ -382,13 +382,13 @@ var Ze = /* @__PURE__ */ t(((e) => {
|
|
|
382
382
|
}, e;
|
|
383
383
|
}();
|
|
384
384
|
e.DomHandler = o, e.default = o;
|
|
385
|
-
})),
|
|
385
|
+
})), nt = /* @__PURE__ */ t(((e) => {
|
|
386
386
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.CARRIAGE_RETURN_PLACEHOLDER_REGEX = e.CARRIAGE_RETURN_PLACEHOLDER = e.CARRIAGE_RETURN_REGEX = e.CARRIAGE_RETURN = e.CASE_SENSITIVE_TAG_NAMES_MAP = e.CASE_SENSITIVE_TAG_NAMES = void 0, e.CASE_SENSITIVE_TAG_NAMES = /* @__PURE__ */ "animateMotion.animateTransform.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.linearGradient.radialGradient.textPath".split("."), e.CASE_SENSITIVE_TAG_NAMES_MAP = e.CASE_SENSITIVE_TAG_NAMES.reduce(function(e, t) {
|
|
387
387
|
return e[t.toLowerCase()] = t, e;
|
|
388
388
|
}, {}), e.CARRIAGE_RETURN = "\r", e.CARRIAGE_RETURN_REGEX = new RegExp(e.CARRIAGE_RETURN, "g"), e.CARRIAGE_RETURN_PLACEHOLDER = `__HTML_DOM_PARSER_CARRIAGE_RETURN_PLACEHOLDER_${Date.now().toString()}__`, e.CARRIAGE_RETURN_PLACEHOLDER_REGEX = new RegExp(e.CARRIAGE_RETURN_PLACEHOLDER, "g");
|
|
389
|
-
})),
|
|
389
|
+
})), rt = /* @__PURE__ */ t(((e) => {
|
|
390
390
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.formatAttributes = i, e.hasOpenTag = o, e.escapeSpecialCharacters = s, e.revertEscapedCharacters = c, e.formatDOM = l;
|
|
391
|
-
var t =
|
|
391
|
+
var t = tt(), n = nt();
|
|
392
392
|
function r(e) {
|
|
393
393
|
return n.CASE_SENSITIVE_TAG_NAMES_MAP[e];
|
|
394
394
|
}
|
|
@@ -436,9 +436,9 @@ var Ze = /* @__PURE__ */ t(((e) => {
|
|
|
436
436
|
}
|
|
437
437
|
return r && (s = new t.ProcessingInstruction(r.substring(0, r.indexOf(" ")).toLowerCase(), r), s.next = o[0] ?? null, s.parent = n, o.unshift(s), o[1] && (o[1].prev = o[0])), o;
|
|
438
438
|
}
|
|
439
|
-
})),
|
|
439
|
+
})), it = /* @__PURE__ */ t(((e) => {
|
|
440
440
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = h;
|
|
441
|
-
var t =
|
|
441
|
+
var t = rt(), n = "html", r = "head", i = "body", a = /<([a-zA-Z]+[0-9]?)/, o = function(e, t) {
|
|
442
442
|
throw Error("This browser does not support `document.implementation.createHTMLDocument`");
|
|
443
443
|
}, s = function(e, t) {
|
|
444
444
|
throw Error("This browser does not support `DOMParser.prototype.parseFromString`");
|
|
@@ -497,19 +497,19 @@ var Ze = /* @__PURE__ */ t(((e) => {
|
|
|
497
497
|
return f?.childNodes ?? m();
|
|
498
498
|
}
|
|
499
499
|
}
|
|
500
|
-
})),
|
|
500
|
+
})), at = /* @__PURE__ */ t(((e) => {
|
|
501
501
|
var t = e && e.__importDefault || function(e) {
|
|
502
502
|
return e && e.__esModule ? e : { default: e };
|
|
503
503
|
};
|
|
504
504
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = a;
|
|
505
|
-
var n = t(
|
|
505
|
+
var n = t(it()), r = rt(), i = /<(![a-zA-Z\s]+)>/;
|
|
506
506
|
function a(e) {
|
|
507
507
|
if (typeof e != "string") throw TypeError("First argument must be a string");
|
|
508
508
|
if (!e) return [];
|
|
509
509
|
var t = i.exec(e), a = t ? t[1] : void 0;
|
|
510
510
|
return (0, r.formatDOM)((0, n.default)(e), null, a);
|
|
511
511
|
}
|
|
512
|
-
})),
|
|
512
|
+
})), ot = /* @__PURE__ */ t(((e) => {
|
|
513
513
|
e.SAME = 0, e.CAMELCASE = 1, e.possibleStandardNames = {
|
|
514
514
|
accept: 0,
|
|
515
515
|
acceptCharset: 1,
|
|
@@ -995,7 +995,7 @@ var Ze = /* @__PURE__ */ t(((e) => {
|
|
|
995
995
|
z: 0,
|
|
996
996
|
zoomAndPan: 1
|
|
997
997
|
};
|
|
998
|
-
})),
|
|
998
|
+
})), st = /* @__PURE__ */ t(((e) => {
|
|
999
999
|
var t = 0, n = 1, r = 2, i = 3, a = 4, o = 5, s = 6;
|
|
1000
1000
|
function c(e) {
|
|
1001
1001
|
return u.hasOwnProperty(e) ? u[e] : null;
|
|
@@ -1114,12 +1114,12 @@ var Ze = /* @__PURE__ */ t(((e) => {
|
|
|
1114
1114
|
].forEach((e) => {
|
|
1115
1115
|
u[e] = new l(e, n, !1, e.toLowerCase(), null, !0, !0);
|
|
1116
1116
|
});
|
|
1117
|
-
var { CAMELCASE: m, SAME: h, possibleStandardNames: g } =
|
|
1117
|
+
var { CAMELCASE: m, SAME: h, possibleStandardNames: g } = ot(), _ = RegExp.prototype.test.bind(/* @__PURE__ */ RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$")), v = Object.keys(g).reduce((e, t) => {
|
|
1118
1118
|
let n = g[t];
|
|
1119
1119
|
return n === h ? e[t] = t : n === m ? e[t.toLowerCase()] = t : e[t] = n, e;
|
|
1120
1120
|
}, {});
|
|
1121
1121
|
e.BOOLEAN = i, e.BOOLEANISH_STRING = r, e.NUMERIC = o, e.OVERLOADED_BOOLEAN = a, e.POSITIVE_NUMERIC = s, e.RESERVED = t, e.STRING = n, e.getPropertyInfo = c, e.isCustomAttribute = _, e.possibleStandardNames = v;
|
|
1122
|
-
})),
|
|
1122
|
+
})), ct = /* @__PURE__ */ t(((e) => {
|
|
1123
1123
|
var t = e && e.__importDefault || function(e) {
|
|
1124
1124
|
return e && e.__esModule ? e : { default: e };
|
|
1125
1125
|
};
|
|
@@ -1166,9 +1166,9 @@ var Ze = /* @__PURE__ */ t(((e) => {
|
|
|
1166
1166
|
}, e.returnFirstArg = function(e) {
|
|
1167
1167
|
return e;
|
|
1168
1168
|
};
|
|
1169
|
-
})),
|
|
1169
|
+
})), lt = /* @__PURE__ */ t(((e) => {
|
|
1170
1170
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = o;
|
|
1171
|
-
var t =
|
|
1171
|
+
var t = st(), n = ct(), r = ["checked", "value"], i = [
|
|
1172
1172
|
"input",
|
|
1173
1173
|
"select",
|
|
1174
1174
|
"textarea"
|
|
@@ -1203,12 +1203,12 @@ var Ze = /* @__PURE__ */ t(((e) => {
|
|
|
1203
1203
|
function s(e) {
|
|
1204
1204
|
return t.possibleStandardNames[e];
|
|
1205
1205
|
}
|
|
1206
|
-
})),
|
|
1206
|
+
})), ut = /* @__PURE__ */ t(((e) => {
|
|
1207
1207
|
var t = e && e.__importDefault || function(e) {
|
|
1208
1208
|
return e && e.__esModule ? e : { default: e };
|
|
1209
1209
|
};
|
|
1210
1210
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = o;
|
|
1211
|
-
var n = c(), r = t(
|
|
1211
|
+
var n = c(), r = t(lt()), i = ct(), a = {
|
|
1212
1212
|
cloneElement: n.cloneElement,
|
|
1213
1213
|
createElement: n.createElement,
|
|
1214
1214
|
isValidElement: n.isValidElement
|
|
@@ -1250,16 +1250,16 @@ var Ze = /* @__PURE__ */ t(((e) => {
|
|
|
1250
1250
|
function s(e) {
|
|
1251
1251
|
return i.PRESERVE_CUSTOM_ATTRIBUTES && e.type === "tag" && (0, i.isCustomComponent)(e.name, e.attribs);
|
|
1252
1252
|
}
|
|
1253
|
-
})),
|
|
1253
|
+
})), dt = /* @__PURE__ */ t(((e) => {
|
|
1254
1254
|
var t = e && e.__importDefault || function(e) {
|
|
1255
1255
|
return e && e.__esModule ? e : { default: e };
|
|
1256
1256
|
};
|
|
1257
1257
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.htmlToDOM = e.domToReact = e.attributesToProps = e.Text = e.ProcessingInstruction = e.Element = e.Comment = void 0, e.default = o;
|
|
1258
|
-
var n = t(
|
|
1259
|
-
e.htmlToDOM = n.default, e.attributesToProps = t(
|
|
1260
|
-
var r = t(
|
|
1258
|
+
var n = t(at());
|
|
1259
|
+
e.htmlToDOM = n.default, e.attributesToProps = t(lt()).default;
|
|
1260
|
+
var r = t(ut());
|
|
1261
1261
|
e.domToReact = r.default;
|
|
1262
|
-
var i =
|
|
1262
|
+
var i = tt();
|
|
1263
1263
|
Object.defineProperty(e, "Comment", {
|
|
1264
1264
|
enumerable: !0,
|
|
1265
1265
|
get: function() {
|
|
@@ -1286,7 +1286,7 @@ var Ze = /* @__PURE__ */ t(((e) => {
|
|
|
1286
1286
|
if (typeof e != "string") throw TypeError("First argument must be a string");
|
|
1287
1287
|
return e ? (0, r.default)((0, n.default)(e, t?.htmlparser2 ?? a), t) : [];
|
|
1288
1288
|
}
|
|
1289
|
-
})), D = /* @__PURE__ */ e(c(), 1), O = l(), k = /* @__PURE__ */ e(
|
|
1289
|
+
})), D = /* @__PURE__ */ e(c(), 1), O = l(), k = /* @__PURE__ */ e(dt(), 1), ft = k.default.default || k.default, pt = y("between-horizontal-start", [
|
|
1290
1290
|
["rect", {
|
|
1291
1291
|
width: "13",
|
|
1292
1292
|
height: "7",
|
|
@@ -1307,10 +1307,10 @@ var Ze = /* @__PURE__ */ t(((e) => {
|
|
|
1307
1307
|
rx: "1",
|
|
1308
1308
|
key: "1q5fc1"
|
|
1309
1309
|
}]
|
|
1310
|
-
]),
|
|
1310
|
+
]), mt = y("loader-circle", [["path", {
|
|
1311
1311
|
d: "M21 12a9 9 0 1 1-6.219-8.56",
|
|
1312
1312
|
key: "13zald"
|
|
1313
|
-
}]]),
|
|
1313
|
+
}]]), ht = y("trash-2", [
|
|
1314
1314
|
["path", {
|
|
1315
1315
|
d: "M10 11v6",
|
|
1316
1316
|
key: "nco0om"
|
|
@@ -1331,61 +1331,61 @@ var Ze = /* @__PURE__ */ t(((e) => {
|
|
|
1331
1331
|
d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",
|
|
1332
1332
|
key: "e791ji"
|
|
1333
1333
|
}]
|
|
1334
|
-
]),
|
|
1334
|
+
]), gt = y("wrench", [["path", {
|
|
1335
1335
|
d: "M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",
|
|
1336
1336
|
key: "1ngwbx"
|
|
1337
|
-
}]]), A =
|
|
1337
|
+
}]]), A = Ee(), _t = Object.defineProperty, j = (e, t) => _t(e, "name", {
|
|
1338
1338
|
value: t,
|
|
1339
1339
|
configurable: !0
|
|
1340
|
-
}),
|
|
1341
|
-
let { __scopeCollapsible: n, open: r, defaultOpen: i, disabled: a, onOpenChange: o, ...s } = e, [c, l] =
|
|
1340
|
+
}), vt = "Collapsible", [yt, bt] = ke(vt), [xt, St] = yt(vt), Ct = /* @__PURE__ */ D.forwardRef(/* @__PURE__ */ j(function(e, t) {
|
|
1341
|
+
let { __scopeCollapsible: n, open: r, defaultOpen: i, disabled: a, onOpenChange: o, ...s } = e, [c, l] = w({
|
|
1342
1342
|
prop: r,
|
|
1343
1343
|
defaultProp: i ?? !1,
|
|
1344
1344
|
onChange: o,
|
|
1345
|
-
caller:
|
|
1345
|
+
caller: vt
|
|
1346
1346
|
});
|
|
1347
|
-
return /* @__PURE__ */ (0, A.jsx)(
|
|
1347
|
+
return /* @__PURE__ */ (0, A.jsx)(xt, {
|
|
1348
1348
|
scope: n,
|
|
1349
1349
|
disabled: a,
|
|
1350
|
-
contentId:
|
|
1350
|
+
contentId: S(),
|
|
1351
1351
|
open: c,
|
|
1352
1352
|
onOpenToggle: D.useCallback(() => l((e) => !e), [l]),
|
|
1353
|
-
children: /* @__PURE__ */ (0, A.jsx)(
|
|
1354
|
-
"data-state":
|
|
1353
|
+
children: /* @__PURE__ */ (0, A.jsx)(T.div, {
|
|
1354
|
+
"data-state": M(c),
|
|
1355
1355
|
"data-disabled": a ? "" : void 0,
|
|
1356
1356
|
...s,
|
|
1357
1357
|
ref: t
|
|
1358
1358
|
})
|
|
1359
1359
|
});
|
|
1360
|
-
}, "Collapsible")),
|
|
1361
|
-
let { __scopeCollapsible: n, ...r } = e, i =
|
|
1362
|
-
return /* @__PURE__ */ (0, A.jsx)(
|
|
1360
|
+
}, "Collapsible")), wt = "CollapsibleTrigger", Tt = /* @__PURE__ */ D.forwardRef(/* @__PURE__ */ j(function(e, t) {
|
|
1361
|
+
let { __scopeCollapsible: n, ...r } = e, i = St(wt, n);
|
|
1362
|
+
return /* @__PURE__ */ (0, A.jsx)(T.button, {
|
|
1363
1363
|
type: "button",
|
|
1364
1364
|
"aria-controls": i.open ? i.contentId : void 0,
|
|
1365
1365
|
"aria-expanded": i.open || !1,
|
|
1366
|
-
"data-state":
|
|
1366
|
+
"data-state": M(i.open),
|
|
1367
1367
|
"data-disabled": i.disabled ? "" : void 0,
|
|
1368
1368
|
disabled: i.disabled,
|
|
1369
1369
|
...r,
|
|
1370
1370
|
ref: t,
|
|
1371
|
-
onClick:
|
|
1371
|
+
onClick: C(e.onClick, i.onOpenToggle)
|
|
1372
1372
|
});
|
|
1373
|
-
}, "CollapsibleTrigger")),
|
|
1374
|
-
let { forceMount: n, ...r } = e, i =
|
|
1375
|
-
return /* @__PURE__ */ (0, A.jsx)(
|
|
1373
|
+
}, "CollapsibleTrigger")), Et = "CollapsibleContent", Dt = /* @__PURE__ */ D.forwardRef(/* @__PURE__ */ j(function(e, t) {
|
|
1374
|
+
let { forceMount: n, ...r } = e, i = St(Et, e.__scopeCollapsible);
|
|
1375
|
+
return /* @__PURE__ */ (0, A.jsx)(Ve, {
|
|
1376
1376
|
present: n || i.open,
|
|
1377
|
-
children: ({ present: e }) => /* @__PURE__ */ (0, A.jsx)(
|
|
1377
|
+
children: ({ present: e }) => /* @__PURE__ */ (0, A.jsx)(Ot, {
|
|
1378
1378
|
...r,
|
|
1379
1379
|
ref: t,
|
|
1380
1380
|
present: e
|
|
1381
1381
|
})
|
|
1382
1382
|
});
|
|
1383
|
-
}, "CollapsibleContent")),
|
|
1384
|
-
let { __scopeCollapsible: n, present: r, children: a, ...o } = e, s =
|
|
1383
|
+
}, "CollapsibleContent")), Ot = /* @__PURE__ */ D.forwardRef(/* @__PURE__ */ j(function(e, t) {
|
|
1384
|
+
let { __scopeCollapsible: n, present: r, children: a, ...o } = e, s = St(Et, n), [c, l] = D.useState(r), u = D.useRef(null), d = i(t, u), f = D.useRef(0), p = f.current, m = D.useRef(0), h = m.current, g = s.open || c, _ = D.useRef(g), v = D.useRef(void 0);
|
|
1385
1385
|
return D.useEffect(() => {
|
|
1386
1386
|
let e = requestAnimationFrame(() => _.current = !1);
|
|
1387
1387
|
return () => cancelAnimationFrame(e);
|
|
1388
|
-
}, []),
|
|
1388
|
+
}, []), Oe(() => {
|
|
1389
1389
|
let e = u.current;
|
|
1390
1390
|
if (e) {
|
|
1391
1391
|
v.current = v.current || {
|
|
@@ -1395,8 +1395,8 @@ var Ze = /* @__PURE__ */ t(((e) => {
|
|
|
1395
1395
|
let t = e.getBoundingClientRect();
|
|
1396
1396
|
f.current = t.height, m.current = t.width, _.current || (e.style.transitionDuration = v.current.transitionDuration, e.style.animationName = v.current.animationName), l(r);
|
|
1397
1397
|
}
|
|
1398
|
-
}, [s.open, r]), /* @__PURE__ */ (0, A.jsx)(
|
|
1399
|
-
"data-state":
|
|
1398
|
+
}, [s.open, r]), /* @__PURE__ */ (0, A.jsx)(T.div, {
|
|
1399
|
+
"data-state": M(s.open),
|
|
1400
1400
|
"data-disabled": s.disabled ? "" : void 0,
|
|
1401
1401
|
id: s.contentId,
|
|
1402
1402
|
hidden: !g,
|
|
@@ -1410,113 +1410,125 @@ var Ze = /* @__PURE__ */ t(((e) => {
|
|
|
1410
1410
|
children: g && a
|
|
1411
1411
|
});
|
|
1412
1412
|
}, "CollapsibleContentImpl"));
|
|
1413
|
-
function
|
|
1413
|
+
function M(e) {
|
|
1414
1414
|
return e ? "open" : "closed";
|
|
1415
1415
|
}
|
|
1416
|
-
j(
|
|
1417
|
-
|
|
1416
|
+
j(M, "getState");
|
|
1417
|
+
//#endregion
|
|
1418
|
+
//#region ../node_modules/.pnpm/@radix-ui+react-accordion@1.3.1_@types+react-dom@19.3.0_@types+react@19.3.0__@types+rea_abc4d855e45dd0aac37149041714f617/node_modules/@radix-ui/react-accordion/dist/index.mjs
|
|
1419
|
+
var kt = Object.defineProperty, N = (e, t) => kt(e, "name", {
|
|
1418
1420
|
value: t,
|
|
1419
1421
|
configurable: !0
|
|
1420
|
-
}),
|
|
1422
|
+
}), At = {
|
|
1423
|
+
Single: "single",
|
|
1424
|
+
Multiple: "multiple"
|
|
1425
|
+
}, P = {
|
|
1426
|
+
Vertical: "vertical",
|
|
1427
|
+
Horizontal: "horizontal"
|
|
1428
|
+
}, jt = {
|
|
1429
|
+
LTR: "ltr",
|
|
1430
|
+
RTL: "rtl"
|
|
1431
|
+
}, F = "Accordion", Mt = [
|
|
1421
1432
|
"Home",
|
|
1422
1433
|
"End",
|
|
1423
1434
|
"ArrowDown",
|
|
1424
1435
|
"ArrowUp",
|
|
1425
1436
|
"ArrowLeft",
|
|
1426
1437
|
"ArrowRight"
|
|
1427
|
-
], [
|
|
1438
|
+
], [Nt, { useGetCollection: Pt, createCollectionScope: Ft }] = xe(F), [I, It] = ke(F, [Ft, bt]), L = bt(), Lt = /* @__PURE__ */ D.forwardRef(/* @__PURE__ */ N(function(e, t) {
|
|
1428
1439
|
let { type: n, ...r } = e, i = r, a = r;
|
|
1429
|
-
return /* @__PURE__ */ (0, A.jsx)(
|
|
1440
|
+
return /* @__PURE__ */ (0, A.jsx)(Nt.Provider, {
|
|
1430
1441
|
scope: e.__scopeAccordion,
|
|
1431
|
-
children: n ===
|
|
1442
|
+
children: n === At.Multiple ? /* @__PURE__ */ (0, A.jsx)(Ut, {
|
|
1432
1443
|
...a,
|
|
1433
1444
|
ref: t
|
|
1434
|
-
}) : /* @__PURE__ */ (0, A.jsx)(
|
|
1445
|
+
}) : /* @__PURE__ */ (0, A.jsx)(Ht, {
|
|
1435
1446
|
...i,
|
|
1436
1447
|
ref: t
|
|
1437
1448
|
})
|
|
1438
1449
|
});
|
|
1439
|
-
}, "Accordion")), [
|
|
1440
|
-
let { value: n, defaultValue: r, onValueChange: i = /* @__PURE__ */
|
|
1450
|
+
}, "Accordion")), [Rt, zt] = I(F), [Bt, Vt] = I(F, { collapsible: !1 }), Ht = /* @__PURE__ */ D.forwardRef(/* @__PURE__ */ N(function(e, t) {
|
|
1451
|
+
let { value: n, defaultValue: r, onValueChange: i = /* @__PURE__ */ N(() => {}, "onValueChange"), collapsible: a = !1, ...o } = e, [s, c] = w({
|
|
1441
1452
|
prop: n,
|
|
1442
1453
|
defaultProp: r ?? "",
|
|
1443
1454
|
onChange: i,
|
|
1444
|
-
caller:
|
|
1455
|
+
caller: F
|
|
1445
1456
|
});
|
|
1446
|
-
return /* @__PURE__ */ (0, A.jsx)(
|
|
1457
|
+
return /* @__PURE__ */ (0, A.jsx)(Rt, {
|
|
1447
1458
|
scope: e.__scopeAccordion,
|
|
1448
1459
|
value: D.useMemo(() => s ? [s] : [], [s]),
|
|
1449
1460
|
onItemOpen: c,
|
|
1450
1461
|
onItemClose: D.useCallback(() => a && c(""), [a, c]),
|
|
1451
|
-
children: /* @__PURE__ */ (0, A.jsx)(
|
|
1462
|
+
children: /* @__PURE__ */ (0, A.jsx)(Bt, {
|
|
1452
1463
|
scope: e.__scopeAccordion,
|
|
1453
1464
|
collapsible: a,
|
|
1454
|
-
children: /* @__PURE__ */ (0, A.jsx)(
|
|
1465
|
+
children: /* @__PURE__ */ (0, A.jsx)(Gt, {
|
|
1455
1466
|
...o,
|
|
1456
1467
|
ref: t
|
|
1457
1468
|
})
|
|
1458
1469
|
})
|
|
1459
1470
|
});
|
|
1460
|
-
}, "AccordionImplSingle")),
|
|
1461
|
-
let { value: n, defaultValue: r, onValueChange: i = /* @__PURE__ */
|
|
1471
|
+
}, "AccordionImplSingle")), Ut = /* @__PURE__ */ D.forwardRef(/* @__PURE__ */ N(function(e, t) {
|
|
1472
|
+
let { value: n, defaultValue: r, onValueChange: i = /* @__PURE__ */ N(() => {}, "onValueChange"), ...a } = e, [o, s] = w({
|
|
1462
1473
|
prop: n,
|
|
1463
1474
|
defaultProp: r ?? [],
|
|
1464
1475
|
onChange: i,
|
|
1465
|
-
caller:
|
|
1476
|
+
caller: F
|
|
1466
1477
|
}), c = D.useCallback((e) => s((t = []) => [...t, e]), [s]), l = D.useCallback((e) => s((t = []) => t.filter((t) => t !== e)), [s]);
|
|
1467
|
-
return /* @__PURE__ */ (0, A.jsx)(
|
|
1478
|
+
return /* @__PURE__ */ (0, A.jsx)(Rt, {
|
|
1468
1479
|
scope: e.__scopeAccordion,
|
|
1469
1480
|
value: o,
|
|
1470
1481
|
onItemOpen: c,
|
|
1471
1482
|
onItemClose: l,
|
|
1472
|
-
children: /* @__PURE__ */ (0, A.jsx)(
|
|
1483
|
+
children: /* @__PURE__ */ (0, A.jsx)(Bt, {
|
|
1473
1484
|
scope: e.__scopeAccordion,
|
|
1474
1485
|
collapsible: !0,
|
|
1475
|
-
children: /* @__PURE__ */ (0, A.jsx)(
|
|
1486
|
+
children: /* @__PURE__ */ (0, A.jsx)(Gt, {
|
|
1476
1487
|
...a,
|
|
1477
1488
|
ref: t
|
|
1478
1489
|
})
|
|
1479
1490
|
})
|
|
1480
1491
|
});
|
|
1481
|
-
}, "AccordionImplMultiple")), [
|
|
1482
|
-
let { __scopeAccordion: n, disabled: r, dir: a, orientation: o =
|
|
1483
|
-
if (!
|
|
1484
|
-
let t = e.target,
|
|
1485
|
-
if (
|
|
1492
|
+
}, "AccordionImplMultiple")), [Wt, R] = I(F), Gt = /* @__PURE__ */ D.forwardRef(/* @__PURE__ */ N(function(e, t) {
|
|
1493
|
+
let { __scopeAccordion: n, disabled: r, dir: a, orientation: o = P.Vertical, ...s } = e, c = D.useRef(null), l = i(c, t), u = Pt(n), d = ye(a) === jt.LTR, f = C(e.onKeyDown, (e) => {
|
|
1494
|
+
if (!Mt.includes(e.key)) return;
|
|
1495
|
+
let t = u(), n = e.target, r = t.filter(([, e]) => !e.element.disabled), i = r.findIndex(([, e]) => e.element === n), a = r.size;
|
|
1496
|
+
if (i === -1) return;
|
|
1486
1497
|
e.preventDefault();
|
|
1487
|
-
let
|
|
1488
|
-
|
|
1489
|
-
}, "moveNext"),
|
|
1490
|
-
|
|
1498
|
+
let s = i, c = a - 1, l = /* @__PURE__ */ N(() => {
|
|
1499
|
+
s = i + 1, s > c && (s = 0);
|
|
1500
|
+
}, "moveNext"), f = /* @__PURE__ */ N(() => {
|
|
1501
|
+
s = i - 1, s < 0 && (s = c);
|
|
1491
1502
|
}, "movePrev");
|
|
1492
1503
|
switch (e.key) {
|
|
1493
1504
|
case "Home":
|
|
1494
|
-
|
|
1505
|
+
s = 0;
|
|
1495
1506
|
break;
|
|
1496
1507
|
case "End":
|
|
1497
|
-
|
|
1508
|
+
s = c;
|
|
1498
1509
|
break;
|
|
1499
1510
|
case "ArrowRight":
|
|
1500
|
-
o ===
|
|
1511
|
+
o === P.Horizontal && (d ? l() : f());
|
|
1501
1512
|
break;
|
|
1502
1513
|
case "ArrowDown":
|
|
1503
|
-
o ===
|
|
1514
|
+
o === P.Vertical && l();
|
|
1504
1515
|
break;
|
|
1505
1516
|
case "ArrowLeft":
|
|
1506
|
-
o ===
|
|
1517
|
+
o === P.Horizontal && (d ? f() : l());
|
|
1507
1518
|
break;
|
|
1508
|
-
case "ArrowUp": o ===
|
|
1519
|
+
case "ArrowUp": o === P.Vertical && f();
|
|
1509
1520
|
}
|
|
1510
|
-
|
|
1521
|
+
let p = s % a;
|
|
1522
|
+
r.at(p)?.element.focus();
|
|
1511
1523
|
});
|
|
1512
|
-
return /* @__PURE__ */ (0, A.jsx)(
|
|
1524
|
+
return /* @__PURE__ */ (0, A.jsx)(Wt, {
|
|
1513
1525
|
scope: n,
|
|
1514
1526
|
disabled: r,
|
|
1515
1527
|
direction: a,
|
|
1516
1528
|
orientation: o,
|
|
1517
|
-
children: /* @__PURE__ */ (0, A.jsx)(
|
|
1529
|
+
children: /* @__PURE__ */ (0, A.jsx)(Nt.Slot, {
|
|
1518
1530
|
scope: n,
|
|
1519
|
-
children: /* @__PURE__ */ (0, A.jsx)(
|
|
1531
|
+
children: /* @__PURE__ */ (0, A.jsx)(T.div, {
|
|
1520
1532
|
...s,
|
|
1521
1533
|
"data-orientation": o,
|
|
1522
1534
|
ref: l,
|
|
@@ -1524,16 +1536,16 @@ var Tt = yt, Et = xt, Dt = Ct, Ot = Object.defineProperty, F = (e, t) => Ot(e, "
|
|
|
1524
1536
|
})
|
|
1525
1537
|
})
|
|
1526
1538
|
});
|
|
1527
|
-
}, "AccordionImpl")),
|
|
1528
|
-
let { __scopeAccordion: n, value: r, ...i } = e, a = R(
|
|
1529
|
-
return /* @__PURE__ */ (0, A.jsx)(
|
|
1539
|
+
}, "AccordionImpl")), Kt = "AccordionItem", [qt, z] = I(Kt), Jt = /* @__PURE__ */ D.forwardRef(/* @__PURE__ */ N(function(e, t) {
|
|
1540
|
+
let { __scopeAccordion: n, value: r, ...i } = e, a = R(Kt, n), o = zt(Kt, n), s = L(n), c = S(), l = r && o.value.includes(r) || !1, u = a.disabled || e.disabled;
|
|
1541
|
+
return /* @__PURE__ */ (0, A.jsx)(qt, {
|
|
1530
1542
|
scope: n,
|
|
1531
1543
|
open: l,
|
|
1532
1544
|
disabled: u,
|
|
1533
1545
|
triggerId: c,
|
|
1534
|
-
children: /* @__PURE__ */ (0, A.jsx)(
|
|
1546
|
+
children: /* @__PURE__ */ (0, A.jsx)(Ct, {
|
|
1535
1547
|
"data-orientation": a.orientation,
|
|
1536
|
-
"data-state":
|
|
1548
|
+
"data-state": tn(l),
|
|
1537
1549
|
...s,
|
|
1538
1550
|
...i,
|
|
1539
1551
|
ref: t,
|
|
@@ -1544,20 +1556,20 @@ var Tt = yt, Et = xt, Dt = Ct, Ot = Object.defineProperty, F = (e, t) => Ot(e, "
|
|
|
1544
1556
|
}
|
|
1545
1557
|
})
|
|
1546
1558
|
});
|
|
1547
|
-
}, "AccordionItem")),
|
|
1548
|
-
let { __scopeAccordion: n, ...r } = e, i = R(
|
|
1549
|
-
return /* @__PURE__ */ (0, A.jsx)(
|
|
1559
|
+
}, "AccordionItem")), Yt = "AccordionHeader", Xt = /* @__PURE__ */ D.forwardRef(/* @__PURE__ */ N(function(e, t) {
|
|
1560
|
+
let { __scopeAccordion: n, ...r } = e, i = R(F, n), a = z(Yt, n);
|
|
1561
|
+
return /* @__PURE__ */ (0, A.jsx)(T.h3, {
|
|
1550
1562
|
"data-orientation": i.orientation,
|
|
1551
|
-
"data-state":
|
|
1563
|
+
"data-state": tn(a.open),
|
|
1552
1564
|
"data-disabled": a.disabled ? "" : void 0,
|
|
1553
1565
|
...r,
|
|
1554
1566
|
ref: t
|
|
1555
1567
|
});
|
|
1556
|
-
}, "AccordionHeader")),
|
|
1557
|
-
let { __scopeAccordion: n, ...r } = e, i = R(
|
|
1558
|
-
return /* @__PURE__ */ (0, A.jsx)(
|
|
1568
|
+
}, "AccordionHeader")), Zt = "AccordionTrigger", Qt = /* @__PURE__ */ D.forwardRef(/* @__PURE__ */ N(function(e, t) {
|
|
1569
|
+
let { __scopeAccordion: n, ...r } = e, i = R(F, n), a = z(Zt, n), o = Vt(Zt, n), s = L(n);
|
|
1570
|
+
return /* @__PURE__ */ (0, A.jsx)(Nt.ItemSlot, {
|
|
1559
1571
|
scope: n,
|
|
1560
|
-
children: /* @__PURE__ */ (0, A.jsx)(
|
|
1572
|
+
children: /* @__PURE__ */ (0, A.jsx)(Tt, {
|
|
1561
1573
|
"aria-disabled": a.open && !o.collapsible || void 0,
|
|
1562
1574
|
"data-orientation": i.orientation,
|
|
1563
1575
|
id: a.triggerId,
|
|
@@ -1566,8 +1578,8 @@ var Tt = yt, Et = xt, Dt = Ct, Ot = Object.defineProperty, F = (e, t) => Ot(e, "
|
|
|
1566
1578
|
ref: t
|
|
1567
1579
|
})
|
|
1568
1580
|
});
|
|
1569
|
-
}, "AccordionTrigger")),
|
|
1570
|
-
let { __scopeAccordion: n, ...r } = e, i = R(
|
|
1581
|
+
}, "AccordionTrigger")), $t = "AccordionContent", en = /* @__PURE__ */ D.forwardRef(/* @__PURE__ */ N(function(e, t) {
|
|
1582
|
+
let { __scopeAccordion: n, ...r } = e, i = R(F, n), a = z($t, n), o = L(n);
|
|
1571
1583
|
return /* @__PURE__ */ (0, A.jsx)(Dt, {
|
|
1572
1584
|
role: "region",
|
|
1573
1585
|
"aria-labelledby": a.triggerId,
|
|
@@ -1582,29 +1594,37 @@ var Tt = yt, Et = xt, Dt = Ct, Ot = Object.defineProperty, F = (e, t) => Ot(e, "
|
|
|
1582
1594
|
}
|
|
1583
1595
|
});
|
|
1584
1596
|
}, "AccordionContent"));
|
|
1585
|
-
function
|
|
1597
|
+
function tn(e) {
|
|
1586
1598
|
return e ? "open" : "closed";
|
|
1587
1599
|
}
|
|
1588
|
-
|
|
1589
|
-
|
|
1600
|
+
N(tn, "getState");
|
|
1601
|
+
//#endregion
|
|
1602
|
+
//#region ../node_modules/.pnpm/@radix-ui+react-popover@1.3.1_@types+react-dom@19.3.0_@types+react@19.3.0__@types+react_e30c1a3361e595871e7a1c2e1a74b81d/node_modules/@radix-ui/react-popover/dist/index.mjs
|
|
1603
|
+
var nn = Object.defineProperty, B = (e, t) => nn(e, "name", {
|
|
1590
1604
|
value: t,
|
|
1591
1605
|
configurable: !0
|
|
1592
|
-
}),
|
|
1593
|
-
let { __scopePopover: t, children: n, open: r, defaultOpen: i, onOpenChange: a, modal: o = !1 } = e, s = V(t), c = D.useRef(null), [l, u] = D.useState(!1), [d, f] =
|
|
1606
|
+
}), rn = "Popover", [an, on] = ke(rn, [ee]), V = ee(), [sn, H] = an(rn), cn = /* @__PURE__ */ B((e) => {
|
|
1607
|
+
let { __scopePopover: t, children: n, open: r, defaultOpen: i, onOpenChange: a, modal: o = !1 } = e, s = V(t), c = D.useRef(null), [l, u] = D.useState(!1), [d, f] = D.useState(0), [p, m] = D.useState(0), [h, g] = w({
|
|
1594
1608
|
prop: r,
|
|
1595
1609
|
defaultProp: i ?? !1,
|
|
1596
1610
|
onChange: a,
|
|
1597
|
-
caller:
|
|
1611
|
+
caller: rn
|
|
1598
1612
|
});
|
|
1599
|
-
return /* @__PURE__ */ (0, A.jsx)(
|
|
1613
|
+
return /* @__PURE__ */ (0, A.jsx)(b, {
|
|
1600
1614
|
...s,
|
|
1601
|
-
children: /* @__PURE__ */ (0, A.jsx)(
|
|
1615
|
+
children: /* @__PURE__ */ (0, A.jsx)(sn, {
|
|
1602
1616
|
scope: t,
|
|
1603
|
-
contentId:
|
|
1617
|
+
contentId: S(),
|
|
1618
|
+
titleId: S(),
|
|
1619
|
+
descriptionId: S(),
|
|
1620
|
+
titlePresent: d > 0,
|
|
1621
|
+
descriptionPresent: p > 0,
|
|
1622
|
+
setTitleCount: f,
|
|
1623
|
+
setDescriptionCount: m,
|
|
1604
1624
|
triggerRef: c,
|
|
1605
|
-
open:
|
|
1606
|
-
onOpenChange:
|
|
1607
|
-
onOpenToggle: D.useCallback(() =>
|
|
1625
|
+
open: h,
|
|
1626
|
+
onOpenChange: g,
|
|
1627
|
+
onOpenToggle: D.useCallback(() => g((e) => !e), [g]),
|
|
1608
1628
|
hasCustomAnchor: l,
|
|
1609
1629
|
onCustomAnchorAdd: D.useCallback(() => u(!0), []),
|
|
1610
1630
|
onCustomAnchorRemove: D.useCallback(() => u(!1), []),
|
|
@@ -1612,81 +1632,84 @@ var tn = Ft, nn = qt, rn = Yt, an = Zt, on = $t, sn = Object.defineProperty, z =
|
|
|
1612
1632
|
children: n
|
|
1613
1633
|
})
|
|
1614
1634
|
});
|
|
1615
|
-
}, "Popover"),
|
|
1616
|
-
let { __scopePopover: n, ...r } = e, i = H(
|
|
1617
|
-
return D.useEffect(() => (o(), () => s()), [o, s]), /* @__PURE__ */ (0, A.jsx)(
|
|
1635
|
+
}, "Popover"), ln = "PopoverAnchor", un = /* @__PURE__ */ D.forwardRef(/* @__PURE__ */ B(function(e, t) {
|
|
1636
|
+
let { __scopePopover: n, ...r } = e, i = H(ln, n), a = V(n), { onCustomAnchorAdd: o, onCustomAnchorRemove: s } = i;
|
|
1637
|
+
return D.useEffect(() => (o(), () => s()), [o, s]), /* @__PURE__ */ (0, A.jsx)(_, {
|
|
1618
1638
|
...a,
|
|
1619
1639
|
...r,
|
|
1620
1640
|
ref: t
|
|
1621
1641
|
});
|
|
1622
|
-
}, "PopoverAnchor")),
|
|
1623
|
-
let { __scopePopover: n, ...r } = e, a = H(
|
|
1642
|
+
}, "PopoverAnchor")), dn = "PopoverTrigger", fn = /* @__PURE__ */ D.forwardRef(/* @__PURE__ */ B(function(e, t) {
|
|
1643
|
+
let { __scopePopover: n, ...r } = e, a = H(dn, n), o = V(n), s = i(t, a.triggerRef), c = /* @__PURE__ */ (0, A.jsx)(T.button, {
|
|
1624
1644
|
type: "button",
|
|
1625
1645
|
"aria-haspopup": "dialog",
|
|
1626
1646
|
"aria-expanded": a.open,
|
|
1627
1647
|
"aria-controls": a.open ? a.contentId : void 0,
|
|
1628
|
-
"data-state":
|
|
1648
|
+
"data-state": wn(a.open),
|
|
1629
1649
|
...r,
|
|
1630
1650
|
ref: s,
|
|
1631
|
-
onClick:
|
|
1651
|
+
onClick: C(e.onClick, a.onOpenToggle)
|
|
1632
1652
|
});
|
|
1633
|
-
return a.hasCustomAnchor ? c : /* @__PURE__ */ (0, A.jsx)(
|
|
1653
|
+
return a.hasCustomAnchor ? c : /* @__PURE__ */ (0, A.jsx)(_, {
|
|
1634
1654
|
asChild: !0,
|
|
1635
1655
|
...o,
|
|
1636
1656
|
children: c
|
|
1637
1657
|
});
|
|
1638
|
-
}, "PopoverTrigger")),
|
|
1639
|
-
let { __scopePopover: t, forceMount: n, children: r, container: i } = e, a = H(
|
|
1640
|
-
return /* @__PURE__ */ (0, A.jsx)(
|
|
1658
|
+
}, "PopoverTrigger")), pn = "PopoverPortal", [mn, hn] = an(pn, { forceMount: void 0 }), gn = /* @__PURE__ */ B((e) => {
|
|
1659
|
+
let { __scopePopover: t, forceMount: n, children: r, container: i } = e, a = H(pn, t);
|
|
1660
|
+
return /* @__PURE__ */ (0, A.jsx)(mn, {
|
|
1641
1661
|
scope: t,
|
|
1642
1662
|
forceMount: n,
|
|
1643
|
-
children: /* @__PURE__ */ (0, A.jsx)(
|
|
1663
|
+
children: /* @__PURE__ */ (0, A.jsx)(Ve, {
|
|
1644
1664
|
present: n || a.open,
|
|
1645
|
-
children: /* @__PURE__ */ (0, A.jsx)(
|
|
1665
|
+
children: /* @__PURE__ */ (0, A.jsx)(Le, {
|
|
1646
1666
|
asChild: !0,
|
|
1647
1667
|
container: i,
|
|
1648
1668
|
children: r
|
|
1649
1669
|
})
|
|
1650
1670
|
})
|
|
1651
1671
|
});
|
|
1652
|
-
}, "PopoverPortal"), U = "PopoverContent",
|
|
1653
|
-
let n =
|
|
1654
|
-
return /* @__PURE__ */ (0, A.jsx)(
|
|
1672
|
+
}, "PopoverPortal"), U = "PopoverContent", _n = /* @__PURE__ */ D.forwardRef(/* @__PURE__ */ B(function(e, t) {
|
|
1673
|
+
let n = hn(U, e.__scopePopover), { forceMount: r = n.forceMount, ...i } = e, a = H(U, e.__scopePopover);
|
|
1674
|
+
return /* @__PURE__ */ (0, A.jsx)(Ve, {
|
|
1655
1675
|
present: r || a.open,
|
|
1656
|
-
children: a.modal ? /* @__PURE__ */ (0, A.jsx)(
|
|
1676
|
+
children: a.modal ? /* @__PURE__ */ (0, A.jsx)(yn, {
|
|
1657
1677
|
...i,
|
|
1658
1678
|
ref: t
|
|
1659
|
-
}) : /* @__PURE__ */ (0, A.jsx)(
|
|
1679
|
+
}) : /* @__PURE__ */ (0, A.jsx)(bn, {
|
|
1660
1680
|
...i,
|
|
1661
1681
|
ref: t
|
|
1662
1682
|
})
|
|
1663
1683
|
});
|
|
1664
|
-
}, "PopoverContent")),
|
|
1665
|
-
let n = H(U, e.__scopePopover), r = D.useRef(null), a = i(t, r), o = D.useRef(!1);
|
|
1684
|
+
}, "PopoverContent")), vn = s("PopoverContent.RemoveScroll"), yn = /* @__PURE__ */ D.forwardRef(/* @__PURE__ */ B(function(e, t) {
|
|
1685
|
+
let n = H(U, e.__scopePopover), r = D.useRef(null), a = i(t, r), o = D.useRef(!1), { nodes: s, registry: c } = He();
|
|
1666
1686
|
return D.useEffect(() => {
|
|
1667
1687
|
let e = r.current;
|
|
1668
|
-
if (e) return
|
|
1669
|
-
}, []), /* @__PURE__ */ (0, A.jsx)(
|
|
1670
|
-
as:
|
|
1688
|
+
if (e) return Pe(e);
|
|
1689
|
+
}, []), /* @__PURE__ */ (0, A.jsx)(Fe, {
|
|
1690
|
+
as: vn,
|
|
1671
1691
|
allowPinchZoom: !0,
|
|
1672
|
-
|
|
1692
|
+
shards: D.useMemo(() => [r, ...s.map((e) => ({ current: e }))], [r, s]),
|
|
1693
|
+
children: /* @__PURE__ */ (0, A.jsx)(xn, {
|
|
1673
1694
|
...e,
|
|
1674
1695
|
ref: a,
|
|
1696
|
+
branchNodes: s,
|
|
1697
|
+
branchRegistry: c,
|
|
1675
1698
|
trapFocus: n.open,
|
|
1676
1699
|
disableOutsidePointerEvents: !0,
|
|
1677
|
-
onCloseAutoFocus:
|
|
1700
|
+
onCloseAutoFocus: C(e.onCloseAutoFocus, (e) => {
|
|
1678
1701
|
e.preventDefault(), o.current || n.triggerRef.current?.focus();
|
|
1679
1702
|
}),
|
|
1680
|
-
onPointerDownOutside:
|
|
1703
|
+
onPointerDownOutside: C(e.onPointerDownOutside, (e) => {
|
|
1681
1704
|
let t = e.detail.originalEvent, n = t.button === 0 && t.ctrlKey === !0, r = t.button === 2 || n;
|
|
1682
1705
|
o.current = r;
|
|
1683
1706
|
}, { checkForDefaultPrevented: !1 }),
|
|
1684
|
-
onFocusOutside:
|
|
1707
|
+
onFocusOutside: C(e.onFocusOutside, (e) => e.preventDefault(), { checkForDefaultPrevented: !1 })
|
|
1685
1708
|
})
|
|
1686
1709
|
});
|
|
1687
|
-
}, "PopoverContentModal")),
|
|
1710
|
+
}, "PopoverContentModal")), bn = /* @__PURE__ */ D.forwardRef(/* @__PURE__ */ B(function(e, t) {
|
|
1688
1711
|
let n = H(U, e.__scopePopover), r = D.useRef(!1), i = D.useRef(!1);
|
|
1689
|
-
return /* @__PURE__ */ (0, A.jsx)(
|
|
1712
|
+
return /* @__PURE__ */ (0, A.jsx)(xn, {
|
|
1690
1713
|
...e,
|
|
1691
1714
|
ref: t,
|
|
1692
1715
|
trapFocus: !1,
|
|
@@ -1700,55 +1723,69 @@ var tn = Ft, nn = qt, rn = Yt, an = Zt, on = $t, sn = Object.defineProperty, z =
|
|
|
1700
1723
|
n.triggerRef.current?.contains(a) && t.preventDefault(), t.detail.originalEvent.type === "focusin" && i.current && t.preventDefault();
|
|
1701
1724
|
}
|
|
1702
1725
|
});
|
|
1703
|
-
}, "PopoverContentNonModal")),
|
|
1704
|
-
let { __scopePopover: n, trapFocus: r, onOpenAutoFocus:
|
|
1705
|
-
return
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
trapped: r,
|
|
1709
|
-
onMountAutoFocus: i,
|
|
1710
|
-
onUnmountAutoFocus: a,
|
|
1711
|
-
children: /* @__PURE__ */ (0, A.jsx)(ze, {
|
|
1726
|
+
}, "PopoverContentNonModal")), xn = /* @__PURE__ */ D.forwardRef(/* @__PURE__ */ B(function(e, t) {
|
|
1727
|
+
let { __scopePopover: n, trapFocus: r, onOpenAutoFocus: a, onCloseAutoFocus: o, disableOutsidePointerEvents: s, onEscapeKeyDown: c, onPointerDownOutside: l, onFocusOutside: u, onInteractOutside: d, "aria-describedby": f, branchNodes: p, branchRegistry: m, ...h } = e, g = H(U, n), _ = V(n), [y, b] = D.useState(null), x = i(t, b);
|
|
1728
|
+
return Be(y), Re(), /* @__PURE__ */ (0, A.jsx)(Me, {
|
|
1729
|
+
registry: m,
|
|
1730
|
+
children: /* @__PURE__ */ (0, A.jsx)(Ie, {
|
|
1712
1731
|
asChild: !0,
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
"
|
|
1732
|
-
"
|
|
1733
|
-
|
|
1734
|
-
|
|
1732
|
+
loop: !0,
|
|
1733
|
+
trapped: r,
|
|
1734
|
+
branches: p,
|
|
1735
|
+
onMountAutoFocus: a,
|
|
1736
|
+
onUnmountAutoFocus: o,
|
|
1737
|
+
children: /* @__PURE__ */ (0, A.jsx)(Ne, {
|
|
1738
|
+
asChild: !0,
|
|
1739
|
+
disableOutsidePointerEvents: s,
|
|
1740
|
+
onInteractOutside: d,
|
|
1741
|
+
onEscapeKeyDown: c,
|
|
1742
|
+
onPointerDownOutside: l,
|
|
1743
|
+
onFocusOutside: u,
|
|
1744
|
+
onDismiss: () => g.onOpenChange(!1),
|
|
1745
|
+
deferPointerDownOutside: !0,
|
|
1746
|
+
children: /* @__PURE__ */ (0, A.jsx)(v, {
|
|
1747
|
+
"data-state": wn(g.open),
|
|
1748
|
+
role: "dialog",
|
|
1749
|
+
id: g.contentId,
|
|
1750
|
+
"aria-labelledby": g.titlePresent ? g.titleId : void 0,
|
|
1751
|
+
"aria-describedby": g.descriptionPresent ? Tn(f, g.descriptionId) : f,
|
|
1752
|
+
..._,
|
|
1753
|
+
...h,
|
|
1754
|
+
ref: x,
|
|
1755
|
+
style: {
|
|
1756
|
+
...h.style,
|
|
1757
|
+
"--radix-popover-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
1758
|
+
"--radix-popover-content-available-width": "var(--radix-popper-available-width)",
|
|
1759
|
+
"--radix-popover-content-available-height": "var(--radix-popper-available-height)",
|
|
1760
|
+
"--radix-popover-trigger-width": "var(--radix-popper-anchor-width)",
|
|
1761
|
+
"--radix-popover-trigger-height": "var(--radix-popper-anchor-height)"
|
|
1762
|
+
}
|
|
1763
|
+
})
|
|
1735
1764
|
})
|
|
1736
1765
|
})
|
|
1737
1766
|
});
|
|
1738
|
-
}, "PopoverContentImpl")),
|
|
1739
|
-
let { __scopePopover: n, ...r } = e, i = H(
|
|
1740
|
-
return /* @__PURE__ */ (0, A.jsx)(
|
|
1767
|
+
}, "PopoverContentImpl")), Sn = "PopoverClose", Cn = /* @__PURE__ */ D.forwardRef(/* @__PURE__ */ B(function(e, t) {
|
|
1768
|
+
let { __scopePopover: n, ...r } = e, i = H(Sn, n);
|
|
1769
|
+
return /* @__PURE__ */ (0, A.jsx)(T.button, {
|
|
1741
1770
|
type: "button",
|
|
1742
1771
|
...r,
|
|
1743
1772
|
ref: t,
|
|
1744
|
-
onClick:
|
|
1773
|
+
onClick: C(e.onClick, () => i.onOpenChange(!1))
|
|
1745
1774
|
});
|
|
1746
1775
|
}, "PopoverClose"));
|
|
1747
|
-
function
|
|
1776
|
+
function wn(e) {
|
|
1748
1777
|
return e ? "open" : "closed";
|
|
1749
1778
|
}
|
|
1750
|
-
|
|
1751
|
-
|
|
1779
|
+
B(wn, "getState");
|
|
1780
|
+
function Tn(...e) {
|
|
1781
|
+
let t = /* @__PURE__ */ new Set();
|
|
1782
|
+
for (let n of e) if (typeof n == "string") for (let e of String(n).trim().split(/\s+/)) e && t.add(e);
|
|
1783
|
+
return t.size > 0 ? Array.from(t).join(" ") : void 0;
|
|
1784
|
+
}
|
|
1785
|
+
B(Tn, "concatAriaDescribedby");
|
|
1786
|
+
//#endregion
|
|
1787
|
+
//#region src/components/ui/query-param-preserving-link.tsx
|
|
1788
|
+
var En = (e) => {
|
|
1752
1789
|
let t = (0, O.c)(16), n, r, i;
|
|
1753
1790
|
t[0] === e ? (n = t[1], r = t[2], i = t[3]) : ({href: r, children: n, ...i} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = i);
|
|
1754
1791
|
let a = (0, D.useRef)(null), o;
|
|
@@ -1765,7 +1802,7 @@ var On = dn, kn = pn, An = hn, jn = yn, Mn = bn, Nn = En, Pn = (e) => {
|
|
|
1765
1802
|
t[6] === s ? c = t[7] : (c = { onPress: () => {
|
|
1766
1803
|
s();
|
|
1767
1804
|
} }, t[6] = s, t[7] = c);
|
|
1768
|
-
let { pressProps: l } =
|
|
1805
|
+
let { pressProps: l } = Ce(c), u;
|
|
1769
1806
|
t[8] === s ? u = t[9] : (u = (e) => {
|
|
1770
1807
|
e.preventDefault(), s();
|
|
1771
1808
|
}, t[8] = s, t[9] = u);
|
|
@@ -1778,18 +1815,18 @@ var On = dn, kn = pn, An = hn, jn = yn, Mn = bn, Nn = En, Pn = (e) => {
|
|
|
1778
1815
|
...i,
|
|
1779
1816
|
children: n
|
|
1780
1817
|
}), t[10] = n, t[11] = d, t[12] = r, t[13] = l, t[14] = i, t[15] = f) : f = t[15], f;
|
|
1781
|
-
},
|
|
1818
|
+
}, Dn = cn, On = fn, kn = Ae(gn), An = Cn, jn = De(_n), Mn = D.forwardRef((e, t) => {
|
|
1782
1819
|
let n = (0, O.c)(22), i, a, o, s, c, l;
|
|
1783
1820
|
n[0] === e ? (i = n[1], a = n[2], o = n[3], s = n[4], c = n[5], l = n[6]) : ({className: i, align: o, sideOffset: s, portal: c, scrollable: l, ...a} = e, n[0] = e, n[1] = i, n[2] = a, n[3] = o, n[4] = s, n[5] = c, n[6] = l);
|
|
1784
1821
|
let u = o === void 0 ? "center" : o, d = s === void 0 ? 4 : s, f = c === void 0 || c, p = l !== void 0 && l, m = p && "overflow-auto", h;
|
|
1785
1822
|
n[7] !== i || n[8] !== m ? (h = r("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-hidden animate-in data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", i, m), n[7] = i, n[8] = m, n[9] = h) : h = n[9];
|
|
1786
|
-
let g = p ? `calc(var(--radix-popover-content-available-height) - ${
|
|
1823
|
+
let g = p ? `calc(var(--radix-popover-content-available-height) - ${je}px)` : void 0, _;
|
|
1787
1824
|
n[10] !== a.style || n[11] !== g ? (_ = {
|
|
1788
1825
|
...a.style,
|
|
1789
1826
|
maxHeight: g
|
|
1790
1827
|
}, n[10] = a.style, n[11] = g, n[12] = _) : _ = n[12];
|
|
1791
1828
|
let v;
|
|
1792
|
-
n[13] !== u || n[14] !== a || n[15] !== t || n[16] !== d || n[17] !== h || n[18] !== _ ? (v = /* @__PURE__ */ (0, A.jsx)(
|
|
1829
|
+
n[13] !== u || n[14] !== a || n[15] !== t || n[16] !== d || n[17] !== h || n[18] !== _ ? (v = /* @__PURE__ */ (0, A.jsx)(ze, { children: /* @__PURE__ */ (0, A.jsx)(jn, {
|
|
1793
1830
|
ref: t,
|
|
1794
1831
|
align: u,
|
|
1795
1832
|
sideOffset: d,
|
|
@@ -1800,35 +1837,35 @@ var On = dn, kn = pn, An = hn, jn = yn, Mn = bn, Nn = En, Pn = (e) => {
|
|
|
1800
1837
|
let y = v;
|
|
1801
1838
|
if (f) {
|
|
1802
1839
|
let e;
|
|
1803
|
-
return n[20] === y ? e = n[21] : (e = /* @__PURE__ */ (0, A.jsx)(
|
|
1840
|
+
return n[20] === y ? e = n[21] : (e = /* @__PURE__ */ (0, A.jsx)(kn, { children: y }), n[20] = y, n[21] = e), e;
|
|
1804
1841
|
}
|
|
1805
1842
|
return y;
|
|
1806
1843
|
});
|
|
1807
|
-
|
|
1844
|
+
Mn.displayName = _n.displayName;
|
|
1808
1845
|
//#endregion
|
|
1809
1846
|
//#region src/core/documentation/doc-lookup.ts
|
|
1810
|
-
async function
|
|
1811
|
-
let t =
|
|
1847
|
+
async function Nn(e) {
|
|
1848
|
+
let t = me().at(0);
|
|
1812
1849
|
if (t) try {
|
|
1813
|
-
let n = await
|
|
1850
|
+
let n = await te.request({
|
|
1814
1851
|
document: e,
|
|
1815
1852
|
cellId: t
|
|
1816
1853
|
});
|
|
1817
1854
|
if (!n || n.options.length === 0) return;
|
|
1818
1855
|
let r = e.split(".").pop() ?? e, i = n.options[0], a = n.options.find((e) => e.name === r) ?? i;
|
|
1819
|
-
a?.completion_info &&
|
|
1856
|
+
a?.completion_info && Je.set(ge, { documentation: a.completion_info });
|
|
1820
1857
|
} catch (t) {
|
|
1821
1858
|
n.debug(`Doc lookup failed for "${e}"`, t);
|
|
1822
1859
|
}
|
|
1823
1860
|
}
|
|
1824
1861
|
//#endregion
|
|
1825
1862
|
//#region src/core/documentation/DocHoverTarget.tsx
|
|
1826
|
-
var
|
|
1863
|
+
var Pn = (e) => {
|
|
1827
1864
|
let t = (0, O.c)(8), { qualifiedName: n, children: r } = e, i;
|
|
1828
1865
|
t[0] === n ? i = t[1] : (i = () => {
|
|
1829
|
-
|
|
1866
|
+
Nn(n);
|
|
1830
1867
|
}, t[0] = n, t[1] = i);
|
|
1831
|
-
let a =
|
|
1868
|
+
let a = Se(i, 100), o;
|
|
1832
1869
|
t[2] === a ? o = t[3] : (o = () => a.cancel(), t[2] = a, t[3] = o);
|
|
1833
1870
|
let s;
|
|
1834
1871
|
return t[4] !== r || t[5] !== a || t[6] !== o ? (s = /* @__PURE__ */ (0, A.jsx)("span", {
|
|
@@ -1836,49 +1873,49 @@ var Hn = (e) => {
|
|
|
1836
1873
|
onMouseLeave: o,
|
|
1837
1874
|
children: r
|
|
1838
1875
|
}), t[4] = r, t[5] = a, t[6] = o, t[7] = s) : s = t[7], s;
|
|
1839
|
-
},
|
|
1876
|
+
}, Fn = We(!1);
|
|
1840
1877
|
//#endregion
|
|
1841
1878
|
//#region src/core/static/export-context.ts
|
|
1842
|
-
function
|
|
1879
|
+
function In(e) {
|
|
1843
1880
|
if (typeof e != "object" || !e) return !1;
|
|
1844
1881
|
let t = e;
|
|
1845
1882
|
return !(t.trusted !== !0 || t.notebookCode !== void 0 && typeof t.notebookCode != "string");
|
|
1846
1883
|
}
|
|
1847
|
-
function
|
|
1884
|
+
function Ln() {
|
|
1848
1885
|
let e = window?.__MARIMO_EXPORT_CONTEXT__;
|
|
1849
|
-
return
|
|
1886
|
+
return In(e) ? e : void 0;
|
|
1850
1887
|
}
|
|
1851
|
-
function
|
|
1852
|
-
return
|
|
1888
|
+
function Rn() {
|
|
1889
|
+
return Ln()?.trusted === !0;
|
|
1853
1890
|
}
|
|
1854
|
-
function
|
|
1855
|
-
if (
|
|
1891
|
+
function zn() {
|
|
1892
|
+
if (Je.get(Fn) || Rn() || Je.get(Ye)) return !0;
|
|
1856
1893
|
try {
|
|
1857
|
-
if (
|
|
1894
|
+
if (we() === "read") return !0;
|
|
1858
1895
|
} catch {}
|
|
1859
1896
|
return !1;
|
|
1860
1897
|
}
|
|
1861
1898
|
//#endregion
|
|
1862
1899
|
//#region src/plugins/core/sanitize.ts
|
|
1863
|
-
var
|
|
1864
|
-
let t = e(
|
|
1865
|
-
if (t || n ||
|
|
1900
|
+
var Bn = We((e) => {
|
|
1901
|
+
let t = e(Fn), n = e(Ye);
|
|
1902
|
+
if (t || n || Rn()) return !1;
|
|
1866
1903
|
let r = !0;
|
|
1867
1904
|
try {
|
|
1868
|
-
r =
|
|
1905
|
+
r = we() === "read";
|
|
1869
1906
|
} catch {
|
|
1870
1907
|
return !0;
|
|
1871
1908
|
}
|
|
1872
1909
|
return !r;
|
|
1873
1910
|
});
|
|
1874
|
-
function
|
|
1875
|
-
return
|
|
1911
|
+
function Vn() {
|
|
1912
|
+
return E(Bn);
|
|
1876
1913
|
}
|
|
1877
1914
|
//#endregion
|
|
1878
1915
|
//#region src/plugins/core/RenderHTML.tsx
|
|
1879
|
-
var
|
|
1916
|
+
var Hn = [], Un = (e) => {
|
|
1880
1917
|
if (e instanceof k.Element && !/^[A-Za-z][\w-]*$/.test(e.name)) return D.createElement(D.Fragment);
|
|
1881
|
-
},
|
|
1918
|
+
}, Wn = (e, t) => {
|
|
1882
1919
|
if (t instanceof k.Element && t.name === "body") {
|
|
1883
1920
|
if ((0, D.isValidElement)(e) && "props" in e) {
|
|
1884
1921
|
let t = e.props.children;
|
|
@@ -1886,7 +1923,7 @@ var Xn = [], Zn = (e) => {
|
|
|
1886
1923
|
}
|
|
1887
1924
|
return;
|
|
1888
1925
|
}
|
|
1889
|
-
},
|
|
1926
|
+
}, Gn = (e, t) => {
|
|
1890
1927
|
if (t instanceof k.Element && t.name === "html") {
|
|
1891
1928
|
if ((0, D.isValidElement)(e) && "props" in e) {
|
|
1892
1929
|
let t = e.props.children;
|
|
@@ -1894,55 +1931,55 @@ var Xn = [], Zn = (e) => {
|
|
|
1894
1931
|
}
|
|
1895
1932
|
return;
|
|
1896
1933
|
}
|
|
1897
|
-
},
|
|
1934
|
+
}, Kn = (e) => {
|
|
1898
1935
|
if (e instanceof k.Element && e.attribs && e.name === "iframe") {
|
|
1899
1936
|
let t = document.createElement("iframe");
|
|
1900
1937
|
return Object.entries(e.attribs).forEach(([e, n]) => {
|
|
1901
1938
|
e.startsWith("\"") && e.endsWith("\"") && (e = e.slice(1, -1)), t.setAttribute(e, n);
|
|
1902
1939
|
}), /* @__PURE__ */ (0, A.jsx)("div", { dangerouslySetInnerHTML: { __html: t.outerHTML } });
|
|
1903
1940
|
}
|
|
1904
|
-
},
|
|
1941
|
+
}, qn = (e) => {
|
|
1905
1942
|
if (e instanceof k.Element && e.name === "script") {
|
|
1906
1943
|
let t = e.attribs.src;
|
|
1907
1944
|
if (!t) return;
|
|
1908
|
-
if (!
|
|
1945
|
+
if (!zn()) return n.warn(`[RenderHTML] refusing <script src> in untrusted context: ${t}`), /* @__PURE__ */ (0, A.jsx)(A.Fragment, {});
|
|
1909
1946
|
if (![...document.querySelectorAll("script[src]")].some((e) => e.getAttribute("src") === t)) {
|
|
1910
1947
|
let e = document.createElement("script");
|
|
1911
1948
|
e.src = t, document.head.append(e);
|
|
1912
1949
|
}
|
|
1913
1950
|
return /* @__PURE__ */ (0, A.jsx)(A.Fragment, {});
|
|
1914
1951
|
}
|
|
1915
|
-
},
|
|
1952
|
+
}, Jn = (e, t) => {
|
|
1916
1953
|
if (t instanceof k.Element && t.name === "a") {
|
|
1917
1954
|
let n = t.attribs.href;
|
|
1918
1955
|
if (n?.startsWith("#") && !n.startsWith("#code/")) {
|
|
1919
1956
|
let r = null;
|
|
1920
|
-
return (0, D.isValidElement)(e) && "props" in e && (r = e.props.children), /* @__PURE__ */ (0, A.jsx)(
|
|
1957
|
+
return (0, D.isValidElement)(e) && "props" in e && (r = e.props.children), /* @__PURE__ */ (0, A.jsx)(En, {
|
|
1921
1958
|
href: n,
|
|
1922
1959
|
...t.attribs,
|
|
1923
1960
|
children: r
|
|
1924
1961
|
});
|
|
1925
1962
|
}
|
|
1926
1963
|
}
|
|
1927
|
-
},
|
|
1928
|
-
if (t instanceof k.Element && t.name === "div" && t.attribs?.class?.includes("codehilite")) return /* @__PURE__ */ (0, A.jsx)(
|
|
1929
|
-
},
|
|
1964
|
+
}, Yn = (e, t, n) => {
|
|
1965
|
+
if (t instanceof k.Element && t.name === "div" && t.attribs?.class?.includes("codehilite")) return /* @__PURE__ */ (0, A.jsx)(er, { children: e }, n);
|
|
1966
|
+
}, Xn = (e, t, n) => {
|
|
1930
1967
|
if (!(t instanceof k.Element) || t.name !== "img") return;
|
|
1931
1968
|
let r = t.attribs?.src;
|
|
1932
1969
|
if (!(!r || !(0, D.isValidElement)(e)) && !/^data:/i.test(r)) return (0, D.cloneElement)(e, { key: `${r}-${n}` });
|
|
1933
|
-
},
|
|
1970
|
+
}, Zn = (e, t, n) => {
|
|
1934
1971
|
if (!(t instanceof k.Element) || t.name !== "input" || t.attribs?.type !== "checkbox" || !(0, D.isValidElement)(e)) return;
|
|
1935
1972
|
let r = "checked" in t.attribs;
|
|
1936
1973
|
return (0, D.cloneElement)(e, { key: `checkbox-${n}-${r}` });
|
|
1937
|
-
},
|
|
1974
|
+
}, Qn = (e, t) => {
|
|
1938
1975
|
if (t instanceof k.Element && t.attribs?.["data-marimo-doc"]) {
|
|
1939
1976
|
let n = t.attribs["data-marimo-doc"];
|
|
1940
|
-
return /* @__PURE__ */ (0, A.jsx)(
|
|
1977
|
+
return /* @__PURE__ */ (0, A.jsx)(Pn, {
|
|
1941
1978
|
qualifiedName: n,
|
|
1942
1979
|
children: e
|
|
1943
1980
|
});
|
|
1944
1981
|
}
|
|
1945
|
-
},
|
|
1982
|
+
}, $n = (e, t) => {
|
|
1946
1983
|
if (t instanceof k.Element && t.attribs?.["data-tooltip"]) {
|
|
1947
1984
|
if ((t.name?.toLowerCase() ?? "").startsWith("marimo-")) return;
|
|
1948
1985
|
let n = t.attribs["data-tooltip"].replace(/^[\r\n]+|[\r\n]+$/g, "");
|
|
@@ -1954,7 +1991,7 @@ var Xn = [], Zn = (e) => {
|
|
|
1954
1991
|
children: e
|
|
1955
1992
|
});
|
|
1956
1993
|
}
|
|
1957
|
-
},
|
|
1994
|
+
}, er = (e) => {
|
|
1958
1995
|
let t = (0, O.c)(3), { children: n } = e, r = (0, D.useRef)(null), i;
|
|
1959
1996
|
t[0] === Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */ (0, A.jsx)("div", {
|
|
1960
1997
|
className: "absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity",
|
|
@@ -1973,12 +2010,12 @@ var Xn = [], Zn = (e) => {
|
|
|
1973
2010
|
ref: r,
|
|
1974
2011
|
children: [n, i]
|
|
1975
2012
|
}), t[1] = n, t[2] = a), a;
|
|
1976
|
-
},
|
|
2013
|
+
}, tr = ({ html: e, additionalReplacements: t = Hn, alwaysSanitizeHtml: n = !0 }) => /* @__PURE__ */ (0, A.jsx)(nr, {
|
|
1977
2014
|
html: e,
|
|
1978
2015
|
alwaysSanitizeHtml: n,
|
|
1979
2016
|
additionalReplacements: t
|
|
1980
|
-
}),
|
|
1981
|
-
let t = (0, O.c)(5), { html: n, additionalReplacements: r, alwaysSanitizeHtml: i } = e, a = r === void 0 ?
|
|
2017
|
+
}), nr = (e) => {
|
|
2018
|
+
let t = (0, O.c)(5), { html: n, additionalReplacements: r, alwaysSanitizeHtml: i } = e, a = r === void 0 ? Hn : r, o = Vn(), s;
|
|
1982
2019
|
bb0: {
|
|
1983
2020
|
if (i || o) {
|
|
1984
2021
|
let e;
|
|
@@ -1988,26 +2025,26 @@ var Xn = [], Zn = (e) => {
|
|
|
1988
2025
|
s = n;
|
|
1989
2026
|
}
|
|
1990
2027
|
let c = s, l;
|
|
1991
|
-
return t[2] !== a || t[3] !== c ? (l =
|
|
2028
|
+
return t[2] !== a || t[3] !== c ? (l = rr({
|
|
1992
2029
|
html: c,
|
|
1993
2030
|
additionalReplacements: a
|
|
1994
2031
|
}), t[2] = a, t[3] = c, t[4] = l) : l = t[4], l;
|
|
1995
2032
|
};
|
|
1996
|
-
function
|
|
2033
|
+
function rr({ html: e, additionalReplacements: t = Hn }) {
|
|
1997
2034
|
let n = [
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2035
|
+
Un,
|
|
2036
|
+
Kn,
|
|
2037
|
+
qn,
|
|
2001
2038
|
...t
|
|
2002
2039
|
], r = [
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
or,
|
|
2006
|
-
sr,
|
|
2040
|
+
Yn,
|
|
2041
|
+
Jn,
|
|
2007
2042
|
Qn,
|
|
2008
|
-
$n
|
|
2009
|
-
|
|
2010
|
-
|
|
2043
|
+
$n,
|
|
2044
|
+
Wn,
|
|
2045
|
+
Gn
|
|
2046
|
+
], i = [Xn, Zn];
|
|
2047
|
+
return ft(e, {
|
|
2011
2048
|
replace: (e, t) => {
|
|
2012
2049
|
for (let r of n) {
|
|
2013
2050
|
let n = r(e, t);
|
|
@@ -2034,36 +2071,36 @@ function dr({ html: e, additionalReplacements: t = Xn }) {
|
|
|
2034
2071
|
}
|
|
2035
2072
|
//#endregion
|
|
2036
2073
|
//#region src/utils/json/base64.ts
|
|
2037
|
-
function
|
|
2074
|
+
function ir(e, t) {
|
|
2038
2075
|
return `data:${t};base64,${e}`;
|
|
2039
2076
|
}
|
|
2040
|
-
function
|
|
2077
|
+
function ar(e) {
|
|
2041
2078
|
return e.startsWith("data:") && e.includes(";base64,");
|
|
2042
2079
|
}
|
|
2043
|
-
function
|
|
2080
|
+
function or(e) {
|
|
2044
2081
|
return e.split(",")[1];
|
|
2045
2082
|
}
|
|
2046
|
-
function
|
|
2083
|
+
function sr(e) {
|
|
2047
2084
|
let t = globalThis.atob(e), n = t.length, r = new Uint8Array(n);
|
|
2048
2085
|
for (let e = 0; e < n; e++) r[e] = t.charCodeAt(e);
|
|
2049
2086
|
return r;
|
|
2050
2087
|
}
|
|
2051
|
-
var
|
|
2052
|
-
function
|
|
2053
|
-
let t =
|
|
2088
|
+
var cr = Uint8Array.fromBase64 ?? sr;
|
|
2089
|
+
function lr(e) {
|
|
2090
|
+
let t = cr(e);
|
|
2054
2091
|
return new DataView(t.buffer);
|
|
2055
2092
|
}
|
|
2056
|
-
function
|
|
2093
|
+
function ur(e) {
|
|
2057
2094
|
let t = "", n = e.length;
|
|
2058
2095
|
for (let r = 0; r < n; r++) t += String.fromCharCode(e[r]);
|
|
2059
2096
|
return globalThis.btoa(t);
|
|
2060
2097
|
}
|
|
2061
|
-
var
|
|
2062
|
-
function
|
|
2063
|
-
return
|
|
2098
|
+
var dr = "toBase64" in Uint8Array.prototype ? (e) => e.toBase64() : ur;
|
|
2099
|
+
function fr(e) {
|
|
2100
|
+
return dr(new Uint8Array(e.buffer, e.byteOffset, e.byteLength));
|
|
2064
2101
|
}
|
|
2065
|
-
function
|
|
2066
|
-
return (e.buffers ?? []).map(
|
|
2102
|
+
function pr(e) {
|
|
2103
|
+
return (e.buffers ?? []).map(lr);
|
|
2067
2104
|
}
|
|
2068
2105
|
//#endregion
|
|
2069
2106
|
//#region ../node_modules/.pnpm/@radix-ui+react-icons@1.3.2_react@19.3.0/node_modules/@radix-ui/react-icons/dist/react-icons.esm.js
|
|
@@ -2073,8 +2110,8 @@ function W(e, t) {
|
|
|
2073
2110
|
for (a = 0; a < r.length; a++) i = r[a], !(t.indexOf(i) >= 0) && (n[i] = e[i]);
|
|
2074
2111
|
return n;
|
|
2075
2112
|
}
|
|
2076
|
-
var
|
|
2077
|
-
var n = e.color, r = n === void 0 ? "currentColor" : n, i = W(e,
|
|
2113
|
+
var mr = ["color"], hr = /*#__PURE__*/ (0, D.forwardRef)(function(e, t) {
|
|
2114
|
+
var n = e.color, r = n === void 0 ? "currentColor" : n, i = W(e, mr);
|
|
2078
2115
|
return (0, D.createElement)("svg", Object.assign({
|
|
2079
2116
|
width: "15",
|
|
2080
2117
|
height: "15",
|
|
@@ -2150,8 +2187,8 @@ var Sr = ["color"], Cr = /*#__PURE__*/ (0, D.forwardRef)(function(e, t) {
|
|
|
2150
2187
|
rx: ".5",
|
|
2151
2188
|
fill: r
|
|
2152
2189
|
}));
|
|
2153
|
-
}),
|
|
2154
|
-
var n = e.color, r = n === void 0 ? "currentColor" : n, i = W(e,
|
|
2190
|
+
}), gr = ["color"], _r = /*#__PURE__*/ (0, D.forwardRef)(function(e, t) {
|
|
2191
|
+
var n = e.color, r = n === void 0 ? "currentColor" : n, i = W(e, gr);
|
|
2155
2192
|
return (0, D.createElement)("svg", Object.assign({
|
|
2156
2193
|
width: "15",
|
|
2157
2194
|
height: "15",
|
|
@@ -2164,8 +2201,8 @@ var Sr = ["color"], Cr = /*#__PURE__*/ (0, D.forwardRef)(function(e, t) {
|
|
|
2164
2201
|
fillRule: "evenodd",
|
|
2165
2202
|
clipRule: "evenodd"
|
|
2166
2203
|
}));
|
|
2167
|
-
}),
|
|
2168
|
-
var n = e.color, r = n === void 0 ? "currentColor" : n, i = W(e,
|
|
2204
|
+
}), vr = ["color"], yr = /*#__PURE__*/ (0, D.forwardRef)(function(e, t) {
|
|
2205
|
+
var n = e.color, r = n === void 0 ? "currentColor" : n, i = W(e, vr);
|
|
2169
2206
|
return (0, D.createElement)("svg", Object.assign({
|
|
2170
2207
|
width: "15",
|
|
2171
2208
|
height: "15",
|
|
@@ -2178,8 +2215,8 @@ var Sr = ["color"], Cr = /*#__PURE__*/ (0, D.forwardRef)(function(e, t) {
|
|
|
2178
2215
|
fillRule: "evenodd",
|
|
2179
2216
|
clipRule: "evenodd"
|
|
2180
2217
|
}));
|
|
2181
|
-
}),
|
|
2182
|
-
var n = e.color, r = n === void 0 ? "currentColor" : n, i = W(e,
|
|
2218
|
+
}), br = ["color"], xr = /*#__PURE__*/ (0, D.forwardRef)(function(e, t) {
|
|
2219
|
+
var n = e.color, r = n === void 0 ? "currentColor" : n, i = W(e, br);
|
|
2183
2220
|
return (0, D.createElement)("svg", Object.assign({
|
|
2184
2221
|
width: "15",
|
|
2185
2222
|
height: "15",
|
|
@@ -2192,8 +2229,8 @@ var Sr = ["color"], Cr = /*#__PURE__*/ (0, D.forwardRef)(function(e, t) {
|
|
|
2192
2229
|
fillRule: "evenodd",
|
|
2193
2230
|
clipRule: "evenodd"
|
|
2194
2231
|
}));
|
|
2195
|
-
}),
|
|
2196
|
-
var n = e.color, r = n === void 0 ? "currentColor" : n, i = W(e,
|
|
2232
|
+
}), Sr = ["color"], Cr = /*#__PURE__*/ (0, D.forwardRef)(function(e, t) {
|
|
2233
|
+
var n = e.color, r = n === void 0 ? "currentColor" : n, i = W(e, Sr);
|
|
2197
2234
|
return (0, D.createElement)("svg", Object.assign({
|
|
2198
2235
|
width: "15",
|
|
2199
2236
|
height: "15",
|
|
@@ -2206,8 +2243,8 @@ var Sr = ["color"], Cr = /*#__PURE__*/ (0, D.forwardRef)(function(e, t) {
|
|
|
2206
2243
|
fillRule: "evenodd",
|
|
2207
2244
|
clipRule: "evenodd"
|
|
2208
2245
|
}));
|
|
2209
|
-
}),
|
|
2210
|
-
var n = e.color, r = n === void 0 ? "currentColor" : n, i = W(e,
|
|
2246
|
+
}), wr = ["color"], Tr = /*#__PURE__*/ (0, D.forwardRef)(function(e, t) {
|
|
2247
|
+
var n = e.color, r = n === void 0 ? "currentColor" : n, i = W(e, wr);
|
|
2211
2248
|
return (0, D.createElement)("svg", Object.assign({
|
|
2212
2249
|
width: "15",
|
|
2213
2250
|
height: "15",
|
|
@@ -2218,8 +2255,8 @@ var Sr = ["color"], Cr = /*#__PURE__*/ (0, D.forwardRef)(function(e, t) {
|
|
|
2218
2255
|
d: "M9.875 7.5C9.875 8.81168 8.81168 9.875 7.5 9.875C6.18832 9.875 5.125 8.81168 5.125 7.5C5.125 6.18832 6.18832 5.125 7.5 5.125C8.81168 5.125 9.875 6.18832 9.875 7.5Z",
|
|
2219
2256
|
fill: r
|
|
2220
2257
|
}));
|
|
2221
|
-
}),
|
|
2222
|
-
var n = e.color, r = n === void 0 ? "currentColor" : n, i = W(e,
|
|
2258
|
+
}), Er = ["color"], Dr = /*#__PURE__*/ (0, D.forwardRef)(function(e, t) {
|
|
2259
|
+
var n = e.color, r = n === void 0 ? "currentColor" : n, i = W(e, Er);
|
|
2223
2260
|
return (0, D.createElement)("svg", Object.assign({
|
|
2224
2261
|
width: "15",
|
|
2225
2262
|
height: "15",
|
|
@@ -2232,8 +2269,8 @@ var Sr = ["color"], Cr = /*#__PURE__*/ (0, D.forwardRef)(function(e, t) {
|
|
|
2232
2269
|
fillRule: "evenodd",
|
|
2233
2270
|
clipRule: "evenodd"
|
|
2234
2271
|
}));
|
|
2235
|
-
}),
|
|
2236
|
-
var n = e.color, r = n === void 0 ? "currentColor" : n, i = W(e,
|
|
2272
|
+
}), Or = ["color"], kr = /*#__PURE__*/ (0, D.forwardRef)(function(e, t) {
|
|
2273
|
+
var n = e.color, r = n === void 0 ? "currentColor" : n, i = W(e, Or);
|
|
2237
2274
|
return (0, D.createElement)("svg", Object.assign({
|
|
2238
2275
|
width: "15",
|
|
2239
2276
|
height: "15",
|
|
@@ -2246,30 +2283,30 @@ var Sr = ["color"], Cr = /*#__PURE__*/ (0, D.forwardRef)(function(e, t) {
|
|
|
2246
2283
|
fillRule: "evenodd",
|
|
2247
2284
|
clipRule: "evenodd"
|
|
2248
2285
|
}));
|
|
2249
|
-
}),
|
|
2286
|
+
}), Ar = Lt, jr = D.forwardRef((e, t) => {
|
|
2250
2287
|
let n = (0, O.c)(9), i, a;
|
|
2251
2288
|
n[0] === e ? (i = n[1], a = n[2]) : ({className: i, ...a} = e, n[0] = e, n[1] = i, n[2] = a);
|
|
2252
2289
|
let o;
|
|
2253
2290
|
n[3] === i ? o = n[4] : (o = r("border-b", i), n[3] = i, n[4] = o);
|
|
2254
2291
|
let s;
|
|
2255
|
-
return n[5] !== a || n[6] !== t || n[7] !== o ? (s = /* @__PURE__ */ (0, A.jsx)(
|
|
2292
|
+
return n[5] !== a || n[6] !== t || n[7] !== o ? (s = /* @__PURE__ */ (0, A.jsx)(Jt, {
|
|
2256
2293
|
ref: t,
|
|
2257
2294
|
className: o,
|
|
2258
2295
|
...a
|
|
2259
2296
|
}), n[5] = a, n[6] = t, n[7] = o, n[8] = s) : s = n[8], s;
|
|
2260
2297
|
});
|
|
2261
|
-
|
|
2262
|
-
var
|
|
2298
|
+
jr.displayName = "AccordionItem";
|
|
2299
|
+
var Mr = D.forwardRef((e, t) => {
|
|
2263
2300
|
let n = (0, O.c)(12), i, a, o;
|
|
2264
2301
|
n[0] === e ? (i = n[1], a = n[2], o = n[3]) : ({className: a, children: i, ...o} = e, n[0] = e, n[1] = i, n[2] = a, n[3] = o);
|
|
2265
2302
|
let s;
|
|
2266
2303
|
n[4] === a ? s = n[5] : (s = r("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180 text-start", a), n[4] = a, n[5] = s);
|
|
2267
2304
|
let c;
|
|
2268
|
-
n[6] === Symbol.for("react.memo_cache_sentinel") ? (c = /* @__PURE__ */ (0, A.jsx)(
|
|
2305
|
+
n[6] === Symbol.for("react.memo_cache_sentinel") ? (c = /* @__PURE__ */ (0, A.jsx)(be, { className: "h-4 w-4 transition-transform duration-200" }), n[6] = c) : c = n[6];
|
|
2269
2306
|
let l;
|
|
2270
|
-
return n[7] !== i || n[8] !== o || n[9] !== t || n[10] !== s ? (l = /* @__PURE__ */ (0, A.jsx)(
|
|
2307
|
+
return n[7] !== i || n[8] !== o || n[9] !== t || n[10] !== s ? (l = /* @__PURE__ */ (0, A.jsx)(Xt, {
|
|
2271
2308
|
className: "flex",
|
|
2272
|
-
children: /* @__PURE__ */ (0, A.jsxs)(
|
|
2309
|
+
children: /* @__PURE__ */ (0, A.jsxs)(Qt, {
|
|
2273
2310
|
ref: t,
|
|
2274
2311
|
className: s,
|
|
2275
2312
|
...o,
|
|
@@ -2277,8 +2314,8 @@ var Br = D.forwardRef((e, t) => {
|
|
|
2277
2314
|
})
|
|
2278
2315
|
}), n[7] = i, n[8] = o, n[9] = t, n[10] = s, n[11] = l) : l = n[11], l;
|
|
2279
2316
|
});
|
|
2280
|
-
|
|
2281
|
-
var
|
|
2317
|
+
Mr.displayName = Qt.displayName;
|
|
2318
|
+
var Nr = D.forwardRef((e, t) => {
|
|
2282
2319
|
let n = (0, O.c)(17), i, a, o, s;
|
|
2283
2320
|
n[0] === e ? (i = n[1], a = n[2], o = n[3], s = n[4]) : ({className: a, children: i, wrapperClassName: s, ...o} = e, n[0] = e, n[1] = i, n[2] = a, n[3] = o, n[4] = s);
|
|
2284
2321
|
let c;
|
|
@@ -2291,17 +2328,60 @@ var Vr = D.forwardRef((e, t) => {
|
|
|
2291
2328
|
children: i
|
|
2292
2329
|
}), n[9] = i, n[10] = l, n[11] = u) : u = n[11];
|
|
2293
2330
|
let d;
|
|
2294
|
-
return n[12] !== o || n[13] !== t || n[14] !== c || n[15] !== u ? (d = /* @__PURE__ */ (0, A.jsx)(
|
|
2331
|
+
return n[12] !== o || n[13] !== t || n[14] !== c || n[15] !== u ? (d = /* @__PURE__ */ (0, A.jsx)(en, {
|
|
2295
2332
|
ref: t,
|
|
2296
2333
|
className: c,
|
|
2297
2334
|
...o,
|
|
2298
2335
|
children: u
|
|
2299
2336
|
}), n[12] = o, n[13] = t, n[14] = c, n[15] = u, n[16] = d) : d = n[16], d;
|
|
2300
2337
|
});
|
|
2301
|
-
|
|
2338
|
+
Nr.displayName = en.displayName;
|
|
2339
|
+
//#endregion
|
|
2340
|
+
//#region ../node_modules/.pnpm/typescript-memoize@1.1.1/node_modules/typescript-memoize/dist/es2015/memoize-decorator.js
|
|
2341
|
+
var Pr = /* @__PURE__ */ e(oe(), 1);
|
|
2342
|
+
function Fr(e) {
|
|
2343
|
+
let t, n, r;
|
|
2344
|
+
return typeof e == "object" ? (t = e.hashFunction, n = e.expiring, r = e.tags) : t = e, (e, i, a) => {
|
|
2345
|
+
if (a.value != null) a.value = Lr(a.value, t, n, r);
|
|
2346
|
+
else if (a.get != null) a.get = Lr(a.get, t, n, r);
|
|
2347
|
+
else throw "Only put a Memoize() decorator on a method or get accessor.";
|
|
2348
|
+
};
|
|
2349
|
+
}
|
|
2350
|
+
var Ir = /* @__PURE__ */ new Map();
|
|
2351
|
+
function Lr(e, t, n = 0, r) {
|
|
2352
|
+
let i = Symbol("__memoized_map__");
|
|
2353
|
+
return function(...a) {
|
|
2354
|
+
let o;
|
|
2355
|
+
this.hasOwnProperty(i) || Object.defineProperty(this, i, {
|
|
2356
|
+
configurable: !1,
|
|
2357
|
+
enumerable: !1,
|
|
2358
|
+
writable: !1,
|
|
2359
|
+
value: /* @__PURE__ */ new Map()
|
|
2360
|
+
});
|
|
2361
|
+
let s = this[i];
|
|
2362
|
+
if (Array.isArray(r)) for (let e of r) Ir.has(e) ? Ir.get(e).push(s) : Ir.set(e, [s]);
|
|
2363
|
+
if (t || a.length > 0 || n > 0) {
|
|
2364
|
+
let r;
|
|
2365
|
+
r = t === !0 ? a.map((e) => e.toString()).join("!") : t ? t.apply(this, a) : a[0];
|
|
2366
|
+
let i = `${r}__timestamp`, c = !1;
|
|
2367
|
+
if (n > 0) {
|
|
2368
|
+
if (!s.has(i)) c = !0;
|
|
2369
|
+
else {
|
|
2370
|
+
let e = s.get(i);
|
|
2371
|
+
c = Date.now() - e > n;
|
|
2372
|
+
}
|
|
2373
|
+
}
|
|
2374
|
+
s.has(r) && !c ? o = s.get(r) : (o = e.apply(this, a), s.set(r, o), n > 0 && s.set(i, Date.now()));
|
|
2375
|
+
} else {
|
|
2376
|
+
let t = this;
|
|
2377
|
+
s.has(t) ? o = s.get(t) : (o = e.apply(this, a), s.set(t, o));
|
|
2378
|
+
}
|
|
2379
|
+
return o;
|
|
2380
|
+
};
|
|
2381
|
+
}
|
|
2302
2382
|
//#endregion
|
|
2303
2383
|
//#region src/utils/multi-map.ts
|
|
2304
|
-
var
|
|
2384
|
+
var Rr = class {
|
|
2305
2385
|
map = /* @__PURE__ */ new Map();
|
|
2306
2386
|
get(e) {
|
|
2307
2387
|
return this.map.get(e) ?? [];
|
|
@@ -2343,12 +2423,20 @@ var Hr = /* @__PURE__ */ e(pe(), 1), Ur = class {
|
|
|
2343
2423
|
}
|
|
2344
2424
|
};
|
|
2345
2425
|
//#endregion
|
|
2426
|
+
//#region \0@oxc-project+runtime@0.147.0/helpers/esm/decorate.js
|
|
2427
|
+
function zr(e, t, n, r) {
|
|
2428
|
+
var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
|
|
2429
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
|
|
2430
|
+
else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
|
|
2431
|
+
return i > 3 && a && Object.defineProperty(t, n, a), a;
|
|
2432
|
+
}
|
|
2433
|
+
//#endregion
|
|
2346
2434
|
//#region src/core/ai/context/registry.ts
|
|
2347
|
-
function
|
|
2435
|
+
function Br(e) {
|
|
2348
2436
|
let t = e.indexOf("://");
|
|
2349
2437
|
if (t !== -1) return e.slice(0, t);
|
|
2350
2438
|
}
|
|
2351
|
-
var
|
|
2439
|
+
var Vr = class {
|
|
2352
2440
|
async getAttachments(e) {
|
|
2353
2441
|
return [];
|
|
2354
2442
|
}
|
|
@@ -2370,7 +2458,7 @@ var Gr = class {
|
|
|
2370
2458
|
section: t?.section || this.title
|
|
2371
2459
|
};
|
|
2372
2460
|
}
|
|
2373
|
-
},
|
|
2461
|
+
}, Hr = class {
|
|
2374
2462
|
providers = /* @__PURE__ */ new Set();
|
|
2375
2463
|
register(e) {
|
|
2376
2464
|
return this.providers.add(e), this;
|
|
@@ -2388,14 +2476,14 @@ var Gr = class {
|
|
|
2388
2476
|
return [...this.providers].flatMap((t) => t.parseContextIds(e));
|
|
2389
2477
|
}
|
|
2390
2478
|
findProviderForUri(e) {
|
|
2391
|
-
let t =
|
|
2479
|
+
let t = Br(e);
|
|
2392
2480
|
if (t) return [...this.providers].find((n) => n.contextType === t && n.getItems().some((t) => t.uri === e));
|
|
2393
2481
|
}
|
|
2394
2482
|
resolveItems(e) {
|
|
2395
2483
|
if (e.length === 0) return [];
|
|
2396
|
-
let t = new
|
|
2484
|
+
let t = new Rr();
|
|
2397
2485
|
for (let n of e) {
|
|
2398
|
-
let e =
|
|
2486
|
+
let e = Br(n);
|
|
2399
2487
|
e && t.add(e, n);
|
|
2400
2488
|
}
|
|
2401
2489
|
let n = /* @__PURE__ */ new Map();
|
|
@@ -2426,7 +2514,7 @@ var Gr = class {
|
|
|
2426
2514
|
async getAttachmentsForContext(e) {
|
|
2427
2515
|
let t = this.resolveItems(e);
|
|
2428
2516
|
if (t.length === 0) return [];
|
|
2429
|
-
let r = new
|
|
2517
|
+
let r = new Rr();
|
|
2430
2518
|
for (let e of t) {
|
|
2431
2519
|
let t = this.findProviderForUri(e.uri);
|
|
2432
2520
|
t && r.add(t, e);
|
|
@@ -2441,30 +2529,30 @@ var Gr = class {
|
|
|
2441
2529
|
return (await Promise.all(i)).flat();
|
|
2442
2530
|
}
|
|
2443
2531
|
};
|
|
2444
|
-
|
|
2532
|
+
zr([Fr()], Hr.prototype, "getAllItems", null);
|
|
2445
2533
|
//#endregion
|
|
2446
2534
|
//#region src/core/ai/context/utils.ts
|
|
2447
|
-
function
|
|
2535
|
+
function Ur(e) {
|
|
2448
2536
|
return e.replaceAll("<", "<").replaceAll(">", ">");
|
|
2449
2537
|
}
|
|
2450
|
-
function
|
|
2538
|
+
function Wr(e) {
|
|
2451
2539
|
let { type: t, data: n, details: r } = e, i = `<${t}`;
|
|
2452
2540
|
for (let [e, t] of Object.entries(n)) if (t !== void 0) {
|
|
2453
|
-
let n =
|
|
2541
|
+
let n = Ur(typeof t == "object" && t ? JSON.stringify(t) : String(t));
|
|
2454
2542
|
i += ` ${e}="${n}"`;
|
|
2455
2543
|
}
|
|
2456
|
-
return i += ">", r && (i +=
|
|
2544
|
+
return i += ">", r && (i += Ur(r)), i += `</${t}>`, i;
|
|
2457
2545
|
}
|
|
2458
2546
|
//#endregion
|
|
2459
2547
|
//#region src/core/ai/context/providers/common.ts
|
|
2460
|
-
var
|
|
2548
|
+
var Gr = {
|
|
2461
2549
|
LOCAL_TABLE: 7,
|
|
2462
2550
|
REMOTE_TABLE: 5,
|
|
2463
2551
|
HIGH: 4,
|
|
2464
2552
|
MEDIUM: 3,
|
|
2465
2553
|
CELL_OUTPUT: 2,
|
|
2466
2554
|
LOW: 2
|
|
2467
|
-
},
|
|
2555
|
+
}, Kr = {
|
|
2468
2556
|
ERROR: {
|
|
2469
2557
|
name: "Error",
|
|
2470
2558
|
rank: 1
|
|
@@ -2489,19 +2577,19 @@ var Yr = {
|
|
|
2489
2577
|
name: "File",
|
|
2490
2578
|
rank: 6
|
|
2491
2579
|
}
|
|
2492
|
-
},
|
|
2580
|
+
}, qr = "datasource", Jr = class extends Vr {
|
|
2493
2581
|
title = "Datasource";
|
|
2494
2582
|
mentionPrefix = "@";
|
|
2495
|
-
contextType =
|
|
2583
|
+
contextType = qr;
|
|
2496
2584
|
connectionsMap;
|
|
2497
2585
|
dataframes;
|
|
2498
2586
|
constructor(e, t) {
|
|
2499
|
-
super(), this.connectionsMap = e, this.dataframes = [...t.values()].filter((e) =>
|
|
2587
|
+
super(), this.connectionsMap = e, this.dataframes = [...t.values()].filter((e) => de(e) === "dataframe");
|
|
2500
2588
|
}
|
|
2501
2589
|
getItems() {
|
|
2502
2590
|
return [...this.connectionsMap.values()].map((e) => {
|
|
2503
2591
|
let t = "Database schema.", n = { connection: e };
|
|
2504
|
-
return
|
|
2592
|
+
return ie.has(e.name) && (n.tables = this.dataframes, t = "Database schema and the dataframes that can be queried"), e.databases.length === 0 && (n.tables?.length ?? 0) === 0 ? null : {
|
|
2505
2593
|
uri: this.asURI(e.name),
|
|
2506
2594
|
name: e.name,
|
|
2507
2595
|
description: t,
|
|
@@ -2512,10 +2600,10 @@ var Yr = {
|
|
|
2512
2600
|
}
|
|
2513
2601
|
formatContext(e) {
|
|
2514
2602
|
let t = e.data, { name: n, display_name: r, source: i, ...a } = t.connection, o = a;
|
|
2515
|
-
return
|
|
2603
|
+
return ie.has(n) || (o = {
|
|
2516
2604
|
...a,
|
|
2517
2605
|
engine_name: n
|
|
2518
|
-
}),
|
|
2606
|
+
}), Wr({
|
|
2519
2607
|
type: this.contextType,
|
|
2520
2608
|
data: {
|
|
2521
2609
|
connection: o,
|
|
@@ -2525,66 +2613,76 @@ var Yr = {
|
|
|
2525
2613
|
}
|
|
2526
2614
|
formatCompletion(e) {
|
|
2527
2615
|
let t = e.data, n = t.connection, r = t.tables, i = n.name;
|
|
2528
|
-
return
|
|
2616
|
+
return ie.has(n.name) && (i = "In-Memory"), {
|
|
2529
2617
|
label: `@${i}`,
|
|
2530
2618
|
displayLabel: i,
|
|
2531
|
-
detail:
|
|
2532
|
-
boost:
|
|
2619
|
+
detail: ue(n.dialect),
|
|
2620
|
+
boost: Gr.MEDIUM,
|
|
2533
2621
|
type: this.contextType,
|
|
2534
|
-
section:
|
|
2622
|
+
section: Kr.DATA_SOURCES,
|
|
2535
2623
|
info: () => {
|
|
2536
2624
|
let e = document.createElement("div");
|
|
2537
|
-
return e.classList.add("mo-cm-tooltip", "docs-documentation"), (0,
|
|
2625
|
+
return e.classList.add("mo-cm-tooltip", "docs-documentation"), (0, Pr.createRoot)(e).render(le(n, r)), e;
|
|
2538
2626
|
}
|
|
2539
2627
|
};
|
|
2540
2628
|
}
|
|
2541
2629
|
};
|
|
2542
|
-
function
|
|
2543
|
-
let n = t.get(
|
|
2630
|
+
function Yr(e, t) {
|
|
2631
|
+
let n = t.get(pe(e))?.code;
|
|
2544
2632
|
if (!n || n.trim() === "") return null;
|
|
2545
|
-
let [r, i, a] =
|
|
2546
|
-
return o ? `@${
|
|
2633
|
+
let [r, i, a] = ve.sql.transformIn(n), o = t.get(ce).connectionsMap.get(a.engine);
|
|
2634
|
+
return o ? `@${qr}://${o.name}` : null;
|
|
2547
2635
|
}
|
|
2548
|
-
function
|
|
2549
|
-
let n =
|
|
2636
|
+
function Xr(e, t) {
|
|
2637
|
+
let n = Yr(e, t);
|
|
2550
2638
|
if (!n) return null;
|
|
2551
|
-
let r = t.get(
|
|
2639
|
+
let r = t.get(ce).connectionsMap, i = new Jr(r, t.get(se)), a = n.slice(1), o = i.getItems().find((e) => e.uri === a);
|
|
2552
2640
|
return o ? i.formatContext(o) : null;
|
|
2553
2641
|
}
|
|
2554
2642
|
//#endregion
|
|
2555
|
-
//#region src/core/
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
let t = (0, O.c)(16), { mode: n } = T(ke), { updateCellConfig: r } = me(), i;
|
|
2559
|
-
t[0] === e ? i = t[1] : (i = de(ve(e), ai, Object.is), t[0] = e, t[1] = i);
|
|
2560
|
-
let a = T(i), o;
|
|
2561
|
-
t[2] !== e || t[3] !== a ? (o = () => ti[e] ?? a, t[2] = e, t[3] = a, t[4] = o) : o = t[4];
|
|
2562
|
-
let [s, c] = (0, D.useState)(o), l, u;
|
|
2563
|
-
t[5] !== e || t[6] !== s ? (l = () => {
|
|
2564
|
-
ti[e] = s;
|
|
2565
|
-
}, u = [e, s], t[5] = e, t[6] = s, t[7] = l, t[8] = u) : (l = t[7], u = t[8]), (0, D.useEffect)(l, u);
|
|
2566
|
-
let d = n === "edit", f = d ? a : s, p;
|
|
2567
|
-
t[9] !== e || t[10] !== d || t[11] !== r ? (p = (t) => {
|
|
2568
|
-
if (c(t), !d) return;
|
|
2569
|
-
let n = { expand_output: t };
|
|
2570
|
-
r({
|
|
2571
|
-
cellId: e,
|
|
2572
|
-
config: n
|
|
2573
|
-
}), se().saveCellConfig({ configs: { [e]: n } }).catch(ii);
|
|
2574
|
-
}, t[9] = e, t[10] = d, t[11] = r, t[12] = p) : p = t[12];
|
|
2575
|
-
let m = Ge(p), h;
|
|
2576
|
-
return t[13] !== f || t[14] !== m ? (h = [f, m], t[13] = f, t[14] = m, t[15] = h) : h = t[15], h;
|
|
2577
|
-
}
|
|
2578
|
-
function ii(e) {
|
|
2579
|
-
n.error("Failed to save expand_output config", e);
|
|
2643
|
+
//#region src/core/notebook/document/select.ts
|
|
2644
|
+
function Zr(e, t, n) {
|
|
2645
|
+
return Ke(e, (e) => e?.cells.get(t)?.[n], Ue);
|
|
2580
2646
|
}
|
|
2647
|
+
//#endregion
|
|
2648
|
+
//#region src/core/notebook/document/hooks.tsx
|
|
2649
|
+
var Qr = (0, D.createContext)(null);
|
|
2650
|
+
function $r() {
|
|
2651
|
+
let e = (0, D.useContext)(Qr);
|
|
2652
|
+
if (e === null) throw Error("Document hooks require a DocumentProvider");
|
|
2653
|
+
return e;
|
|
2654
|
+
}
|
|
2655
|
+
function ei(e, t) {
|
|
2656
|
+
let n = (0, O.c)(4), { documentAtom: r } = $r(), i;
|
|
2657
|
+
return n[0] !== r || n[1] !== t || n[2] !== e ? (i = Zr(r, e, t), n[0] = r, n[1] = t, n[2] = e, n[3] = i) : i = n[3], E(i);
|
|
2658
|
+
}
|
|
2659
|
+
function ti(e) {
|
|
2660
|
+
return ei(e, "config");
|
|
2661
|
+
}
|
|
2662
|
+
function ni() {
|
|
2663
|
+
return Ge($r().editAtom);
|
|
2664
|
+
}
|
|
2665
|
+
//#endregion
|
|
2666
|
+
//#region src/core/cells/outputs.ts
|
|
2667
|
+
var ri = {}, ii = {};
|
|
2581
2668
|
function ai(e) {
|
|
2582
|
-
|
|
2669
|
+
let t = (0, O.c)(14), { mode: n } = E(Te), r = ni(), i = ti(e)?.expand_output ?? !1, a;
|
|
2670
|
+
t[0] !== e || t[1] !== i ? (a = () => ri[e] ?? i, t[0] = e, t[1] = i, t[2] = a) : a = t[2];
|
|
2671
|
+
let [o, s] = (0, D.useState)(a), c, l;
|
|
2672
|
+
t[3] !== e || t[4] !== o ? (c = () => {
|
|
2673
|
+
ri[e] = o;
|
|
2674
|
+
}, l = [e, o], t[3] = e, t[4] = o, t[5] = c, t[6] = l) : (c = t[5], l = t[6]), (0, D.useEffect)(c, l);
|
|
2675
|
+
let u = n === "edit", d = u ? i : o, f;
|
|
2676
|
+
t[7] !== e || t[8] !== r || t[9] !== u ? (f = (t) => {
|
|
2677
|
+
s(t), !(!u || e === "__scratch__") && r((n) => n.updateConfig(e, { expand_output: t }));
|
|
2678
|
+
}, t[7] = e, t[8] = r, t[9] = u, t[10] = f) : f = t[10];
|
|
2679
|
+
let p = qe(f), m;
|
|
2680
|
+
return t[11] !== d || t[12] !== p ? (m = [d, p], t[11] = d, t[12] = p, t[13] = m) : m = t[13], m;
|
|
2583
2681
|
}
|
|
2584
2682
|
function oi(e) {
|
|
2585
|
-
let t = (0, O.c)(6), [n, r] = (0, D.useState)(
|
|
2683
|
+
let t = (0, O.c)(6), [n, r] = (0, D.useState)(ii[e] ?? !1), i, a;
|
|
2586
2684
|
t[0] !== e || t[1] !== n ? (i = () => {
|
|
2587
|
-
|
|
2685
|
+
ii[e] = n;
|
|
2588
2686
|
}, a = [e, n], t[0] = e, t[1] = n, t[2] = i, t[3] = a) : (i = t[2], a = t[3]), (0, D.useEffect)(i, a);
|
|
2589
2687
|
let o;
|
|
2590
2688
|
return t[4] === n ? o = t[5] : (o = [n, r], t[4] = n, t[5] = o), o;
|
|
@@ -2594,17 +2692,17 @@ function si(e) {
|
|
|
2594
2692
|
}
|
|
2595
2693
|
//#endregion
|
|
2596
2694
|
//#region src/plugins/impl/code/LazyAnyLanguageCodeMirror.tsx
|
|
2597
|
-
var ci = (0, D.lazy)(() => import("./any-language-editor-
|
|
2695
|
+
var ci = (0, D.lazy)(() => import("./any-language-editor-BVFHDDQ3.js")), li = [Ze.lineWrapping];
|
|
2598
2696
|
function ui(e, t) {
|
|
2599
2697
|
return e ? e === "python" ? {
|
|
2600
2698
|
language: e,
|
|
2601
2699
|
code: t
|
|
2602
2700
|
} : e === "sql" ? {
|
|
2603
2701
|
language: "python",
|
|
2604
|
-
code:
|
|
2702
|
+
code: re.fromQuery(t)
|
|
2605
2703
|
} : e === "markdown" ? {
|
|
2606
2704
|
language: "python",
|
|
2607
|
-
code:
|
|
2705
|
+
code: _e.fromMarkdown(t)
|
|
2608
2706
|
} : e === "shell" || e === "bash" ? {
|
|
2609
2707
|
language: "python",
|
|
2610
2708
|
code: `import subprocess\nsubprocess.run("${t}")`
|
|
@@ -2617,21 +2715,20 @@ function ui(e, t) {
|
|
|
2617
2715
|
};
|
|
2618
2716
|
}
|
|
2619
2717
|
var di = (e) => {
|
|
2620
|
-
let t = (0, O.c)(9), { code: n, language: r } = e, {
|
|
2718
|
+
let t = (0, O.c)(9), { code: n, language: r } = e, { createCell: i } = ae(), a = fe(), s = E(Ye), c;
|
|
2621
2719
|
t[0] !== s || t[1] !== n || t[2] !== i || t[3] !== r || t[4] !== a ? (c = () => {
|
|
2622
2720
|
let e = ui(r, n);
|
|
2623
|
-
r === "sql" &&
|
|
2721
|
+
r === "sql" && he({
|
|
2624
2722
|
autoInstantiate: s,
|
|
2625
|
-
|
|
2723
|
+
createCell: i,
|
|
2626
2724
|
fromCellId: a
|
|
2627
2725
|
}), i({
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
cellId: a ?? "__end__"
|
|
2726
|
+
after: a,
|
|
2727
|
+
code: e.code
|
|
2631
2728
|
});
|
|
2632
2729
|
}, t[0] = s, t[1] = n, t[2] = i, t[3] = r, t[4] = a, t[5] = c) : c = t[5];
|
|
2633
2730
|
let l = c, u;
|
|
2634
|
-
t[6] === Symbol.for("react.memo_cache_sentinel") ? (u = /* @__PURE__ */ (0, A.jsx)(
|
|
2731
|
+
t[6] === Symbol.for("react.memo_cache_sentinel") ? (u = /* @__PURE__ */ (0, A.jsx)(pt, { className: "ml-2 h-4 w-4" }), t[6] = u) : u = t[6];
|
|
2635
2732
|
let d;
|
|
2636
2733
|
return t[7] === l ? d = t[8] : (d = /* @__PURE__ */ (0, A.jsxs)(o, {
|
|
2637
2734
|
size: "xs",
|
|
@@ -2640,7 +2737,7 @@ var di = (e) => {
|
|
|
2640
2737
|
children: ["Add to Notebook", u]
|
|
2641
2738
|
}), t[7] = l, t[8] = d), d;
|
|
2642
2739
|
}, fi = (e) => {
|
|
2643
|
-
let t = (0, O.c)(17), { code: n, language: r } = e, { theme: i } =
|
|
2740
|
+
let t = (0, O.c)(17), { code: n, language: r } = e, { theme: i } = Xe(), [a, o] = (0, D.useState)(n);
|
|
2644
2741
|
a !== n && o(n);
|
|
2645
2742
|
let s;
|
|
2646
2743
|
t[0] === a ? s = t[1] : (s = async () => {
|
|
@@ -2717,7 +2814,7 @@ var di = (e) => {
|
|
|
2717
2814
|
children: e
|
|
2718
2815
|
});
|
|
2719
2816
|
} }, _i, vi = () => {
|
|
2720
|
-
let { data: e } =
|
|
2817
|
+
let { data: e } = Qe(async () => _i || (_i = { math: (await import("./dist-Lm-D-Vr6.js")).math }, _i), []);
|
|
2721
2818
|
return e;
|
|
2722
2819
|
}, yi = (0, D.memo)((e) => {
|
|
2723
2820
|
let t = (0, O.c)(3), { content: n } = e, r = vi(), i;
|
|
@@ -2755,7 +2852,7 @@ var bi = a("animate-spin", {
|
|
|
2755
2852
|
size: s
|
|
2756
2853
|
}), a), n[5] = i, n[6] = a, n[7] = s, n[8] = c) : c = n[8];
|
|
2757
2854
|
let l;
|
|
2758
|
-
return n[9] !== o || n[10] !== t || n[11] !== c ? (l = /* @__PURE__ */ (0, A.jsx)(
|
|
2855
|
+
return n[9] !== o || n[10] !== t || n[11] !== c ? (l = /* @__PURE__ */ (0, A.jsx)(mt, {
|
|
2759
2856
|
ref: t,
|
|
2760
2857
|
className: c,
|
|
2761
2858
|
strokeWidth: 1.5,
|
|
@@ -2916,14 +3013,14 @@ async function Gi(e, t, n) {
|
|
|
2916
3013
|
}, a.readAsDataURL(i);
|
|
2917
3014
|
});
|
|
2918
3015
|
}
|
|
2919
|
-
var
|
|
2920
|
-
function
|
|
3016
|
+
var Z = {};
|
|
3017
|
+
function Ki(e, t, n) {
|
|
2921
3018
|
let r = e.replace(/\?.*/, "");
|
|
2922
3019
|
return n && (r = e), /ttf|otf|eot|woff2?/i.test(r) && (r = r.replace(/.*\//, "")), t ? `[${t}]${r}` : r;
|
|
2923
3020
|
}
|
|
2924
|
-
async function
|
|
2925
|
-
let r =
|
|
2926
|
-
if (
|
|
3021
|
+
async function qi(e, t, n) {
|
|
3022
|
+
let r = Ki(e, t, n.includeQueryParams);
|
|
3023
|
+
if (Z[r] != null) return Z[r];
|
|
2927
3024
|
n.cacheBust && (e += (/\?/.test(e) ? "&" : "?") + (/* @__PURE__ */ new Date()).getTime());
|
|
2928
3025
|
let i;
|
|
2929
3026
|
try {
|
|
@@ -2933,7 +3030,7 @@ async function Z(e, t, n) {
|
|
|
2933
3030
|
let r = `Failed to fetch resource: ${e}`;
|
|
2934
3031
|
t && (r = typeof t == "string" ? t : t.message), r && console.warn(r);
|
|
2935
3032
|
}
|
|
2936
|
-
return
|
|
3033
|
+
return Z[r] = i, i;
|
|
2937
3034
|
}
|
|
2938
3035
|
//#endregion
|
|
2939
3036
|
//#region ../node_modules/.pnpm/html-to-image@1.11.13_patch_hash=405d43fd603ed64fdfdd4e3572f22a2b0eab5c8bd36a0dbd88f28ab1f311893f/node_modules/html-to-image/es/clone-node.js
|
|
@@ -2947,7 +3044,7 @@ async function Yi(e, t) {
|
|
|
2947
3044
|
return t.width = e.clientWidth, t.height = e.clientHeight, n?.drawImage(e, 0, 0, t.width, t.height), Y(t.toDataURL());
|
|
2948
3045
|
}
|
|
2949
3046
|
let n = e.poster;
|
|
2950
|
-
return Y(await
|
|
3047
|
+
return Y(await qi(n, Vi(n), t));
|
|
2951
3048
|
}
|
|
2952
3049
|
async function Xi(e, t) {
|
|
2953
3050
|
try {
|
|
@@ -3031,7 +3128,7 @@ function ua(e) {
|
|
|
3031
3128
|
async function da(e, t, n, r, i) {
|
|
3032
3129
|
try {
|
|
3033
3130
|
let a = n ? Si(t, n) : t, o = Vi(t), s;
|
|
3034
|
-
return s = i ? Wi(await i(a), o) : await
|
|
3131
|
+
return s = i ? Wi(await i(a), o) : await qi(a, o, r), e.replace(la(t), `$1${s}$3`);
|
|
3035
3132
|
} catch {}
|
|
3036
3133
|
return e;
|
|
3037
3134
|
}
|
|
@@ -3068,7 +3165,7 @@ async function ha(e, t) {
|
|
|
3068
3165
|
async function ga(e, t) {
|
|
3069
3166
|
let n = X(e, HTMLImageElement);
|
|
3070
3167
|
if (!(n && !Ui(e.src)) && !(X(e, SVGImageElement) && !Ui(e.href.baseVal))) return;
|
|
3071
|
-
let r = n ? e.src : e.href.baseVal, i = await
|
|
3168
|
+
let r = n ? e.src : e.href.baseVal, i = await qi(r, Vi(r), t);
|
|
3072
3169
|
await new Promise((r, a) => {
|
|
3073
3170
|
e.onload = r, e.onerror = t.onImageErrorHandler ? (...e) => {
|
|
3074
3171
|
try {
|
|
@@ -3248,4 +3345,4 @@ async function Fa(e, t) {
|
|
|
3248
3345
|
});
|
|
3249
3346
|
}
|
|
3250
3347
|
//#endregion
|
|
3251
|
-
export {
|
|
3348
|
+
export { ft as $, lr as A, Dn as B, yr as C, Dr as D, Tr as E, pr as F, Cn as G, Mn as H, tr as I, Jt as J, Lt as K, Ln as L, fr as M, or as N, kr as O, ar as P, mt as Q, Rn as R, _r as S, Cr as T, On as U, An as V, un as W, gt as X, Qt as Y, ht as Z, Ar as _, si as a, Mr as b, ni as c, Yr as d, k as et, Gr as f, Hr as g, Vr as h, ci as i, cr as j, ir as k, Jr as l, Wr as m, xi as n, oi as o, Kr as p, en as q, yi as r, ai as s, Fa as t, Xr as u, Nr as v, xr as w, hr as x, jr as y, Fn as z };
|