@marimo-team/islands 0.25.3-dev19 → 0.25.3-dev192
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ConnectedDataExplorerComponent-CNMliVzw.js → ConnectedDataExplorerComponent-BBbOElk3.js} +21 -19
- package/dist/{ErrorBoundary-CBHB755J.js → ErrorBoundary-Dw6uRKVk.js} +19 -19
- package/dist/{abnfDiagram-VCTEODGH-D-Ez91gV.js → abnfDiagram-VCTEODGH-DhMT6Uhd.js} +2 -2
- package/dist/any-language-editor-BVFHDDQ3.js +75 -0
- package/dist/{architectureDiagram-5GKGNRK7-CTpcNtO8.js → architectureDiagram-5GKGNRK7-BVbEiJLq.js} +1 -1
- package/dist/{arrays-CN1djC4k.js → arrays-R6JsImiT.js} +8 -0
- package/dist/assets/__vite-browser-external-C8gQho07.js +1 -0
- package/dist/assets/worker-C6e9ERyd.js +113 -0
- package/dist/{button-CvjkwdSk.js → button-BQRdqQi1.js} +199 -192
- package/dist/{capabilities-CQ5IjhzL.js → capabilities-CI4xUPsp.js} +2 -2
- package/dist/{chat-ui-DaHynk8g.js → chat-ui-BguxTQEL.js} +541 -540
- package/dist/{check-EDwSwP89.js → check-C9Mp9eCK.js} +1 -1
- package/dist/{chunk-IMKFNOWR-DGxi-zeo.js → chunk-IMKFNOWR-By5hSbJJ.js} +1 -1
- package/dist/{chunk-SHT3W25Y-CV9J3rAB.js → chunk-SHT3W25Y-DFrEYG54.js} +1 -1
- package/dist/{chunk-SVP7TREG-BL-9Fqgg.js → chunk-SVP7TREG-DFXGc9ew.js} +1 -1
- package/dist/{chunk-TICWLB2K-Cu_XMjDM.js → chunk-TICWLB2K-DZdNIpoZ.js} +1 -1
- package/dist/{chunk-YOKDWASO-DPZk8vhS.js → chunk-YOKDWASO-DKplTrBY.js} +20 -20
- package/dist/{classDiagram-ZZMXUADV-BXXV13Hq.js → classDiagram-ZZMXUADV-Cgj_eEQA.js} +2 -2
- package/dist/{classDiagram-v2-VYDZK3BY-B7FXJ1Cp.js → classDiagram-v2-VYDZK3BY-DLAUrSqj.js} +2 -2
- package/dist/{code-visibility-CEXXuuOE.js → code-visibility-v_7ijLtx.js} +25 -25
- package/dist/{common-OLE92qsR.js → common-BUwWHpnK.js} +6994 -6819
- package/dist/{copy-icon-Ft7t9bqz.js → copy-icon-De584pZ4.js} +3 -3
- package/dist/{cynefinDiagram-5FMLGOSQ-CH96rwba.js → cynefinDiagram-5FMLGOSQ-Cikf9AKa.js} +1 -1
- package/dist/{dagre-GXQ25YYZ-BD3PmpFY.js → dagre-GXQ25YYZ-C5KEi5_l.js} +1 -1
- package/dist/{data-grid-overlay-editor-CpHX98zN.js → data-grid-overlay-editor-4IZymnXZ.js} +5 -5
- package/dist/{data-grid-types-BH_r7g7l.js → data-grid-types-0PJ-9N5n.js} +1 -1
- package/dist/{diagram-S7CK7UJ4-BsSJJldB.js → diagram-S7CK7UJ4-BaoBTQjR.js} +1 -1
- package/dist/{diagram-UQ7AKVKN-muQtNZc4.js → diagram-UQ7AKVKN-DDufBsUA.js} +1 -1
- package/dist/{diagram-VX7I27RA-CdhuZAqR.js → diagram-VX7I27RA-CY6RALJ8.js} +1 -1
- package/dist/{diagram-Z3DM3KII-BD8mXjOj.js → diagram-Z3DM3KII-Bc-LHsD6.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-drDjxJyV.js} +1481 -1433
- package/dist/{ebnfDiagram-PWID7BFC-BIN1sweE.js → ebnfDiagram-PWID7BFC-Cz0J-tcC.js} +2 -2
- package/dist/{erDiagram-RLTQ6QDP-Ctp5cfoN.js → erDiagram-RLTQ6QDP-DTXTDgFu.js} +1 -1
- package/dist/{error-banner-D-WCIiMt.js → error-banner-DxJ3s8YO.js} +86 -86
- package/dist/{error-entries-Bv6bZPF3.js → error-entries-CZ1NQ6Kv.js} +4771 -4702
- 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-_f7fx7zj.js → feedback-button-MpeoIn1D.js} +37 -37
- package/dist/{flowDiagram-HODETNUW-3EfLrlFb.js → flowDiagram-HODETNUW-RbwWf2zc.js} +2 -2
- package/dist/{formats-27CW_UP4.js → formats-DbXnijtH.js} +3 -3
- package/dist/{ganttDiagram-EL5Y4UJY-BQT16JSc.js → ganttDiagram-EL5Y4UJY-Dh_4cBJZ.js} +2 -2
- package/dist/{glide-data-editor-Cmu4vWKD.js → glide-data-editor-DU8_EDG5.js} +370 -368
- package/dist/{glide-utils-DJyqh0EM.js → glide-utils-D98laidb.js} +16 -16
- package/dist/{globals-1Hfhz6Dx.js → globals-BeBDOk22.js} +3 -3
- package/dist/{highlighted-body-KPVGNVTW-zwjq21tf.js → highlighted-body-KPVGNVTW-3Ziwfz-V.js} +2 -2
- package/dist/{html-to-image-Bf8QMGi4.js → html-to-image-D_4_hQ8U.js} +668 -622
- package/dist/{infoDiagram-27XIBGKW-DipQoHxl.js → infoDiagram-27XIBGKW-DlmzZjmI.js} +1 -1
- package/dist/{ishikawaDiagram-5VMMS53U-DgFMjSGz.js → ishikawaDiagram-5VMMS53U-EN3TYP_q.js} +1 -1
- package/dist/{kanban-definition-UXKFOSKX-w1ACVjgl.js → kanban-definition-UXKFOSKX-CK_-Ru7Q.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 +9822 -7824
- package/dist/{mermaid-CHo49Yv-.js → mermaid-DU9ZRmkG.js} +38 -38
- package/dist/mermaid-HWGCJPDP-Du3-HPQA.js +2 -0
- package/dist/{mindmap-definition-YA3MSWOX-CrT0KSfX.js → mindmap-definition-YA3MSWOX-C-hqgUvF.js} +1 -1
- package/dist/{number-overlay-editor-BQN3-Nye.js → number-overlay-editor-BoIkyh6H.js} +3 -3
- package/dist/{objects-CzUgoMIF.js → objects-DCmMvZtn.js} +1 -3
- package/dist/{once-BtE-wKRL.js → once-eG8Vmvjd.js} +1 -1
- package/dist/{pegDiagram-XKGWAZYB-BqvywNJA.js → pegDiagram-XKGWAZYB-BiMejYPB.js} +2 -2
- package/dist/{pieDiagram-E7YTZNPT-BfxJ_XCc.js → pieDiagram-E7YTZNPT-B1zCZ1eq.js} +1 -1
- package/dist/precisionRound-DhAzeRcm.js +49 -0
- package/dist/{process-output-BZg56CCb.js → process-output-DxSCHBWp.js} +4 -4
- package/dist/{quadrantDiagram-AXDQQJYC-Ccw0xMjN.js → quadrantDiagram-AXDQQJYC-Blrm7V7_.js} +1 -1
- package/dist/{railroadDiagram-O6MQD6OU-8vFLVTPu.js → railroadDiagram-O6MQD6OU-BLcfaASl.js} +2 -2
- package/dist/{react-vega-BED0DjiB.js → react-vega-C4T9Rb_w.js} +12284 -12270
- package/dist/{requirementDiagram-BXWQKSXE-a_MxGvxe.js → requirementDiagram-BXWQKSXE-DtBOf52-.js} +1 -1
- package/dist/{reveal-component-nqUW7zgn.js → reveal-component-5M3a2rpj.js} +734 -711
- package/dist/{select-BButFi-d.js → select-2KOiReNY.js} +536 -457
- package/dist/{sequenceDiagram-WJ2MYXX4-CXFMnxGh.js → sequenceDiagram-WJ2MYXX4-DIwF19_n.js} +1 -1
- package/dist/{spec-BwarBpUJ.js → spec-DZDnnlgT.js} +41 -11
- package/dist/{stateDiagram-D77RDMKH-DQeA_CwI.js → stateDiagram-D77RDMKH-sWk1AdYL.js} +2 -2
- package/dist/{stateDiagram-v2-MP3YSRHH-BxxQucm1.js → stateDiagram-v2-MP3YSRHH-CiNo-OI7.js} +2 -2
- package/dist/style.css +1 -1
- package/dist/{swimlanes-42K2YHIH-Do6L-cYg.js → swimlanes-42K2YHIH-Bj3hiOY5.js} +1 -1
- package/dist/{swimlanesDiagram-VR7AAH4N-DUzPvSVU.js → swimlanesDiagram-VR7AAH4N-BzEo2r_N.js} +2 -2
- package/dist/{swiper-component-DKntyn8p.js → swiper-component-BkCm-kLg.js} +2 -2
- package/dist/{time-BieKwdYS.js → time-BaMbJs4z.js} +18 -18
- package/dist/{timeline-definition-24CTP7MA-D3c46WM5.js → timeline-definition-24CTP7MA-CrPQk42H.js} +1 -1
- package/dist/{toDate-UtiwmnH2.js → toDate-Cu2pIZcC.js} +37 -36
- 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-DEhLdRIu.js} +15 -14
- package/dist/{useDateFormatter-D8XruNGG.js → useDateFormatter-D3Tkfzej.js} +2 -2
- package/dist/{useDeepCompareMemoize-DXwzRINI.js → useDeepCompareMemoize-RjZGVhBV.js} +1 -1
- package/dist/{useIframeCapabilities-DBETvvPl.js → useIframeCapabilities-CSdWn6NP.js} +1 -1
- package/dist/{useLifecycle-j7D9uD1o.js → useLifecycle-DtcB2s1z.js} +28 -25
- package/dist/{useTheme-CRnjkku0.js → useTheme-CoEtr4mK.js} +301 -297
- package/dist/{vega-component-BeF9dfyO.js → vega-component-BhjTrP9-.js} +148 -148
- package/dist/{vega-embed-container-BNHE18G9.js → vega-embed-container--LYZqguO.js} +2 -2
- package/dist/{vega-loader.browser-DNST6uVf.js → vega-loader.browser-B9Pz0EGP.js} +298 -507
- package/dist/{vennDiagram-4TSXK5OY-BSZD8JcZ.js → vennDiagram-4TSXK5OY-BaYMoIpj.js} +1 -1
- package/dist/{wardleyDiagram-VM6X3IG4-48cUWkfA.js → wardleyDiagram-VM6X3IG4-DjHeuj8p.js} +1 -1
- package/dist/{xychartDiagram-S5SC5T6Z-CswYgYeu.js → xychartDiagram-S5SC5T6Z-Bc_hcuXS.js} +2 -2
- package/package.json +16 -16
- package/src/__mocks__/document.tsx +54 -0
- package/src/__mocks__/notebook.ts +2 -1
- package/src/__mocks__/requests.ts +0 -3
- package/src/__tests__/module-entry.test.ts +44 -0
- package/src/__tests__/mount.test.ts +1 -21
- package/src/__tests__/{host-imports.test.ts → replica-imports.test.ts} +12 -11
- package/src/components/ai/__tests__/ai-model-dropdown.test.tsx +63 -0
- package/src/components/ai/ai-model-dropdown.tsx +11 -6
- package/src/components/app-config/ai-config.tsx +7 -2
- 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__/data-table.test.tsx +1 -0
- package/src/components/data-table/__tests__/date-popover.test.tsx +72 -0
- package/src/components/data-table/__tests__/export-actions.test.tsx +105 -0
- package/src/components/data-table/__tests__/keyboard-selection.test.tsx +188 -0
- package/src/components/data-table/__tests__/pagination.test.tsx +28 -1
- package/src/components/data-table/__tests__/search-highlight.test.tsx +109 -0
- package/src/components/data-table/__tests__/url-detector.test.tsx +74 -0
- package/src/components/data-table/cell-selection/feature.ts +2 -2
- package/src/components/data-table/cell-selection/types.ts +2 -2
- package/src/components/data-table/charts/__tests__/chart-panel.test.tsx +74 -1
- package/src/components/data-table/charts/__tests__/spec-snapshot.test.ts +20 -20
- package/src/components/data-table/charts/__tests__/spec.test.ts +78 -52
- package/src/components/data-table/charts/__tests__/storage.test.ts +4 -1
- package/src/components/data-table/charts/chart-spec/spec.ts +68 -43
- package/src/components/data-table/charts/charts.tsx +40 -30
- package/src/components/data-table/charts/storage.ts +16 -5
- package/src/components/data-table/column-explorer-panel/column-explorer.tsx +1 -1
- package/src/components/data-table/column-summary/chart-spec-model.tsx +23 -16
- package/src/components/data-table/column-summary/column-summary.tsx +2 -4
- package/src/components/data-table/column-visibility-dropdown.tsx +8 -13
- package/src/components/data-table/columns.tsx +45 -46
- package/src/components/data-table/context-menu.tsx +36 -20
- package/src/components/data-table/data-table.tsx +17 -1
- package/src/components/data-table/date-popover.tsx +6 -4
- package/src/components/data-table/export-actions.tsx +76 -48
- package/src/components/data-table/pagination.tsx +44 -33
- package/src/components/data-table/range-focus/atoms.ts +4 -6
- package/src/components/data-table/range-focus/use-cell-range-selection.ts +65 -38
- package/src/components/data-table/range-focus/use-scroll-into-view.ts +21 -2
- package/src/components/data-table/renderers.tsx +16 -7
- package/src/components/data-table/row-viewer-panel/__tests__/row-viewer.test.tsx +24 -1
- package/src/components/data-table/row-viewer-panel/row-viewer.tsx +4 -4
- package/src/components/data-table/search-highlight.tsx +79 -0
- package/src/components/data-table/types.ts +1 -0
- package/src/components/data-table/url-detector.tsx +49 -9
- package/src/components/datasources/__tests__/column-actions.test.tsx +97 -0
- package/src/components/datasources/__tests__/column-preview.test.tsx +96 -5
- package/src/components/datasources/__tests__/datasources-interactions.test.tsx +181 -0
- package/src/components/datasources/__tests__/table-list.test.tsx +118 -0
- package/src/components/datasources/__tests__/utils.test.ts +57 -6
- package/src/components/datasources/column-preview.tsx +17 -12
- package/src/components/datasources/datasources.tsx +55 -42
- package/src/components/datasources/utils.ts +32 -23
- package/src/components/debugger/debugger-code.tsx +5 -0
- 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 +2 -6
- package/src/components/dependency-graph/panels.tsx +4 -2
- package/src/components/dependency-graph/utils/__tests__/layout.test.ts +18 -11
- package/src/components/editor/SortableCell.tsx +1 -3
- package/src/components/editor/__tests__/Output.test.tsx +50 -32
- package/src/{core/attachments/__tests__/toast.test.tsx → components/editor/__tests__/agent-toast.test.tsx} +1 -1
- package/src/components/editor/__tests__/data-attributes.test.tsx +28 -13
- package/src/components/editor/__tests__/dynamic-favicon.test.tsx +111 -18
- package/src/components/editor/__tests__/output-persistence.test.tsx +6 -1
- 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-modal.test.tsx +34 -8
- 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 +2 -2
- package/src/components/editor/actions/pair-with-agent-modal.tsx +19 -16
- package/src/components/editor/actions/useCellActionButton.tsx +20 -26
- package/src/components/editor/actions/useNotebookActions.tsx +14 -19
- package/src/components/editor/actions/useRestartKernel.tsx +1 -1
- package/src/components/editor/actions/useSetCodeVisibility.ts +10 -11
- package/src/components/editor/actions/useSetOutputsExpanded.ts +13 -18
- 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/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 +22 -36
- package/src/components/editor/cell/code/language-toggle.tsx +8 -7
- package/src/components/editor/cell/collapse.tsx +5 -3
- 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 +2 -1
- package/src/components/editor/chrome/components/__tests__/feedback-button.test.tsx +1 -1
- package/src/components/editor/chrome/components/feedback-button.tsx +1 -1
- 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/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/snippets-panel.tsx +10 -12
- package/src/components/editor/chrome/wrapper/__tests__/attachment-status.test.tsx +9 -18
- 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-items/attachment-status.tsx +4 -4
- package/src/components/editor/chrome/wrapper/footer-items/backend-status.tsx +1 -1
- package/src/components/editor/chrome/wrapper/footer-items/document-sync-status.tsx +54 -0
- package/src/components/editor/chrome/wrapper/footer-items/lsp-status.tsx +1 -1
- package/src/components/editor/chrome/wrapper/footer-items/machine-stats.tsx +1 -1
- package/src/components/editor/chrome/wrapper/footer-items/runtime-settings.tsx +1 -7
- package/src/components/editor/chrome/wrapper/footer.tsx +2 -0
- 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/sortable-column.tsx +1 -1
- package/src/components/editor/connections/components.tsx +5 -10
- package/src/components/editor/controls/Controls.tsx +3 -3
- 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 +9 -23
- package/src/components/editor/errors/auto-fix.tsx +4 -8
- package/src/components/editor/errors/send-error-report-button.tsx +3 -6
- package/src/components/editor/file-tree/__tests__/file-explorer-interactions.test.tsx +6 -0
- package/src/components/editor/file-tree/__tests__/file-explorer-navigation.test.tsx +47 -0
- package/src/components/editor/file-tree/__tests__/use-file-search.test.tsx +91 -0
- package/src/components/editor/file-tree/file-explorer.tsx +48 -15
- package/src/components/editor/file-tree/file-name-input.tsx +1 -0
- package/src/components/editor/file-tree/file-viewer.tsx +4 -2
- package/src/components/editor/file-tree/use-file-search.ts +35 -21
- package/src/components/editor/header/__tests__/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.tsx +16 -6
- package/src/components/editor/navigation/__tests__/clipboard.test.ts +60 -38
- package/src/components/editor/navigation/__tests__/navigation.test.ts +73 -64
- package/src/components/editor/navigation/clipboard.ts +12 -11
- package/src/components/editor/navigation/focus-utils.ts +4 -4
- package/src/components/editor/navigation/multi-cell-action-toolbar.tsx +11 -20
- package/src/components/editor/navigation/navigation.ts +20 -28
- package/src/components/editor/notebook-banner.tsx +1 -0
- package/src/components/editor/notebook-cell.tsx +19 -13
- package/src/components/editor/output/MarimoErrorOutput.tsx +2 -1
- package/src/components/editor/output/MarimoTracebackOutput.tsx +19 -17
- package/src/components/editor/output/Outputs.css +8 -0
- package/src/components/editor/output/__tests__/traceback.test.tsx +27 -1
- package/src/components/editor/output/ansi-reduce.ts +33 -20
- package/src/components/editor/output/console/ConsoleOutput.tsx +19 -25
- package/src/components/editor/output/console/__tests__/ConsoleOutput.test.tsx +125 -69
- package/src/components/editor/package-alert.tsx +14 -7
- package/src/components/editor/renderers/cell-array.tsx +10 -17
- package/src/components/editor/renderers/grid-layout/grid-layout.tsx +12 -6
- package/src/components/editor/renderers/vertical-layout/sidebar/toggle.tsx +7 -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 +32 -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 -10
- package/src/components/slides/__tests__/minimap-actions.test.tsx +9 -25
- package/src/components/slides/__tests__/slide-scroll-hint.test.tsx +37 -0
- package/src/components/slides/minimap.tsx +7 -3
- package/src/components/slides/reveal-component.tsx +57 -25
- package/src/components/slides/reveal-slides.css +5 -4
- package/src/components/slides/slide-cell-view.tsx +4 -4
- 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 +2 -1
- package/src/components/tracing/tracing-keyboard.test.tsx +85 -0
- package/src/components/tracing/tracing.tsx +45 -41
- 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/ai/__tests__/staged-cells.test.ts +26 -25
- 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 +6 -22
- 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 +75 -71
- 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 -0
- package/src/core/cells/__tests__/actions.test.ts +474 -34
- package/src/core/cells/__tests__/add-missing-import.test.ts +7 -8
- package/src/core/cells/__tests__/cell.test.ts +39 -0
- package/src/core/cells/__tests__/cells.test.ts +260 -1165
- package/src/core/cells/__tests__/collapseConsoleOutputs.test.ts +54 -0
- package/src/core/cells/__tests__/document.test.ts +414 -0
- package/src/core/cells/__tests__/flush-document.test.ts +40 -0
- package/src/core/cells/__tests__/notebook-outline.test.ts +114 -0
- package/src/core/cells/__tests__/outputs.test.tsx +71 -53
- package/src/core/cells/__tests__/session.test.ts +117 -36
- package/src/core/cells/__tests__/with-document-save.test.ts +67 -0
- package/src/core/cells/actions.ts +391 -3
- package/src/core/cells/add-missing-import.ts +46 -42
- package/src/core/cells/cell.ts +14 -3
- package/src/core/cells/cells.ts +99 -599
- package/src/core/cells/columns.ts +38 -0
- package/src/core/cells/document.ts +392 -0
- package/src/core/cells/outputs.ts +12 -28
- package/src/core/cells/pending-delete-service.ts +2 -6
- package/src/core/cells/session.ts +1 -1
- package/src/core/cells/types.ts +22 -1
- 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/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/notebook-lsp.ts +6 -5
- 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__/config-schema.test.ts +12 -5
- package/src/core/config/config-schema.ts +7 -1
- 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/edit-app.tsx +19 -23
- package/src/core/errors/error-entries.ts +3 -0
- 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 +73 -43
- 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/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 +18 -59
- package/src/core/network/__tests__/connection.test.ts +1 -1
- package/src/core/network/__tests__/requests-lazy.test.ts +1 -3
- package/src/core/network/connection-notice.ts +1 -1
- package/src/core/network/connection.ts +1 -1
- package/src/core/network/requests-lazy.ts +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/attachments.ts +38 -0
- package/src/core/notebook/document/__tests__/codemirror.test.ts +552 -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 +18 -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/notebook/replica/connection.ts +42 -0
- 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 +32 -58
- package/src/core/runtime/adapter.ts +1 -1
- package/src/core/runtime/config.ts +2 -2
- package/src/core/runtime/runtime.ts +38 -42
- package/src/core/runtime/types.ts +0 -2
- package/src/core/saving/filename.ts +1 -1
- package/src/core/saving/save-component.tsx +10 -4
- package/src/core/saving/useAutoSave.ts +1 -1
- package/src/core/session/__tests__/backend.test.ts +235 -0
- package/src/core/session/__tests__/useNotebookReplica.hook.test.tsx +183 -0
- package/src/core/session/__tests__/useNotebookSession.hook.test.tsx +663 -0
- package/src/core/session/active-notebook.ts +11 -0
- package/src/core/session/backend.ts +125 -0
- package/src/core/{websocket → session}/types.ts +2 -2
- package/src/core/session/useNotebookReplica.ts +72 -0
- package/src/core/{websocket → session}/useNotebookSession.tsx +74 -68
- package/src/core/state/__tests__/jotai.test.tsx +108 -0
- package/src/core/state/jotai.ts +1 -1
- package/src/core/static/__tests__/files.test.ts +38 -10
- package/src/core/static/files.ts +2 -0
- package/src/core/{websocket → transports}/__tests__/connection-state.test.ts +1 -13
- package/src/core/transports/__tests__/server.test.ts +408 -0
- package/src/core/transports/__tests__/static.test.ts +175 -0
- package/src/core/transports/__tests__/wasm.test.ts +166 -0
- package/src/core/{websocket → transports}/connection-state.ts +9 -16
- package/src/core/transports/server.ts +152 -0
- package/src/core/transports/static.ts +84 -0
- package/src/core/transports/wasm.ts +97 -0
- package/src/core/wasm/__tests__/bridge.test.ts +213 -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 +1 -5
- package/src/plugins/__tests__/plugin-object-schemas.test.ts +104 -0
- package/src/plugins/core/registerReactComponent.tsx +1 -1
- package/src/plugins/impl/CodeEditorPlugin.tsx +1 -1
- package/src/plugins/impl/DataEditorPlugin.tsx +1 -1
- package/src/plugins/impl/DataTablePlugin.tsx +69 -37
- package/src/plugins/impl/DropdownPlugin.tsx +2 -6
- package/src/plugins/impl/FileBrowserPlugin.tsx +4 -16
- package/src/plugins/impl/FormPlugin.tsx +1 -1
- package/src/plugins/impl/RangeSliderPlugin.tsx +16 -2
- package/src/plugins/impl/RefreshPlugin.tsx +1 -0
- package/src/plugins/impl/SliderPlugin.tsx +6 -8
- package/src/plugins/impl/__tests__/DataTablePlugin.test.tsx +387 -1
- package/src/plugins/impl/__tests__/FileBrowserPlugin.test.tsx +45 -0
- package/src/plugins/impl/__tests__/RangeSliderPlugin.test.tsx +109 -0
- package/src/plugins/impl/__tests__/SliderPlugin.test.tsx +24 -3
- package/src/plugins/impl/anywidget/__tests__/registry.test.ts +153 -0
- package/src/plugins/impl/anywidget/__tests__/widget-binding.test.ts +241 -2
- package/src/plugins/impl/anywidget/model.ts +3 -1
- package/src/plugins/impl/anywidget/registry.ts +18 -14
- package/src/plugins/impl/anywidget/runtime.ts +21 -9
- package/src/plugins/impl/anywidget/widget-binding.ts +160 -82
- package/src/plugins/impl/chat/__tests__/chat-prompts.test.tsx +93 -0
- package/src/plugins/impl/chat/chat-ui.tsx +14 -11
- package/src/plugins/impl/code/any-language-editor.tsx +2 -2
- package/src/plugins/impl/data-editor/glide-data-editor.tsx +8 -5
- package/src/plugins/impl/data-editor/glide-utils.ts +3 -1
- package/src/plugins/impl/data-explorer/ConnectedDataExplorerComponent.tsx +1 -1
- package/src/plugins/impl/data-explorer/components/column-summary.tsx +4 -2
- package/src/plugins/impl/data-explorer/state/reducer.ts +1 -1
- package/src/plugins/impl/data-frames/DataFramePlugin.tsx +1 -2
- package/src/plugins/impl/data-frames/__tests__/sidebar.test.tsx +160 -0
- package/src/plugins/impl/data-frames/forms/__tests__/__snapshots__/form.test.tsx.snap +66 -66
- package/src/plugins/impl/data-frames/panel.tsx +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 +1 -1
- 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 +1 -1
- package/src/stories/runtime-story.tsx +23 -16
- 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__/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/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-DZ_YTVus.js +0 -76
- package/dist/assets/__vite-browser-external-BXYkiFsk.js +0 -1
- package/dist/assets/worker-HPY9fbhz.js +0 -114
- package/dist/mermaid-HWGCJPDP-ByCsZnYF.js +0 -2
- package/dist/precisionRound-DMIVQrt2.js +0 -97
- package/src/core/ai/tools/__tests__/run-cells-tool.test.ts +0 -656
- package/src/core/ai/tools/run-cells-tool.ts +0 -303
- package/src/core/attachments/state.ts +0 -21
- 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__/events.test.ts +0 -46
- package/src/core/host/__tests__/notebook-client.test.ts +0 -191
- package/src/core/host/__tests__/protocol.test.ts +0 -214
- package/src/core/host/connection.ts +0 -81
- package/src/core/host/events.ts +0 -60
- package/src/core/host/notebook-client.ts +0 -226
- 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__/createConnectionTransport.test.ts +0 -49
- package/src/core/websocket/__tests__/useNotebookClient.hook.test.tsx +0 -140
- package/src/core/websocket/__tests__/useNotebookSession.hook.test.tsx +0 -883
- package/src/core/websocket/transports/__tests__/basic.test.ts +0 -275
- package/src/core/websocket/transports/__tests__/sse.test.ts +0 -335
- package/src/core/websocket/transports/__tests__/transport.test.ts +0 -308
- package/src/core/websocket/transports/__tests__/ws.test.ts +0 -125
- package/src/core/websocket/transports/basic.ts +0 -102
- package/src/core/websocket/transports/create.ts +0 -31
- package/src/core/websocket/transports/sse.ts +0 -308
- package/src/core/websocket/transports/transport.ts +0 -50
- package/src/core/websocket/transports/ws.ts +0 -98
- package/src/core/websocket/useNotebookClient.ts +0 -80
- /package/src/{core/attachments/toast.ts → components/editor/agent-toast.ts} +0 -0
- /package/src/core/{websocket → session}/connection-utils.ts +0 -0
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
import { a as e } from "./rolldown-runtime-Cb76FRpK.js";
|
|
2
|
-
import { g as t, h as n, m as r, p as i, r as a, u as o } from "./button-
|
|
2
|
+
import { g as t, h as n, m as r, p as i, r as a, u as o } from "./button-BQRdqQi1.js";
|
|
3
3
|
import { t as s } from "./react-sHtZdjeP.js";
|
|
4
4
|
import { t as c } from "./compiler-runtime-CldRdSsv.js";
|
|
5
|
-
import { c as l,
|
|
6
|
-
import { t as h } from "./check-
|
|
5
|
+
import { c as l, f as u, l as d, m as f, s as p, u as m } from "./tooltip-s4zZxwKe.js";
|
|
6
|
+
import { t as h } from "./check-C9Mp9eCK.js";
|
|
7
7
|
import { t as g } from "./react-dom-DUmH0GXv.js";
|
|
8
8
|
import { t as _ } from "./jsx-runtime-3BD1kT0s.js";
|
|
9
|
-
import {
|
|
10
|
-
import { t as
|
|
11
|
-
var
|
|
9
|
+
import { $ as v, Ct as y, Dt as b, Et as x, Ot as S, Q as C, St as w, Tt as T, bt as E, dt as ee, ft as D, gt as te, ht as O, kt as k, mt as ne, tt as re, wt as ie } from "./use-restore-focus-BgDTd2tc.js";
|
|
10
|
+
import { t as A } from "./invariant-DLmrl-hA.js";
|
|
11
|
+
var j = f("chevron-down", [["path", {
|
|
12
12
|
d: "m6 9 6 6 6-6",
|
|
13
13
|
key: "qrunsl"
|
|
14
|
-
}]]),
|
|
14
|
+
}]]), M = f("chevron-up", [["path", {
|
|
15
15
|
d: "m18 15-6-6-6 6",
|
|
16
16
|
key: "153udz"
|
|
17
|
-
}]]),
|
|
17
|
+
}]]), N = f("x", [["path", {
|
|
18
18
|
d: "M18 6 6 18",
|
|
19
19
|
key: "1bl5f8"
|
|
20
20
|
}], ["path", {
|
|
21
21
|
d: "m6 6 12 12",
|
|
22
22
|
key: "d8bk6v"
|
|
23
|
-
}]]),
|
|
23
|
+
}]]), P = /* @__PURE__ */ e(g(), 1), F = /* @__PURE__ */ e(s(), 1), I = _(), L = Object.defineProperty, R = (e, t) => L(e, "name", {
|
|
24
24
|
value: t,
|
|
25
25
|
configurable: !0
|
|
26
26
|
});
|
|
27
27
|
// @__NO_SIDE_EFFECTS__
|
|
28
|
-
function
|
|
29
|
-
let t = e + "CollectionProvider", [n, r] =
|
|
28
|
+
function z(e) {
|
|
29
|
+
let t = e + "CollectionProvider", [n, r] = S(t), [a, s] = n(t, {
|
|
30
30
|
collectionRef: { current: null },
|
|
31
31
|
itemMap: /* @__PURE__ */ new Map()
|
|
32
|
-
}), c = /* @__PURE__ */
|
|
33
|
-
let { scope: t, children: n } = e, r =
|
|
34
|
-
return /* @__PURE__ */ (0,
|
|
32
|
+
}), c = /* @__PURE__ */ R((e) => {
|
|
33
|
+
let { scope: t, children: n } = e, r = F.useRef(null), i = F.useRef(/* @__PURE__ */ new Map()).current;
|
|
34
|
+
return /* @__PURE__ */ (0, I.jsx)(a, {
|
|
35
35
|
scope: t,
|
|
36
36
|
itemMap: i,
|
|
37
37
|
collectionRef: r,
|
|
@@ -39,20 +39,20 @@ function V(e) {
|
|
|
39
39
|
});
|
|
40
40
|
}, "CollectionProvider");
|
|
41
41
|
c.displayName = t;
|
|
42
|
-
let l = e + "CollectionSlot", u = o(l), d =
|
|
42
|
+
let l = e + "CollectionSlot", u = o(l), d = F.forwardRef((e, t) => {
|
|
43
43
|
let { scope: n, children: r } = e, a = s(l, n), o = i(t, a.collectionRef);
|
|
44
|
-
return /* @__PURE__ */ (0,
|
|
44
|
+
return /* @__PURE__ */ (0, I.jsx)(u, {
|
|
45
45
|
ref: o,
|
|
46
46
|
children: r
|
|
47
47
|
});
|
|
48
48
|
});
|
|
49
49
|
d.displayName = l;
|
|
50
|
-
let f = e + "CollectionItemSlot", p = "data-radix-collection-item", m = o(f), h =
|
|
51
|
-
let { scope: n, children: r, ...a } = e, o =
|
|
52
|
-
return
|
|
50
|
+
let f = e + "CollectionItemSlot", p = "data-radix-collection-item", m = o(f), h = F.forwardRef((e, t) => {
|
|
51
|
+
let { scope: n, children: r, ...a } = e, o = F.useRef(null), c = i(t, o), l = s(f, n);
|
|
52
|
+
return F.useEffect(() => (l.itemMap.set(o, {
|
|
53
53
|
ref: o,
|
|
54
54
|
...a
|
|
55
|
-
}), () => void l.itemMap.delete(o))), /* @__PURE__ */ (0,
|
|
55
|
+
}), () => void l.itemMap.delete(o))), /* @__PURE__ */ (0, I.jsx)(m, {
|
|
56
56
|
[p]: "",
|
|
57
57
|
ref: c,
|
|
58
58
|
children: r
|
|
@@ -61,14 +61,14 @@ function V(e) {
|
|
|
61
61
|
h.displayName = f;
|
|
62
62
|
function g(t) {
|
|
63
63
|
let n = s(e + "CollectionConsumer", t);
|
|
64
|
-
return
|
|
64
|
+
return F.useCallback(() => {
|
|
65
65
|
let e = n.collectionRef.current;
|
|
66
66
|
if (!e) return [];
|
|
67
67
|
let t = Array.from(e.querySelectorAll(`[${p}]`));
|
|
68
68
|
return Array.from(n.itemMap.values()).sort((e, n) => t.indexOf(e.ref.current) - t.indexOf(n.ref.current));
|
|
69
69
|
}, [n.collectionRef, n.itemMap]);
|
|
70
70
|
}
|
|
71
|
-
return
|
|
71
|
+
return R(g, "useCollection"), [
|
|
72
72
|
{
|
|
73
73
|
Provider: c,
|
|
74
74
|
Slot: d,
|
|
@@ -78,32 +78,26 @@ function V(e) {
|
|
|
78
78
|
r
|
|
79
79
|
];
|
|
80
80
|
}
|
|
81
|
-
|
|
82
|
-
var
|
|
81
|
+
R(z, "createCollection");
|
|
82
|
+
var B = /* @__PURE__ */ new WeakMap(), V = class e extends Map {
|
|
83
83
|
static {
|
|
84
|
-
|
|
84
|
+
R(this, "OrderedDict");
|
|
85
85
|
}
|
|
86
86
|
#e;
|
|
87
87
|
constructor(e) {
|
|
88
|
-
super(e), this.#e = [...super.keys()],
|
|
88
|
+
super(e), this.#e = [...super.keys()], B.set(this, !0);
|
|
89
89
|
}
|
|
90
90
|
set(e, t) {
|
|
91
|
-
return
|
|
91
|
+
return B.get(this) && !this.has(e) && this.#e.push(e), super.set(e, t), this;
|
|
92
92
|
}
|
|
93
93
|
insert(e, t, n) {
|
|
94
|
-
let r = this.has(t), i = this
|
|
95
|
-
if (
|
|
96
|
-
let
|
|
97
|
-
|
|
98
|
-
let
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
l[e] === t && (i = l[e + 1]), r && this.delete(t), u = this.get(i), this.set(t, n);
|
|
102
|
-
} else {
|
|
103
|
-
!d && l[e - 1] === t && (d = !0);
|
|
104
|
-
let n = l[d ? e : e - 1], r = u;
|
|
105
|
-
u = this.get(n), this.delete(n), this.set(n, r);
|
|
106
|
-
}
|
|
94
|
+
let r = this.has(t), i = r ? this.size : this.size + 1, a = U(e), o = a >= 0 ? Math.min(a, i - 1) : Math.max(i + a, 0);
|
|
95
|
+
if (r ? this.#e.indexOf(t) === o : o === this.size) return this.set(t, n), this;
|
|
96
|
+
let s = this.#e.filter((e) => e !== t);
|
|
97
|
+
s.splice(o, 0, t);
|
|
98
|
+
let c = s.map((e) => [e, e === t ? n : this.get(e)]);
|
|
99
|
+
this.clear();
|
|
100
|
+
for (let [e, t] of c) this.set(e, t);
|
|
107
101
|
return this;
|
|
108
102
|
}
|
|
109
103
|
with(t, n, r) {
|
|
@@ -116,7 +110,9 @@ var re = /* @__PURE__ */ new WeakMap(), H = class e extends Map {
|
|
|
116
110
|
}
|
|
117
111
|
setBefore(e, t, n) {
|
|
118
112
|
let r = this.#e.indexOf(e);
|
|
119
|
-
|
|
113
|
+
if (r === -1) return this;
|
|
114
|
+
let i = this.#e.indexOf(t), a = i !== -1 && i < r ? r - 1 : r;
|
|
115
|
+
return this.insert(a, t, n);
|
|
120
116
|
}
|
|
121
117
|
after(e) {
|
|
122
118
|
let t = this.#e.indexOf(e);
|
|
@@ -124,7 +120,9 @@ var re = /* @__PURE__ */ new WeakMap(), H = class e extends Map {
|
|
|
124
120
|
}
|
|
125
121
|
setAfter(e, t, n) {
|
|
126
122
|
let r = this.#e.indexOf(e);
|
|
127
|
-
|
|
123
|
+
if (r === -1) return this;
|
|
124
|
+
let i = this.#e.indexOf(t), a = i !== -1 && i <= r ? r : r + 1;
|
|
125
|
+
return this.insert(a, t, n);
|
|
128
126
|
}
|
|
129
127
|
first() {
|
|
130
128
|
return this.entryAt(0);
|
|
@@ -144,18 +142,18 @@ var re = /* @__PURE__ */ new WeakMap(), H = class e extends Map {
|
|
|
144
142
|
return t !== void 0 && this.delete(t);
|
|
145
143
|
}
|
|
146
144
|
at(e) {
|
|
147
|
-
let t =
|
|
145
|
+
let t = H(this.#e, e);
|
|
148
146
|
if (t !== void 0) return this.get(t);
|
|
149
147
|
}
|
|
150
148
|
entryAt(e) {
|
|
151
|
-
let t =
|
|
149
|
+
let t = H(this.#e, e);
|
|
152
150
|
if (t !== void 0) return [t, this.get(t)];
|
|
153
151
|
}
|
|
154
152
|
indexOf(e) {
|
|
155
153
|
return this.#e.indexOf(e);
|
|
156
154
|
}
|
|
157
155
|
keyAt(e) {
|
|
158
|
-
return
|
|
156
|
+
return H(this.#e, e);
|
|
159
157
|
}
|
|
160
158
|
from(e, t) {
|
|
161
159
|
let n = this.indexOf(e);
|
|
@@ -211,29 +209,41 @@ var re = /* @__PURE__ */ new WeakMap(), H = class e extends Map {
|
|
|
211
209
|
return new e(r);
|
|
212
210
|
}
|
|
213
211
|
reduce(...e) {
|
|
214
|
-
let [t, n] = e, r =
|
|
215
|
-
|
|
212
|
+
let [t, n] = e, r = e.length > 1;
|
|
213
|
+
if (!r && this.size === 0) throw TypeError("Reduce of empty OrderedDict with no initial value");
|
|
214
|
+
let i = 0, a = n;
|
|
215
|
+
for (let e of this) a = i === 0 && !r ? e : Reflect.apply(t, this, [
|
|
216
|
+
a,
|
|
217
|
+
e,
|
|
216
218
|
i,
|
|
217
|
-
n,
|
|
218
|
-
r,
|
|
219
219
|
this
|
|
220
|
-
]),
|
|
221
|
-
return
|
|
220
|
+
]), i++;
|
|
221
|
+
return a;
|
|
222
222
|
}
|
|
223
223
|
reduceRight(...e) {
|
|
224
|
-
let [t, n] = e, r =
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
224
|
+
let [t, n] = e, r = e.length > 1;
|
|
225
|
+
if (!r && this.size === 0) throw TypeError("Reduce of empty OrderedDict with no initial value");
|
|
226
|
+
let i = n;
|
|
227
|
+
for (let e = this.size - 1; e >= 0; e--) {
|
|
228
|
+
let n = this.entryAt(e);
|
|
229
|
+
i = e === this.size - 1 && !r ? n : Reflect.apply(t, this, [
|
|
229
230
|
i,
|
|
230
231
|
n,
|
|
232
|
+
e,
|
|
231
233
|
this
|
|
232
234
|
]);
|
|
233
235
|
}
|
|
234
|
-
return
|
|
236
|
+
return i;
|
|
237
|
+
}
|
|
238
|
+
sort(e) {
|
|
239
|
+
if (typeof e != "function") throw TypeError("OrderedDict.sort requires a compare function");
|
|
240
|
+
let t = [...this.entries()].sort(e);
|
|
241
|
+
this.clear();
|
|
242
|
+
for (let [e, n] of t) this.set(e, n);
|
|
243
|
+
return this;
|
|
235
244
|
}
|
|
236
245
|
toSorted(t) {
|
|
246
|
+
if (typeof t != "function") throw TypeError("OrderedDict.toSorted requires a compare function");
|
|
237
247
|
let n = [...this.entries()].sort(t);
|
|
238
248
|
return new e(n);
|
|
239
249
|
}
|
|
@@ -250,13 +260,8 @@ var re = /* @__PURE__ */ new WeakMap(), H = class e extends Map {
|
|
|
250
260
|
return n.splice(...t), new e(n);
|
|
251
261
|
}
|
|
252
262
|
slice(t, n) {
|
|
253
|
-
let r = new e()
|
|
254
|
-
|
|
255
|
-
t < 0 && (t += this.size), n !== void 0 && n > 0 && (i = n - 1);
|
|
256
|
-
for (let e = t; e <= i; e++) {
|
|
257
|
-
let t = this.keyAt(e), n = this.get(t);
|
|
258
|
-
r.set(t, n);
|
|
259
|
-
}
|
|
263
|
+
let r = new e();
|
|
264
|
+
for (let e of this.#e.slice(t, n)) r.set(e, this.get(e));
|
|
260
265
|
return r;
|
|
261
266
|
}
|
|
262
267
|
every(e, t) {
|
|
@@ -284,118 +289,153 @@ var re = /* @__PURE__ */ new WeakMap(), H = class e extends Map {
|
|
|
284
289
|
return !1;
|
|
285
290
|
}
|
|
286
291
|
};
|
|
287
|
-
function
|
|
292
|
+
function H(e, t) {
|
|
288
293
|
if ("at" in Array.prototype) return Array.prototype.at.call(e, t);
|
|
289
|
-
let n =
|
|
294
|
+
let n = ae(e, t);
|
|
290
295
|
return n === -1 ? void 0 : e[n];
|
|
291
296
|
}
|
|
292
|
-
|
|
293
|
-
function
|
|
294
|
-
let n = e.length, r =
|
|
297
|
+
R(H, "at");
|
|
298
|
+
function ae(e, t) {
|
|
299
|
+
let n = e.length, r = U(t), i = r >= 0 ? r : n + r;
|
|
295
300
|
return i < 0 || i >= n ? -1 : i;
|
|
296
301
|
}
|
|
297
|
-
|
|
298
|
-
function
|
|
302
|
+
R(ae, "toSafeIndex");
|
|
303
|
+
function U(e) {
|
|
299
304
|
return e !== e || e === 0 ? 0 : Math.trunc(e);
|
|
300
305
|
}
|
|
301
|
-
|
|
306
|
+
R(U, "toSafeInteger");
|
|
302
307
|
// @__NO_SIDE_EFFECTS__
|
|
303
|
-
function
|
|
304
|
-
let t = e + "CollectionProvider", [n, r] =
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
setItemMap: /* @__PURE__ */ B(() => void 0, "setItemMap")
|
|
310
|
-
}), c = /* @__PURE__ */ B(({ state: e, ...t }) => e ? /* @__PURE__ */ (0, R.jsx)(u, {
|
|
308
|
+
function oe(e) {
|
|
309
|
+
let t = e + "CollectionProvider", [n, r] = S(t), [a, s] = n(t);
|
|
310
|
+
a.displayName = e + "CollectionStableContextProvider";
|
|
311
|
+
let [c, l] = n(t);
|
|
312
|
+
c.displayName = e + "CollectionStatefulContextProvider";
|
|
313
|
+
let u = /* @__PURE__ */ R(({ state: e, ...t }) => e ? /* @__PURE__ */ (0, I.jsx)(f, {
|
|
311
314
|
...t,
|
|
312
315
|
state: e
|
|
313
|
-
}) : /* @__PURE__ */ (0,
|
|
314
|
-
|
|
315
|
-
let
|
|
316
|
-
let t =
|
|
317
|
-
return /* @__PURE__ */ (0,
|
|
316
|
+
}) : /* @__PURE__ */ (0, I.jsx)(d, { ...t }), "CollectionProvider");
|
|
317
|
+
u.displayName = t;
|
|
318
|
+
let d = /* @__PURE__ */ R((e) => {
|
|
319
|
+
let t = y();
|
|
320
|
+
return /* @__PURE__ */ (0, I.jsx)(f, {
|
|
318
321
|
...e,
|
|
319
322
|
state: t
|
|
320
323
|
});
|
|
321
324
|
}, "CollectionInit");
|
|
322
|
-
|
|
323
|
-
let
|
|
324
|
-
let { scope: t, children: n, state: r } = e, o =
|
|
325
|
-
|
|
325
|
+
d.displayName = e + "CollectionInit";
|
|
326
|
+
let f = /* @__PURE__ */ R((e) => {
|
|
327
|
+
let { scope: t, children: n, state: r } = e, o = F.useRef(null), [s, l] = F.useState(null), u = i(o, l), [d, f] = r, p = F.useRef(new V()), m = F.useCallback(() => {
|
|
328
|
+
let e = p.current;
|
|
329
|
+
return ce(e) || e.sort(le), e;
|
|
330
|
+
}, []);
|
|
331
|
+
return F.useEffect(() => {
|
|
326
332
|
if (!s) return;
|
|
327
|
-
let e =
|
|
333
|
+
let e = ue(() => {
|
|
334
|
+
f((e) => {
|
|
335
|
+
let t = e.toSorted(le);
|
|
336
|
+
return t.some(([t], n) => e.keyAt(n) !== t) ? t : e;
|
|
337
|
+
});
|
|
338
|
+
});
|
|
328
339
|
return e.observe(s, {
|
|
329
340
|
childList: !0,
|
|
330
341
|
subtree: !0
|
|
331
342
|
}), () => {
|
|
332
343
|
e.disconnect();
|
|
333
344
|
};
|
|
334
|
-
}, [s]), /* @__PURE__ */ (0,
|
|
345
|
+
}, [s, f]), /* @__PURE__ */ (0, I.jsx)(a, {
|
|
335
346
|
scope: t,
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
children:
|
|
347
|
+
collectionElementRef: u,
|
|
348
|
+
collectionElementRefObject: o,
|
|
349
|
+
getCollection: m,
|
|
350
|
+
setCollection: f,
|
|
351
|
+
registryRef: p,
|
|
352
|
+
children: /* @__PURE__ */ (0, I.jsx)(c, {
|
|
353
|
+
scope: t,
|
|
354
|
+
collectionElement: s,
|
|
355
|
+
collection: d,
|
|
356
|
+
children: n
|
|
357
|
+
})
|
|
342
358
|
});
|
|
343
359
|
}, "CollectionProviderImpl");
|
|
344
|
-
|
|
345
|
-
let
|
|
346
|
-
let { scope: n, children: r } = e, a = s(
|
|
347
|
-
return /* @__PURE__ */ (0,
|
|
360
|
+
f.displayName = e + "CollectionProviderImpl";
|
|
361
|
+
let p = e + "CollectionSlot", m = o(p), h = F.forwardRef((e, t) => {
|
|
362
|
+
let { scope: n, children: r } = e, a = s(p, n), o = i(t, a.collectionElementRef);
|
|
363
|
+
return /* @__PURE__ */ (0, I.jsx)(m, {
|
|
348
364
|
ref: o,
|
|
349
365
|
children: r
|
|
350
366
|
});
|
|
351
367
|
});
|
|
352
|
-
|
|
353
|
-
let
|
|
354
|
-
let { scope: n, children: r, ...a } = e, o =
|
|
355
|
-
|
|
356
|
-
let
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
d
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
368
|
+
h.displayName = p;
|
|
369
|
+
let g = e + "CollectionItemSlot", _ = o(g), v = F.forwardRef((e, t) => {
|
|
370
|
+
let { scope: n, children: r, ...a } = e, o = F.useRef(null), { setCollection: c, registryRef: l } = s(g, n), u = F.useRef(a);
|
|
371
|
+
se(u.current, a) || (u.current = a);
|
|
372
|
+
let d = u.current, f = F.useCallback((e) => {
|
|
373
|
+
let t = l.current;
|
|
374
|
+
e ? t.set(e, {
|
|
375
|
+
...u.current,
|
|
376
|
+
element: e
|
|
377
|
+
}) : o.current && t.delete(o.current);
|
|
378
|
+
}, [l]), p = i(t, f, o);
|
|
379
|
+
b(() => {
|
|
380
|
+
let e = o.current, t = l.current;
|
|
381
|
+
e && t.has(e) && t.set(e, {
|
|
382
|
+
...d,
|
|
383
|
+
element: e
|
|
384
|
+
});
|
|
385
|
+
}, [d, l]);
|
|
386
|
+
let m = F.useRef(null);
|
|
387
|
+
return F.useEffect(() => {
|
|
388
|
+
let e = o.current, t = m.current;
|
|
389
|
+
(t?.element ?? null) === e && (!e || t?.itemData === d) || (m.current = e ? {
|
|
390
|
+
element: e,
|
|
391
|
+
itemData: d
|
|
392
|
+
} : null, c((n) => {
|
|
393
|
+
let r = new V(n);
|
|
394
|
+
return t && t.element !== e && r.delete(t.element), e && r.set(e, {
|
|
395
|
+
...d,
|
|
396
|
+
element: e
|
|
397
|
+
}), r.sort(le);
|
|
398
|
+
}));
|
|
399
|
+
}), F.useEffect(() => () => {
|
|
400
|
+
let e = m.current;
|
|
401
|
+
m.current = null, e && c((t) => {
|
|
402
|
+
if (!t.has(e.element)) return t;
|
|
403
|
+
let n = new V(t);
|
|
404
|
+
return n.delete(e.element), n;
|
|
405
|
+
});
|
|
406
|
+
}, [c]), /* @__PURE__ */ (0, I.jsx)(_, {
|
|
373
407
|
"data-radix-collection-item": "",
|
|
374
|
-
ref:
|
|
408
|
+
ref: p,
|
|
375
409
|
children: r
|
|
376
410
|
});
|
|
377
411
|
});
|
|
378
|
-
|
|
379
|
-
function
|
|
380
|
-
return
|
|
412
|
+
v.displayName = g;
|
|
413
|
+
function y() {
|
|
414
|
+
return F.useState(new V());
|
|
415
|
+
}
|
|
416
|
+
R(y, "useInitCollection");
|
|
417
|
+
function x(t) {
|
|
418
|
+
let { collection: n } = l(e + "CollectionConsumer", t);
|
|
419
|
+
return n;
|
|
381
420
|
}
|
|
382
|
-
|
|
383
|
-
function
|
|
384
|
-
let {
|
|
421
|
+
R(x, "useCollection");
|
|
422
|
+
function C(t) {
|
|
423
|
+
let { getCollection: n } = s(e + "CollectionConsumer", t);
|
|
385
424
|
return n;
|
|
386
425
|
}
|
|
387
|
-
return
|
|
388
|
-
Provider:
|
|
389
|
-
Slot:
|
|
390
|
-
ItemSlot:
|
|
426
|
+
return R(C, "useGetCollection"), [{
|
|
427
|
+
Provider: u,
|
|
428
|
+
Slot: h,
|
|
429
|
+
ItemSlot: v
|
|
391
430
|
}, {
|
|
392
431
|
createCollectionScope: r,
|
|
393
|
-
useCollection:
|
|
394
|
-
|
|
432
|
+
useCollection: x,
|
|
433
|
+
useGetCollection: C,
|
|
434
|
+
useInitCollection: y
|
|
395
435
|
}];
|
|
396
436
|
}
|
|
397
|
-
|
|
398
|
-
function
|
|
437
|
+
R(oe, "createCollection");
|
|
438
|
+
function se(e, t) {
|
|
399
439
|
if (e === t) return !0;
|
|
400
440
|
if (typeof e != "object" || typeof t != "object" || e == null || t == null) return !1;
|
|
401
441
|
let n = Object.keys(e), r = Object.keys(t);
|
|
@@ -403,16 +443,28 @@ function oe(e, t) {
|
|
|
403
443
|
for (let r of n) if (!Object.prototype.hasOwnProperty.call(t, r) || e[r] !== t[r]) return !1;
|
|
404
444
|
return !0;
|
|
405
445
|
}
|
|
406
|
-
|
|
407
|
-
function
|
|
446
|
+
R(se, "shallowEqual");
|
|
447
|
+
function W(e, t) {
|
|
408
448
|
return !!(t.compareDocumentPosition(e) & Node.DOCUMENT_POSITION_PRECEDING);
|
|
409
449
|
}
|
|
410
|
-
|
|
411
|
-
function ce(e
|
|
412
|
-
|
|
450
|
+
R(W, "isElementPreceding");
|
|
451
|
+
function ce(e) {
|
|
452
|
+
let t;
|
|
453
|
+
for (let n of e.keys()) {
|
|
454
|
+
if (t) {
|
|
455
|
+
let e = t.compareDocumentPosition(n);
|
|
456
|
+
if (!(e & Node.DOCUMENT_POSITION_DISCONNECTED) && e & Node.DOCUMENT_POSITION_PRECEDING) return !1;
|
|
457
|
+
}
|
|
458
|
+
t = n;
|
|
459
|
+
}
|
|
460
|
+
return !0;
|
|
461
|
+
}
|
|
462
|
+
R(ce, "isInDocumentOrder");
|
|
463
|
+
function le(e, t) {
|
|
464
|
+
return !e[1].element || !t[1].element ? 0 : W(e[1].element, t[1].element) ? -1 : 1;
|
|
413
465
|
}
|
|
414
|
-
|
|
415
|
-
function
|
|
466
|
+
R(le, "sortByDocumentPosition");
|
|
467
|
+
function ue(e) {
|
|
416
468
|
return new MutationObserver((t) => {
|
|
417
469
|
for (let n of t) if (n.type === "childList") {
|
|
418
470
|
e();
|
|
@@ -420,145 +472,148 @@ function le(e) {
|
|
|
420
472
|
}
|
|
421
473
|
});
|
|
422
474
|
}
|
|
423
|
-
|
|
424
|
-
//#endregion
|
|
425
|
-
//#region ../node_modules/.pnpm/@radix-ui+react-direction@1.1.4_@types+react@19.3.0_react@19.3.0/node_modules/@radix-ui/react-direction/dist/index.mjs
|
|
426
|
-
var ue = Object.defineProperty, de = (e, t) => ue(e, "name", {
|
|
427
|
-
value: t,
|
|
428
|
-
configurable: !0
|
|
429
|
-
}), fe = L.createContext(void 0);
|
|
430
|
-
function pe(e) {
|
|
431
|
-
let t = L.useContext(fe);
|
|
432
|
-
return e || t || "ltr";
|
|
433
|
-
}
|
|
434
|
-
de(pe, "useDirection");
|
|
475
|
+
R(ue, "getChildListObserver");
|
|
435
476
|
//#endregion
|
|
436
|
-
//#region ../node_modules/.pnpm/@radix-ui+react-
|
|
437
|
-
var
|
|
477
|
+
//#region ../node_modules/.pnpm/@radix-ui+react-direction@1.2.0_@types+react@19.3.0_react@19.3.0/node_modules/@radix-ui/react-direction/dist/index.mjs
|
|
478
|
+
var de = Object.defineProperty, fe = (e, t) => de(e, "name", {
|
|
438
479
|
value: t,
|
|
439
480
|
configurable: !0
|
|
440
|
-
})
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
return
|
|
481
|
+
}), pe = {
|
|
482
|
+
LTR: "ltr",
|
|
483
|
+
RTL: "rtl"
|
|
484
|
+
}, me = F.createContext(void 0);
|
|
485
|
+
function he(e) {
|
|
486
|
+
let t = F.useContext(me);
|
|
487
|
+
return e || t || pe.LTR;
|
|
447
488
|
}
|
|
448
|
-
he
|
|
489
|
+
fe(he, "useDirection");
|
|
449
490
|
//#endregion
|
|
450
491
|
//#region ../node_modules/.pnpm/@radix-ui+number@1.1.3/node_modules/@radix-ui/number/dist/index.mjs
|
|
451
|
-
var
|
|
492
|
+
var ge = Object.defineProperty, _e = (e, t) => ge(e, "name", {
|
|
452
493
|
value: t,
|
|
453
494
|
configurable: !0
|
|
454
495
|
});
|
|
455
|
-
function
|
|
496
|
+
function ve(e, [t, n]) {
|
|
456
497
|
return Math.min(n, Math.max(t, e));
|
|
457
498
|
}
|
|
458
|
-
ve
|
|
499
|
+
_e(ve, "clamp");
|
|
459
500
|
//#endregion
|
|
460
|
-
//#region ../node_modules/.pnpm/@radix-ui+react-select@2.
|
|
461
|
-
var
|
|
501
|
+
//#region ../node_modules/.pnpm/@radix-ui+react-select@2.4.1_@types+react-dom@19.3.0_@types+react@19.3.0__@types+react@_41875abfe3e9c9a7ec650dda663f0eb9/node_modules/@radix-ui/react-select/dist/index.mjs
|
|
502
|
+
var ye = Object.defineProperty, G = (e, t) => ye(e, "name", {
|
|
462
503
|
value: t,
|
|
463
504
|
configurable: !0
|
|
464
|
-
}),
|
|
505
|
+
}), be = {
|
|
506
|
+
ItemAligned: "item-aligned",
|
|
507
|
+
Popper: "popper"
|
|
508
|
+
}, xe = {
|
|
509
|
+
LTR: "ltr",
|
|
510
|
+
RTL: "rtl"
|
|
511
|
+
}, Se = [
|
|
465
512
|
" ",
|
|
466
513
|
"Enter",
|
|
467
514
|
"ArrowUp",
|
|
468
515
|
"ArrowDown"
|
|
469
|
-
],
|
|
470
|
-
function
|
|
471
|
-
let { __scopeSelect: t, children: n, open: r, defaultOpen: i, onOpenChange: a, value: o, defaultValue: s, onValueChange: c, dir: l, name: u, autoComplete:
|
|
516
|
+
], Ce = [" ", "Enter"], K = "Select", [we, Te, Ee] = /* @__PURE__ */ z(K), [q, De] = S(K, [Ee, m]), Oe = m(), [ke, J] = q(K), [Ae, je] = q(K);
|
|
517
|
+
function Me(e) {
|
|
518
|
+
let { __scopeSelect: t, children: n, open: r, defaultOpen: i, onOpenChange: a, value: o, defaultValue: s, onValueChange: c, dir: l, name: u, autoComplete: d, disabled: f, required: m, form: h, internal_do_not_use_render: g } = e, _ = Oe(t), [v, b] = F.useState(null), [x, S] = F.useState(null), [C, w] = F.useState(!1), E = he(l), [ee, D] = T({
|
|
472
519
|
prop: r,
|
|
473
520
|
defaultProp: i ?? !1,
|
|
474
521
|
onChange: a,
|
|
475
522
|
caller: K
|
|
476
|
-
}), [
|
|
523
|
+
}), [te, O] = T({
|
|
477
524
|
prop: o,
|
|
478
525
|
defaultProp: s,
|
|
479
526
|
onChange: c,
|
|
480
527
|
caller: K
|
|
481
|
-
}),
|
|
482
|
-
|
|
528
|
+
}), k = F.useRef(null), ne = F.useRef(!1), [re, ie] = F.useState(null), A = /* @__PURE__ */ G((e) => {
|
|
529
|
+
ie({
|
|
530
|
+
value: e,
|
|
531
|
+
hasConsumerStoppedPropagation: ne.current
|
|
532
|
+
}), O(e);
|
|
533
|
+
}, "handleUserSelect"), j = F.useRef(te);
|
|
534
|
+
F.useEffect(() => {
|
|
483
535
|
let e = h ? v?.ownerDocument.getElementById(h) : v?.form;
|
|
484
536
|
if (e instanceof HTMLFormElement) {
|
|
485
|
-
let t = /* @__PURE__ */ G(() =>
|
|
537
|
+
let t = /* @__PURE__ */ G(() => O(j.current), "reset");
|
|
486
538
|
return e.addEventListener("reset", t), () => e.removeEventListener("reset", t);
|
|
487
539
|
}
|
|
488
540
|
}, [
|
|
489
541
|
h,
|
|
490
542
|
v,
|
|
491
|
-
|
|
543
|
+
O
|
|
492
544
|
]);
|
|
493
|
-
let
|
|
494
|
-
|
|
495
|
-
}, []),
|
|
496
|
-
|
|
545
|
+
let M = !v || !!h || !!v.closest("form"), [N, P] = F.useState(/* @__PURE__ */ new Set()), L = y(), R = Array.from(N).map((e) => e.props.value).join(";"), z = F.useCallback((e) => {
|
|
546
|
+
P((t) => new Set(t).add(e));
|
|
547
|
+
}, []), B = F.useCallback((e) => {
|
|
548
|
+
P((t) => {
|
|
497
549
|
let n = new Set(t);
|
|
498
550
|
return n.delete(e), n;
|
|
499
551
|
});
|
|
500
|
-
}, []),
|
|
552
|
+
}, []), V = {
|
|
501
553
|
required: m,
|
|
502
554
|
trigger: v,
|
|
503
|
-
onTriggerChange:
|
|
504
|
-
valueNode:
|
|
505
|
-
onValueNodeChange:
|
|
506
|
-
valueNodeHasChildren:
|
|
507
|
-
onValueNodeHasChildrenChange:
|
|
508
|
-
contentId:
|
|
509
|
-
value:
|
|
510
|
-
onValueChange:
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
555
|
+
onTriggerChange: b,
|
|
556
|
+
valueNode: x,
|
|
557
|
+
onValueNodeChange: S,
|
|
558
|
+
valueNodeHasChildren: C,
|
|
559
|
+
onValueNodeHasChildrenChange: w,
|
|
560
|
+
contentId: L,
|
|
561
|
+
value: te,
|
|
562
|
+
onValueChange: O,
|
|
563
|
+
hasConsumerStoppedPropagationRef: ne,
|
|
564
|
+
userSelection: re,
|
|
565
|
+
onUserSelect: A,
|
|
566
|
+
open: ee,
|
|
567
|
+
onOpenChange: D,
|
|
568
|
+
dir: E,
|
|
569
|
+
triggerPointerDownPosRef: k,
|
|
570
|
+
disabled: f,
|
|
516
571
|
name: u,
|
|
517
|
-
autoComplete:
|
|
572
|
+
autoComplete: d,
|
|
518
573
|
form: h,
|
|
519
|
-
nativeOptions:
|
|
520
|
-
nativeSelectKey:
|
|
521
|
-
isFormControl:
|
|
574
|
+
nativeOptions: N,
|
|
575
|
+
nativeSelectKey: R,
|
|
576
|
+
isFormControl: M
|
|
522
577
|
};
|
|
523
|
-
return /* @__PURE__ */ (0,
|
|
578
|
+
return /* @__PURE__ */ (0, I.jsx)(p, {
|
|
524
579
|
..._,
|
|
525
|
-
children: /* @__PURE__ */ (0,
|
|
580
|
+
children: /* @__PURE__ */ (0, I.jsx)(ke, {
|
|
526
581
|
scope: t,
|
|
527
|
-
...
|
|
528
|
-
children: /* @__PURE__ */ (0,
|
|
582
|
+
...V,
|
|
583
|
+
children: /* @__PURE__ */ (0, I.jsx)(we.Provider, {
|
|
529
584
|
scope: t,
|
|
530
|
-
children: /* @__PURE__ */ (0,
|
|
585
|
+
children: /* @__PURE__ */ (0, I.jsx)(Ae, {
|
|
531
586
|
scope: t,
|
|
532
|
-
onNativeOptionAdd:
|
|
533
|
-
onNativeOptionRemove:
|
|
534
|
-
children:
|
|
587
|
+
onNativeOptionAdd: z,
|
|
588
|
+
onNativeOptionRemove: B,
|
|
589
|
+
children: bt(g) ? g(V) : n
|
|
535
590
|
})
|
|
536
591
|
})
|
|
537
592
|
})
|
|
538
593
|
});
|
|
539
594
|
}
|
|
540
|
-
G(
|
|
541
|
-
var
|
|
595
|
+
G(Me, "SelectProvider");
|
|
596
|
+
var Ne = /* @__PURE__ */ G((e) => {
|
|
542
597
|
let { __scopeSelect: t, children: n, ...r } = e;
|
|
543
|
-
return /* @__PURE__ */ (0,
|
|
598
|
+
return /* @__PURE__ */ (0, I.jsx)(Me, {
|
|
544
599
|
__scopeSelect: t,
|
|
545
600
|
...r,
|
|
546
|
-
internal_do_not_use_render: ({ isFormControl: e }) => /* @__PURE__ */ (0,
|
|
601
|
+
internal_do_not_use_render: ({ isFormControl: e }) => /* @__PURE__ */ (0, I.jsxs)(I.Fragment, { children: [n, e ? /* @__PURE__ */ (0, I.jsx)(yt, { __scopeSelect: t }) : null] })
|
|
547
602
|
});
|
|
548
|
-
}, "Select"),
|
|
549
|
-
let { __scopeSelect: n, disabled: r = !1, ...a } = e, o =
|
|
550
|
-
let t =
|
|
551
|
-
n !== void 0 && s.
|
|
603
|
+
}, "Select"), Pe = "SelectTrigger", Fe = /* @__PURE__ */ F.forwardRef(/* @__PURE__ */ G(function(e, t) {
|
|
604
|
+
let { __scopeSelect: n, disabled: r = !1, ...a } = e, o = Oe(n), s = J(Pe, n), c = s.disabled || r, u = i(t, s.onTriggerChange), d = Te(n), f = F.useRef("touch"), [p, m, h] = xt((e) => {
|
|
605
|
+
let t = d().filter((e) => !e.disabled), n = St(t, e, t.find((e) => e.value === s.value));
|
|
606
|
+
n !== void 0 && s.onUserSelect(n.value);
|
|
552
607
|
}), g = /* @__PURE__ */ G((e) => {
|
|
553
608
|
c || (s.onOpenChange(!0), h()), e && (s.triggerPointerDownPosRef.current = {
|
|
554
609
|
x: Math.round(e.pageX),
|
|
555
610
|
y: Math.round(e.pageY)
|
|
556
611
|
});
|
|
557
612
|
}, "handleOpen");
|
|
558
|
-
return /* @__PURE__ */ (0,
|
|
613
|
+
return /* @__PURE__ */ (0, I.jsx)(l, {
|
|
559
614
|
asChild: !0,
|
|
560
615
|
...o,
|
|
561
|
-
children: /* @__PURE__ */ (0,
|
|
616
|
+
children: /* @__PURE__ */ (0, I.jsx)(k.button, {
|
|
562
617
|
type: "button",
|
|
563
618
|
role: "combobox",
|
|
564
619
|
"aria-controls": s.open ? s.contentId : void 0,
|
|
@@ -571,97 +626,97 @@ var Me = /* @__PURE__ */ G((e) => {
|
|
|
571
626
|
"data-disabled": c ? "" : void 0,
|
|
572
627
|
"data-placeholder": Q(s.value) ? "" : void 0,
|
|
573
628
|
...a,
|
|
574
|
-
ref:
|
|
575
|
-
onClick:
|
|
576
|
-
e.currentTarget.focus(),
|
|
629
|
+
ref: u,
|
|
630
|
+
onClick: x(a.onClick, (e) => {
|
|
631
|
+
e.currentTarget.focus(), f.current !== "mouse" && g(e);
|
|
577
632
|
}),
|
|
578
|
-
onPointerDown:
|
|
579
|
-
|
|
633
|
+
onPointerDown: x(a.onPointerDown, (e) => {
|
|
634
|
+
f.current = e.pointerType;
|
|
580
635
|
let t = e.target;
|
|
581
636
|
t.hasPointerCapture(e.pointerId) && t.releasePointerCapture(e.pointerId), e.button === 0 && e.ctrlKey === !1 && e.pointerType === "mouse" && (g(e), e.preventDefault());
|
|
582
637
|
}),
|
|
583
|
-
onKeyDown:
|
|
584
|
-
let t =
|
|
585
|
-
!(e.ctrlKey || e.altKey || e.metaKey) && e.key.length === 1 && m(e.key), !(t && e.key === " ") &&
|
|
638
|
+
onKeyDown: x(a.onKeyDown, (e) => {
|
|
639
|
+
let t = p.current !== "";
|
|
640
|
+
!(e.ctrlKey || e.altKey || e.metaKey) && e.key.length === 1 && (s.hasConsumerStoppedPropagationRef.current = e.isPropagationStopped(), m(e.key)), !(t && e.key === " ") && Se.includes(e.key) && (g(), e.preventDefault());
|
|
586
641
|
})
|
|
587
642
|
})
|
|
588
643
|
});
|
|
589
|
-
}, "SelectTrigger")),
|
|
590
|
-
let { __scopeSelect: n, className: r, style: a, children: o, placeholder: s = "", ...c } = e, l = J(
|
|
591
|
-
|
|
644
|
+
}, "SelectTrigger")), Ie = "SelectValue", Le = /* @__PURE__ */ F.forwardRef(/* @__PURE__ */ G(function(e, t) {
|
|
645
|
+
let { __scopeSelect: n, className: r, style: a, children: o, placeholder: s = "", ...c } = e, l = J(Ie, n), { onValueNodeHasChildrenChange: u } = l, d = o !== void 0, f = i(t, l.onValueNodeChange);
|
|
646
|
+
b(() => {
|
|
592
647
|
u(d);
|
|
593
648
|
}, [u, d]);
|
|
594
649
|
let p = Q(l.value);
|
|
595
|
-
return /* @__PURE__ */ (0,
|
|
650
|
+
return /* @__PURE__ */ (0, I.jsx)(k.span, {
|
|
596
651
|
...c,
|
|
597
652
|
asChild: !p && c.asChild,
|
|
598
653
|
ref: f,
|
|
599
654
|
style: { pointerEvents: "none" },
|
|
600
|
-
children: /* @__PURE__ */ (0,
|
|
655
|
+
children: /* @__PURE__ */ (0, I.jsx)(F.Fragment, { children: p ? s : o }, p ? "placeholder" : "value")
|
|
601
656
|
});
|
|
602
|
-
}, "SelectValue")),
|
|
657
|
+
}, "SelectValue")), Re = /* @__PURE__ */ F.forwardRef(/* @__PURE__ */ G(function(e, t) {
|
|
603
658
|
let { __scopeSelect: n, children: r, ...i } = e;
|
|
604
|
-
return /* @__PURE__ */ (0,
|
|
659
|
+
return /* @__PURE__ */ (0, I.jsx)(k.span, {
|
|
605
660
|
"aria-hidden": !0,
|
|
606
661
|
...i,
|
|
607
662
|
ref: t,
|
|
608
663
|
children: r || "▼"
|
|
609
664
|
});
|
|
610
|
-
}, "SelectIcon")), [
|
|
665
|
+
}, "SelectIcon")), [ze, Be] = q("SelectPortal", { forceMount: void 0 }), Ve = /* @__PURE__ */ G((e) => {
|
|
611
666
|
let { __scopeSelect: t, forceMount: n, ...r } = e;
|
|
612
|
-
return /* @__PURE__ */ (0,
|
|
667
|
+
return /* @__PURE__ */ (0, I.jsx)(ze, {
|
|
613
668
|
scope: e.__scopeSelect,
|
|
614
669
|
forceMount: n,
|
|
615
|
-
children: /* @__PURE__ */ (0,
|
|
670
|
+
children: /* @__PURE__ */ (0, I.jsx)(O, {
|
|
616
671
|
asChild: !0,
|
|
617
672
|
...r
|
|
618
673
|
})
|
|
619
674
|
});
|
|
620
|
-
}, "SelectPortal"), Y = "SelectContent",
|
|
621
|
-
let n =
|
|
622
|
-
return
|
|
675
|
+
}, "SelectPortal"), Y = "SelectContent", He = /* @__PURE__ */ F.forwardRef(/* @__PURE__ */ G(function(e, t) {
|
|
676
|
+
let n = Be(Y, e.__scopeSelect), { forceMount: r = n.forceMount, ...i } = e, a = J(Y, e.__scopeSelect), [o, s] = F.useState();
|
|
677
|
+
return b(() => {
|
|
623
678
|
s(new DocumentFragment());
|
|
624
|
-
}, []), /* @__PURE__ */ (0,
|
|
679
|
+
}, []), /* @__PURE__ */ (0, I.jsx)(ie, {
|
|
625
680
|
present: r || a.open,
|
|
626
|
-
children: ({ present: e }) => e ? /* @__PURE__ */ (0,
|
|
681
|
+
children: ({ present: e }) => e ? /* @__PURE__ */ (0, I.jsx)(Ke, {
|
|
627
682
|
...i,
|
|
628
683
|
ref: t
|
|
629
|
-
}) : /* @__PURE__ */ (0,
|
|
684
|
+
}) : /* @__PURE__ */ (0, I.jsx)(Ue, {
|
|
630
685
|
...i,
|
|
631
686
|
fragment: o
|
|
632
687
|
})
|
|
633
688
|
});
|
|
634
|
-
}, "SelectContent")),
|
|
689
|
+
}, "SelectContent")), Ue = /* @__PURE__ */ F.forwardRef(/* @__PURE__ */ G(function(e, t) {
|
|
635
690
|
let { __scopeSelect: n, children: r, fragment: i } = e;
|
|
636
|
-
return i ?
|
|
691
|
+
return i ? P.createPortal(/* @__PURE__ */ (0, I.jsx)(We, {
|
|
637
692
|
scope: n,
|
|
638
|
-
children: /* @__PURE__ */ (0,
|
|
693
|
+
children: /* @__PURE__ */ (0, I.jsx)(we.Slot, {
|
|
639
694
|
scope: n,
|
|
640
|
-
children: /* @__PURE__ */ (0,
|
|
695
|
+
children: /* @__PURE__ */ (0, I.jsx)("div", {
|
|
641
696
|
ref: t,
|
|
642
697
|
children: r
|
|
643
698
|
})
|
|
644
699
|
})
|
|
645
700
|
}), i) : null;
|
|
646
|
-
}, "SelectContentFragment")), X = 10, [
|
|
647
|
-
let { __scopeSelect: n } = e, { position: r =
|
|
648
|
-
|
|
649
|
-
if (
|
|
650
|
-
}, [
|
|
651
|
-
let
|
|
652
|
-
let [t, ...n] =
|
|
701
|
+
}, "SelectContentFragment")), X = 10, [We, Z] = q(Y), Ge = o("SelectContent.RemoveScroll"), Ke = /* @__PURE__ */ F.forwardRef(/* @__PURE__ */ G(function(e, t) {
|
|
702
|
+
let { __scopeSelect: n } = e, { position: r = be.ItemAligned, onCloseAutoFocus: a, onEscapeKeyDown: o, onPointerDownOutside: s, side: c, sideOffset: l, align: u, alignOffset: d, arrowPadding: f, collisionBoundary: p, collisionPadding: m, sticky: h, hideWhenDetached: g, avoidCollisions: _, ...v } = e, y = J(Y, n), [b, S] = F.useState(null), [C, w] = F.useState(null), T = i(t, S), [O, k] = F.useState(null), [re, ie] = F.useState(null), A = Te(n), [j, M] = F.useState(!1), N = F.useRef(!1), P = F.useRef(!1), L = F.useRef(!1);
|
|
703
|
+
F.useEffect(() => {
|
|
704
|
+
if (b) return ee(b);
|
|
705
|
+
}, [b]), ne();
|
|
706
|
+
let R = F.useCallback((e) => {
|
|
707
|
+
let [t, ...n] = A().map((e) => e.ref.current), [r] = n.slice(-1), i = document.activeElement;
|
|
653
708
|
for (let n of e) if (n === i || (n?.scrollIntoView({ block: "nearest" }), n === t && C && (C.scrollTop = 0), n === r && C && (C.scrollTop = C.scrollHeight), n?.focus(), document.activeElement !== i)) return;
|
|
654
|
-
}, [
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
709
|
+
}, [A, C]), z = F.useCallback(() => R([O, b]), [
|
|
710
|
+
R,
|
|
711
|
+
O,
|
|
712
|
+
b
|
|
658
713
|
]);
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
}, [
|
|
714
|
+
F.useEffect(() => {
|
|
715
|
+
j && z();
|
|
716
|
+
}, [j, z]);
|
|
662
717
|
let { onOpenChange: B, triggerPointerDownPosRef: V } = y;
|
|
663
|
-
|
|
664
|
-
if (
|
|
718
|
+
F.useEffect(() => {
|
|
719
|
+
if (b) {
|
|
665
720
|
let e = {
|
|
666
721
|
x: 0,
|
|
667
722
|
y: 0
|
|
@@ -671,7 +726,7 @@ var Me = /* @__PURE__ */ G((e) => {
|
|
|
671
726
|
y: Math.abs(Math.round(t.pageY) - (V.current?.y ?? 0))
|
|
672
727
|
};
|
|
673
728
|
}, "handlePointerMove"), n = /* @__PURE__ */ G((n) => {
|
|
674
|
-
e.x <= 10 && e.y <= 10 ? n.preventDefault() : n.composedPath().includes(
|
|
729
|
+
e.x <= 10 && e.y <= 10 ? n.preventDefault() : n.composedPath().includes(b) || B(!1), document.removeEventListener("pointermove", t), V.current = null;
|
|
675
730
|
}, "handlePointerUp");
|
|
676
731
|
return V.current !== null && (document.addEventListener("pointermove", t), document.addEventListener("pointerup", n, {
|
|
677
732
|
capture: !0,
|
|
@@ -681,25 +736,30 @@ var Me = /* @__PURE__ */ G((e) => {
|
|
|
681
736
|
};
|
|
682
737
|
}
|
|
683
738
|
}, [
|
|
684
|
-
|
|
739
|
+
b,
|
|
685
740
|
B,
|
|
686
741
|
V
|
|
687
|
-
]),
|
|
742
|
+
]), F.useEffect(() => {
|
|
688
743
|
let e = /* @__PURE__ */ G(() => B(!1), "close");
|
|
689
744
|
return window.addEventListener("blur", e), window.addEventListener("resize", e), () => {
|
|
690
745
|
window.removeEventListener("blur", e), window.removeEventListener("resize", e);
|
|
691
746
|
};
|
|
692
747
|
}, [B]);
|
|
693
|
-
let [
|
|
694
|
-
let t =
|
|
748
|
+
let [H, ae] = xt((e) => {
|
|
749
|
+
let t = A().filter((e) => !e.disabled), n = St(t, e, t.find((e) => e.ref.current === document.activeElement));
|
|
695
750
|
n && setTimeout(() => n.ref.current?.focus());
|
|
696
|
-
}), U =
|
|
697
|
-
let r = !
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
751
|
+
}), U = F.useCallback((e, t, n) => {
|
|
752
|
+
let r = !P.current;
|
|
753
|
+
r && (P.current = !0);
|
|
754
|
+
let i = !N.current && !n;
|
|
755
|
+
y.value !== void 0 && y.value === t || i ? (k(e), i && (N.current = !0)) : r && k(e);
|
|
756
|
+
}, [y.value]), oe = F.useCallback(() => b?.focus(), [b]), se = F.useCallback((e, t, n) => {
|
|
757
|
+
if (!e) return;
|
|
758
|
+
let r = !L.current;
|
|
759
|
+
r && (L.current = !0);
|
|
760
|
+
let i = !N.current && !n;
|
|
761
|
+
(y.value !== void 0 && y.value === t || i || r) && ie(e);
|
|
762
|
+
}, [y.value]), W = r === be.Popper ? Je : qe, ce = W === Je ? {
|
|
703
763
|
side: c,
|
|
704
764
|
sideOffset: l,
|
|
705
765
|
align: u,
|
|
@@ -711,48 +771,48 @@ var Me = /* @__PURE__ */ G((e) => {
|
|
|
711
771
|
hideWhenDetached: g,
|
|
712
772
|
avoidCollisions: _
|
|
713
773
|
} : {};
|
|
714
|
-
return /* @__PURE__ */ (0,
|
|
774
|
+
return /* @__PURE__ */ (0, I.jsx)(We, {
|
|
715
775
|
scope: n,
|
|
716
|
-
content:
|
|
776
|
+
content: b,
|
|
717
777
|
viewport: C,
|
|
718
|
-
onViewportChange:
|
|
778
|
+
onViewportChange: w,
|
|
719
779
|
itemRefCallback: U,
|
|
720
|
-
selectedItem:
|
|
721
|
-
onItemLeave:
|
|
722
|
-
itemTextRefCallback:
|
|
780
|
+
selectedItem: O,
|
|
781
|
+
onItemLeave: oe,
|
|
782
|
+
itemTextRefCallback: se,
|
|
723
783
|
focusSelectedItem: z,
|
|
724
|
-
selectedItemText:
|
|
784
|
+
selectedItemText: re,
|
|
725
785
|
position: r,
|
|
726
|
-
isPositioned:
|
|
727
|
-
searchRef:
|
|
728
|
-
children: /* @__PURE__ */ (0,
|
|
729
|
-
as:
|
|
786
|
+
isPositioned: j,
|
|
787
|
+
searchRef: H,
|
|
788
|
+
children: /* @__PURE__ */ (0, I.jsx)(D, {
|
|
789
|
+
as: Ge,
|
|
730
790
|
allowPinchZoom: !0,
|
|
731
|
-
children: /* @__PURE__ */ (0,
|
|
791
|
+
children: /* @__PURE__ */ (0, I.jsx)(te, {
|
|
732
792
|
asChild: !0,
|
|
733
793
|
trapped: y.open,
|
|
734
794
|
onMountAutoFocus: (e) => {
|
|
735
795
|
e.preventDefault();
|
|
736
796
|
},
|
|
737
|
-
onUnmountAutoFocus:
|
|
797
|
+
onUnmountAutoFocus: x(a, (e) => {
|
|
738
798
|
y.trigger?.focus({ preventScroll: !0 }), e.preventDefault();
|
|
739
799
|
}),
|
|
740
|
-
children: /* @__PURE__ */ (0,
|
|
800
|
+
children: /* @__PURE__ */ (0, I.jsx)(E, {
|
|
741
801
|
asChild: !0,
|
|
742
802
|
disableOutsidePointerEvents: !0,
|
|
743
803
|
onEscapeKeyDown: o,
|
|
744
804
|
onPointerDownOutside: s,
|
|
745
805
|
onFocusOutside: (e) => e.preventDefault(),
|
|
746
806
|
onDismiss: () => y.onOpenChange(!1),
|
|
747
|
-
children: /* @__PURE__ */ (0,
|
|
807
|
+
children: /* @__PURE__ */ (0, I.jsx)(W, {
|
|
748
808
|
role: "listbox",
|
|
749
809
|
id: y.contentId,
|
|
750
810
|
"data-state": y.open ? "open" : "closed",
|
|
751
811
|
dir: y.dir,
|
|
752
812
|
onContextMenu: (e) => e.preventDefault(),
|
|
753
813
|
...v,
|
|
754
|
-
...
|
|
755
|
-
onPlaced: () =>
|
|
814
|
+
...ce,
|
|
815
|
+
onPlaced: () => M(!0),
|
|
756
816
|
ref: T,
|
|
757
817
|
style: {
|
|
758
818
|
display: "flex",
|
|
@@ -760,20 +820,20 @@ var Me = /* @__PURE__ */ G((e) => {
|
|
|
760
820
|
outline: "none",
|
|
761
821
|
...v.style
|
|
762
822
|
},
|
|
763
|
-
onKeyDown:
|
|
823
|
+
onKeyDown: x(v.onKeyDown, (e) => {
|
|
764
824
|
let t = e.ctrlKey || e.altKey || e.metaKey;
|
|
765
|
-
if (e.key === "Tab" && e.preventDefault(), !t && e.key.length === 1 &&
|
|
825
|
+
if (e.key === "Tab" && e.preventDefault(), !t && e.key.length === 1 && ae(e.key), [
|
|
766
826
|
"ArrowUp",
|
|
767
827
|
"ArrowDown",
|
|
768
828
|
"Home",
|
|
769
829
|
"End"
|
|
770
830
|
].includes(e.key)) {
|
|
771
|
-
let t =
|
|
831
|
+
let t = A().filter((e) => !e.disabled).map((e) => e.ref.current);
|
|
772
832
|
if (["ArrowUp", "End"].includes(e.key) && (t = t.slice().reverse()), ["ArrowUp", "ArrowDown"].includes(e.key)) {
|
|
773
833
|
let n = e.target, r = t.indexOf(n);
|
|
774
834
|
t = t.slice(r + 1);
|
|
775
835
|
}
|
|
776
|
-
setTimeout(() =>
|
|
836
|
+
setTimeout(() => R(t)), e.preventDefault();
|
|
777
837
|
}
|
|
778
838
|
})
|
|
779
839
|
})
|
|
@@ -781,28 +841,28 @@ var Me = /* @__PURE__ */ G((e) => {
|
|
|
781
841
|
})
|
|
782
842
|
})
|
|
783
843
|
});
|
|
784
|
-
}, "SelectContentImpl")),
|
|
785
|
-
let { __scopeSelect: n, onPlaced: r, ...a } = e, o = J(Y, n), s = Z(Y, n), [c, l] =
|
|
844
|
+
}, "SelectContentImpl")), qe = /* @__PURE__ */ F.forwardRef(/* @__PURE__ */ G(function(e, t) {
|
|
845
|
+
let { __scopeSelect: n, onPlaced: r, ...a } = e, o = J(Y, n), s = Z(Y, n), [c, l] = F.useState(null), [u, d] = F.useState(null), f = i(t, d), p = Te(n), m = F.useRef(!1), h = F.useRef(!0), { viewport: g, selectedItem: _, selectedItemText: v, focusSelectedItem: y } = s, x = F.useCallback(() => {
|
|
786
846
|
if (o.trigger && o.valueNode && c && u && g && _ && v) {
|
|
787
847
|
let e = o.trigger.getBoundingClientRect(), t = u.getBoundingClientRect(), n = o.valueNode.getBoundingClientRect(), i = v.getBoundingClientRect();
|
|
788
|
-
if (o.dir !==
|
|
789
|
-
let r = i.left - t.left, a = n.left - r, o = e.left - a, s = e.width + o, l = Math.max(s, t.width), u = window.innerWidth - X, d =
|
|
848
|
+
if (o.dir !== xe.RTL) {
|
|
849
|
+
let r = i.left - t.left, a = n.left - r, o = e.left - a, s = e.width + o, l = Math.max(s, t.width), u = window.innerWidth - X, d = ve(a, [X, Math.max(X, u - l)]);
|
|
790
850
|
c.style.minWidth = s + "px", c.style.left = d + "px";
|
|
791
851
|
} else {
|
|
792
|
-
let r = t.right - i.right, a = window.innerWidth - n.right - r, o = window.innerWidth - e.right - a, s = e.width + o, l = Math.max(s, t.width), u = window.innerWidth - X, d =
|
|
852
|
+
let r = t.right - i.right, a = window.innerWidth - n.right - r, o = window.innerWidth - e.right - a, s = e.width + o, l = Math.max(s, t.width), u = window.innerWidth - X, d = ve(a, [X, Math.max(X, u - l)]);
|
|
793
853
|
c.style.minWidth = s + "px", c.style.right = d + "px";
|
|
794
854
|
}
|
|
795
|
-
let a = p(), s = window.innerHeight - X * 2, l = g.scrollHeight, d = window.getComputedStyle(u), f = parseInt(d.borderTopWidth, 10), h = parseInt(d.paddingTop, 10), y = parseInt(d.borderBottomWidth, 10), b = parseInt(d.paddingBottom, 10), x = f + h + l + b + y, S = Math.min(_.offsetHeight * 5, x), C = window.getComputedStyle(g),
|
|
796
|
-
if (O <=
|
|
855
|
+
let a = p(), s = window.innerHeight - X * 2, l = g.scrollHeight, d = window.getComputedStyle(u), f = parseInt(d.borderTopWidth, 10), h = parseInt(d.paddingTop, 10), y = parseInt(d.borderBottomWidth, 10), b = parseInt(d.paddingBottom, 10), x = f + h + l + b + y, S = Math.min(_.offsetHeight * 5, x), C = window.getComputedStyle(g), w = parseInt(C.paddingTop, 10), T = parseInt(C.paddingBottom, 10), E = e.top + e.height / 2 - X, ee = s - E, D = _.offsetHeight / 2, te = _.offsetTop + D, O = f + h + te, k = x - O;
|
|
856
|
+
if (O <= E) {
|
|
797
857
|
let e = a.length > 0 && _ === a[a.length - 1].ref.current;
|
|
798
858
|
c.style.bottom = "0px";
|
|
799
|
-
let t = u.clientHeight - g.offsetTop - g.offsetHeight, n = O + Math.max(
|
|
859
|
+
let t = u.clientHeight - g.offsetTop - g.offsetHeight, n = O + Math.max(ee, D + (e ? T : 0) + t + y);
|
|
800
860
|
c.style.height = n + "px";
|
|
801
861
|
} else {
|
|
802
862
|
let e = a.length > 0 && _ === a[0].ref.current;
|
|
803
863
|
c.style.top = "0px";
|
|
804
|
-
let t = Math.max(
|
|
805
|
-
c.style.height = t + "px", g.scrollTop = O -
|
|
864
|
+
let t = Math.max(E, f + g.offsetTop + (e ? w : 0) + D) + k;
|
|
865
|
+
c.style.height = t + "px", g.scrollTop = O - E + g.offsetTop;
|
|
806
866
|
}
|
|
807
867
|
c.style.margin = `${X}px 0`, c.style.minHeight = S + "px", c.style.maxHeight = s + "px", r?.(), requestAnimationFrame(() => m.current = !0);
|
|
808
868
|
}
|
|
@@ -818,28 +878,28 @@ var Me = /* @__PURE__ */ G((e) => {
|
|
|
818
878
|
o.dir,
|
|
819
879
|
r
|
|
820
880
|
]);
|
|
821
|
-
|
|
822
|
-
let [
|
|
823
|
-
|
|
824
|
-
u &&
|
|
881
|
+
b(() => x(), [x]);
|
|
882
|
+
let [S, C] = F.useState();
|
|
883
|
+
b(() => {
|
|
884
|
+
u && C(window.getComputedStyle(u).zIndex);
|
|
825
885
|
}, [u]);
|
|
826
|
-
let
|
|
827
|
-
e && h.current === !0 && (
|
|
828
|
-
}, [
|
|
829
|
-
return /* @__PURE__ */ (0,
|
|
886
|
+
let w = F.useCallback((e) => {
|
|
887
|
+
e && h.current === !0 && (x(), y?.(), h.current = !1);
|
|
888
|
+
}, [x, y]);
|
|
889
|
+
return /* @__PURE__ */ (0, I.jsx)(Ye, {
|
|
830
890
|
scope: n,
|
|
831
891
|
contentWrapper: c,
|
|
832
892
|
shouldExpandOnScrollRef: m,
|
|
833
|
-
onScrollButtonChange:
|
|
834
|
-
children: /* @__PURE__ */ (0,
|
|
893
|
+
onScrollButtonChange: w,
|
|
894
|
+
children: /* @__PURE__ */ (0, I.jsx)("div", {
|
|
835
895
|
ref: l,
|
|
836
896
|
style: {
|
|
837
897
|
display: "flex",
|
|
838
898
|
flexDirection: "column",
|
|
839
899
|
position: "fixed",
|
|
840
|
-
zIndex:
|
|
900
|
+
zIndex: S
|
|
841
901
|
},
|
|
842
|
-
children: /* @__PURE__ */ (0,
|
|
902
|
+
children: /* @__PURE__ */ (0, I.jsx)(k.div, {
|
|
843
903
|
...a,
|
|
844
904
|
ref: f,
|
|
845
905
|
style: {
|
|
@@ -850,9 +910,9 @@ var Me = /* @__PURE__ */ G((e) => {
|
|
|
850
910
|
})
|
|
851
911
|
})
|
|
852
912
|
});
|
|
853
|
-
}, "SelectItemAlignedPosition")),
|
|
854
|
-
let { __scopeSelect: n, align: r = "start", collisionPadding: i = X, ...a } = e, o =
|
|
855
|
-
return /* @__PURE__ */ (0,
|
|
913
|
+
}, "SelectItemAlignedPosition")), Je = /* @__PURE__ */ F.forwardRef(/* @__PURE__ */ G(function(e, t) {
|
|
914
|
+
let { __scopeSelect: n, align: r = "start", collisionPadding: i = X, ...a } = e, o = Oe(n);
|
|
915
|
+
return /* @__PURE__ */ (0, I.jsx)(d, {
|
|
856
916
|
...o,
|
|
857
917
|
...a,
|
|
858
918
|
ref: t,
|
|
@@ -868,14 +928,14 @@ var Me = /* @__PURE__ */ G((e) => {
|
|
|
868
928
|
"--radix-select-trigger-height": "var(--radix-popper-anchor-height)"
|
|
869
929
|
}
|
|
870
930
|
});
|
|
871
|
-
}, "SelectPopperPosition")), [
|
|
872
|
-
let { __scopeSelect: n, nonce: r, ...a } = e, o = Z(
|
|
873
|
-
return /* @__PURE__ */ (0,
|
|
931
|
+
}, "SelectPopperPosition")), [Ye, Xe] = q(Y, {}), Ze = "SelectViewport", Qe = /* @__PURE__ */ F.forwardRef(/* @__PURE__ */ G(function(e, t) {
|
|
932
|
+
let { __scopeSelect: n, nonce: r, ...a } = e, o = Z(Ze, n), s = Xe(Ze, n), c = i(t, o.onViewportChange), l = F.useRef(0);
|
|
933
|
+
return /* @__PURE__ */ (0, I.jsxs)(I.Fragment, { children: [/* @__PURE__ */ (0, I.jsx)("style", {
|
|
874
934
|
dangerouslySetInnerHTML: { __html: "[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}" },
|
|
875
935
|
nonce: r
|
|
876
|
-
}), /* @__PURE__ */ (0,
|
|
936
|
+
}), /* @__PURE__ */ (0, I.jsx)(we.Slot, {
|
|
877
937
|
scope: n,
|
|
878
|
-
children: /* @__PURE__ */ (0,
|
|
938
|
+
children: /* @__PURE__ */ (0, I.jsx)(k.div, {
|
|
879
939
|
"data-radix-select-viewport": "",
|
|
880
940
|
role: "presentation",
|
|
881
941
|
...a,
|
|
@@ -886,7 +946,7 @@ var Me = /* @__PURE__ */ G((e) => {
|
|
|
886
946
|
overflow: "hidden auto",
|
|
887
947
|
...a.style
|
|
888
948
|
},
|
|
889
|
-
onScroll:
|
|
949
|
+
onScroll: x(a.onScroll, (e) => {
|
|
890
950
|
let t = e.currentTarget, { contentWrapper: n, shouldExpandOnScrollRef: r } = s;
|
|
891
951
|
if (r?.current && n) {
|
|
892
952
|
let e = Math.abs(l.current - t.scrollTop);
|
|
@@ -902,44 +962,45 @@ var Me = /* @__PURE__ */ G((e) => {
|
|
|
902
962
|
})
|
|
903
963
|
})
|
|
904
964
|
})] });
|
|
905
|
-
}, "SelectViewport")), [
|
|
906
|
-
let { __scopeSelect: n, ...r } = e, i =
|
|
907
|
-
return /* @__PURE__ */ (0,
|
|
965
|
+
}, "SelectViewport")), [$e, et] = q("SelectGroup"), tt = /* @__PURE__ */ F.forwardRef(/* @__PURE__ */ G(function(e, t) {
|
|
966
|
+
let { __scopeSelect: n, ...r } = e, i = y();
|
|
967
|
+
return /* @__PURE__ */ (0, I.jsx)($e, {
|
|
908
968
|
scope: n,
|
|
909
969
|
id: i,
|
|
910
|
-
children: /* @__PURE__ */ (0,
|
|
970
|
+
children: /* @__PURE__ */ (0, I.jsx)(k.div, {
|
|
911
971
|
role: "group",
|
|
912
972
|
"aria-labelledby": i,
|
|
913
973
|
...r,
|
|
914
974
|
ref: t
|
|
915
975
|
})
|
|
916
976
|
});
|
|
917
|
-
}, "SelectGroup")),
|
|
918
|
-
let { __scopeSelect: n, ...r } = e, i =
|
|
919
|
-
return /* @__PURE__ */ (0,
|
|
977
|
+
}, "SelectGroup")), nt = "SelectLabel", rt = /* @__PURE__ */ F.forwardRef(/* @__PURE__ */ G(function(e, t) {
|
|
978
|
+
let { __scopeSelect: n, ...r } = e, i = et(nt, n);
|
|
979
|
+
return /* @__PURE__ */ (0, I.jsx)(k.div, {
|
|
920
980
|
id: i.id,
|
|
921
981
|
...r,
|
|
922
982
|
ref: t
|
|
923
983
|
});
|
|
924
|
-
}, "SelectLabel")),
|
|
925
|
-
let { __scopeSelect: n, value: r, disabled: a = !1, textValue: o, ...s } = e, c = J(
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
984
|
+
}, "SelectLabel")), it = "SelectItem", [at, ot] = q(it), st = /* @__PURE__ */ F.forwardRef(/* @__PURE__ */ G(function(e, t) {
|
|
985
|
+
let { __scopeSelect: n, value: r, disabled: a = !1, textValue: o, ...s } = e, c = J(it, n), l = Z(it, n), u = c.value === r, [d, f] = F.useState(o ?? ""), [p, m] = F.useState(!1), h = w((e) => l.itemRefCallback?.(e, r, a)), g = i(t, h), _ = y(), v = F.useRef("touch");
|
|
986
|
+
function b(e) {
|
|
987
|
+
c.hasConsumerStoppedPropagationRef.current = e.isPropagationStopped(), c.onUserSelect(r), c.onOpenChange(!1);
|
|
988
|
+
}
|
|
989
|
+
return G(b, "handleSelect"), /* @__PURE__ */ (0, I.jsx)(at, {
|
|
929
990
|
scope: n,
|
|
930
991
|
value: r,
|
|
931
992
|
disabled: a,
|
|
932
993
|
textId: _,
|
|
933
994
|
isSelected: u,
|
|
934
|
-
onItemTextChange:
|
|
995
|
+
onItemTextChange: F.useCallback((e) => {
|
|
935
996
|
f((t) => t || (e?.textContent ?? "").trim());
|
|
936
997
|
}, []),
|
|
937
|
-
children: /* @__PURE__ */ (0,
|
|
998
|
+
children: /* @__PURE__ */ (0, I.jsx)(we.ItemSlot, {
|
|
938
999
|
scope: n,
|
|
939
1000
|
value: r,
|
|
940
1001
|
disabled: a,
|
|
941
1002
|
textValue: d,
|
|
942
|
-
children: /* @__PURE__ */ (0,
|
|
1003
|
+
children: /* @__PURE__ */ (0, I.jsx)(k.div, {
|
|
943
1004
|
role: "option",
|
|
944
1005
|
"aria-labelledby": _,
|
|
945
1006
|
"data-highlighted": p ? "" : void 0,
|
|
@@ -950,31 +1011,31 @@ var Me = /* @__PURE__ */ G((e) => {
|
|
|
950
1011
|
tabIndex: a ? void 0 : -1,
|
|
951
1012
|
...s,
|
|
952
1013
|
ref: g,
|
|
953
|
-
onFocus:
|
|
954
|
-
onBlur:
|
|
955
|
-
onClick:
|
|
956
|
-
v.current !== "mouse" &&
|
|
1014
|
+
onFocus: x(s.onFocus, () => m(!0)),
|
|
1015
|
+
onBlur: x(s.onBlur, () => m(!1)),
|
|
1016
|
+
onClick: x(s.onClick, (e) => {
|
|
1017
|
+
a || v.current !== "mouse" && b(e);
|
|
957
1018
|
}),
|
|
958
|
-
onPointerUp:
|
|
959
|
-
v.current === "mouse" &&
|
|
1019
|
+
onPointerUp: x(s.onPointerUp, (e) => {
|
|
1020
|
+
a || v.current === "mouse" && b(e);
|
|
960
1021
|
}),
|
|
961
|
-
onPointerDown:
|
|
1022
|
+
onPointerDown: x(s.onPointerDown, (e) => {
|
|
962
1023
|
v.current = e.pointerType;
|
|
963
1024
|
}),
|
|
964
|
-
onPointerMove:
|
|
1025
|
+
onPointerMove: x(s.onPointerMove, (e) => {
|
|
965
1026
|
v.current = e.pointerType, a ? l.onItemLeave?.() : v.current === "mouse" && e.currentTarget.focus({ preventScroll: !0 });
|
|
966
1027
|
}),
|
|
967
|
-
onPointerLeave:
|
|
1028
|
+
onPointerLeave: x(s.onPointerLeave, (e) => {
|
|
968
1029
|
e.currentTarget === document.activeElement && l.onItemLeave?.();
|
|
969
1030
|
}),
|
|
970
|
-
onKeyDown:
|
|
971
|
-
a || e.target !== e.currentTarget || (l.searchRef?.current === "" || e.key !== " ") && (
|
|
1031
|
+
onKeyDown: x(s.onKeyDown, (e) => {
|
|
1032
|
+
a || e.target !== e.currentTarget || (l.searchRef?.current === "" || e.key !== " ") && (Ce.includes(e.key) && b(e), e.key === " " && e.preventDefault());
|
|
972
1033
|
})
|
|
973
1034
|
})
|
|
974
1035
|
})
|
|
975
1036
|
});
|
|
976
|
-
}, "SelectItem")),
|
|
977
|
-
let { __scopeSelect: n, className: r, style: a, ...o } = e, s = J(
|
|
1037
|
+
}, "SelectItem")), ct = "SelectItemText", lt = /* @__PURE__ */ F.forwardRef(/* @__PURE__ */ G(function(e, t) {
|
|
1038
|
+
let { __scopeSelect: n, className: r, style: a, ...o } = e, s = J(ct, n), c = Z(ct, n), l = ot(ct, n), u = je(ct, n), [d, f] = F.useState(null), p = w((e) => c.itemTextRefCallback?.(e, l.value, l.disabled)), m = i(t, f, l.onItemTextChange, p), h = d?.textContent, g = F.useMemo(() => /* @__PURE__ */ (0, I.jsx)("option", {
|
|
978
1039
|
value: l.value,
|
|
979
1040
|
disabled: l.disabled,
|
|
980
1041
|
children: h
|
|
@@ -983,25 +1044,25 @@ var Me = /* @__PURE__ */ G((e) => {
|
|
|
983
1044
|
l.value,
|
|
984
1045
|
h
|
|
985
1046
|
]), { onNativeOptionAdd: _, onNativeOptionRemove: v } = u;
|
|
986
|
-
return
|
|
1047
|
+
return b(() => (_(g), () => v(g)), [
|
|
987
1048
|
_,
|
|
988
1049
|
v,
|
|
989
1050
|
g
|
|
990
|
-
]), /* @__PURE__ */ (0,
|
|
1051
|
+
]), /* @__PURE__ */ (0, I.jsxs)(I.Fragment, { children: [/* @__PURE__ */ (0, I.jsx)(k.span, {
|
|
991
1052
|
id: l.textId,
|
|
992
1053
|
...o,
|
|
993
1054
|
ref: m
|
|
994
|
-
}), l.isSelected && s.valueNode && !s.valueNodeHasChildren && !Q(s.value) ?
|
|
995
|
-
}, "SelectItemText")),
|
|
1055
|
+
}), l.isSelected && s.valueNode && !s.valueNodeHasChildren && !Q(s.value) ? P.createPortal(o.children, s.valueNode) : null] });
|
|
1056
|
+
}, "SelectItemText")), ut = "SelectItemIndicator", dt = /* @__PURE__ */ F.forwardRef(/* @__PURE__ */ G(function(e, t) {
|
|
996
1057
|
let { __scopeSelect: n, ...r } = e;
|
|
997
|
-
return
|
|
1058
|
+
return ot(ut, n).isSelected ? /* @__PURE__ */ (0, I.jsx)(k.span, {
|
|
998
1059
|
"aria-hidden": !0,
|
|
999
1060
|
...r,
|
|
1000
1061
|
ref: t
|
|
1001
1062
|
}) : null;
|
|
1002
|
-
}, "SelectItemIndicator")),
|
|
1003
|
-
let n = Z(
|
|
1004
|
-
return
|
|
1063
|
+
}, "SelectItemIndicator")), ft = "SelectScrollUpButton", pt = /* @__PURE__ */ F.forwardRef(/* @__PURE__ */ G(function(e, t) {
|
|
1064
|
+
let n = Z(ft, e.__scopeSelect), r = Xe(ft, e.__scopeSelect), [a, o] = F.useState(!1), s = i(t, r.onScrollButtonChange);
|
|
1065
|
+
return b(() => {
|
|
1005
1066
|
if (n.viewport && n.isPositioned) {
|
|
1006
1067
|
let e = function() {
|
|
1007
1068
|
let e = t.scrollTop > 0;
|
|
@@ -1011,7 +1072,7 @@ var Me = /* @__PURE__ */ G((e) => {
|
|
|
1011
1072
|
let t = n.viewport;
|
|
1012
1073
|
return e(), t.addEventListener("scroll", e), () => t.removeEventListener("scroll", e);
|
|
1013
1074
|
}
|
|
1014
|
-
}, [n.viewport, n.isPositioned]), a ? /* @__PURE__ */ (0,
|
|
1075
|
+
}, [n.viewport, n.isPositioned]), a ? /* @__PURE__ */ (0, I.jsx)(gt, {
|
|
1015
1076
|
...e,
|
|
1016
1077
|
ref: s,
|
|
1017
1078
|
onAutoScroll: () => {
|
|
@@ -1019,9 +1080,9 @@ var Me = /* @__PURE__ */ G((e) => {
|
|
|
1019
1080
|
e && t && (e.scrollTop -= t.offsetHeight);
|
|
1020
1081
|
}
|
|
1021
1082
|
}) : null;
|
|
1022
|
-
}, "SelectScrollUpButton")),
|
|
1023
|
-
let n = Z(
|
|
1024
|
-
return
|
|
1083
|
+
}, "SelectScrollUpButton")), mt = "SelectScrollDownButton", ht = /* @__PURE__ */ F.forwardRef(/* @__PURE__ */ G(function(e, t) {
|
|
1084
|
+
let n = Z(mt, e.__scopeSelect), r = Xe(mt, e.__scopeSelect), [a, o] = F.useState(!1), s = i(t, r.onScrollButtonChange);
|
|
1085
|
+
return b(() => {
|
|
1025
1086
|
if (n.viewport && n.isPositioned) {
|
|
1026
1087
|
let e = function() {
|
|
1027
1088
|
let e = t.scrollHeight - t.clientHeight, n = Math.ceil(t.scrollTop) < e;
|
|
@@ -1031,7 +1092,7 @@ var Me = /* @__PURE__ */ G((e) => {
|
|
|
1031
1092
|
let t = n.viewport;
|
|
1032
1093
|
return e(), t.addEventListener("scroll", e), () => t.removeEventListener("scroll", e);
|
|
1033
1094
|
}
|
|
1034
|
-
}, [n.viewport, n.isPositioned]), a ? /* @__PURE__ */ (0,
|
|
1095
|
+
}, [n.viewport, n.isPositioned]), a ? /* @__PURE__ */ (0, I.jsx)(gt, {
|
|
1035
1096
|
...e,
|
|
1036
1097
|
ref: s,
|
|
1037
1098
|
onAutoScroll: () => {
|
|
@@ -1039,13 +1100,13 @@ var Me = /* @__PURE__ */ G((e) => {
|
|
|
1039
1100
|
e && t && (e.scrollTop += t.offsetHeight);
|
|
1040
1101
|
}
|
|
1041
1102
|
}) : null;
|
|
1042
|
-
}, "SelectScrollDownButton")),
|
|
1043
|
-
let { __scopeSelect: n, onAutoScroll: r, ...i } = e, a = Z("SelectScrollButton", n), o =
|
|
1103
|
+
}, "SelectScrollDownButton")), gt = /* @__PURE__ */ F.forwardRef(/* @__PURE__ */ G(function(e, t) {
|
|
1104
|
+
let { __scopeSelect: n, onAutoScroll: r, ...i } = e, a = Z("SelectScrollButton", n), o = F.useRef(null), s = Te(n), c = F.useCallback(() => {
|
|
1044
1105
|
o.current !== null && (window.clearInterval(o.current), o.current = null);
|
|
1045
1106
|
}, []);
|
|
1046
|
-
return
|
|
1107
|
+
return F.useEffect(() => () => c(), [c]), b(() => {
|
|
1047
1108
|
s().find((e) => e.ref.current === document.activeElement)?.ref.current?.scrollIntoView({ block: "nearest" });
|
|
1048
|
-
}, [s]), /* @__PURE__ */ (0,
|
|
1109
|
+
}, [s]), /* @__PURE__ */ (0, I.jsx)(k.div, {
|
|
1049
1110
|
"aria-hidden": !0,
|
|
1050
1111
|
...i,
|
|
1051
1112
|
ref: t,
|
|
@@ -1053,107 +1114,125 @@ var Me = /* @__PURE__ */ G((e) => {
|
|
|
1053
1114
|
flexShrink: 0,
|
|
1054
1115
|
...i.style
|
|
1055
1116
|
},
|
|
1056
|
-
onPointerDown:
|
|
1117
|
+
onPointerDown: x(i.onPointerDown, () => {
|
|
1057
1118
|
o.current === null && (o.current = window.setInterval(r, 50));
|
|
1058
1119
|
}),
|
|
1059
|
-
onPointerMove:
|
|
1120
|
+
onPointerMove: x(i.onPointerMove, () => {
|
|
1060
1121
|
a.onItemLeave?.(), o.current === null && (o.current = window.setInterval(r, 50));
|
|
1061
1122
|
}),
|
|
1062
|
-
onPointerLeave:
|
|
1123
|
+
onPointerLeave: x(i.onPointerLeave, () => {
|
|
1063
1124
|
c();
|
|
1064
1125
|
})
|
|
1065
1126
|
});
|
|
1066
|
-
}, "SelectScrollButtonImpl")),
|
|
1127
|
+
}, "SelectScrollButtonImpl")), _t = /* @__PURE__ */ F.forwardRef(/* @__PURE__ */ G(function(e, t) {
|
|
1067
1128
|
let { __scopeSelect: n, ...r } = e;
|
|
1068
|
-
return /* @__PURE__ */ (0,
|
|
1129
|
+
return /* @__PURE__ */ (0, I.jsx)(k.div, {
|
|
1069
1130
|
"aria-hidden": !0,
|
|
1070
1131
|
...r,
|
|
1071
1132
|
ref: t
|
|
1072
1133
|
});
|
|
1073
|
-
}, "SelectSeparator")),
|
|
1074
|
-
let r = J(
|
|
1075
|
-
return
|
|
1076
|
-
let e =
|
|
1134
|
+
}, "SelectSeparator")), vt = "SelectBubbleInput", yt = /* @__PURE__ */ F.forwardRef(/* @__PURE__ */ G(function({ __scopeSelect: e, ...t }, n) {
|
|
1135
|
+
let r = J(vt, e), { value: a, onValueChange: o, required: s, disabled: c, name: l, autoComplete: d, form: f, userSelection: p } = r, { nativeOptions: m, nativeSelectKey: h } = r, g = F.useRef(null), _ = i(n, g), v = a ?? "", y = F.useRef(v), b = F.useRef(p), x = F.useRef(!1), S = Array.from(m).some((e) => (e.props.value ?? "") === "");
|
|
1136
|
+
return F.useEffect(() => {
|
|
1137
|
+
let e = g.current;
|
|
1077
1138
|
if (!e) return;
|
|
1078
|
-
let t = window.HTMLSelectElement.prototype, n = Object.getOwnPropertyDescriptor(t, "value").set;
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1139
|
+
let t = window.HTMLSelectElement.prototype, n = Object.getOwnPropertyDescriptor(t, "value").set, r = p !== null && p !== b.current;
|
|
1140
|
+
b.current = p;
|
|
1141
|
+
let i = y.current !== v;
|
|
1142
|
+
y.current = v;
|
|
1143
|
+
let a = r && i;
|
|
1144
|
+
if (r && !i && p.value !== v && !p.hasConsumerStoppedPropagation && n) {
|
|
1145
|
+
x.current = !0;
|
|
1146
|
+
try {
|
|
1147
|
+
n.call(e, p.value), e.dispatchEvent(new Event("change", { bubbles: !0 }));
|
|
1148
|
+
} finally {
|
|
1149
|
+
x.current = !1, n.call(e, v);
|
|
1150
|
+
}
|
|
1151
|
+
return;
|
|
1152
|
+
}
|
|
1153
|
+
let o = a && !p.hasConsumerStoppedPropagation;
|
|
1154
|
+
if (i && n) {
|
|
1155
|
+
let t = new Event("change", { bubbles: o });
|
|
1156
|
+
n.call(e, v), e.dispatchEvent(t);
|
|
1082
1157
|
}
|
|
1083
|
-
}, [v,
|
|
1158
|
+
}, [v, p]), /* @__PURE__ */ (0, I.jsxs)(k.select, {
|
|
1084
1159
|
"aria-hidden": !0,
|
|
1085
1160
|
required: s,
|
|
1086
1161
|
tabIndex: -1,
|
|
1087
1162
|
name: l,
|
|
1088
|
-
autoComplete:
|
|
1163
|
+
autoComplete: d,
|
|
1089
1164
|
disabled: c,
|
|
1090
|
-
form:
|
|
1091
|
-
onChange: (e) =>
|
|
1165
|
+
form: f,
|
|
1166
|
+
onChange: (e) => {
|
|
1167
|
+
x.current || o(e.target.value);
|
|
1168
|
+
},
|
|
1092
1169
|
...t,
|
|
1093
1170
|
style: {
|
|
1094
|
-
...
|
|
1171
|
+
...u,
|
|
1095
1172
|
...t.style
|
|
1096
1173
|
},
|
|
1097
|
-
ref:
|
|
1098
|
-
defaultValue:
|
|
1099
|
-
children: [Q(a) && !
|
|
1100
|
-
},
|
|
1174
|
+
ref: _,
|
|
1175
|
+
defaultValue: v,
|
|
1176
|
+
children: [Q(a) && !S ? /* @__PURE__ */ (0, I.jsx)("option", { value: "" }) : null, Array.from(m)]
|
|
1177
|
+
}, h);
|
|
1101
1178
|
}, "SelectBubbleInput"));
|
|
1102
|
-
function
|
|
1179
|
+
function bt(e) {
|
|
1103
1180
|
return typeof e == "function";
|
|
1104
1181
|
}
|
|
1105
|
-
G(
|
|
1182
|
+
G(bt, "isFunction");
|
|
1106
1183
|
function Q(e) {
|
|
1107
1184
|
return e === "" || e === void 0;
|
|
1108
1185
|
}
|
|
1109
1186
|
G(Q, "shouldShowPlaceholder");
|
|
1110
|
-
function
|
|
1111
|
-
let t =
|
|
1187
|
+
function xt(e) {
|
|
1188
|
+
let t = w(e), n = F.useRef(""), r = F.useRef(0), i = F.useCallback((e) => {
|
|
1112
1189
|
let i = n.current + e;
|
|
1113
|
-
t(i)
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1190
|
+
t(i);
|
|
1191
|
+
function a(e) {
|
|
1192
|
+
n.current = e, window.clearTimeout(r.current), e !== "" && (r.current = window.setTimeout(() => a(""), 1e3));
|
|
1193
|
+
}
|
|
1194
|
+
G(a, "updateSearch"), a(i);
|
|
1195
|
+
}, [t]), a = F.useCallback(() => {
|
|
1117
1196
|
n.current = "", window.clearTimeout(r.current);
|
|
1118
1197
|
}, []);
|
|
1119
|
-
return
|
|
1198
|
+
return F.useEffect(() => () => window.clearTimeout(r.current), []), [
|
|
1120
1199
|
n,
|
|
1121
1200
|
i,
|
|
1122
1201
|
a
|
|
1123
1202
|
];
|
|
1124
1203
|
}
|
|
1125
|
-
G(
|
|
1126
|
-
function
|
|
1127
|
-
let r = t.length > 1 && Array.from(t).every((e) => e === t[0]) ? t[0] : t, i = n ? e.indexOf(n) : -1, a =
|
|
1204
|
+
G(xt, "useTypeaheadSearch");
|
|
1205
|
+
function St(e, t, n) {
|
|
1206
|
+
let r = t.length > 1 && Array.from(t).every((e) => e === t[0]) ? t[0] : t, i = n ? e.indexOf(n) : -1, a = Ct(e, Math.max(i, 0));
|
|
1128
1207
|
r.length === 1 && (a = a.filter((e) => e !== n));
|
|
1129
1208
|
let o = a.find((e) => e.textValue.toLowerCase().startsWith(r.toLowerCase()));
|
|
1130
1209
|
return o === n ? void 0 : o;
|
|
1131
1210
|
}
|
|
1132
|
-
G(
|
|
1133
|
-
function
|
|
1211
|
+
G(St, "findNextItem");
|
|
1212
|
+
function Ct(e, t) {
|
|
1134
1213
|
return e.map((n, r) => e[(t + r) % e.length]);
|
|
1135
1214
|
}
|
|
1136
|
-
G(
|
|
1215
|
+
G(Ct, "wrapArray");
|
|
1137
1216
|
//#endregion
|
|
1138
1217
|
//#region src/utils/assertNever.ts
|
|
1139
|
-
function Ct(e) {
|
|
1140
|
-
M(!1, `Unexpected object: ${e}`);
|
|
1141
|
-
}
|
|
1142
1218
|
function wt(e) {
|
|
1219
|
+
A(!1, `Unexpected object: ${e}`);
|
|
1220
|
+
}
|
|
1221
|
+
function Tt(e) {
|
|
1143
1222
|
return t.warn(`Unexpected object: ${JSON.stringify(e)}`), e;
|
|
1144
1223
|
}
|
|
1145
1224
|
//#endregion
|
|
1146
1225
|
//#region src/utils/strings.ts
|
|
1147
|
-
function
|
|
1226
|
+
function Et(e) {
|
|
1148
1227
|
return e ? e.charAt(0).toUpperCase() + e.slice(1) : "";
|
|
1149
1228
|
}
|
|
1150
|
-
function
|
|
1229
|
+
function Dt(e) {
|
|
1151
1230
|
if (!e) return "";
|
|
1152
1231
|
if (typeof e != "string") throw t.error(e), TypeError(`Expected string, got ${typeof e}`);
|
|
1153
|
-
return /[A-Za-z]/.test(e) ? e.replaceAll(/([\da-z])([A-Z])/g, "$1 $2").replaceAll(/([A-Z]+)([A-Z][a-z])/g, "$1 $2").replaceAll(/[\s_-]+/g, " ").trim().split(" ").map(
|
|
1232
|
+
return /[A-Za-z]/.test(e) ? e.replaceAll(/([\da-z])([A-Z])/g, "$1 $2").replaceAll(/([A-Z]+)([A-Z][a-z])/g, "$1 $2").replaceAll(/[\s_-]+/g, " ").trim().split(" ").map(Et).join(" ") : e;
|
|
1154
1233
|
}
|
|
1155
|
-
var
|
|
1156
|
-
startCase:
|
|
1234
|
+
var Ot = {
|
|
1235
|
+
startCase: Dt,
|
|
1157
1236
|
htmlEscape: (e) => e && e.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll("\"", """).replaceAll("'", "'").replaceAll("\n", " "),
|
|
1158
1237
|
withTrailingSlash(e) {
|
|
1159
1238
|
return e.endsWith("/") ? e : `${e}/`;
|
|
@@ -1172,7 +1251,7 @@ var Dt = {
|
|
|
1172
1251
|
return String(e);
|
|
1173
1252
|
}
|
|
1174
1253
|
}
|
|
1175
|
-
}, $ = c(),
|
|
1254
|
+
}, $ = c(), kt = a("z-50 min-w-32 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md forced-color-adjust-none forced-colors:border-[CanvasText] forced-colors:bg-[Canvas] forced-colors:text-[CanvasText]", { variants: { subcontent: { true: "shadow-lg" } } }), At = a("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-hidden data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground forced-color-adjust-none forced-colors:data-[highlighted]:bg-[Highlight] forced-colors:data-[highlighted]:text-[HighlightText] forced-colors:data-[state=open]:bg-[Highlight] forced-colors:data-[state=open]:text-[HighlightText]", { variants: { inset: { true: "pl-8" } } }), jt = "data-disabled:pointer-events-none data-disabled:opacity-50 forced-colors:data-disabled:text-[GrayText]", Mt = a(n("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-hidden transition-colors data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground forced-color-adjust-none forced-colors:data-[highlighted]:bg-[Highlight] forced-colors:data-[highlighted]:text-[HighlightText]", jt), { variants: {} }), Nt = a("absolute left-2 flex h-3.5 w-3.5 items-center justify-center", { variants: {} }), Pt = a("px-2 py-1.5 text-sm font-semibold", { variants: { inset: { true: "pl-8" } } }), Ft = a(n("menu-item relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-hidden forced-color-adjust-none forced-colors:data-[highlighted]:bg-[Highlight] forced-colors:data-[highlighted]:text-[HighlightText] forced-colors:aria-selected:bg-[Highlight] forced-colors:aria-selected:text-[HighlightText]", jt), {
|
|
1176
1255
|
variants: {
|
|
1177
1256
|
inset: { true: "pl-8" },
|
|
1178
1257
|
variant: {
|
|
@@ -1184,35 +1263,35 @@ var Dt = {
|
|
|
1184
1263
|
}
|
|
1185
1264
|
},
|
|
1186
1265
|
defaultVariants: { variant: "default" }
|
|
1187
|
-
}),
|
|
1266
|
+
}), It = a("-mx-1 my-1 h-px bg-border last:hidden", { variants: {} }), Lt = (e) => {
|
|
1188
1267
|
let t = (0, $.c)(8), r, i;
|
|
1189
1268
|
t[0] === e ? (r = t[1], i = t[2]) : ({className: r, ...i} = e, t[0] = e, t[1] = r, t[2] = i);
|
|
1190
1269
|
let a;
|
|
1191
1270
|
t[3] === r ? a = t[4] : (a = n("ml-auto text-xs tracking-widest opacity-60", r), t[3] = r, t[4] = a);
|
|
1192
1271
|
let o;
|
|
1193
|
-
return t[5] !== i || t[6] !== a ? (o = /* @__PURE__ */ (0,
|
|
1272
|
+
return t[5] !== i || t[6] !== a ? (o = /* @__PURE__ */ (0, I.jsx)("span", {
|
|
1194
1273
|
className: a,
|
|
1195
1274
|
...i
|
|
1196
1275
|
}), t[5] = i, t[6] = a, t[7] = o) : o = t[7], o;
|
|
1197
1276
|
};
|
|
1198
|
-
|
|
1277
|
+
Lt.displayName = "MenuShortcut";
|
|
1199
1278
|
//#endregion
|
|
1200
1279
|
//#region src/components/ui/native-select.tsx
|
|
1201
|
-
var
|
|
1280
|
+
var Rt = a("flex h-6 w-fit mb-1 items-center justify-between rounded-sm bg-background px-2 text-sm font-prose ring-offset-background placeholder:text-muted-foreground focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 cursor-pointer forced-color-adjust-none forced-colors:bg-[ButtonFace] forced-colors:text-[ButtonText] forced-colors:disabled:text-[GrayText]", {
|
|
1202
1281
|
variants: { variant: {
|
|
1203
1282
|
default: "shadow-xs-solid border border-input hover:shadow-sm-solid focus-visible:border-primary focus-visible:shadow-md-solid disabled:hover:shadow-xs-solid forced-colors:border-[ButtonText] forced-colors:disabled:border-[GrayText]",
|
|
1204
1283
|
ghost: "opacity-70 hover:opacity-100 focus:opacity-100"
|
|
1205
1284
|
} },
|
|
1206
1285
|
defaultVariants: { variant: "default" }
|
|
1207
|
-
}),
|
|
1286
|
+
}), zt = F.forwardRef((e, t) => {
|
|
1208
1287
|
let i = (0, $.c)(12), a, o, s;
|
|
1209
1288
|
i[0] === e ? (a = i[1], o = i[2], s = i[3]) : ({className: o, children: a, ...s} = e, i[0] = e, i[1] = a, i[2] = o, i[3] = s);
|
|
1210
1289
|
let c;
|
|
1211
1290
|
i[4] === Symbol.for("react.memo_cache_sentinel") ? (c = r.stopPropagation(), i[4] = c) : c = i[4];
|
|
1212
1291
|
let l;
|
|
1213
|
-
i[5] === o ? l = i[6] : (l = n(
|
|
1292
|
+
i[5] === o ? l = i[6] : (l = n(Rt({}), o), i[5] = o, i[6] = l);
|
|
1214
1293
|
let u;
|
|
1215
|
-
return i[7] !== a || i[8] !== s || i[9] !== t || i[10] !== l ? (u = /* @__PURE__ */ (0,
|
|
1294
|
+
return i[7] !== a || i[8] !== s || i[9] !== t || i[10] !== l ? (u = /* @__PURE__ */ (0, I.jsx)("select", {
|
|
1216
1295
|
ref: t,
|
|
1217
1296
|
onClick: c,
|
|
1218
1297
|
className: l,
|
|
@@ -1220,59 +1299,59 @@ var Lt = a("flex h-6 w-fit mb-1 items-center justify-between rounded-sm bg-backg
|
|
|
1220
1299
|
children: a
|
|
1221
1300
|
}), i[7] = a, i[8] = s, i[9] = t, i[10] = l, i[11] = u) : u = i[11], u;
|
|
1222
1301
|
});
|
|
1223
|
-
|
|
1302
|
+
zt.displayName = "NativeSelect";
|
|
1224
1303
|
//#endregion
|
|
1225
1304
|
//#region src/components/ui/select.tsx
|
|
1226
|
-
var
|
|
1305
|
+
var Bt = Ne, Vt = tt, Ht = C(Ve), Ut = Le, Wt = F.forwardRef((e, t) => {
|
|
1227
1306
|
let r = (0, $.c)(21), i, a, o, s, c, l;
|
|
1228
1307
|
r[0] === e ? (i = r[1], a = r[2], o = r[3], s = r[4], c = r[5], l = r[6]) : ({className: a, children: i, onClear: o, variant: l, hideChevron: c, ...s} = e, r[0] = e, r[1] = i, r[2] = a, r[3] = o, r[4] = s, r[5] = c, r[6] = l);
|
|
1229
1308
|
let u = c !== void 0 && c, d;
|
|
1230
|
-
r[7] !== a || r[8] !== l ? (d = n(
|
|
1309
|
+
r[7] !== a || r[8] !== l ? (d = n(Rt({ variant: l }), "mb-0", a), r[7] = a, r[8] = l, r[9] = d) : d = r[9];
|
|
1231
1310
|
let f;
|
|
1232
|
-
r[10] !== u || r[11] !== o ? (f = o ? /* @__PURE__ */ (0,
|
|
1311
|
+
r[10] !== u || r[11] !== o ? (f = o ? /* @__PURE__ */ (0, I.jsx)("span", {
|
|
1233
1312
|
onPointerDown: (e) => {
|
|
1234
1313
|
e.preventDefault(), e.stopPropagation(), o();
|
|
1235
1314
|
},
|
|
1236
|
-
children: /* @__PURE__ */ (0,
|
|
1237
|
-
}) : !u && /* @__PURE__ */ (0,
|
|
1315
|
+
children: /* @__PURE__ */ (0, I.jsx)(N, { className: "h-4 w-4 opacity-50 hover:opacity-90" })
|
|
1316
|
+
}) : !u && /* @__PURE__ */ (0, I.jsx)(j, { className: "h-4 w-4 opacity-50" }), r[10] = u, r[11] = o, r[12] = f) : f = r[12];
|
|
1238
1317
|
let p;
|
|
1239
|
-
r[13] === f ? p = r[14] : (p = /* @__PURE__ */ (0,
|
|
1318
|
+
r[13] === f ? p = r[14] : (p = /* @__PURE__ */ (0, I.jsx)(Re, {
|
|
1240
1319
|
asChild: !0,
|
|
1241
1320
|
children: f
|
|
1242
1321
|
}), r[13] = f, r[14] = p);
|
|
1243
1322
|
let m;
|
|
1244
|
-
return r[15] !== i || r[16] !== s || r[17] !== t || r[18] !== d || r[19] !== p ? (m = /* @__PURE__ */ (0,
|
|
1323
|
+
return r[15] !== i || r[16] !== s || r[17] !== t || r[18] !== d || r[19] !== p ? (m = /* @__PURE__ */ (0, I.jsxs)(Fe, {
|
|
1245
1324
|
ref: t,
|
|
1246
1325
|
className: d,
|
|
1247
1326
|
...s,
|
|
1248
1327
|
children: [i, p]
|
|
1249
1328
|
}), r[15] = i, r[16] = s, r[17] = t, r[18] = d, r[19] = p, r[20] = m) : m = r[20], m;
|
|
1250
1329
|
});
|
|
1251
|
-
|
|
1252
|
-
var
|
|
1330
|
+
Wt.displayName = Fe.displayName;
|
|
1331
|
+
var Gt = v(He), Kt = F.forwardRef((e, t) => {
|
|
1253
1332
|
let r = (0, $.c)(21), i, a, o, s;
|
|
1254
1333
|
r[0] === e ? (i = r[1], a = r[2], o = r[3], s = r[4]) : ({className: a, children: i, position: s, ...o} = e, r[0] = e, r[1] = i, r[2] = a, r[3] = o, r[4] = s);
|
|
1255
1334
|
let c = s === void 0 ? "popper" : s, l = c === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", u;
|
|
1256
1335
|
r[5] !== a || r[6] !== l ? (u = n("max-h-[300px] relative z-50 min-w-32 overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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", l, a), r[5] = a, r[6] = l, r[7] = u) : u = r[7];
|
|
1257
1336
|
let d;
|
|
1258
|
-
r[8] === Symbol.for("react.memo_cache_sentinel") ? (d = /* @__PURE__ */ (0,
|
|
1337
|
+
r[8] === Symbol.for("react.memo_cache_sentinel") ? (d = /* @__PURE__ */ (0, I.jsx)(pt, {
|
|
1259
1338
|
className: "flex items-center justify-center h-[20px] bg-background text-muted-foreground cursor-default",
|
|
1260
|
-
children: /* @__PURE__ */ (0,
|
|
1339
|
+
children: /* @__PURE__ */ (0, I.jsx)(M, { className: "h-4 w-4" })
|
|
1261
1340
|
}), r[8] = d) : d = r[8];
|
|
1262
1341
|
let f = c === "popper" && "h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width)", p;
|
|
1263
1342
|
r[9] === f ? p = r[10] : (p = n("p-1", f), r[9] = f, r[10] = p);
|
|
1264
1343
|
let m;
|
|
1265
|
-
r[11] !== i || r[12] !== p ? (m = /* @__PURE__ */ (0,
|
|
1344
|
+
r[11] !== i || r[12] !== p ? (m = /* @__PURE__ */ (0, I.jsx)(Qe, {
|
|
1266
1345
|
className: p,
|
|
1267
1346
|
children: i
|
|
1268
1347
|
}), r[11] = i, r[12] = p, r[13] = m) : m = r[13];
|
|
1269
1348
|
let h;
|
|
1270
|
-
r[14] === Symbol.for("react.memo_cache_sentinel") ? (h = /* @__PURE__ */ (0,
|
|
1349
|
+
r[14] === Symbol.for("react.memo_cache_sentinel") ? (h = /* @__PURE__ */ (0, I.jsx)(ht, {
|
|
1271
1350
|
className: "flex items-center justify-center h-[20px] bg-background text-muted-foreground cursor-default",
|
|
1272
|
-
children: /* @__PURE__ */ (0,
|
|
1351
|
+
children: /* @__PURE__ */ (0, I.jsx)(j, { className: "h-4 w-4 opacity-50" })
|
|
1273
1352
|
}), r[14] = h) : h = r[14];
|
|
1274
1353
|
let g;
|
|
1275
|
-
return r[15] !== c || r[16] !== o || r[17] !== t || r[18] !== u || r[19] !== m ? (g = /* @__PURE__ */ (0,
|
|
1354
|
+
return r[15] !== c || r[16] !== o || r[17] !== t || r[18] !== u || r[19] !== m ? (g = /* @__PURE__ */ (0, I.jsx)(Ht, { children: /* @__PURE__ */ (0, I.jsx)(re, { children: /* @__PURE__ */ (0, I.jsxs)(Gt, {
|
|
1276
1355
|
ref: t,
|
|
1277
1356
|
className: u,
|
|
1278
1357
|
position: c,
|
|
@@ -1284,38 +1363,38 @@ var Wt = x(Ve), Gt = L.forwardRef((e, t) => {
|
|
|
1284
1363
|
]
|
|
1285
1364
|
}) }) }), r[15] = c, r[16] = o, r[17] = t, r[18] = u, r[19] = m, r[20] = g) : g = r[20], g;
|
|
1286
1365
|
});
|
|
1287
|
-
|
|
1288
|
-
var
|
|
1366
|
+
Kt.displayName = He.displayName;
|
|
1367
|
+
var qt = F.forwardRef((e, t) => {
|
|
1289
1368
|
let r = (0, $.c)(9), i, a;
|
|
1290
1369
|
r[0] === e ? (i = r[1], a = r[2]) : ({className: i, ...a} = e, r[0] = e, r[1] = i, r[2] = a);
|
|
1291
1370
|
let o;
|
|
1292
1371
|
r[3] === i ? o = r[4] : (o = n("px-2 py-1.5 text-sm font-semibold", i), r[3] = i, r[4] = o);
|
|
1293
1372
|
let s;
|
|
1294
|
-
return r[5] !== a || r[6] !== t || r[7] !== o ? (s = /* @__PURE__ */ (0,
|
|
1373
|
+
return r[5] !== a || r[6] !== t || r[7] !== o ? (s = /* @__PURE__ */ (0, I.jsx)(rt, {
|
|
1295
1374
|
ref: t,
|
|
1296
1375
|
className: o,
|
|
1297
1376
|
...a
|
|
1298
1377
|
}), r[5] = a, r[6] = t, r[7] = o, r[8] = s) : s = r[8], s;
|
|
1299
1378
|
});
|
|
1300
|
-
|
|
1301
|
-
var
|
|
1379
|
+
qt.displayName = rt.displayName;
|
|
1380
|
+
var Jt = F.forwardRef((e, t) => {
|
|
1302
1381
|
let r = (0, $.c)(17), i, a, o, s;
|
|
1303
1382
|
r[0] === e ? (i = r[1], a = r[2], o = r[3], s = r[4]) : ({className: a, children: i, subtitle: s, ...o} = e, r[0] = e, r[1] = i, r[2] = a, r[3] = o, r[4] = s);
|
|
1304
1383
|
let c;
|
|
1305
|
-
r[5] === a ? c = r[6] : (c = n("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-hidden data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground forced-colors:data-[highlighted]:bg-[Highlight] forced-colors:data-[highlighted]:text-[HighlightText]",
|
|
1384
|
+
r[5] === a ? c = r[6] : (c = n("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-hidden data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground forced-colors:data-[highlighted]:bg-[Highlight] forced-colors:data-[highlighted]:text-[HighlightText]", jt, a), r[5] = a, r[6] = c);
|
|
1306
1385
|
let l;
|
|
1307
|
-
r[7] === Symbol.for("react.memo_cache_sentinel") ? (l = /* @__PURE__ */ (0,
|
|
1386
|
+
r[7] === Symbol.for("react.memo_cache_sentinel") ? (l = /* @__PURE__ */ (0, I.jsx)("span", {
|
|
1308
1387
|
className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center",
|
|
1309
|
-
children: /* @__PURE__ */ (0,
|
|
1388
|
+
children: /* @__PURE__ */ (0, I.jsx)(dt, { children: /* @__PURE__ */ (0, I.jsx)(h, { className: "h-3 w-3" }) })
|
|
1310
1389
|
}), r[7] = l) : l = r[7];
|
|
1311
1390
|
let u = typeof i != "string" || void 0, d;
|
|
1312
|
-
r[8] !== i || r[9] !== u ? (d = /* @__PURE__ */ (0,
|
|
1391
|
+
r[8] !== i || r[9] !== u ? (d = /* @__PURE__ */ (0, I.jsx)(lt, {
|
|
1313
1392
|
asChild: u,
|
|
1314
1393
|
className: "flex w-full flex-1",
|
|
1315
1394
|
children: i
|
|
1316
1395
|
}), r[8] = i, r[9] = u, r[10] = d) : d = r[10];
|
|
1317
1396
|
let f;
|
|
1318
|
-
return r[11] !== o || r[12] !== t || r[13] !== s || r[14] !== c || r[15] !== d ? (f = /* @__PURE__ */ (0,
|
|
1397
|
+
return r[11] !== o || r[12] !== t || r[13] !== s || r[14] !== c || r[15] !== d ? (f = /* @__PURE__ */ (0, I.jsxs)(st, {
|
|
1319
1398
|
ref: t,
|
|
1320
1399
|
className: c,
|
|
1321
1400
|
...o,
|
|
@@ -1326,19 +1405,19 @@ var qt = L.forwardRef((e, t) => {
|
|
|
1326
1405
|
]
|
|
1327
1406
|
}), r[11] = o, r[12] = t, r[13] = s, r[14] = c, r[15] = d, r[16] = f) : f = r[16], f;
|
|
1328
1407
|
});
|
|
1329
|
-
|
|
1330
|
-
var
|
|
1408
|
+
Jt.displayName = st.displayName;
|
|
1409
|
+
var Yt = F.forwardRef((e, t) => {
|
|
1331
1410
|
let r = (0, $.c)(9), i, a;
|
|
1332
1411
|
r[0] === e ? (i = r[1], a = r[2]) : ({className: i, ...a} = e, r[0] = e, r[1] = i, r[2] = a);
|
|
1333
1412
|
let o;
|
|
1334
1413
|
r[3] === i ? o = r[4] : (o = n("-mx-1 my-1 h-px bg-muted", i), r[3] = i, r[4] = o);
|
|
1335
1414
|
let s;
|
|
1336
|
-
return r[5] !== a || r[6] !== t || r[7] !== o ? (s = /* @__PURE__ */ (0,
|
|
1415
|
+
return r[5] !== a || r[6] !== t || r[7] !== o ? (s = /* @__PURE__ */ (0, I.jsx)(_t, {
|
|
1337
1416
|
ref: t,
|
|
1338
1417
|
className: o,
|
|
1339
1418
|
...a
|
|
1340
1419
|
}), r[5] = a, r[6] = t, r[7] = o, r[8] = s) : s = r[8], s;
|
|
1341
1420
|
});
|
|
1342
|
-
|
|
1421
|
+
Yt.displayName = _t.displayName;
|
|
1343
1422
|
//#endregion
|
|
1344
|
-
export {
|
|
1423
|
+
export { N as A, Tt as C, he as D, ve as E, j as M, z as O, wt as S, Fe as T, Pt as _, qt as a, Ot as b, Ut as c, jt as d, Lt as f, Ft as g, Mt as h, Jt as i, M as j, oe as k, zt as l, Nt as m, Kt as n, Yt as o, kt as p, Vt as r, Wt as s, Bt as t, Rt as u, It as v, Re as w, Et as x, At as y };
|