@qredence/fleet 0.6.3 → 0.6.5
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/CHANGELOG.md +22 -0
- package/dist/web/client/assets/{DialogTitle-DiAm7YNe.js → DialogTitle-BwQ9k-MZ.js} +1 -1
- package/dist/web/client/assets/agent-disclosure-YgLa4c2y.js +1 -0
- package/dist/web/client/assets/{alert-dialog-CYE37KMM.js → alert-dialog-BfK7648p.js} +1 -1
- package/dist/web/client/assets/analytics-stub-BY-GADyA.js +1 -0
- package/dist/web/client/assets/arrow-up-DCwrqIrK.js +1 -0
- package/dist/web/client/assets/artifacts-panel-DDlPULVv.js +1 -0
- package/dist/web/client/assets/bot-DETalD3q.js +1 -0
- package/dist/web/client/assets/{button-Dl0ce3Y5.js → button-BrwYi6QP.js} +1 -1
- package/dist/web/client/assets/{card-DCEnYd2G.js → card-BScRdZNS.js} +1 -1
- package/dist/web/client/assets/chat-command-palette-AjGusIEp.js +1 -0
- package/dist/web/client/assets/chat-helpers-Bj7_hES7.js +1 -0
- package/dist/web/client/assets/check-BTwIaCtI.js +1 -0
- package/dist/web/client/assets/chevron-down-Bse1ggZM.js +1 -0
- package/dist/web/client/assets/chevron-right-BPCB1mOg.js +1 -0
- package/dist/web/client/assets/chunk-YOKDWASO-C8deEx7Z.js +143 -0
- package/dist/web/client/assets/circle-check-DBhaebaM.js +1 -0
- package/dist/web/client/assets/citations-DOkXsdCi.js +1 -0
- package/dist/web/client/assets/clsx-DB0hHKMi.js +1 -0
- package/dist/web/client/assets/{collapsible-CUxOjhDJ.js → collapsible-DsbKpD_Y.js} +1 -1
- package/dist/web/client/assets/{command-Cw4X8Bpk.js → command-DSxdh_1v.js} +1 -1
- package/dist/web/client/assets/composer-intent-C5pz72T6.js +62 -0
- package/dist/web/client/assets/create-project-dialog-zTSeGUup.js +1 -0
- package/dist/web/client/assets/{createBaseUIEventDetails-B58Jldei.js → createBaseUIEventDetails-DklXWq23.js} +1 -1
- package/dist/web/client/assets/createLucideIcon-CQY2ECfR.js +1 -0
- package/dist/web/client/assets/{dialog-BzcIOvFC.js → dialog-B9nXTto4.js} +1 -1
- package/dist/web/client/assets/{dist-DbHxXSgQ.js → dist-BJJVCio8.js} +1 -1
- package/dist/web/client/assets/dist-BogNzeK9.js +1 -0
- package/dist/web/client/assets/{ease-CMumuPlX.js → ease-2UPBQU5v.js} +1 -1
- package/dist/web/client/assets/eye-iNSvs0UA.js +1 -0
- package/dist/web/client/assets/file-text-cqOanUYv.js +1 -0
- package/dist/web/client/assets/folder-COBtkKZa.js +1 -0
- package/dist/web/client/assets/{fork-picker-dialog-BYRr-xTy.js → fork-picker-dialog-DEdHU89A.js} +1 -1
- package/dist/web/client/assets/gauge-0Nn96wfZ.js +1 -0
- package/dist/web/client/assets/git-branch-DZEh2mM2.js +1 -0
- package/dist/web/client/assets/globals-BiAbxPQ2.css +2 -0
- package/dist/web/client/assets/hard-drive-B3opVeEB.js +1 -0
- package/dist/web/client/assets/{highlighted-body-KPVGNVTW-CgT7gqvs.js → highlighted-body-KPVGNVTW-CZcNaoxi.js} +1 -1
- package/dist/web/client/assets/horizontal-resize-5AxYvGLA.js +1 -0
- package/dist/web/client/assets/index-NhnAdIsR.js +12 -0
- package/dist/web/client/assets/{input-CxZp56Im.js → input-BceH49B1.js} +1 -1
- package/dist/web/client/assets/{input-group-D7lAfKHR.js → input-group-DThl_vkS.js} +1 -1
- package/dist/web/client/assets/ipython-tool-CuSGRhXl.js +3 -0
- package/dist/web/client/assets/is-ref-object-CEXqIz6L.js +1 -0
- package/dist/web/client/assets/loader-circle-BmKYM_C4.js +1 -0
- package/dist/web/client/assets/markdown-C-Y9gskI.js +2 -0
- package/dist/web/client/assets/{markdown-code-CDTRq-HZ.js → markdown-code-BqFVdovL.js} +1 -1
- package/dist/web/client/assets/mermaid-HWGCJPDP-CVNXPao6.js +1 -0
- package/dist/web/client/assets/{message-queue-Dl8wbCOu.js → message-queue-BoNn57Po.js} +1 -1
- package/dist/web/client/assets/{model-selector-list-CHD8lMAl.js → model-selector-list-DDsuJCgB.js} +1 -1
- package/dist/web/client/assets/{notify-DjVixft7.js → notify-GSsGEKtR.js} +1 -1
- package/dist/web/client/assets/{openui-renderer-C4e9FOVR.js → openui-renderer-l1qI5JDt.js} +41 -41
- package/dist/web/client/assets/package-BkC-HSi-.js +1 -0
- package/dist/web/client/assets/pencil-Cbgq3ybX.js +1 -0
- package/dist/web/client/assets/plug-wCz-036u.js +1 -0
- package/dist/web/client/assets/prompt-input-BhVQxoyh.js +1 -0
- package/dist/web/client/assets/{prompt-suggestions-BNyTcyWg.js → prompt-suggestions-BRFWFm5y.js} +1 -1
- package/dist/web/client/assets/provider-catalog-L0c-bZv6.js +1 -0
- package/dist/web/client/assets/provider-label-Buq3HZrP.js +1 -0
- package/dist/web/client/assets/react-Cvdyeg_0.js +1 -0
- package/dist/web/client/assets/react-dom-B7th3XGm.js +1 -0
- package/dist/web/client/assets/refresh-cw-CqPE3kNY.js +1 -0
- package/dist/web/client/assets/{repl-panel-L9dmPqio.js → repl-panel-UQN9UFG7.js} +1 -1
- package/dist/web/client/assets/resource-helpers-CKbSmzpw.js +2 -0
- package/dist/web/client/assets/{resources-panel-mT-aMCvV.js → resources-panel-kp_UjnpX.js} +1 -1
- package/dist/web/client/assets/right-panel-context-DHKWoetk.js +1 -0
- package/dist/web/client/assets/right-panel-registry-gwgnEeUz.js +2 -0
- package/dist/web/client/assets/rotate-ccw-DLkfsmG9.js +1 -0
- package/dist/web/client/assets/routes-umGEy_Ak.js +16 -0
- package/dist/web/client/assets/safe-external-url-BnEhm9A0.js +1 -0
- package/dist/web/client/assets/search-Cb6fFWew.js +1 -0
- package/dist/web/client/assets/{session-reasoning-panel-8D2P7iaJ.js → session-reasoning-panel-BAtKTsjn.js} +1 -1
- package/dist/web/client/assets/session-tool-renderer-pGdW2MnV.js +1389 -0
- package/dist/web/client/assets/{session-tree-panel-CM4_wwrM.js → session-tree-panel-DF3kuF0P.js} +1 -1
- package/dist/web/client/assets/settings-dialog-C8YN5D1V.js +2 -0
- package/dist/web/client/assets/{skeleton-C3mo31Qu.js → skeleton-D5Y9nBfp.js} +1 -1
- package/dist/web/client/assets/{skeleton-loaders-BMa_G4yX.js → skeleton-loaders-DOKGa7CW.js} +1 -1
- package/dist/web/client/assets/sparkles-C4VQyMox.js +1 -0
- package/dist/web/client/assets/spinner-C3sPnLdu.js +1 -0
- package/dist/web/client/assets/square-BbTF3gLc.js +1 -0
- package/dist/web/client/assets/square-terminal-BLq2bQVF.js +1 -0
- package/dist/web/client/assets/{subagent-chat-panel-BESrXxAR.js → subagent-chat-panel-BIsmzS45.js} +1 -1
- package/dist/web/client/assets/subagent-transcript-CEUBL9sF.js +1 -0
- package/dist/web/client/assets/{subagents-panel-8aKOwWLs.js → subagents-panel-CFxWpUT0.js} +1 -1
- package/dist/web/client/assets/sun-C7zg8Oas.js +1 -0
- package/dist/web/client/assets/{surfaces-CpfsGAIA.js → surfaces-BULKVm-B.js} +1 -1
- package/dist/web/client/assets/switch-CoSNSJEY.js +1 -0
- package/dist/web/client/assets/terminal-Ceucj7us.js +1 -0
- package/dist/web/client/assets/toast-CS0pnDlS.js +1 -0
- package/dist/web/client/assets/tokens-CtP2s1Y3.js +1 -0
- package/dist/web/client/assets/tool-result-C-vs_tjQ.js +4 -0
- package/dist/web/client/assets/tool-timeline-B4ci1oJg.js +1 -0
- package/dist/web/client/assets/triangle-alert-BuzmrrqI.js +1 -0
- package/dist/web/client/assets/types-D5hZ8IyV.js +1 -0
- package/dist/web/client/assets/{ui-preferences-aG2U2jjW.js → ui-preferences-1YaENqef.js} +1 -1
- package/dist/web/client/assets/{use-presence-7I2qv4qI.js → use-presence-D2YmRKr3.js} +1 -1
- package/dist/web/client/assets/{use-reduced-motion-BOcG709U.js → use-reduced-motion-CaQBb3Qc.js} +2 -2
- package/dist/web/client/assets/{useBaseUiId-D9ZGPZ6f.js → useBaseUiId-BlzQUkVG.js} +1 -1
- package/dist/web/client/assets/{useControlled-CgAAWIy9.js → useControlled-CkQSkSv1.js} +1 -1
- package/dist/web/client/assets/utils-Dpy9ZFOr.js +1 -0
- package/dist/web/client/assets/virtualized-turn-list-DkJIWXFJ.js +6 -0
- package/dist/web/client/assets/workspace-panel-CjKMroC6.js +1 -0
- package/dist/web/client/assets/{workspace-path-nav-DqPbETfJ.js → workspace-path-nav-DmxBrMV6.js} +2 -2
- package/dist/web/client/assets/wrench-BYnD147U.js +1 -0
- package/dist/web/client/assets/x-DEU6H3M-.js +1 -0
- package/dist/web/client/bundle-budget.json +6 -6
- package/dist/web/server/_tanstack-start-manifest_v-B3Gb4p5p-DO2GL5VM.js +95 -0
- package/dist/web/server/{artifacts-panel-CwLVBqyi-CDORJY75.js → artifacts-panel-CGgpyc85-V3KXDVAX.js} +73 -66
- package/dist/web/server/{chat-command-palette-DUha04ia-5OV7WVJZ.js → chat-command-palette-BMR7RsuI-U5S4X44U.js} +52 -45
- package/dist/web/server/{chunk-ADYZWC5L.js → chunk-22XP6PHK.js} +50 -11
- package/dist/web/server/{chunk-XEG4JTND.js → chunk-2HOITUWV.js} +5 -5
- package/dist/web/server/{chunk-NZ6KQT2X.js → chunk-2XQYM4KB.js} +2 -2
- package/dist/web/server/{chunk-K6PTNSCW.js → chunk-36BG6OPK.js} +2 -2
- package/dist/web/server/chunk-3OOZPQZF.js +51 -0
- package/dist/web/server/{chunk-DP26GVWH.js → chunk-3YYNG52U.js} +5772 -4758
- package/dist/web/server/chunk-4IVORBQD.js +39 -0
- package/dist/web/server/{chunk-B2LF64HM.js → chunk-4LBXVBM7.js} +5 -5
- package/dist/web/server/{chunk-DKD32TRM.js → chunk-5FIJPXUA.js} +3343 -14
- package/dist/web/server/{chunk-O2IC376F.js → chunk-5TXDGMCK.js} +117 -1787
- package/dist/web/server/{chunk-YDDDSVNB.js → chunk-5VPNOUVY.js} +7 -5
- package/dist/web/server/chunk-7LUHWO5G.js +28 -0
- package/dist/web/server/chunk-7SZKAHLD.js +25 -0
- package/dist/web/server/{chunk-UE32PAV2.js → chunk-ACZS5EEZ.js} +4 -4
- package/dist/web/server/{chunk-CAPTFJOC.js → chunk-AWVHN432.js} +4 -4
- package/dist/web/server/{chunk-SDV3P3IW.js → chunk-BMXYQRMJ.js} +96 -78
- package/dist/web/server/chunk-BS4D5LRR.js +152 -0
- package/dist/web/server/{chunk-OVJYUWSQ.js → chunk-C2YGLMFE.js} +1 -1
- package/dist/web/server/chunk-CMOAC245.js +28 -0
- package/dist/web/server/{chunk-7FK6YEMA.js → chunk-CRCVWYBA.js} +2 -9
- package/dist/web/server/chunk-DIVIHC5K.js +100 -0
- package/dist/web/server/{chunk-XJ6TGSUB.js → chunk-EKVRPCBJ.js} +1 -1
- package/dist/web/server/{chunk-V5IFFLZQ.js → chunk-ELRLMFHT.js} +192 -142
- package/dist/web/server/{chunk-ZNFXBGLK.js → chunk-ERYPONRF.js} +1 -1
- package/dist/web/server/chunk-F3OV445J.js +25 -0
- package/dist/web/server/{chunk-5727TXOK.js → chunk-F5DJQ3PQ.js} +36 -36
- package/dist/web/server/{chunk-XSOUURPF.js → chunk-FAJILEF2.js} +142 -110
- package/dist/web/server/{chunk-UM3RHJNZ.js → chunk-FF2M3MLP.js} +2 -2
- package/dist/web/server/{chunk-IPV4GLJL.js → chunk-FHZAFF2A.js} +7 -24
- package/dist/web/server/chunk-FOMB2JR7.js +26 -0
- package/dist/web/server/{chunk-5RTGRTPD.js → chunk-FVWPODLT.js} +7 -6
- package/dist/web/server/chunk-G3WQTXJY.js +25 -0
- package/dist/web/server/{chunk-KZ35W5M7.js → chunk-G6NMFFZX.js} +41 -36
- package/dist/web/server/{chunk-YCCF676T.js → chunk-GLNLSEZJ.js} +7 -7
- package/dist/web/server/chunk-GNDXVFJY.js +28 -0
- package/dist/web/server/{chunk-HGVJEUV4.js → chunk-GR765UTQ.js} +4 -4
- package/dist/web/server/{chunk-RXUMFFUV.js → chunk-GSG3K6RA.js} +2 -2
- package/dist/web/server/chunk-HFN4TNR3.js +31 -0
- package/dist/web/server/{chunk-ETCO5KZK.js → chunk-I36LJXNY.js} +5 -5
- package/dist/web/server/{chunk-3Q3QKLHC.js → chunk-IIPUA4LB.js} +248 -212
- package/dist/web/server/{chunk-7PQTPSEE.js → chunk-INWLYZZ6.js} +1 -1
- package/dist/web/server/chunk-JCK6B7ZW.js +1677 -0
- package/dist/web/server/chunk-JEQQEY6O.js +30 -0
- package/dist/web/server/chunk-JVXQQYXB.js +154 -0
- package/dist/web/server/chunk-KABZXD6N.js +152 -0
- package/dist/web/server/{chunk-FTLJ66KU.js → chunk-L2SVMQWB.js} +12 -43
- package/dist/web/server/{chunk-TU2WNRAL.js → chunk-LBUHLBKK.js} +15 -13
- package/dist/web/server/chunk-LOFZS555.js +28 -0
- package/dist/web/server/{chunk-MJXXVQNA.js → chunk-LQRH6BP6.js} +25 -18
- package/dist/web/server/{chunk-WU6X3GPJ.js → chunk-MTVGA2MH.js} +72 -52
- package/dist/web/server/{chunk-T2UTBHJ4.js → chunk-N47UN47Y.js} +51 -39
- package/dist/web/server/chunk-NZ5YXXQ5.js +39 -0
- package/dist/web/server/{chunk-E5HALE4M.js → chunk-OYWUPJ72.js} +2 -2
- package/dist/web/server/{chunk-YVGCPUAW.js → chunk-PISNXFEK.js} +3 -3
- package/dist/web/server/{chunk-7HXCGBUP.js → chunk-PX7B5BTI.js} +5 -5
- package/dist/web/server/{chunk-33QA7BQJ.js → chunk-PYTU4DGR.js} +16 -10
- package/dist/web/server/{chunk-7E76R7MB.js → chunk-QHCQDVCQ.js} +1 -2
- package/dist/web/server/{chunk-FMAYMBRS.js → chunk-QN7KFCUW.js} +4318 -3649
- package/dist/web/server/chunk-QWWG3YC6.js +25 -0
- package/dist/web/server/chunk-RPGWRA2X.js +39 -0
- package/dist/web/server/chunk-RPWKCJHL.js +18 -0
- package/dist/web/server/chunk-RWYAKZCZ.js +39 -0
- package/dist/web/server/chunk-SGMJ5CGW.js +36 -0
- package/dist/web/server/chunk-SOZKLVNI.js +275 -0
- package/dist/web/server/{chunk-BQROC4PL.js → chunk-TNZKPEE6.js} +13 -7
- package/dist/web/server/chunk-TSOBRZPG.js +41 -0
- package/dist/web/server/{chunk-RJNGEU6C.js → chunk-UIUZ4ETR.js} +2 -2
- package/dist/web/server/{chunk-TLNZNR7C.js → chunk-UUDBEYKV.js} +2 -2
- package/dist/web/server/{chunk-HQ5TEXHT.js → chunk-UXS5E6OE.js} +4 -4
- package/dist/web/server/chunk-V7PDLH3T.js +73 -0
- package/dist/web/server/chunk-VCQ65B3G.js +28 -0
- package/dist/web/server/{chunk-TR2GA5OF.js → chunk-VHLBXWEN.js} +55 -40
- package/dist/web/server/{chunk-S2IBIJIG.js → chunk-WU6KNEGU.js} +46 -31
- package/dist/web/server/chunk-X37KO4BO.js +29 -0
- package/dist/web/server/chunk-X5AQ7KHU.js +22 -0
- package/dist/web/server/chunk-XZCIEF54.js +28 -0
- package/dist/web/server/{chunk-7NZ3FJDA.js → chunk-YBCP4V6T.js} +2 -2
- package/dist/web/server/{chunk-7UTDOTOU.js → chunk-YKJJDQAK.js} +28 -100
- package/dist/web/server/chunk-Z4OTKGMN.js +25 -0
- package/dist/web/server/chunk-ZJIELDZL.js +39 -0
- package/dist/web/server/{chunk-UDD5W4CR.js → chunk-ZMF45HAO.js} +58 -45
- package/dist/web/server/chunk-ZNED4KTU.js +105 -0
- package/dist/web/server/chunk-ZNI5AL4B.js +30 -0
- package/dist/web/server/create-project-dialog-xhTWmcx1-UQQU3MAT.js +295 -0
- package/dist/web/server/{fork-picker-dialog-DeMiLZtS-WTRTTP64.js → fork-picker-dialog-B5J-S5Nm-QOMVVHI7.js} +11 -11
- package/dist/web/server/{highlighted-body-KPVGNVTW-Ct6g7FVa-YZHVMLW4.js → highlighted-body-KPVGNVTW-D4Xsgab0-BZNKZ2YE.js} +3 -3
- package/dist/web/server/{markdown-BzNejPoZ-6ITTDAV6.js → markdown-DaTMVcnu-37DWI2JW.js} +4 -4
- package/dist/web/server/{markdown-code-DAwXuW6m-HHVELO6I.js → markdown-code-Cvz3a-x3-WAD4KC4A.js} +5 -5
- package/dist/web/server/{mermaid-HWGCJPDP-Ca26PwPZ-5EWRESLM.js → mermaid-HWGCJPDP-CDDePcVz-4BWFRGWL.js} +2 -2
- package/dist/web/server/{message-queue-Demph1x4-GGXJUUKO.js → message-queue-Dg2okv2L-SJTUUJS7.js} +17 -16
- package/dist/web/server/{model-selector-list-BeGQHwKV-UJYFO4KX.js → model-selector-list-Csw4nOra-IOMN5JMO.js} +23 -23
- package/dist/web/server/openui-renderer-CiWvcD3p-N6I66FOC.js +39 -0
- package/dist/web/server/{prompt-suggestions-yPZqX__K-3VGJC4IF.js → prompt-suggestions-h17Gu7u1-BS5SU2FY.js} +5 -5
- package/dist/web/server/{repl-panel-CgUF1qUw-3DFD2V53.js → repl-panel-CBwh0VGD-USDEOGGJ.js} +8 -9
- package/dist/web/server/{resources-panel-ChUliWV--JITAGS6Q.js → resources-panel-rn64m-sL-7QXEGRNX.js} +9 -10
- package/dist/web/server/{router-DfG45nTQ-3VXEUYG5.js → router-DOPFvRSC-G7G75P7U.js} +2663 -163
- package/dist/web/server/{routes-B9F9UfF1-UN2IVBMJ.js → routes-i2Ai-ZwX-SMSFONDQ.js} +2233 -2486
- package/dist/web/server/server.js +6 -6
- package/dist/web/server/{session-insights-panel-xgrkX1Rp-FDNURBXZ.js → session-insights-panel-DKkakWj6-ITHKDXF4.js} +1 -1
- package/dist/web/server/{session-reasoning-panel-m1RgcIph-NUXGXVKE.js → session-reasoning-panel-CXMCAM8C-HZMR5JCO.js} +9 -10
- package/dist/web/server/session-tool-renderer-jldnNioy-5ATOVAG5.js +46 -0
- package/dist/web/server/{session-tree-panel-rS0t1wbf-HNA6AJBY.js → session-tree-panel-WaHHv775-HRUHFSFO.js} +11 -11
- package/dist/web/server/{settings-dialog-CqkrDSnm-LFEKSS7Y.js → settings-dialog-C-xwPYy8-TFICZWEM.js} +554 -381
- package/dist/web/server/{start-DVUbMfrb-ELVIFRUY.js → start-QK6aG02q-RXFV6K5L.js} +1 -1
- package/dist/web/server/{subagent-chat-panel-Cf7QdDqH-DPPSVLSY.js → subagent-chat-panel-VEVu0QXU-DPWJFCYR.js} +50 -47
- package/dist/web/server/{subagents-panel-_JsUw-6t-MZWM5P45.js → subagents-panel-Cs3cBcsy-HTQBIYAS.js} +47 -45
- package/dist/web/server/tool-timeline-CfuizRid-L3Y3OSCH.js +15 -0
- package/dist/web/server/{workspace-panel-BHEB9nRM-Y6KGIVGP.js → workspace-panel-BU50q4Bu-JHTQPR6R.js} +109 -93
- package/package.json +1 -1
- package/dist/web/client/assets/agent-disclosure-CMrxF7L-.js +0 -1
- package/dist/web/client/assets/analytics-stub-C2vgmGm_.js +0 -1
- package/dist/web/client/assets/artifacts-panel-ClDpGWOU.js +0 -1
- package/dist/web/client/assets/bot-DbB9BKL0.js +0 -1
- package/dist/web/client/assets/bundle-mjs-cJTHqqzI.js +0 -1
- package/dist/web/client/assets/chat-BVMnC5Qh.js +0 -52
- package/dist/web/client/assets/chat-command-palette-YuyaJNbi.js +0 -1
- package/dist/web/client/assets/check-B3LlvM65.js +0 -1
- package/dist/web/client/assets/chevron-down-DUUprRP5.js +0 -1
- package/dist/web/client/assets/chevron-right-NVqQIoiO.js +0 -1
- package/dist/web/client/assets/chunk-YOKDWASO-Bte3iwlH.js +0 -143
- package/dist/web/client/assets/citations-DXqV2NLy.js +0 -1
- package/dist/web/client/assets/createLucideIcon-_dfI7Arx.js +0 -1
- package/dist/web/client/assets/dist-52wg4XPY.js +0 -1
- package/dist/web/client/assets/eye-CDHqtVoE.js +0 -1
- package/dist/web/client/assets/file-text-TmalmYrb.js +0 -1
- package/dist/web/client/assets/folder-vuNT4shY.js +0 -1
- package/dist/web/client/assets/gauge-BsDqNM1A.js +0 -1
- package/dist/web/client/assets/git-branch-CTq9aACS.js +0 -1
- package/dist/web/client/assets/globals-BtCXZXL_.css +0 -2
- package/dist/web/client/assets/hard-drive-BT7UxHQu.js +0 -1
- package/dist/web/client/assets/horizontal-resize-VLjLByUV.js +0 -1
- package/dist/web/client/assets/index-B9aXxpOv.js +0 -12
- package/dist/web/client/assets/ipython-tool-CkHaO3PW.js +0 -3
- package/dist/web/client/assets/is-ref-object-BcRWZ4l7.js +0 -1
- package/dist/web/client/assets/loader-circle-B5GIZGxd.js +0 -1
- package/dist/web/client/assets/markdown-BHkByC9K.js +0 -2
- package/dist/web/client/assets/mermaid-HWGCJPDP-CY3N5ECk.js +0 -1
- package/dist/web/client/assets/package-BKBPgwMP.js +0 -1
- package/dist/web/client/assets/pencil-CdO6qfv3.js +0 -1
- package/dist/web/client/assets/plug-BRROUIw-.js +0 -1
- package/dist/web/client/assets/prompt-input-WaGSKZCU.js +0 -1
- package/dist/web/client/assets/provider-catalog-ClVvphe0.js +0 -1
- package/dist/web/client/assets/provider-label-CwZ-KDxk.js +0 -1
- package/dist/web/client/assets/react-CwJFpaho.js +0 -1
- package/dist/web/client/assets/react-dom-DX3XddaT.js +0 -1
- package/dist/web/client/assets/refresh-cw-l9WPHRkq.js +0 -1
- package/dist/web/client/assets/resource-helpers-BuWybA8l.js +0 -2
- package/dist/web/client/assets/right-panel-context-CS8tJMzE.js +0 -1
- package/dist/web/client/assets/right-panel-registry-BnYCffmM.js +0 -2
- package/dist/web/client/assets/rotate-ccw-CfGhzOv7.js +0 -1
- package/dist/web/client/assets/routes-DUontXSG.js +0 -16
- package/dist/web/client/assets/safe-external-url-BbAom7Bm.js +0 -1
- package/dist/web/client/assets/search-BjcXAUrI.js +0 -1
- package/dist/web/client/assets/session-tool-renderer-Bd3dsE2D.js +0 -1395
- package/dist/web/client/assets/settings-dialog-DMTD9m6z.js +0 -2
- package/dist/web/client/assets/sparkles-BY5MFyk6.js +0 -1
- package/dist/web/client/assets/square-DQaQu9bp.js +0 -1
- package/dist/web/client/assets/square-terminal-BsopiuN7.js +0 -1
- package/dist/web/client/assets/subagent-transcript-CAqFJfMj.js +0 -1
- package/dist/web/client/assets/sun-D0llhiMU.js +0 -1
- package/dist/web/client/assets/switch-D3FhZU-S.js +0 -1
- package/dist/web/client/assets/terminal-BQAKkBY6.js +0 -1
- package/dist/web/client/assets/toast-lnCWGgSE.js +0 -1
- package/dist/web/client/assets/tokens-Ch5WqXC_.js +0 -1
- package/dist/web/client/assets/tool-result-B_yb2JoE.js +0 -4
- package/dist/web/client/assets/tool-timeline-VnMRQoLS.js +0 -1
- package/dist/web/client/assets/triangle-alert-GAYh_5d3.js +0 -1
- package/dist/web/client/assets/utils-Brtgag-m.js +0 -1
- package/dist/web/client/assets/virtualized-turn-list-mL3ONUUA.js +0 -6
- package/dist/web/client/assets/workspace-panel-CKF5JQl2.js +0 -1
- package/dist/web/client/assets/wrench-Myc12BTA.js +0 -1
- package/dist/web/client/assets/x-BGsDD848.js +0 -1
- package/dist/web/server/_tanstack-start-manifest_v-Cm8xE-Rb-TMLYN3GY.js +0 -93
- package/dist/web/server/chunk-2ST2ULW7.js +0 -24
- package/dist/web/server/chunk-3C4CFCIS.js +0 -19
- package/dist/web/server/chunk-3IHTZSBY.js +0 -22
- package/dist/web/server/chunk-4QD4PCVP.js +0 -19
- package/dist/web/server/chunk-4ZIEVI5O.js +0 -63
- package/dist/web/server/chunk-7CNGNFFK.js +0 -23
- package/dist/web/server/chunk-AHTO6GDS.js +0 -33
- package/dist/web/server/chunk-CHEC7TWB.js +0 -22
- package/dist/web/server/chunk-D7ELZVTI.js +0 -33
- package/dist/web/server/chunk-DLA5TLKX.js +0 -164
- package/dist/web/server/chunk-GS2IZGRC.js +0 -19
- package/dist/web/server/chunk-H5D5DX3K.js +0 -75
- package/dist/web/server/chunk-HFQZLPU2.js +0 -29
- package/dist/web/server/chunk-JBLHIEVG.js +0 -22
- package/dist/web/server/chunk-JDCCC7A7.js +0 -3382
- package/dist/web/server/chunk-JIULUYHT.js +0 -24
- package/dist/web/server/chunk-KBWUBWVJ.js +0 -60
- package/dist/web/server/chunk-LJ6Y7DBH.js +0 -128
- package/dist/web/server/chunk-M5RSPNYN.js +0 -22
- package/dist/web/server/chunk-O2DUZJYK.js +0 -19
- package/dist/web/server/chunk-OKL5ZRVB.js +0 -33
- package/dist/web/server/chunk-OMPXUTMX.js +0 -33
- package/dist/web/server/chunk-OOXWPL22.js +0 -22
- package/dist/web/server/chunk-SFTKGQ7H.js +0 -33
- package/dist/web/server/chunk-TNL4YV63.js +0 -29
- package/dist/web/server/chunk-UCA4WN66.js +0 -45
- package/dist/web/server/chunk-WWJF4RO2.js +0 -19
- package/dist/web/server/chunk-X7D6GFQU.js +0 -34
- package/dist/web/server/chunk-XA42CHF2.js +0 -22
- package/dist/web/server/openui-renderer-B4z18Brm-HSMKJ47D.js +0 -39
- package/dist/web/server/session-tool-renderer-CT65wuet-RQBMXHEZ.js +0 -46
- package/dist/web/server/tool-timeline-QL9k5dzA-RLU26HXT.js +0 -16
|
@@ -1,1739 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
isObject
|
|
3
|
-
} from "./chunk-K6PTNSCW.js";
|
|
4
|
-
import {
|
|
5
|
-
KeyframeResolver,
|
|
6
|
-
MotionConfigContext,
|
|
7
|
-
MotionGlobalConfig,
|
|
8
|
-
NativeAnimation,
|
|
9
|
-
VisualElement,
|
|
10
|
-
WithPromise,
|
|
11
|
-
acceleratedValues,
|
|
12
|
-
analyseComplexValue,
|
|
13
|
-
buildHTMLStyles,
|
|
14
|
-
buildSVGAttrs,
|
|
15
|
-
camelToDash,
|
|
16
|
-
cancelFrame,
|
|
17
|
-
clamp,
|
|
18
|
-
color,
|
|
19
|
-
complex,
|
|
20
|
-
containsCSSVariable,
|
|
21
|
-
createBox,
|
|
22
|
-
cssStyleProperties,
|
|
23
|
-
defaultTransformValue,
|
|
24
|
-
findDimensionValueType,
|
|
25
|
-
flushKeyframeResolvers,
|
|
26
|
-
frame,
|
|
27
|
-
frameData,
|
|
28
|
-
generateLinearEasing,
|
|
29
|
-
getAnimatableNone,
|
|
30
|
-
getDefaultValueType,
|
|
31
|
-
getFinalKeyframe,
|
|
32
|
-
hex,
|
|
33
|
-
hsla,
|
|
34
|
-
invariant,
|
|
35
|
-
isBezierDefinition,
|
|
36
|
-
isCSSVariableName,
|
|
37
|
-
isCSSVariableToken,
|
|
38
|
-
isGenerator,
|
|
39
|
-
isMotionValue,
|
|
40
|
-
isNumOrPxType,
|
|
41
|
-
isNumericalString,
|
|
42
|
-
isSVGTag,
|
|
43
|
-
isZeroValueString,
|
|
44
|
-
memo$1,
|
|
45
|
-
millisecondsToSeconds,
|
|
46
|
-
mixNumber,
|
|
47
|
-
motionValue,
|
|
48
|
-
noop,
|
|
49
|
-
optimizedAppearDataAttribute,
|
|
50
|
-
positionalValues,
|
|
51
|
-
readTransformValue,
|
|
52
|
-
resolveVariantFromProps,
|
|
53
|
-
rgba,
|
|
54
|
-
scrapeMotionValuesFromProps,
|
|
55
|
-
scrapeMotionValuesFromProps$1,
|
|
56
|
-
secondsToMilliseconds,
|
|
57
|
-
setStyle,
|
|
58
|
-
time,
|
|
59
|
-
transformPropOrder,
|
|
60
|
-
transformProps,
|
|
61
|
-
useConstant,
|
|
62
|
-
velocityPerSecond,
|
|
63
|
-
warning
|
|
64
|
-
} from "./chunk-7E76R7MB.js";
|
|
65
1
|
import {
|
|
66
2
|
ChatDeliveryModeSchema,
|
|
67
3
|
ChatThinkingLevelSchema,
|
|
68
4
|
ChatTransportSchema,
|
|
5
|
+
ProjectIdSchema,
|
|
69
6
|
SessionIdSchema,
|
|
70
7
|
external_exports,
|
|
71
8
|
nonEmptyStringSchema,
|
|
72
9
|
nonNegativeIntSchema,
|
|
73
10
|
positiveIntSchema
|
|
74
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-3YYNG52U.js";
|
|
75
12
|
|
|
76
|
-
// web/app/dist/server/assets/
|
|
77
|
-
import { useContext, useMemo } from "react";
|
|
78
|
-
import { jsx } from "react/jsx-runtime";
|
|
79
|
-
var pipe = (...transformers) => transformers.reduce((a, b) => (v) => b(a(v)));
|
|
80
|
-
var progress = /* @__NO_SIDE_EFFECTS__ */ (from, to, value) => {
|
|
81
|
-
const range = to - from;
|
|
82
|
-
return range ? (value - from) / range : 1;
|
|
83
|
-
};
|
|
84
|
-
var calcBezier = (t, a1, a2) => (((1 - 3 * a2 + 3 * a1) * t + (3 * a2 - 6 * a1)) * t + 3 * a1) * t;
|
|
85
|
-
var subdivisionPrecision = 1e-7;
|
|
86
|
-
var subdivisionMaxIterations = 12;
|
|
87
|
-
function binarySubdivide(x, lowerBound, upperBound, mX1, mX2) {
|
|
88
|
-
let currentX;
|
|
89
|
-
let currentT;
|
|
90
|
-
let i = 0;
|
|
91
|
-
do {
|
|
92
|
-
currentT = lowerBound + (upperBound - lowerBound) / 2;
|
|
93
|
-
currentX = calcBezier(currentT, mX1, mX2) - x;
|
|
94
|
-
if (currentX > 0) upperBound = currentT;
|
|
95
|
-
else lowerBound = currentT;
|
|
96
|
-
} while (Math.abs(currentX) > subdivisionPrecision && ++i < subdivisionMaxIterations);
|
|
97
|
-
return currentT;
|
|
98
|
-
}
|
|
99
|
-
// @__NO_SIDE_EFFECTS__
|
|
100
|
-
function cubicBezier(mX1, mY1, mX2, mY2) {
|
|
101
|
-
if (mX1 === mY1 && mX2 === mY2) return noop;
|
|
102
|
-
const getTForX = (aX) => binarySubdivide(aX, 0, 1, mX1, mX2);
|
|
103
|
-
return (t) => t === 0 || t === 1 ? t : calcBezier(getTForX(t), mY1, mY2);
|
|
104
|
-
}
|
|
105
|
-
var mirrorEasing = /* @__NO_SIDE_EFFECTS__ */ (easing) => (p) => p <= 0.5 ? easing(2 * p) / 2 : (2 - easing(2 * (1 - p))) / 2;
|
|
106
|
-
var reverseEasing = /* @__NO_SIDE_EFFECTS__ */ (easing) => (p) => 1 - easing(1 - p);
|
|
107
|
-
var backOut = /* @__PURE__ */ cubicBezier(0.33, 1.53, 0.69, 0.99);
|
|
108
|
-
var backIn = /* @__PURE__ */ reverseEasing(backOut);
|
|
109
|
-
var backInOut = /* @__PURE__ */ mirrorEasing(backIn);
|
|
110
|
-
var anticipate = (p) => p >= 1 ? 1 : (p *= 2) < 1 ? 0.5 * backIn(p) : 0.5 * (2 - Math.pow(2, -10 * (p - 1)));
|
|
111
|
-
var circIn = (p) => 1 - Math.sin(Math.acos(p));
|
|
112
|
-
var circOut = /* @__PURE__ */ reverseEasing(circIn);
|
|
113
|
-
var circInOut = /* @__PURE__ */ mirrorEasing(circIn);
|
|
114
|
-
var easeIn = /* @__PURE__ */ cubicBezier(0.42, 0, 1, 1);
|
|
115
|
-
var easeOut = /* @__PURE__ */ cubicBezier(0, 0, 0.58, 1);
|
|
116
|
-
var easeInOut = /* @__PURE__ */ cubicBezier(0.42, 0, 0.58, 1);
|
|
117
|
-
var isEasingArray = /* @__NO_SIDE_EFFECTS__ */ (ease2) => {
|
|
118
|
-
return Array.isArray(ease2) && typeof ease2[0] !== "number";
|
|
119
|
-
};
|
|
120
|
-
var easingLookup = {
|
|
121
|
-
linear: noop,
|
|
122
|
-
easeIn,
|
|
123
|
-
easeInOut,
|
|
124
|
-
easeOut,
|
|
125
|
-
circIn,
|
|
126
|
-
circInOut,
|
|
127
|
-
circOut,
|
|
128
|
-
backIn,
|
|
129
|
-
backInOut,
|
|
130
|
-
backOut,
|
|
131
|
-
anticipate
|
|
132
|
-
};
|
|
133
|
-
var isValidEasing = (easing) => {
|
|
134
|
-
return typeof easing === "string";
|
|
135
|
-
};
|
|
136
|
-
var easingDefinitionToFunction = (definition) => {
|
|
137
|
-
if (isBezierDefinition(definition)) {
|
|
138
|
-
invariant(definition.length === 4, `Cubic bezier arrays must contain four numerical values.`, "cubic-bezier-length");
|
|
139
|
-
const [x1, y1, x2, y2] = definition;
|
|
140
|
-
return /* @__PURE__ */ cubicBezier(x1, y1, x2, y2);
|
|
141
|
-
} else if (isValidEasing(definition)) {
|
|
142
|
-
invariant(easingLookup[definition] !== void 0, `Invalid easing type '${definition}'`, "invalid-easing-type");
|
|
143
|
-
return easingLookup[definition];
|
|
144
|
-
}
|
|
145
|
-
return definition;
|
|
146
|
-
};
|
|
147
|
-
function hueToRgb(p, q, t) {
|
|
148
|
-
if (t < 0) t += 1;
|
|
149
|
-
if (t > 1) t -= 1;
|
|
150
|
-
if (t < 1 / 6) return p + (q - p) * 6 * t;
|
|
151
|
-
if (t < 1 / 2) return q;
|
|
152
|
-
if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;
|
|
153
|
-
return p;
|
|
154
|
-
}
|
|
155
|
-
function hslaToRgba({ hue, saturation, lightness, alpha }) {
|
|
156
|
-
hue /= 360;
|
|
157
|
-
saturation /= 100;
|
|
158
|
-
lightness /= 100;
|
|
159
|
-
let red = 0;
|
|
160
|
-
let green = 0;
|
|
161
|
-
let blue = 0;
|
|
162
|
-
if (!saturation) red = green = blue = lightness;
|
|
163
|
-
else {
|
|
164
|
-
const q = lightness < 0.5 ? lightness * (1 + saturation) : lightness + saturation - lightness * saturation;
|
|
165
|
-
const p = 2 * lightness - q;
|
|
166
|
-
red = hueToRgb(p, q, hue + 1 / 3);
|
|
167
|
-
green = hueToRgb(p, q, hue);
|
|
168
|
-
blue = hueToRgb(p, q, hue - 1 / 3);
|
|
169
|
-
}
|
|
170
|
-
return {
|
|
171
|
-
red: Math.round(red * 255),
|
|
172
|
-
green: Math.round(green * 255),
|
|
173
|
-
blue: Math.round(blue * 255),
|
|
174
|
-
alpha
|
|
175
|
-
};
|
|
176
|
-
}
|
|
177
|
-
function mixImmediate(a, b) {
|
|
178
|
-
return (p) => p > 0 ? b : a;
|
|
179
|
-
}
|
|
180
|
-
var mixLinearColor = (from, to, v) => {
|
|
181
|
-
const fromExpo = from * from;
|
|
182
|
-
const expo = v * (to * to - fromExpo) + fromExpo;
|
|
183
|
-
return expo < 0 ? 0 : Math.sqrt(expo);
|
|
184
|
-
};
|
|
185
|
-
var colorTypes = [
|
|
186
|
-
hex,
|
|
187
|
-
rgba,
|
|
188
|
-
hsla
|
|
189
|
-
];
|
|
190
|
-
var getColorType = (v) => colorTypes.find((type) => type.test(v));
|
|
191
|
-
function asRGBA(color2) {
|
|
192
|
-
const type = getColorType(color2);
|
|
193
|
-
warning(Boolean(type), `'${color2}' is not an animatable color. Use the equivalent color code instead.`, "color-not-animatable");
|
|
194
|
-
if (!Boolean(type)) return false;
|
|
195
|
-
let model = type.parse(color2);
|
|
196
|
-
if (type === hsla) model = hslaToRgba(model);
|
|
197
|
-
return model;
|
|
198
|
-
}
|
|
199
|
-
var mixColor = (from, to) => {
|
|
200
|
-
const fromRGBA = asRGBA(from);
|
|
201
|
-
const toRGBA = asRGBA(to);
|
|
202
|
-
if (!fromRGBA || !toRGBA) return mixImmediate(from, to);
|
|
203
|
-
const blended = { ...fromRGBA };
|
|
204
|
-
return (v) => {
|
|
205
|
-
blended.red = mixLinearColor(fromRGBA.red, toRGBA.red, v);
|
|
206
|
-
blended.green = mixLinearColor(fromRGBA.green, toRGBA.green, v);
|
|
207
|
-
blended.blue = mixLinearColor(fromRGBA.blue, toRGBA.blue, v);
|
|
208
|
-
blended.alpha = mixNumber(fromRGBA.alpha, toRGBA.alpha, v);
|
|
209
|
-
return rgba.transform(blended);
|
|
210
|
-
};
|
|
211
|
-
};
|
|
212
|
-
var invisibleValues = /* @__PURE__ */ new Set(["none", "hidden"]);
|
|
213
|
-
function mixVisibility(origin, target) {
|
|
214
|
-
if (invisibleValues.has(origin)) return (p) => p <= 0 ? origin : target;
|
|
215
|
-
else return (p) => p >= 1 ? target : origin;
|
|
216
|
-
}
|
|
217
|
-
function mixNumber2(a, b) {
|
|
218
|
-
return (p) => mixNumber(a, b, p);
|
|
219
|
-
}
|
|
220
|
-
function getMixer(a) {
|
|
221
|
-
if (typeof a === "number") return mixNumber2;
|
|
222
|
-
else if (typeof a === "string") return isCSSVariableToken(a) ? mixImmediate : color.test(a) ? mixColor : mixComplex;
|
|
223
|
-
else if (Array.isArray(a)) return mixArray;
|
|
224
|
-
else if (typeof a === "object") return color.test(a) ? mixColor : mixObject;
|
|
225
|
-
return mixImmediate;
|
|
226
|
-
}
|
|
227
|
-
function mixArray(a, b) {
|
|
228
|
-
const output = [...a];
|
|
229
|
-
const numValues = output.length;
|
|
230
|
-
const blendValue = a.map((v, i) => getMixer(v)(v, b[i]));
|
|
231
|
-
return (p) => {
|
|
232
|
-
for (let i = 0; i < numValues; i++) output[i] = blendValue[i](p);
|
|
233
|
-
return output;
|
|
234
|
-
};
|
|
235
|
-
}
|
|
236
|
-
function mixObject(a, b) {
|
|
237
|
-
const output = {
|
|
238
|
-
...a,
|
|
239
|
-
...b
|
|
240
|
-
};
|
|
241
|
-
const blendValue = {};
|
|
242
|
-
for (const key in output) if (a[key] !== void 0 && b[key] !== void 0) blendValue[key] = getMixer(a[key])(a[key], b[key]);
|
|
243
|
-
return (v) => {
|
|
244
|
-
for (const key in blendValue) output[key] = blendValue[key](v);
|
|
245
|
-
return output;
|
|
246
|
-
};
|
|
247
|
-
}
|
|
248
|
-
function matchOrder(origin, target) {
|
|
249
|
-
const orderedOrigin = [];
|
|
250
|
-
const pointers = {
|
|
251
|
-
color: 0,
|
|
252
|
-
var: 0,
|
|
253
|
-
number: 0
|
|
254
|
-
};
|
|
255
|
-
for (let i = 0; i < target.values.length; i++) {
|
|
256
|
-
const type = target.types[i];
|
|
257
|
-
const originIndex = origin.indexes[type][pointers[type]];
|
|
258
|
-
const originValue = origin.values[originIndex] ?? 0;
|
|
259
|
-
orderedOrigin[i] = originValue;
|
|
260
|
-
pointers[type]++;
|
|
261
|
-
}
|
|
262
|
-
return orderedOrigin;
|
|
263
|
-
}
|
|
264
|
-
var mixComplex = (origin, target) => {
|
|
265
|
-
const template = complex.createTransformer(target);
|
|
266
|
-
const originStats = analyseComplexValue(origin);
|
|
267
|
-
const targetStats = analyseComplexValue(target);
|
|
268
|
-
if (originStats.indexes.var.length === targetStats.indexes.var.length && originStats.indexes.color.length === targetStats.indexes.color.length && originStats.indexes.number.length >= targetStats.indexes.number.length) {
|
|
269
|
-
if (invisibleValues.has(origin) && !targetStats.values.length || invisibleValues.has(target) && !originStats.values.length) return mixVisibility(origin, target);
|
|
270
|
-
return pipe(mixArray(matchOrder(originStats, targetStats), targetStats.values), template);
|
|
271
|
-
} else {
|
|
272
|
-
warning(true, `Complex values '${origin}' and '${target}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`, "complex-values-different");
|
|
273
|
-
return mixImmediate(origin, target);
|
|
274
|
-
}
|
|
275
|
-
};
|
|
276
|
-
function mix(from, to, p) {
|
|
277
|
-
if (typeof from === "number" && typeof to === "number" && typeof p === "number") return mixNumber(from, to, p);
|
|
278
|
-
return getMixer(from)(from, to);
|
|
279
|
-
}
|
|
280
|
-
var frameloopDriver = (update) => {
|
|
281
|
-
const passTimestamp = ({ timestamp }) => update(timestamp);
|
|
282
|
-
return {
|
|
283
|
-
start: (keepAlive = true) => frame.update(passTimestamp, keepAlive),
|
|
284
|
-
stop: () => cancelFrame(passTimestamp),
|
|
285
|
-
/**
|
|
286
|
-
* If we're processing this frame we can use the
|
|
287
|
-
* framelocked timestamp to keep things in sync.
|
|
288
|
-
*/
|
|
289
|
-
now: () => frameData.isProcessing ? frameData.timestamp : time.now()
|
|
290
|
-
};
|
|
291
|
-
};
|
|
292
|
-
var maxGeneratorDuration = 2e4;
|
|
293
|
-
function calcGeneratorDuration(generator) {
|
|
294
|
-
let duration = 0;
|
|
295
|
-
const timeStep = 50;
|
|
296
|
-
let state = generator.next(duration);
|
|
297
|
-
while (!state.done && duration < 2e4) {
|
|
298
|
-
duration += timeStep;
|
|
299
|
-
state = generator.next(duration);
|
|
300
|
-
}
|
|
301
|
-
return duration >= 2e4 ? Infinity : duration;
|
|
302
|
-
}
|
|
303
|
-
function createGeneratorEasing(options, scale = 100, createGenerator) {
|
|
304
|
-
const generator = createGenerator({
|
|
305
|
-
...options,
|
|
306
|
-
keyframes: [0, scale]
|
|
307
|
-
});
|
|
308
|
-
const duration = Math.min(calcGeneratorDuration(generator), maxGeneratorDuration);
|
|
309
|
-
return {
|
|
310
|
-
type: "keyframes",
|
|
311
|
-
ease: (progress2) => {
|
|
312
|
-
return generator.next(duration * progress2).value / scale;
|
|
313
|
-
},
|
|
314
|
-
duration: millisecondsToSeconds(duration)
|
|
315
|
-
};
|
|
316
|
-
}
|
|
317
|
-
var springDefaults = {
|
|
318
|
-
stiffness: 100,
|
|
319
|
-
damping: 10,
|
|
320
|
-
mass: 1,
|
|
321
|
-
velocity: 0,
|
|
322
|
-
duration: 800,
|
|
323
|
-
bounce: 0.3,
|
|
324
|
-
visualDuration: 0.3,
|
|
325
|
-
restSpeed: {
|
|
326
|
-
granular: 0.01,
|
|
327
|
-
default: 2
|
|
328
|
-
},
|
|
329
|
-
restDelta: {
|
|
330
|
-
granular: 5e-3,
|
|
331
|
-
default: 0.5
|
|
332
|
-
},
|
|
333
|
-
minDuration: 0.01,
|
|
334
|
-
maxDuration: 10,
|
|
335
|
-
minDamping: 0.05,
|
|
336
|
-
maxDamping: 1
|
|
337
|
-
};
|
|
338
|
-
function calcAngularFreq(undampedFreq, dampingRatio) {
|
|
339
|
-
return undampedFreq * Math.sqrt(1 - dampingRatio * dampingRatio);
|
|
340
|
-
}
|
|
341
|
-
var rootIterations = 12;
|
|
342
|
-
function approximateRoot(envelope, derivative, initialGuess) {
|
|
343
|
-
let result = initialGuess;
|
|
344
|
-
for (let i = 1; i < rootIterations; i++) result = result - envelope(result) / derivative(result);
|
|
345
|
-
return result;
|
|
346
|
-
}
|
|
347
|
-
var safeMin = 1e-3;
|
|
348
|
-
function findSpring({ duration = springDefaults.duration, bounce = springDefaults.bounce, velocity = springDefaults.velocity, mass = springDefaults.mass }) {
|
|
349
|
-
let envelope;
|
|
350
|
-
let derivative;
|
|
351
|
-
warning(duration <= secondsToMilliseconds(springDefaults.maxDuration), "Spring duration must be 10 seconds or less", "spring-duration-limit");
|
|
352
|
-
let dampingRatio = 1 - bounce;
|
|
353
|
-
dampingRatio = clamp(springDefaults.minDamping, springDefaults.maxDamping, dampingRatio);
|
|
354
|
-
duration = clamp(springDefaults.minDuration, springDefaults.maxDuration, millisecondsToSeconds(duration));
|
|
355
|
-
if (dampingRatio < 1) {
|
|
356
|
-
envelope = (undampedFreq2) => {
|
|
357
|
-
const exponentialDecay = undampedFreq2 * dampingRatio;
|
|
358
|
-
const delta = exponentialDecay * duration;
|
|
359
|
-
const a = exponentialDecay - velocity;
|
|
360
|
-
const b = calcAngularFreq(undampedFreq2, dampingRatio);
|
|
361
|
-
const c = Math.exp(-delta);
|
|
362
|
-
return safeMin - a / b * c;
|
|
363
|
-
};
|
|
364
|
-
derivative = (undampedFreq2) => {
|
|
365
|
-
const delta = undampedFreq2 * dampingRatio * duration;
|
|
366
|
-
const d = delta * velocity + velocity;
|
|
367
|
-
const e = Math.pow(dampingRatio, 2) * Math.pow(undampedFreq2, 2) * duration;
|
|
368
|
-
const f = Math.exp(-delta);
|
|
369
|
-
const g = calcAngularFreq(Math.pow(undampedFreq2, 2), dampingRatio);
|
|
370
|
-
return (-envelope(undampedFreq2) + safeMin > 0 ? -1 : 1) * ((d - e) * f) / g;
|
|
371
|
-
};
|
|
372
|
-
} else {
|
|
373
|
-
envelope = (undampedFreq2) => {
|
|
374
|
-
return -1e-3 + Math.exp(-undampedFreq2 * duration) * ((undampedFreq2 - velocity) * duration + 1);
|
|
375
|
-
};
|
|
376
|
-
derivative = (undampedFreq2) => {
|
|
377
|
-
return Math.exp(-undampedFreq2 * duration) * ((velocity - undampedFreq2) * (duration * duration));
|
|
378
|
-
};
|
|
379
|
-
}
|
|
380
|
-
const initialGuess = 5 / duration;
|
|
381
|
-
const undampedFreq = approximateRoot(envelope, derivative, initialGuess);
|
|
382
|
-
duration = secondsToMilliseconds(duration);
|
|
383
|
-
if (isNaN(undampedFreq)) return {
|
|
384
|
-
stiffness: springDefaults.stiffness,
|
|
385
|
-
damping: springDefaults.damping,
|
|
386
|
-
duration
|
|
387
|
-
};
|
|
388
|
-
else {
|
|
389
|
-
const stiffness = Math.pow(undampedFreq, 2) * mass;
|
|
390
|
-
return {
|
|
391
|
-
stiffness,
|
|
392
|
-
damping: dampingRatio * 2 * Math.sqrt(mass * stiffness),
|
|
393
|
-
duration
|
|
394
|
-
};
|
|
395
|
-
}
|
|
396
|
-
}
|
|
397
|
-
var durationKeys = ["duration", "bounce"];
|
|
398
|
-
var physicsKeys = [
|
|
399
|
-
"stiffness",
|
|
400
|
-
"damping",
|
|
401
|
-
"mass"
|
|
402
|
-
];
|
|
403
|
-
function isSpringType(options, keys) {
|
|
404
|
-
return keys.some((key) => options[key] !== void 0);
|
|
405
|
-
}
|
|
406
|
-
function getSpringOptions(options) {
|
|
407
|
-
let springOptions = {
|
|
408
|
-
velocity: springDefaults.velocity,
|
|
409
|
-
stiffness: springDefaults.stiffness,
|
|
410
|
-
damping: springDefaults.damping,
|
|
411
|
-
mass: springDefaults.mass,
|
|
412
|
-
isResolvedFromDuration: false,
|
|
413
|
-
...options
|
|
414
|
-
};
|
|
415
|
-
if (!isSpringType(options, physicsKeys) && isSpringType(options, durationKeys)) {
|
|
416
|
-
springOptions.velocity = 0;
|
|
417
|
-
if (options.visualDuration) {
|
|
418
|
-
const visualDuration = options.visualDuration;
|
|
419
|
-
const root = 2 * Math.PI / (visualDuration * 1.2);
|
|
420
|
-
const stiffness = root * root;
|
|
421
|
-
const damping = 2 * clamp(0.05, 1, 1 - (options.bounce || 0)) * Math.sqrt(stiffness);
|
|
422
|
-
springOptions = {
|
|
423
|
-
...springOptions,
|
|
424
|
-
mass: springDefaults.mass,
|
|
425
|
-
stiffness,
|
|
426
|
-
damping
|
|
427
|
-
};
|
|
428
|
-
} else {
|
|
429
|
-
const derived = findSpring({
|
|
430
|
-
...options,
|
|
431
|
-
velocity: 0
|
|
432
|
-
});
|
|
433
|
-
springOptions = {
|
|
434
|
-
...springOptions,
|
|
435
|
-
...derived,
|
|
436
|
-
mass: springDefaults.mass
|
|
437
|
-
};
|
|
438
|
-
springOptions.isResolvedFromDuration = true;
|
|
439
|
-
}
|
|
440
|
-
}
|
|
441
|
-
return springOptions;
|
|
442
|
-
}
|
|
443
|
-
function spring(optionsOrVisualDuration = springDefaults.visualDuration, bounce = springDefaults.bounce) {
|
|
444
|
-
const options = typeof optionsOrVisualDuration !== "object" ? {
|
|
445
|
-
visualDuration: optionsOrVisualDuration,
|
|
446
|
-
keyframes: [0, 1],
|
|
447
|
-
bounce
|
|
448
|
-
} : optionsOrVisualDuration;
|
|
449
|
-
let { restSpeed, restDelta } = options;
|
|
450
|
-
const origin = options.keyframes[0];
|
|
451
|
-
const target = options.keyframes[options.keyframes.length - 1];
|
|
452
|
-
const state = {
|
|
453
|
-
done: false,
|
|
454
|
-
value: origin
|
|
455
|
-
};
|
|
456
|
-
const { stiffness, damping, mass, duration, velocity, isResolvedFromDuration } = getSpringOptions({
|
|
457
|
-
...options,
|
|
458
|
-
velocity: -millisecondsToSeconds(options.velocity || 0)
|
|
459
|
-
});
|
|
460
|
-
const initialVelocity = velocity || 0;
|
|
461
|
-
const dampingRatio = damping / (2 * Math.sqrt(stiffness * mass));
|
|
462
|
-
const initialDelta = target - origin;
|
|
463
|
-
const undampedAngularFreq = millisecondsToSeconds(Math.sqrt(stiffness / mass));
|
|
464
|
-
const isGranularScale = Math.abs(initialDelta) < 5;
|
|
465
|
-
restSpeed || (restSpeed = isGranularScale ? springDefaults.restSpeed.granular : springDefaults.restSpeed.default);
|
|
466
|
-
restDelta || (restDelta = isGranularScale ? springDefaults.restDelta.granular : springDefaults.restDelta.default);
|
|
467
|
-
let resolveSpring;
|
|
468
|
-
let resolveVelocity;
|
|
469
|
-
let angularFreq;
|
|
470
|
-
let A;
|
|
471
|
-
let sinCoeff;
|
|
472
|
-
let cosCoeff;
|
|
473
|
-
if (dampingRatio < 1) {
|
|
474
|
-
angularFreq = calcAngularFreq(undampedAngularFreq, dampingRatio);
|
|
475
|
-
A = (initialVelocity + dampingRatio * undampedAngularFreq * initialDelta) / angularFreq;
|
|
476
|
-
resolveSpring = (t) => {
|
|
477
|
-
const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);
|
|
478
|
-
return target - envelope * (A * Math.sin(angularFreq * t) + initialDelta * Math.cos(angularFreq * t));
|
|
479
|
-
};
|
|
480
|
-
sinCoeff = dampingRatio * undampedAngularFreq * A + initialDelta * angularFreq;
|
|
481
|
-
cosCoeff = dampingRatio * undampedAngularFreq * initialDelta - A * angularFreq;
|
|
482
|
-
resolveVelocity = (t) => {
|
|
483
|
-
return Math.exp(-dampingRatio * undampedAngularFreq * t) * (sinCoeff * Math.sin(angularFreq * t) + cosCoeff * Math.cos(angularFreq * t));
|
|
484
|
-
};
|
|
485
|
-
} else if (dampingRatio === 1) {
|
|
486
|
-
resolveSpring = (t) => target - Math.exp(-undampedAngularFreq * t) * (initialDelta + (initialVelocity + undampedAngularFreq * initialDelta) * t);
|
|
487
|
-
const C = initialVelocity + undampedAngularFreq * initialDelta;
|
|
488
|
-
resolveVelocity = (t) => Math.exp(-undampedAngularFreq * t) * (undampedAngularFreq * C * t - initialVelocity);
|
|
489
|
-
} else {
|
|
490
|
-
const dampedAngularFreq = undampedAngularFreq * Math.sqrt(dampingRatio * dampingRatio - 1);
|
|
491
|
-
resolveSpring = (t) => {
|
|
492
|
-
const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);
|
|
493
|
-
const freqForT = Math.min(dampedAngularFreq * t, 300);
|
|
494
|
-
return target - envelope * ((initialVelocity + dampingRatio * undampedAngularFreq * initialDelta) * Math.sinh(freqForT) + dampedAngularFreq * initialDelta * Math.cosh(freqForT)) / dampedAngularFreq;
|
|
495
|
-
};
|
|
496
|
-
const P = (initialVelocity + dampingRatio * undampedAngularFreq * initialDelta) / dampedAngularFreq;
|
|
497
|
-
const sinhCoeff = dampingRatio * undampedAngularFreq * P - initialDelta * dampedAngularFreq;
|
|
498
|
-
const coshCoeff = dampingRatio * undampedAngularFreq * initialDelta - P * dampedAngularFreq;
|
|
499
|
-
resolveVelocity = (t) => {
|
|
500
|
-
const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);
|
|
501
|
-
const freqForT = Math.min(dampedAngularFreq * t, 300);
|
|
502
|
-
return envelope * (sinhCoeff * Math.sinh(freqForT) + coshCoeff * Math.cosh(freqForT));
|
|
503
|
-
};
|
|
504
|
-
}
|
|
505
|
-
const generator = {
|
|
506
|
-
calculatedDuration: isResolvedFromDuration ? duration || null : null,
|
|
507
|
-
velocity: (t) => secondsToMilliseconds(resolveVelocity(t)),
|
|
508
|
-
next: (t) => {
|
|
509
|
-
if (!isResolvedFromDuration && dampingRatio < 1) {
|
|
510
|
-
const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);
|
|
511
|
-
const sin = Math.sin(angularFreq * t);
|
|
512
|
-
const cos = Math.cos(angularFreq * t);
|
|
513
|
-
const current2 = target - envelope * (A * sin + initialDelta * cos);
|
|
514
|
-
const currentVelocity = secondsToMilliseconds(envelope * (sinCoeff * sin + cosCoeff * cos));
|
|
515
|
-
state.done = Math.abs(currentVelocity) <= restSpeed && Math.abs(target - current2) <= restDelta;
|
|
516
|
-
state.value = state.done ? target : current2;
|
|
517
|
-
return state;
|
|
518
|
-
}
|
|
519
|
-
const current = resolveSpring(t);
|
|
520
|
-
if (!isResolvedFromDuration) {
|
|
521
|
-
const currentVelocity = secondsToMilliseconds(resolveVelocity(t));
|
|
522
|
-
state.done = Math.abs(currentVelocity) <= restSpeed && Math.abs(target - current) <= restDelta;
|
|
523
|
-
} else state.done = t >= duration;
|
|
524
|
-
state.value = state.done ? target : current;
|
|
525
|
-
return state;
|
|
526
|
-
},
|
|
527
|
-
toString: () => {
|
|
528
|
-
const calculatedDuration = Math.min(calcGeneratorDuration(generator), maxGeneratorDuration);
|
|
529
|
-
const easing = generateLinearEasing((progress2) => generator.next(calculatedDuration * progress2).value, calculatedDuration, 30);
|
|
530
|
-
return calculatedDuration + "ms " + easing;
|
|
531
|
-
},
|
|
532
|
-
toTransition: () => {
|
|
533
|
-
}
|
|
534
|
-
};
|
|
535
|
-
return generator;
|
|
536
|
-
}
|
|
537
|
-
spring.applyToOptions = (options) => {
|
|
538
|
-
const generatorOptions = createGeneratorEasing(options, 100, spring);
|
|
539
|
-
options.ease = generatorOptions.ease;
|
|
540
|
-
options.duration = secondsToMilliseconds(generatorOptions.duration);
|
|
541
|
-
options.type = "keyframes";
|
|
542
|
-
return options;
|
|
543
|
-
};
|
|
544
|
-
var velocitySampleDuration = 5;
|
|
545
|
-
function getGeneratorVelocity(resolveValue, t, current) {
|
|
546
|
-
const prevT = Math.max(t - velocitySampleDuration, 0);
|
|
547
|
-
return velocityPerSecond(current - resolveValue(prevT), t - prevT);
|
|
548
|
-
}
|
|
549
|
-
function inertia({ keyframes: keyframes2, velocity = 0, power = 0.8, timeConstant = 325, bounceDamping = 10, bounceStiffness = 500, modifyTarget, min, max, restDelta = 0.5, restSpeed }) {
|
|
550
|
-
const origin = keyframes2[0];
|
|
551
|
-
const state = {
|
|
552
|
-
done: false,
|
|
553
|
-
value: origin
|
|
554
|
-
};
|
|
555
|
-
const isOutOfBounds = (v) => min !== void 0 && v < min || max !== void 0 && v > max;
|
|
556
|
-
const nearestBoundary = (v) => {
|
|
557
|
-
if (min === void 0) return max;
|
|
558
|
-
if (max === void 0) return min;
|
|
559
|
-
return Math.abs(min - v) < Math.abs(max - v) ? min : max;
|
|
560
|
-
};
|
|
561
|
-
let amplitude = power * velocity;
|
|
562
|
-
const ideal = origin + amplitude;
|
|
563
|
-
const target = modifyTarget === void 0 ? ideal : modifyTarget(ideal);
|
|
564
|
-
if (target !== ideal) amplitude = target - origin;
|
|
565
|
-
const calcDelta = (t) => -amplitude * Math.exp(-t / timeConstant);
|
|
566
|
-
const calcLatest = (t) => target + calcDelta(t);
|
|
567
|
-
const applyFriction = (t) => {
|
|
568
|
-
const delta = calcDelta(t);
|
|
569
|
-
const latest = calcLatest(t);
|
|
570
|
-
state.done = Math.abs(delta) <= restDelta;
|
|
571
|
-
state.value = state.done ? target : latest;
|
|
572
|
-
};
|
|
573
|
-
let timeReachedBoundary;
|
|
574
|
-
let spring$1;
|
|
575
|
-
const checkCatchBoundary = (t) => {
|
|
576
|
-
if (!isOutOfBounds(state.value)) return;
|
|
577
|
-
timeReachedBoundary = t;
|
|
578
|
-
spring$1 = spring({
|
|
579
|
-
keyframes: [state.value, nearestBoundary(state.value)],
|
|
580
|
-
velocity: getGeneratorVelocity(calcLatest, t, state.value),
|
|
581
|
-
damping: bounceDamping,
|
|
582
|
-
stiffness: bounceStiffness,
|
|
583
|
-
restDelta,
|
|
584
|
-
restSpeed
|
|
585
|
-
});
|
|
586
|
-
};
|
|
587
|
-
checkCatchBoundary(0);
|
|
588
|
-
return {
|
|
589
|
-
calculatedDuration: null,
|
|
590
|
-
next: (t) => {
|
|
591
|
-
let hasUpdatedFrame = false;
|
|
592
|
-
if (!spring$1 && timeReachedBoundary === void 0) {
|
|
593
|
-
hasUpdatedFrame = true;
|
|
594
|
-
applyFriction(t);
|
|
595
|
-
checkCatchBoundary(t);
|
|
596
|
-
}
|
|
597
|
-
if (timeReachedBoundary !== void 0 && t >= timeReachedBoundary) return spring$1.next(t - timeReachedBoundary);
|
|
598
|
-
else {
|
|
599
|
-
!hasUpdatedFrame && applyFriction(t);
|
|
600
|
-
return state;
|
|
601
|
-
}
|
|
602
|
-
}
|
|
603
|
-
};
|
|
604
|
-
}
|
|
605
|
-
function createMixers(output, ease2, customMixer) {
|
|
606
|
-
const mixers = [];
|
|
607
|
-
const mixerFactory = customMixer || MotionGlobalConfig.mix || mix;
|
|
608
|
-
const numMixers = output.length - 1;
|
|
609
|
-
for (let i = 0; i < numMixers; i++) {
|
|
610
|
-
let mixer = mixerFactory(output[i], output[i + 1]);
|
|
611
|
-
if (ease2) mixer = pipe(Array.isArray(ease2) ? ease2[i] || noop : ease2, mixer);
|
|
612
|
-
mixers.push(mixer);
|
|
613
|
-
}
|
|
614
|
-
return mixers;
|
|
615
|
-
}
|
|
616
|
-
function interpolate(input, output, { clamp: isClamp = true, ease: ease2, mixer } = {}) {
|
|
617
|
-
const inputLength = input.length;
|
|
618
|
-
invariant(inputLength === output.length, "Both input and output ranges must be the same length", "range-length");
|
|
619
|
-
if (inputLength === 1) return () => output[0];
|
|
620
|
-
if (inputLength === 2 && output[0] === output[1]) return () => output[1];
|
|
621
|
-
const isZeroDeltaRange = input[0] === input[1];
|
|
622
|
-
if (input[0] > input[inputLength - 1]) {
|
|
623
|
-
input = [...input].reverse();
|
|
624
|
-
output = [...output].reverse();
|
|
625
|
-
}
|
|
626
|
-
const mixers = createMixers(output, ease2, mixer);
|
|
627
|
-
const numMixers = mixers.length;
|
|
628
|
-
const interpolator = (v) => {
|
|
629
|
-
if (isZeroDeltaRange && v < input[0]) return output[0];
|
|
630
|
-
let i = 0;
|
|
631
|
-
if (numMixers > 1) {
|
|
632
|
-
for (; i < input.length - 2; i++) if (v < input[i + 1]) break;
|
|
633
|
-
}
|
|
634
|
-
const progressInRange = /* @__PURE__ */ progress(input[i], input[i + 1], v);
|
|
635
|
-
return mixers[i](progressInRange);
|
|
636
|
-
};
|
|
637
|
-
return isClamp ? (v) => interpolator(clamp(input[0], input[inputLength - 1], v)) : interpolator;
|
|
638
|
-
}
|
|
639
|
-
function fillOffset(offset, remaining) {
|
|
640
|
-
const min = offset[offset.length - 1];
|
|
641
|
-
for (let i = 1; i <= remaining; i++) {
|
|
642
|
-
const offsetProgress = /* @__PURE__ */ progress(0, remaining, i);
|
|
643
|
-
offset.push(mixNumber(min, 1, offsetProgress));
|
|
644
|
-
}
|
|
645
|
-
}
|
|
646
|
-
function defaultOffset(arr) {
|
|
647
|
-
const offset = [0];
|
|
648
|
-
fillOffset(offset, arr.length - 1);
|
|
649
|
-
return offset;
|
|
650
|
-
}
|
|
651
|
-
function convertOffsetToTimes(offset, duration) {
|
|
652
|
-
return offset.map((o) => o * duration);
|
|
653
|
-
}
|
|
654
|
-
function defaultEasing(values, easing) {
|
|
655
|
-
return values.map(() => easing || easeInOut).splice(0, values.length - 1);
|
|
656
|
-
}
|
|
657
|
-
function keyframes({ duration = 300, keyframes: keyframeValues, times, ease: ease2 = "easeInOut" }) {
|
|
658
|
-
const easingFunctions = /* @__PURE__ */ isEasingArray(ease2) ? ease2.map(easingDefinitionToFunction) : easingDefinitionToFunction(ease2);
|
|
659
|
-
const state = {
|
|
660
|
-
done: false,
|
|
661
|
-
value: keyframeValues[0]
|
|
662
|
-
};
|
|
663
|
-
const mapTimeToKeyframe = interpolate(convertOffsetToTimes(times && times.length === keyframeValues.length ? times : defaultOffset(keyframeValues), duration), keyframeValues, { ease: Array.isArray(easingFunctions) ? easingFunctions : defaultEasing(keyframeValues, easingFunctions) });
|
|
664
|
-
return {
|
|
665
|
-
calculatedDuration: duration,
|
|
666
|
-
next: (t) => {
|
|
667
|
-
state.value = mapTimeToKeyframe(t);
|
|
668
|
-
state.done = t >= duration;
|
|
669
|
-
return state;
|
|
670
|
-
}
|
|
671
|
-
};
|
|
672
|
-
}
|
|
673
|
-
var transitionTypeMap = {
|
|
674
|
-
decay: inertia,
|
|
675
|
-
inertia,
|
|
676
|
-
tween: keyframes,
|
|
677
|
-
keyframes,
|
|
678
|
-
spring
|
|
679
|
-
};
|
|
680
|
-
function replaceTransitionType(transition) {
|
|
681
|
-
if (typeof transition.type === "string") transition.type = transitionTypeMap[transition.type];
|
|
682
|
-
}
|
|
683
|
-
var percentToProgress = (percent) => percent / 100;
|
|
684
|
-
var JSAnimation = class extends WithPromise {
|
|
685
|
-
constructor(options) {
|
|
686
|
-
super();
|
|
687
|
-
this.state = "idle";
|
|
688
|
-
this.startTime = null;
|
|
689
|
-
this.isStopped = false;
|
|
690
|
-
this.currentTime = 0;
|
|
691
|
-
this.holdTime = null;
|
|
692
|
-
this.playbackSpeed = 1;
|
|
693
|
-
this.delayState = {
|
|
694
|
-
done: false,
|
|
695
|
-
value: void 0
|
|
696
|
-
};
|
|
697
|
-
this.stop = () => {
|
|
698
|
-
const { motionValue: motionValue2 } = this.options;
|
|
699
|
-
if (motionValue2 && motionValue2.updatedAt !== time.now()) this.tick(time.now());
|
|
700
|
-
this.isStopped = true;
|
|
701
|
-
if (this.state === "idle") return;
|
|
702
|
-
this.teardown();
|
|
703
|
-
this.options.onStop?.();
|
|
704
|
-
};
|
|
705
|
-
this.options = options;
|
|
706
|
-
this.initAnimation();
|
|
707
|
-
this.play();
|
|
708
|
-
if (options.autoplay === false) this.pause();
|
|
709
|
-
}
|
|
710
|
-
initAnimation() {
|
|
711
|
-
const { options } = this;
|
|
712
|
-
replaceTransitionType(options);
|
|
713
|
-
const { type = keyframes, repeat = 0, repeatDelay = 0, repeatType, velocity = 0 } = options;
|
|
714
|
-
let { keyframes: keyframes$1 } = options;
|
|
715
|
-
const generatorFactory = type || keyframes;
|
|
716
|
-
if (generatorFactory !== keyframes && typeof keyframes$1[0] !== "number") {
|
|
717
|
-
this.mixKeyframes = pipe(percentToProgress, mix(keyframes$1[0], keyframes$1[1]));
|
|
718
|
-
keyframes$1 = [0, 100];
|
|
719
|
-
}
|
|
720
|
-
const generator = generatorFactory({
|
|
721
|
-
...options,
|
|
722
|
-
keyframes: keyframes$1
|
|
723
|
-
});
|
|
724
|
-
if (repeatType === "mirror") this.mirroredGenerator = generatorFactory({
|
|
725
|
-
...options,
|
|
726
|
-
keyframes: [...keyframes$1].reverse(),
|
|
727
|
-
velocity: -velocity
|
|
728
|
-
});
|
|
729
|
-
if (generator.calculatedDuration === null) generator.calculatedDuration = calcGeneratorDuration(generator);
|
|
730
|
-
const { calculatedDuration } = generator;
|
|
731
|
-
this.calculatedDuration = calculatedDuration;
|
|
732
|
-
this.resolvedDuration = calculatedDuration + repeatDelay;
|
|
733
|
-
this.totalDuration = this.resolvedDuration * (repeat + 1) - repeatDelay;
|
|
734
|
-
this.generator = generator;
|
|
735
|
-
}
|
|
736
|
-
updateTime(timestamp) {
|
|
737
|
-
const animationTime = Math.round(timestamp - this.startTime) * this.playbackSpeed;
|
|
738
|
-
if (this.holdTime !== null) this.currentTime = this.holdTime;
|
|
739
|
-
else this.currentTime = animationTime;
|
|
740
|
-
}
|
|
741
|
-
tick(timestamp, sample = false) {
|
|
742
|
-
const { generator, totalDuration, mixKeyframes, mirroredGenerator, resolvedDuration, calculatedDuration } = this;
|
|
743
|
-
if (this.startTime === null) return generator.next(0);
|
|
744
|
-
const { delay = 0, keyframes: keyframes2, repeat, repeatType, repeatDelay, type, onUpdate, finalKeyframe } = this.options;
|
|
745
|
-
if (this.speed > 0) this.startTime = Math.min(this.startTime, timestamp);
|
|
746
|
-
else if (this.speed < 0) this.startTime = Math.min(timestamp - totalDuration / this.speed, this.startTime);
|
|
747
|
-
if (sample) this.currentTime = timestamp;
|
|
748
|
-
else this.updateTime(timestamp);
|
|
749
|
-
const timeWithoutDelay = this.currentTime - delay * (this.playbackSpeed >= 0 ? 1 : -1);
|
|
750
|
-
const isInDelayPhase = this.playbackSpeed >= 0 ? timeWithoutDelay < 0 : timeWithoutDelay > totalDuration;
|
|
751
|
-
this.currentTime = Math.max(timeWithoutDelay, 0);
|
|
752
|
-
if (this.state === "finished" && this.holdTime === null) this.currentTime = totalDuration;
|
|
753
|
-
let elapsed = this.currentTime;
|
|
754
|
-
let frameGenerator = generator;
|
|
755
|
-
if (repeat) {
|
|
756
|
-
const progress2 = Math.min(this.currentTime, totalDuration) / resolvedDuration;
|
|
757
|
-
let currentIteration = Math.floor(progress2);
|
|
758
|
-
let iterationProgress = progress2 % 1;
|
|
759
|
-
if (!iterationProgress && progress2 >= 1) iterationProgress = 1;
|
|
760
|
-
iterationProgress === 1 && currentIteration--;
|
|
761
|
-
currentIteration = Math.min(currentIteration, repeat + 1);
|
|
762
|
-
if (Boolean(currentIteration % 2)) {
|
|
763
|
-
if (repeatType === "reverse") {
|
|
764
|
-
iterationProgress = 1 - iterationProgress;
|
|
765
|
-
if (repeatDelay) iterationProgress -= repeatDelay / resolvedDuration;
|
|
766
|
-
} else if (repeatType === "mirror") frameGenerator = mirroredGenerator;
|
|
767
|
-
}
|
|
768
|
-
elapsed = clamp(0, 1, iterationProgress) * resolvedDuration;
|
|
769
|
-
}
|
|
770
|
-
let state;
|
|
771
|
-
if (isInDelayPhase) {
|
|
772
|
-
this.delayState.value = keyframes2[0];
|
|
773
|
-
state = this.delayState;
|
|
774
|
-
} else state = frameGenerator.next(elapsed);
|
|
775
|
-
if (mixKeyframes && !isInDelayPhase) state.value = mixKeyframes(state.value);
|
|
776
|
-
let { done } = state;
|
|
777
|
-
if (!isInDelayPhase && calculatedDuration !== null) done = this.playbackSpeed >= 0 ? this.currentTime >= totalDuration : this.currentTime <= 0;
|
|
778
|
-
const isAnimationFinished = this.holdTime === null && (this.state === "finished" || this.state === "running" && done);
|
|
779
|
-
if (isAnimationFinished && type !== inertia) state.value = getFinalKeyframe(keyframes2, this.options, finalKeyframe, this.speed);
|
|
780
|
-
if (onUpdate) onUpdate(state.value);
|
|
781
|
-
if (isAnimationFinished) this.finish();
|
|
782
|
-
return state;
|
|
783
|
-
}
|
|
784
|
-
/**
|
|
785
|
-
* Allows the returned animation to be awaited or promise-chained. Currently
|
|
786
|
-
* resolves when the animation finishes at all but in a future update could/should
|
|
787
|
-
* reject if its cancels.
|
|
788
|
-
*/
|
|
789
|
-
then(resolve, reject) {
|
|
790
|
-
return this.finished.then(resolve, reject);
|
|
791
|
-
}
|
|
792
|
-
get duration() {
|
|
793
|
-
return millisecondsToSeconds(this.calculatedDuration);
|
|
794
|
-
}
|
|
795
|
-
get iterationDuration() {
|
|
796
|
-
const { delay = 0 } = this.options || {};
|
|
797
|
-
return this.duration + millisecondsToSeconds(delay);
|
|
798
|
-
}
|
|
799
|
-
get time() {
|
|
800
|
-
return millisecondsToSeconds(this.currentTime);
|
|
801
|
-
}
|
|
802
|
-
set time(newTime) {
|
|
803
|
-
newTime = secondsToMilliseconds(newTime);
|
|
804
|
-
this.currentTime = newTime;
|
|
805
|
-
if (this.startTime === null || this.holdTime !== null || this.playbackSpeed === 0) this.holdTime = newTime;
|
|
806
|
-
else if (this.driver) this.startTime = this.driver.now() - newTime / this.playbackSpeed;
|
|
807
|
-
if (this.driver) this.driver.start(false);
|
|
808
|
-
else {
|
|
809
|
-
this.startTime = 0;
|
|
810
|
-
this.state = "paused";
|
|
811
|
-
this.holdTime = newTime;
|
|
812
|
-
this.tick(newTime);
|
|
813
|
-
}
|
|
814
|
-
}
|
|
815
|
-
/**
|
|
816
|
-
* Returns the generator's velocity at the current time in units/second.
|
|
817
|
-
* Uses the analytical derivative when available (springs), avoiding
|
|
818
|
-
* the MotionValue's frame-dependent velocity estimation.
|
|
819
|
-
*/
|
|
820
|
-
getGeneratorVelocity() {
|
|
821
|
-
const t = this.currentTime;
|
|
822
|
-
if (t <= 0) return this.options.velocity || 0;
|
|
823
|
-
if (this.generator.velocity) return this.generator.velocity(t);
|
|
824
|
-
const current = this.generator.next(t).value;
|
|
825
|
-
return getGeneratorVelocity((s) => this.generator.next(s).value, t, current);
|
|
826
|
-
}
|
|
827
|
-
get speed() {
|
|
828
|
-
return this.playbackSpeed;
|
|
829
|
-
}
|
|
830
|
-
set speed(newSpeed) {
|
|
831
|
-
const hasChanged = this.playbackSpeed !== newSpeed;
|
|
832
|
-
if (hasChanged && this.driver) this.updateTime(time.now());
|
|
833
|
-
this.playbackSpeed = newSpeed;
|
|
834
|
-
if (hasChanged && this.driver) this.time = millisecondsToSeconds(this.currentTime);
|
|
835
|
-
}
|
|
836
|
-
play() {
|
|
837
|
-
if (this.isStopped) return;
|
|
838
|
-
const { driver = frameloopDriver, startTime } = this.options;
|
|
839
|
-
if (!this.driver) this.driver = driver((timestamp) => this.tick(timestamp));
|
|
840
|
-
this.options.onPlay?.();
|
|
841
|
-
const now = this.driver.now();
|
|
842
|
-
if (this.state === "finished") {
|
|
843
|
-
this.updateFinished();
|
|
844
|
-
this.startTime = now;
|
|
845
|
-
} else if (this.holdTime !== null) this.startTime = now - this.holdTime;
|
|
846
|
-
else if (!this.startTime) this.startTime = startTime ?? now;
|
|
847
|
-
if (this.state === "finished" && this.speed < 0) this.startTime += this.calculatedDuration;
|
|
848
|
-
this.holdTime = null;
|
|
849
|
-
this.state = "running";
|
|
850
|
-
this.driver.start();
|
|
851
|
-
}
|
|
852
|
-
pause() {
|
|
853
|
-
this.state = "paused";
|
|
854
|
-
this.updateTime(time.now());
|
|
855
|
-
this.holdTime = this.currentTime;
|
|
856
|
-
}
|
|
857
|
-
complete() {
|
|
858
|
-
if (this.state !== "running") this.play();
|
|
859
|
-
this.state = "finished";
|
|
860
|
-
this.holdTime = null;
|
|
861
|
-
}
|
|
862
|
-
finish() {
|
|
863
|
-
this.notifyFinished();
|
|
864
|
-
this.teardown();
|
|
865
|
-
this.state = "finished";
|
|
866
|
-
this.options.onComplete?.();
|
|
867
|
-
}
|
|
868
|
-
cancel() {
|
|
869
|
-
this.holdTime = null;
|
|
870
|
-
this.startTime = 0;
|
|
871
|
-
this.tick(0);
|
|
872
|
-
this.teardown();
|
|
873
|
-
this.options.onCancel?.();
|
|
874
|
-
}
|
|
875
|
-
teardown() {
|
|
876
|
-
this.state = "idle";
|
|
877
|
-
this.stopDriver();
|
|
878
|
-
this.startTime = this.holdTime = null;
|
|
879
|
-
}
|
|
880
|
-
stopDriver() {
|
|
881
|
-
if (!this.driver) return;
|
|
882
|
-
this.driver.stop();
|
|
883
|
-
this.driver = void 0;
|
|
884
|
-
}
|
|
885
|
-
sample(sampleTime) {
|
|
886
|
-
this.startTime = 0;
|
|
887
|
-
return this.tick(sampleTime, true);
|
|
888
|
-
}
|
|
889
|
-
attachTimeline(timeline) {
|
|
890
|
-
if (this.options.allowFlatten) {
|
|
891
|
-
this.options.type = "keyframes";
|
|
892
|
-
this.options.ease = "linear";
|
|
893
|
-
this.initAnimation();
|
|
894
|
-
}
|
|
895
|
-
this.driver?.stop();
|
|
896
|
-
return timeline.observe(this);
|
|
897
|
-
}
|
|
898
|
-
};
|
|
899
|
-
var unsupportedEasingFunctions = {
|
|
900
|
-
anticipate,
|
|
901
|
-
backInOut,
|
|
902
|
-
circInOut
|
|
903
|
-
};
|
|
904
|
-
function isUnsupportedEase(key) {
|
|
905
|
-
return key in unsupportedEasingFunctions;
|
|
906
|
-
}
|
|
907
|
-
function replaceStringEasing(transition) {
|
|
908
|
-
if (typeof transition.ease === "string" && isUnsupportedEase(transition.ease)) transition.ease = unsupportedEasingFunctions[transition.ease];
|
|
909
|
-
}
|
|
910
|
-
var sampleDelta = 10;
|
|
911
|
-
var NativeAnimationExtended = class extends NativeAnimation {
|
|
912
|
-
constructor(options) {
|
|
913
|
-
replaceStringEasing(options);
|
|
914
|
-
replaceTransitionType(options);
|
|
915
|
-
super(options);
|
|
916
|
-
if (options.startTime !== void 0 && options.autoplay !== false) this.startTime = options.startTime;
|
|
917
|
-
this.options = options;
|
|
918
|
-
}
|
|
919
|
-
/**
|
|
920
|
-
* WAAPI doesn't natively have any interruption capabilities.
|
|
921
|
-
*
|
|
922
|
-
* Rather than read committed styles back out of the DOM, we can
|
|
923
|
-
* create a renderless JS animation and sample it twice to calculate
|
|
924
|
-
* its current value, "previous" value, and therefore allow
|
|
925
|
-
* Motion to calculate velocity for any subsequent animation.
|
|
926
|
-
*/
|
|
927
|
-
updateMotionValue(value) {
|
|
928
|
-
const { motionValue: motionValue2, onUpdate, onComplete, element, ...options } = this.options;
|
|
929
|
-
if (!motionValue2) return;
|
|
930
|
-
if (value !== void 0) {
|
|
931
|
-
motionValue2.set(value);
|
|
932
|
-
return;
|
|
933
|
-
}
|
|
934
|
-
const sampleAnimation = new JSAnimation({
|
|
935
|
-
...options,
|
|
936
|
-
autoplay: false
|
|
937
|
-
});
|
|
938
|
-
const sampleTime = Math.max(sampleDelta, time.now() - this.startTime);
|
|
939
|
-
const delta = clamp(0, sampleDelta, sampleTime - sampleDelta);
|
|
940
|
-
const current = sampleAnimation.sample(sampleTime).value;
|
|
941
|
-
const { name } = this.options;
|
|
942
|
-
if (element && name) setStyle(element, name, current);
|
|
943
|
-
motionValue2.setWithVelocity(sampleAnimation.sample(Math.max(0, sampleTime - delta)).value, current, delta);
|
|
944
|
-
sampleAnimation.stop();
|
|
945
|
-
}
|
|
946
|
-
};
|
|
947
|
-
var isAnimatable = (value, name) => {
|
|
948
|
-
if (name === "zIndex") return false;
|
|
949
|
-
if (typeof value === "number" || Array.isArray(value)) return true;
|
|
950
|
-
if (typeof value === "string" && (complex.test(value) || value === "0") && !value.startsWith("url(")) return true;
|
|
951
|
-
return false;
|
|
952
|
-
};
|
|
953
|
-
function hasKeyframesChanged(keyframes2) {
|
|
954
|
-
const current = keyframes2[0];
|
|
955
|
-
if (keyframes2.length === 1) return true;
|
|
956
|
-
for (let i = 0; i < keyframes2.length; i++) if (keyframes2[i] !== current) return true;
|
|
957
|
-
}
|
|
958
|
-
function canAnimate(keyframes2, name, type, velocity) {
|
|
959
|
-
const originKeyframe = keyframes2[0];
|
|
960
|
-
if (originKeyframe === null) return false;
|
|
961
|
-
if (name === "display" || name === "visibility") return true;
|
|
962
|
-
const targetKeyframe = keyframes2[keyframes2.length - 1];
|
|
963
|
-
const isOriginAnimatable = isAnimatable(originKeyframe, name);
|
|
964
|
-
const isTargetAnimatable = isAnimatable(targetKeyframe, name);
|
|
965
|
-
warning(isOriginAnimatable === isTargetAnimatable, `You are trying to animate ${name} from "${originKeyframe}" to "${targetKeyframe}". "${isOriginAnimatable ? targetKeyframe : originKeyframe}" is not an animatable value.`, "value-not-animatable");
|
|
966
|
-
if (!isOriginAnimatable || !isTargetAnimatable) return false;
|
|
967
|
-
return hasKeyframesChanged(keyframes2) || (type === "spring" || isGenerator(type)) && velocity;
|
|
968
|
-
}
|
|
969
|
-
function makeAnimationInstant(options) {
|
|
970
|
-
options.duration = 0;
|
|
971
|
-
options.type = "keyframes";
|
|
972
|
-
}
|
|
973
|
-
var browserColorFunctions = /^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;
|
|
974
|
-
function hasBrowserOnlyColors(keyframes2) {
|
|
975
|
-
for (let i = 0; i < keyframes2.length; i++) if (typeof keyframes2[i] === "string" && browserColorFunctions.test(keyframes2[i])) return true;
|
|
976
|
-
return false;
|
|
977
|
-
}
|
|
978
|
-
var colorProperties = /* @__PURE__ */ new Set([
|
|
979
|
-
"color",
|
|
980
|
-
"backgroundColor",
|
|
981
|
-
"outlineColor",
|
|
982
|
-
"fill",
|
|
983
|
-
"stroke",
|
|
984
|
-
"borderColor",
|
|
985
|
-
"borderTopColor",
|
|
986
|
-
"borderRightColor",
|
|
987
|
-
"borderBottomColor",
|
|
988
|
-
"borderLeftColor"
|
|
989
|
-
]);
|
|
990
|
-
var supportsWaapi = /* @__PURE__ */ memo$1(() => Object.hasOwnProperty.call(Element.prototype, "animate"));
|
|
991
|
-
function supportsBrowserAnimation(options) {
|
|
992
|
-
const { motionValue: motionValue2, name, repeatDelay, repeatType, damping, type, keyframes: keyframes2 } = options;
|
|
993
|
-
const subject = motionValue2?.owner?.current;
|
|
994
|
-
if (!(subject instanceof HTMLElement) && !(subject instanceof SVGElement)) return false;
|
|
995
|
-
const { onUpdate, transformTemplate } = motionValue2.owner.getProps();
|
|
996
|
-
return supportsWaapi() && name && (acceleratedValues.has(name) || colorProperties.has(name) && hasBrowserOnlyColors(keyframes2)) && (name !== "transform" || !transformTemplate) && !onUpdate && !repeatDelay && repeatType !== "mirror" && damping !== 0 && type !== "inertia";
|
|
997
|
-
}
|
|
998
|
-
var MAX_RESOLVE_DELAY = 40;
|
|
999
|
-
var AsyncMotionValueAnimation = class extends WithPromise {
|
|
1000
|
-
constructor({ autoplay = true, delay = 0, type = "keyframes", repeat = 0, repeatDelay = 0, repeatType = "loop", keyframes: keyframes2, name, motionValue: motionValue2, element, ...options }) {
|
|
1001
|
-
super();
|
|
1002
|
-
this.stop = () => {
|
|
1003
|
-
if (this._animation) {
|
|
1004
|
-
this._animation.stop();
|
|
1005
|
-
this.stopTimeline?.();
|
|
1006
|
-
}
|
|
1007
|
-
this.keyframeResolver?.cancel();
|
|
1008
|
-
};
|
|
1009
|
-
this.createdAt = time.now();
|
|
1010
|
-
const optionsWithDefaults = {
|
|
1011
|
-
autoplay,
|
|
1012
|
-
delay,
|
|
1013
|
-
type,
|
|
1014
|
-
repeat,
|
|
1015
|
-
repeatDelay,
|
|
1016
|
-
repeatType,
|
|
1017
|
-
name,
|
|
1018
|
-
motionValue: motionValue2,
|
|
1019
|
-
element,
|
|
1020
|
-
...options
|
|
1021
|
-
};
|
|
1022
|
-
const KeyframeResolver$1 = element?.KeyframeResolver || KeyframeResolver;
|
|
1023
|
-
this.keyframeResolver = new KeyframeResolver$1(keyframes2, (resolvedKeyframes, finalKeyframe, forced) => this.onKeyframesResolved(resolvedKeyframes, finalKeyframe, optionsWithDefaults, !forced), name, motionValue2, element);
|
|
1024
|
-
this.keyframeResolver?.scheduleResolve();
|
|
1025
|
-
}
|
|
1026
|
-
onKeyframesResolved(keyframes2, finalKeyframe, options, sync) {
|
|
1027
|
-
this.keyframeResolver = void 0;
|
|
1028
|
-
const { name, type, velocity, delay, isHandoff, onUpdate } = options;
|
|
1029
|
-
this.resolvedAt = time.now();
|
|
1030
|
-
let canAnimateValue = true;
|
|
1031
|
-
if (!canAnimate(keyframes2, name, type, velocity)) {
|
|
1032
|
-
canAnimateValue = false;
|
|
1033
|
-
if (MotionGlobalConfig.instantAnimations || !delay) onUpdate?.(getFinalKeyframe(keyframes2, options, finalKeyframe));
|
|
1034
|
-
keyframes2[0] = keyframes2[keyframes2.length - 1];
|
|
1035
|
-
makeAnimationInstant(options);
|
|
1036
|
-
options.repeat = 0;
|
|
1037
|
-
}
|
|
1038
|
-
const resolvedOptions = {
|
|
1039
|
-
startTime: sync ? !this.resolvedAt ? this.createdAt : this.resolvedAt - this.createdAt > MAX_RESOLVE_DELAY ? this.resolvedAt : this.createdAt : void 0,
|
|
1040
|
-
finalKeyframe,
|
|
1041
|
-
...options,
|
|
1042
|
-
keyframes: keyframes2
|
|
1043
|
-
};
|
|
1044
|
-
const useWaapi = canAnimateValue && !isHandoff && supportsBrowserAnimation(resolvedOptions);
|
|
1045
|
-
const element = resolvedOptions.motionValue?.owner?.current;
|
|
1046
|
-
let animation;
|
|
1047
|
-
if (useWaapi) try {
|
|
1048
|
-
animation = new NativeAnimationExtended({
|
|
1049
|
-
...resolvedOptions,
|
|
1050
|
-
element
|
|
1051
|
-
});
|
|
1052
|
-
} catch {
|
|
1053
|
-
animation = new JSAnimation(resolvedOptions);
|
|
1054
|
-
}
|
|
1055
|
-
else animation = new JSAnimation(resolvedOptions);
|
|
1056
|
-
animation.finished.then(() => {
|
|
1057
|
-
this.notifyFinished();
|
|
1058
|
-
}).catch(noop);
|
|
1059
|
-
if (this.pendingTimeline) {
|
|
1060
|
-
this.stopTimeline = animation.attachTimeline(this.pendingTimeline);
|
|
1061
|
-
this.pendingTimeline = void 0;
|
|
1062
|
-
}
|
|
1063
|
-
this._animation = animation;
|
|
1064
|
-
}
|
|
1065
|
-
get finished() {
|
|
1066
|
-
if (!this._animation) return this._finished;
|
|
1067
|
-
else return this.animation.finished;
|
|
1068
|
-
}
|
|
1069
|
-
then(onResolve, _onReject) {
|
|
1070
|
-
return this.finished.finally(onResolve).then(() => {
|
|
1071
|
-
});
|
|
1072
|
-
}
|
|
1073
|
-
get animation() {
|
|
1074
|
-
if (!this._animation) {
|
|
1075
|
-
this.keyframeResolver?.resume();
|
|
1076
|
-
flushKeyframeResolvers();
|
|
1077
|
-
}
|
|
1078
|
-
return this._animation;
|
|
1079
|
-
}
|
|
1080
|
-
get duration() {
|
|
1081
|
-
return this.animation.duration;
|
|
1082
|
-
}
|
|
1083
|
-
get iterationDuration() {
|
|
1084
|
-
return this.animation.iterationDuration;
|
|
1085
|
-
}
|
|
1086
|
-
get time() {
|
|
1087
|
-
return this.animation.time;
|
|
1088
|
-
}
|
|
1089
|
-
set time(newTime) {
|
|
1090
|
-
this.animation.time = newTime;
|
|
1091
|
-
}
|
|
1092
|
-
get speed() {
|
|
1093
|
-
return this.animation.speed;
|
|
1094
|
-
}
|
|
1095
|
-
get state() {
|
|
1096
|
-
return this.animation.state;
|
|
1097
|
-
}
|
|
1098
|
-
set speed(newSpeed) {
|
|
1099
|
-
this.animation.speed = newSpeed;
|
|
1100
|
-
}
|
|
1101
|
-
get startTime() {
|
|
1102
|
-
return this.animation.startTime;
|
|
1103
|
-
}
|
|
1104
|
-
attachTimeline(timeline) {
|
|
1105
|
-
if (this._animation) this.stopTimeline = this.animation.attachTimeline(timeline);
|
|
1106
|
-
else this.pendingTimeline = timeline;
|
|
1107
|
-
return () => this.stop();
|
|
1108
|
-
}
|
|
1109
|
-
play() {
|
|
1110
|
-
this.animation.play();
|
|
1111
|
-
}
|
|
1112
|
-
pause() {
|
|
1113
|
-
this.animation.pause();
|
|
1114
|
-
}
|
|
1115
|
-
complete() {
|
|
1116
|
-
this.animation.complete();
|
|
1117
|
-
}
|
|
1118
|
-
cancel() {
|
|
1119
|
-
if (this._animation) this.animation.cancel();
|
|
1120
|
-
this.keyframeResolver?.cancel();
|
|
1121
|
-
}
|
|
1122
|
-
};
|
|
1123
|
-
function resolveTransition(transition, parentTransition) {
|
|
1124
|
-
if (transition?.inherit && parentTransition) {
|
|
1125
|
-
const { inherit: _, ...rest } = transition;
|
|
1126
|
-
return {
|
|
1127
|
-
...parentTransition,
|
|
1128
|
-
...rest
|
|
1129
|
-
};
|
|
1130
|
-
}
|
|
1131
|
-
return transition;
|
|
1132
|
-
}
|
|
1133
|
-
function getValueTransition(transition, key) {
|
|
1134
|
-
const valueTransition = transition?.[key] ?? transition?.["default"] ?? transition;
|
|
1135
|
-
if (valueTransition !== transition) return resolveTransition(valueTransition, transition);
|
|
1136
|
-
return valueTransition;
|
|
1137
|
-
}
|
|
1138
|
-
var underDampedSpring = {
|
|
1139
|
-
type: "spring",
|
|
1140
|
-
stiffness: 500,
|
|
1141
|
-
damping: 25,
|
|
1142
|
-
restSpeed: 10
|
|
1143
|
-
};
|
|
1144
|
-
var criticallyDampedSpring = (target) => ({
|
|
1145
|
-
type: "spring",
|
|
1146
|
-
stiffness: 550,
|
|
1147
|
-
damping: target === 0 ? 2 * Math.sqrt(550) : 30,
|
|
1148
|
-
restSpeed: 10
|
|
1149
|
-
});
|
|
1150
|
-
var keyframesTransition = {
|
|
1151
|
-
type: "keyframes",
|
|
1152
|
-
duration: 0.8
|
|
1153
|
-
};
|
|
1154
|
-
var ease = {
|
|
1155
|
-
type: "keyframes",
|
|
1156
|
-
ease: [
|
|
1157
|
-
0.25,
|
|
1158
|
-
0.1,
|
|
1159
|
-
0.35,
|
|
1160
|
-
1
|
|
1161
|
-
],
|
|
1162
|
-
duration: 0.3
|
|
1163
|
-
};
|
|
1164
|
-
var getDefaultTransition = (valueKey, { keyframes: keyframes2 }) => {
|
|
1165
|
-
if (keyframes2.length > 2) return keyframesTransition;
|
|
1166
|
-
else if (transformProps.has(valueKey)) return valueKey.startsWith("scale") ? criticallyDampedSpring(keyframes2[1]) : underDampedSpring;
|
|
1167
|
-
return ease;
|
|
1168
|
-
};
|
|
1169
|
-
var orchestrationKeys = /* @__PURE__ */ new Set([
|
|
1170
|
-
"when",
|
|
1171
|
-
"delay",
|
|
1172
|
-
"delayChildren",
|
|
1173
|
-
"staggerChildren",
|
|
1174
|
-
"staggerDirection",
|
|
1175
|
-
"repeat",
|
|
1176
|
-
"repeatType",
|
|
1177
|
-
"repeatDelay",
|
|
1178
|
-
"from",
|
|
1179
|
-
"elapsed"
|
|
1180
|
-
]);
|
|
1181
|
-
function isTransitionDefined(transition) {
|
|
1182
|
-
for (const key in transition) if (!orchestrationKeys.has(key)) return true;
|
|
1183
|
-
return false;
|
|
1184
|
-
}
|
|
1185
|
-
var animateMotionValue = (name, value, target, transition = {}, element, isHandoff) => (onComplete) => {
|
|
1186
|
-
const valueTransition = getValueTransition(transition, name) || {};
|
|
1187
|
-
const delay = valueTransition.delay || transition.delay || 0;
|
|
1188
|
-
let { elapsed = 0 } = transition;
|
|
1189
|
-
elapsed = elapsed - secondsToMilliseconds(delay);
|
|
1190
|
-
const options = {
|
|
1191
|
-
keyframes: Array.isArray(target) ? target : [null, target],
|
|
1192
|
-
ease: "easeOut",
|
|
1193
|
-
velocity: value.getVelocity(),
|
|
1194
|
-
...valueTransition,
|
|
1195
|
-
delay: -elapsed,
|
|
1196
|
-
onUpdate: (v) => {
|
|
1197
|
-
value.set(v);
|
|
1198
|
-
valueTransition.onUpdate && valueTransition.onUpdate(v);
|
|
1199
|
-
},
|
|
1200
|
-
onComplete: () => {
|
|
1201
|
-
onComplete();
|
|
1202
|
-
valueTransition.onComplete && valueTransition.onComplete();
|
|
1203
|
-
},
|
|
1204
|
-
name,
|
|
1205
|
-
motionValue: value,
|
|
1206
|
-
element: isHandoff ? void 0 : element
|
|
1207
|
-
};
|
|
1208
|
-
if (!isTransitionDefined(valueTransition)) Object.assign(options, getDefaultTransition(name, options));
|
|
1209
|
-
options.duration && (options.duration = secondsToMilliseconds(options.duration));
|
|
1210
|
-
options.repeatDelay && (options.repeatDelay = secondsToMilliseconds(options.repeatDelay));
|
|
1211
|
-
if (options.from !== void 0) options.keyframes[0] = options.from;
|
|
1212
|
-
let shouldSkip = false;
|
|
1213
|
-
if (options.type === false || options.duration === 0 && !options.repeatDelay) {
|
|
1214
|
-
makeAnimationInstant(options);
|
|
1215
|
-
if (options.delay === 0) shouldSkip = true;
|
|
1216
|
-
}
|
|
1217
|
-
if (MotionGlobalConfig.instantAnimations || MotionGlobalConfig.skipAnimations || element?.shouldSkipAnimations || valueTransition.skipAnimations) {
|
|
1218
|
-
shouldSkip = true;
|
|
1219
|
-
makeAnimationInstant(options);
|
|
1220
|
-
options.delay = 0;
|
|
1221
|
-
}
|
|
1222
|
-
options.allowFlatten = !valueTransition.type && !valueTransition.ease;
|
|
1223
|
-
if (shouldSkip && !isHandoff && value.get() !== void 0) {
|
|
1224
|
-
const finalKeyframe = getFinalKeyframe(options.keyframes, valueTransition);
|
|
1225
|
-
if (finalKeyframe !== void 0) {
|
|
1226
|
-
frame.update(() => {
|
|
1227
|
-
options.onUpdate(finalKeyframe);
|
|
1228
|
-
options.onComplete();
|
|
1229
|
-
});
|
|
1230
|
-
return;
|
|
1231
|
-
}
|
|
1232
|
-
}
|
|
1233
|
-
return valueTransition.isSync ? new JSAnimation(options) : new AsyncMotionValueAnimation(options);
|
|
1234
|
-
};
|
|
1235
|
-
var splitCSSVariableRegex = /^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;
|
|
1236
|
-
function parseCSSVariable(current) {
|
|
1237
|
-
const match = splitCSSVariableRegex.exec(current);
|
|
1238
|
-
if (!match) return [,];
|
|
1239
|
-
const [, token1, token2, fallback] = match;
|
|
1240
|
-
return [`--${token1 ?? token2}`, fallback];
|
|
1241
|
-
}
|
|
1242
|
-
var maxDepth = 4;
|
|
1243
|
-
function getVariableValue(current, element, depth = 1) {
|
|
1244
|
-
invariant(depth <= maxDepth, `Max CSS variable fallback depth detected in property "${current}". This may indicate a circular fallback dependency.`, "max-css-var-depth");
|
|
1245
|
-
const [token, fallback] = parseCSSVariable(current);
|
|
1246
|
-
if (!token) return;
|
|
1247
|
-
const resolved = window.getComputedStyle(element).getPropertyValue(token);
|
|
1248
|
-
if (resolved) {
|
|
1249
|
-
const trimmed = resolved.trim();
|
|
1250
|
-
return isNumericalString(trimmed) ? parseFloat(trimmed) : trimmed;
|
|
1251
|
-
}
|
|
1252
|
-
return isCSSVariableToken(fallback) ? getVariableValue(fallback, element, depth + 1) : fallback;
|
|
1253
|
-
}
|
|
1254
|
-
function resolveVariant(visualElement, definition, custom) {
|
|
1255
|
-
const props = visualElement.getProps();
|
|
1256
|
-
return resolveVariantFromProps(props, definition, custom !== void 0 ? custom : props.custom, visualElement);
|
|
1257
|
-
}
|
|
1258
|
-
var positionalKeys = /* @__PURE__ */ new Set([
|
|
1259
|
-
"width",
|
|
1260
|
-
"height",
|
|
1261
|
-
"top",
|
|
1262
|
-
"left",
|
|
1263
|
-
"right",
|
|
1264
|
-
"bottom",
|
|
1265
|
-
...transformPropOrder
|
|
1266
|
-
]);
|
|
1267
|
-
var isKeyframesTarget = (v) => {
|
|
1268
|
-
return Array.isArray(v);
|
|
1269
|
-
};
|
|
1270
|
-
function setMotionValue(visualElement, key, value) {
|
|
1271
|
-
if (visualElement.hasValue(key)) visualElement.getValue(key).set(value);
|
|
1272
|
-
else visualElement.addValue(key, motionValue(value));
|
|
1273
|
-
}
|
|
1274
|
-
function resolveFinalValueInKeyframes(v) {
|
|
1275
|
-
return isKeyframesTarget(v) ? v[v.length - 1] || 0 : v;
|
|
1276
|
-
}
|
|
1277
|
-
function setTarget(visualElement, definition) {
|
|
1278
|
-
let { transitionEnd = {}, transition = {}, ...target } = resolveVariant(visualElement, definition) || {};
|
|
1279
|
-
target = {
|
|
1280
|
-
...target,
|
|
1281
|
-
...transitionEnd
|
|
1282
|
-
};
|
|
1283
|
-
for (const key in target) setMotionValue(visualElement, key, resolveFinalValueInKeyframes(target[key]));
|
|
1284
|
-
}
|
|
1285
|
-
function isWillChangeMotionValue(value) {
|
|
1286
|
-
return Boolean(isMotionValue(value) && value.add);
|
|
1287
|
-
}
|
|
1288
|
-
function addValueToWillChange(visualElement, key) {
|
|
1289
|
-
const willChange = visualElement.getValue("willChange");
|
|
1290
|
-
if (isWillChangeMotionValue(willChange)) return willChange.add(key);
|
|
1291
|
-
else if (!willChange && MotionGlobalConfig.WillChange) {
|
|
1292
|
-
const newWillChange = new MotionGlobalConfig.WillChange("auto");
|
|
1293
|
-
visualElement.addValue("willChange", newWillChange);
|
|
1294
|
-
newWillChange.add(key);
|
|
1295
|
-
}
|
|
1296
|
-
}
|
|
1297
|
-
function getOptimisedAppearId(visualElement) {
|
|
1298
|
-
return visualElement.props[optimizedAppearDataAttribute];
|
|
1299
|
-
}
|
|
1300
|
-
var isBrowser = typeof window !== "undefined";
|
|
1301
|
-
function shouldBlockAnimation({ protectedKeys, needsAnimating }, key) {
|
|
1302
|
-
const shouldBlock = protectedKeys.hasOwnProperty(key) && needsAnimating[key] !== true;
|
|
1303
|
-
needsAnimating[key] = false;
|
|
1304
|
-
return shouldBlock;
|
|
1305
|
-
}
|
|
1306
|
-
function animateTarget(visualElement, targetAndTransition, { delay = 0, transitionOverride, type } = {}) {
|
|
1307
|
-
let { transition, transitionEnd, ...target } = targetAndTransition;
|
|
1308
|
-
const defaultTransition = visualElement.getDefaultTransition();
|
|
1309
|
-
transition = transition ? resolveTransition(transition, defaultTransition) : defaultTransition;
|
|
1310
|
-
const reduceMotion = transition?.reduceMotion;
|
|
1311
|
-
const skipAnimations = transition?.skipAnimations;
|
|
1312
|
-
if (transitionOverride) transition = transitionOverride;
|
|
1313
|
-
const animations = [];
|
|
1314
|
-
const animationTypeState = type && visualElement.animationState && visualElement.animationState.getState()[type];
|
|
1315
|
-
const path = transition?.path;
|
|
1316
|
-
if (path) path.animateVisualElement(visualElement, target, transition, delay, animations);
|
|
1317
|
-
for (const key in target) {
|
|
1318
|
-
const value = visualElement.getValue(key, visualElement.latestValues[key] ?? null);
|
|
1319
|
-
const valueTarget = target[key];
|
|
1320
|
-
if (valueTarget === void 0 || animationTypeState && shouldBlockAnimation(animationTypeState, key)) continue;
|
|
1321
|
-
const valueTransition = {
|
|
1322
|
-
delay,
|
|
1323
|
-
...getValueTransition(transition || {}, key)
|
|
1324
|
-
};
|
|
1325
|
-
if (skipAnimations) valueTransition.skipAnimations = true;
|
|
1326
|
-
const currentValue = value.get();
|
|
1327
|
-
if (currentValue !== void 0 && !value.isAnimating() && !Array.isArray(valueTarget) && valueTarget === currentValue && !valueTransition.velocity) {
|
|
1328
|
-
frame.update(() => value.set(valueTarget));
|
|
1329
|
-
continue;
|
|
1330
|
-
}
|
|
1331
|
-
let isHandoff = false;
|
|
1332
|
-
if (isBrowser && window.MotionHandoffAnimation) {
|
|
1333
|
-
const appearId = getOptimisedAppearId(visualElement);
|
|
1334
|
-
if (appearId) {
|
|
1335
|
-
const startTime = window.MotionHandoffAnimation(appearId, key, frame);
|
|
1336
|
-
if (startTime !== null) {
|
|
1337
|
-
valueTransition.startTime = startTime;
|
|
1338
|
-
isHandoff = true;
|
|
1339
|
-
}
|
|
1340
|
-
}
|
|
1341
|
-
}
|
|
1342
|
-
addValueToWillChange(visualElement, key);
|
|
1343
|
-
const shouldReduceMotion = reduceMotion ?? visualElement.shouldReduceMotion;
|
|
1344
|
-
value.start(animateMotionValue(key, value, valueTarget, shouldReduceMotion && positionalKeys.has(key) ? { type: false } : valueTransition, visualElement, isHandoff));
|
|
1345
|
-
const animation = value.animation;
|
|
1346
|
-
if (animation) animations.push(animation);
|
|
1347
|
-
}
|
|
1348
|
-
if (transitionEnd) {
|
|
1349
|
-
const applyTransitionEnd = () => frame.update(() => {
|
|
1350
|
-
transitionEnd && setTarget(visualElement, transitionEnd);
|
|
1351
|
-
});
|
|
1352
|
-
if (animations.length) Promise.all(animations).then(applyTransitionEnd);
|
|
1353
|
-
else applyTransitionEnd();
|
|
1354
|
-
}
|
|
1355
|
-
return animations;
|
|
1356
|
-
}
|
|
1357
|
-
function isNone(value) {
|
|
1358
|
-
if (typeof value === "number") return value === 0;
|
|
1359
|
-
else if (value !== null) return value === "none" || value === "0" || isZeroValueString(value);
|
|
1360
|
-
else return true;
|
|
1361
|
-
}
|
|
1362
|
-
var invalidTemplates = /* @__PURE__ */ new Set([
|
|
1363
|
-
"auto",
|
|
1364
|
-
"none",
|
|
1365
|
-
"0"
|
|
1366
|
-
]);
|
|
1367
|
-
function makeNoneKeyframesAnimatable(unresolvedKeyframes, noneKeyframeIndexes, name) {
|
|
1368
|
-
let i = 0;
|
|
1369
|
-
let animatableTemplate = void 0;
|
|
1370
|
-
while (i < unresolvedKeyframes.length && !animatableTemplate) {
|
|
1371
|
-
const keyframe = unresolvedKeyframes[i];
|
|
1372
|
-
if (typeof keyframe === "string" && !invalidTemplates.has(keyframe) && analyseComplexValue(keyframe).values.length) animatableTemplate = unresolvedKeyframes[i];
|
|
1373
|
-
i++;
|
|
1374
|
-
}
|
|
1375
|
-
if (animatableTemplate && name) for (const noneIndex of noneKeyframeIndexes) unresolvedKeyframes[noneIndex] = getAnimatableNone(name, animatableTemplate);
|
|
1376
|
-
}
|
|
1377
|
-
var DOMKeyframesResolver = class extends KeyframeResolver {
|
|
1378
|
-
constructor(unresolvedKeyframes, onComplete, name, motionValue2, element) {
|
|
1379
|
-
super(unresolvedKeyframes, onComplete, name, motionValue2, element, true);
|
|
1380
|
-
}
|
|
1381
|
-
readKeyframes() {
|
|
1382
|
-
const { unresolvedKeyframes, element, name } = this;
|
|
1383
|
-
if (!element || !element.current) return;
|
|
1384
|
-
super.readKeyframes();
|
|
1385
|
-
for (let i = 0; i < unresolvedKeyframes.length; i++) {
|
|
1386
|
-
let keyframe = unresolvedKeyframes[i];
|
|
1387
|
-
if (typeof keyframe === "string") {
|
|
1388
|
-
keyframe = keyframe.trim();
|
|
1389
|
-
if (isCSSVariableToken(keyframe)) {
|
|
1390
|
-
const resolved = getVariableValue(keyframe, element.current);
|
|
1391
|
-
if (resolved !== void 0) unresolvedKeyframes[i] = resolved;
|
|
1392
|
-
if (i === unresolvedKeyframes.length - 1) this.finalKeyframe = keyframe;
|
|
1393
|
-
}
|
|
1394
|
-
}
|
|
1395
|
-
}
|
|
1396
|
-
this.resolveNoneKeyframes();
|
|
1397
|
-
if (!positionalKeys.has(name) || unresolvedKeyframes.length !== 2) return;
|
|
1398
|
-
const [origin, target] = unresolvedKeyframes;
|
|
1399
|
-
const originType = findDimensionValueType(origin);
|
|
1400
|
-
const targetType = findDimensionValueType(target);
|
|
1401
|
-
if (containsCSSVariable(origin) !== containsCSSVariable(target) && positionalValues[name]) {
|
|
1402
|
-
this.needsMeasurement = true;
|
|
1403
|
-
return;
|
|
1404
|
-
}
|
|
1405
|
-
if (originType === targetType) return;
|
|
1406
|
-
if (isNumOrPxType(originType) && isNumOrPxType(targetType)) for (let i = 0; i < unresolvedKeyframes.length; i++) {
|
|
1407
|
-
const value = unresolvedKeyframes[i];
|
|
1408
|
-
if (typeof value === "string") unresolvedKeyframes[i] = parseFloat(value);
|
|
1409
|
-
}
|
|
1410
|
-
else if (positionalValues[name])
|
|
1411
|
-
this.needsMeasurement = true;
|
|
1412
|
-
}
|
|
1413
|
-
resolveNoneKeyframes() {
|
|
1414
|
-
const { unresolvedKeyframes, name } = this;
|
|
1415
|
-
const noneKeyframeIndexes = [];
|
|
1416
|
-
for (let i = 0; i < unresolvedKeyframes.length; i++) if (unresolvedKeyframes[i] === null || isNone(unresolvedKeyframes[i])) noneKeyframeIndexes.push(i);
|
|
1417
|
-
if (noneKeyframeIndexes.length) makeNoneKeyframesAnimatable(unresolvedKeyframes, noneKeyframeIndexes, name);
|
|
1418
|
-
}
|
|
1419
|
-
measureInitialState() {
|
|
1420
|
-
const { element, unresolvedKeyframes, name } = this;
|
|
1421
|
-
if (!element || !element.current) return;
|
|
1422
|
-
if (name === "height") this.suspendedScrollY = window.pageYOffset;
|
|
1423
|
-
this.measuredOrigin = positionalValues[name](element.measureViewportBox(), window.getComputedStyle(element.current));
|
|
1424
|
-
unresolvedKeyframes[0] = this.measuredOrigin;
|
|
1425
|
-
const measureKeyframe = unresolvedKeyframes[unresolvedKeyframes.length - 1];
|
|
1426
|
-
if (measureKeyframe !== void 0) element.getValue(name, measureKeyframe).jump(measureKeyframe, false);
|
|
1427
|
-
}
|
|
1428
|
-
measureEndState() {
|
|
1429
|
-
const { element, name, unresolvedKeyframes } = this;
|
|
1430
|
-
if (!element || !element.current) return;
|
|
1431
|
-
const value = element.getValue(name);
|
|
1432
|
-
value && value.jump(this.measuredOrigin, false);
|
|
1433
|
-
const finalKeyframeIndex = unresolvedKeyframes.length - 1;
|
|
1434
|
-
const finalKeyframe = unresolvedKeyframes[finalKeyframeIndex];
|
|
1435
|
-
unresolvedKeyframes[finalKeyframeIndex] = positionalValues[name](element.measureViewportBox(), window.getComputedStyle(element.current));
|
|
1436
|
-
if (finalKeyframe !== null && this.finalKeyframe === void 0) this.finalKeyframe = finalKeyframe;
|
|
1437
|
-
if (this.removedTransforms?.length) this.removedTransforms.forEach(([unsetTransformName, unsetTransformValue]) => {
|
|
1438
|
-
element.getValue(unsetTransformName).set(unsetTransformValue);
|
|
1439
|
-
});
|
|
1440
|
-
this.resolveNoneKeyframes();
|
|
1441
|
-
}
|
|
1442
|
-
};
|
|
1443
|
-
function resolveElements(elementOrSelector, scope, selectorCache) {
|
|
1444
|
-
if (elementOrSelector == null) return [];
|
|
1445
|
-
if (elementOrSelector instanceof EventTarget) return [elementOrSelector];
|
|
1446
|
-
else if (typeof elementOrSelector === "string") {
|
|
1447
|
-
let root = document;
|
|
1448
|
-
if (scope) root = scope.current;
|
|
1449
|
-
const elements = selectorCache?.[elementOrSelector] ?? root.querySelectorAll(elementOrSelector);
|
|
1450
|
-
return elements ? Array.from(elements) : [];
|
|
1451
|
-
}
|
|
1452
|
-
return Array.from(elementOrSelector).filter((element) => element != null);
|
|
1453
|
-
}
|
|
1454
|
-
function isSVGElement(element) {
|
|
1455
|
-
return isObject(element) && "ownerSVGElement" in element;
|
|
1456
|
-
}
|
|
1457
|
-
function isSVGSVGElement(element) {
|
|
1458
|
-
return isSVGElement(element) && element.tagName === "svg";
|
|
1459
|
-
}
|
|
1460
|
-
var DOMVisualElement = class extends VisualElement {
|
|
1461
|
-
constructor() {
|
|
1462
|
-
super(...arguments);
|
|
1463
|
-
this.KeyframeResolver = DOMKeyframesResolver;
|
|
1464
|
-
}
|
|
1465
|
-
sortInstanceNodePosition(a, b) {
|
|
1466
|
-
return a.compareDocumentPosition(b) & 2 ? 1 : -1;
|
|
1467
|
-
}
|
|
1468
|
-
getBaseTargetFromProps(props, key) {
|
|
1469
|
-
const style = props.style;
|
|
1470
|
-
return style ? style[key] : void 0;
|
|
1471
|
-
}
|
|
1472
|
-
removeValueFromRenderState(key, { vars, style }) {
|
|
1473
|
-
delete vars[key];
|
|
1474
|
-
delete style[key];
|
|
1475
|
-
}
|
|
1476
|
-
handleChildMotionValue() {
|
|
1477
|
-
if (this.childSubscription) {
|
|
1478
|
-
this.childSubscription();
|
|
1479
|
-
delete this.childSubscription;
|
|
1480
|
-
}
|
|
1481
|
-
const { children } = this.props;
|
|
1482
|
-
if (isMotionValue(children)) this.childSubscription = children.on("change", (latest) => {
|
|
1483
|
-
if (this.current) this.current.textContent = `${latest}`;
|
|
1484
|
-
});
|
|
1485
|
-
}
|
|
1486
|
-
};
|
|
1487
|
-
function convertBoundingBoxToBox({ top, left, right, bottom }) {
|
|
1488
|
-
return {
|
|
1489
|
-
x: {
|
|
1490
|
-
min: left,
|
|
1491
|
-
max: right
|
|
1492
|
-
},
|
|
1493
|
-
y: {
|
|
1494
|
-
min: top,
|
|
1495
|
-
max: bottom
|
|
1496
|
-
}
|
|
1497
|
-
};
|
|
1498
|
-
}
|
|
1499
|
-
function convertBoxToBoundingBox({ x, y }) {
|
|
1500
|
-
return {
|
|
1501
|
-
top: y.min,
|
|
1502
|
-
right: x.max,
|
|
1503
|
-
bottom: y.max,
|
|
1504
|
-
left: x.min
|
|
1505
|
-
};
|
|
1506
|
-
}
|
|
1507
|
-
function transformBoxPoints(point, transformPoint) {
|
|
1508
|
-
if (!transformPoint) return point;
|
|
1509
|
-
const topLeft = transformPoint({
|
|
1510
|
-
x: point.left,
|
|
1511
|
-
y: point.top
|
|
1512
|
-
});
|
|
1513
|
-
const bottomRight = transformPoint({
|
|
1514
|
-
x: point.right,
|
|
1515
|
-
y: point.bottom
|
|
1516
|
-
});
|
|
1517
|
-
return {
|
|
1518
|
-
top: topLeft.y,
|
|
1519
|
-
left: topLeft.x,
|
|
1520
|
-
bottom: bottomRight.y,
|
|
1521
|
-
right: bottomRight.x
|
|
1522
|
-
};
|
|
1523
|
-
}
|
|
1524
|
-
function isIdentityScale(scale) {
|
|
1525
|
-
return scale === void 0 || scale === 1;
|
|
1526
|
-
}
|
|
1527
|
-
function hasScale({ scale, scaleX, scaleY }) {
|
|
1528
|
-
return !isIdentityScale(scale) || !isIdentityScale(scaleX) || !isIdentityScale(scaleY);
|
|
1529
|
-
}
|
|
1530
|
-
function hasTransform(values) {
|
|
1531
|
-
return hasScale(values) || has2DTranslate(values) || values.z || values.rotate || values.rotateX || values.rotateY || values.skewX || values.skewY;
|
|
1532
|
-
}
|
|
1533
|
-
function has2DTranslate(values) {
|
|
1534
|
-
return is2DTranslate(values.x) || is2DTranslate(values.y);
|
|
1535
|
-
}
|
|
1536
|
-
function is2DTranslate(value) {
|
|
1537
|
-
return value && value !== "0%";
|
|
1538
|
-
}
|
|
1539
|
-
function scalePoint(point, scale, originPoint) {
|
|
1540
|
-
return originPoint + scale * (point - originPoint);
|
|
1541
|
-
}
|
|
1542
|
-
function applyPointDelta(point, translate, scale, originPoint, boxScale) {
|
|
1543
|
-
if (boxScale !== void 0) point = scalePoint(point, boxScale, originPoint);
|
|
1544
|
-
return scalePoint(point, scale, originPoint) + translate;
|
|
1545
|
-
}
|
|
1546
|
-
function applyAxisDelta(axis, translate = 0, scale = 1, originPoint, boxScale) {
|
|
1547
|
-
axis.min = applyPointDelta(axis.min, translate, scale, originPoint, boxScale);
|
|
1548
|
-
axis.max = applyPointDelta(axis.max, translate, scale, originPoint, boxScale);
|
|
1549
|
-
}
|
|
1550
|
-
function applyBoxDelta(box, { x, y }) {
|
|
1551
|
-
applyAxisDelta(box.x, x.translate, x.scale, x.originPoint);
|
|
1552
|
-
applyAxisDelta(box.y, y.translate, y.scale, y.originPoint);
|
|
1553
|
-
}
|
|
1554
|
-
var TREE_SCALE_SNAP_MIN = 0.999999999999;
|
|
1555
|
-
var TREE_SCALE_SNAP_MAX = 1.0000000000001;
|
|
1556
|
-
function applyTreeDeltas(box, treeScale, treePath, isSharedTransition = false) {
|
|
1557
|
-
const treeLength = treePath.length;
|
|
1558
|
-
if (!treeLength) return;
|
|
1559
|
-
treeScale.x = treeScale.y = 1;
|
|
1560
|
-
let node;
|
|
1561
|
-
let delta;
|
|
1562
|
-
for (let i = 0; i < treeLength; i++) {
|
|
1563
|
-
node = treePath[i];
|
|
1564
|
-
delta = node.projectionDelta;
|
|
1565
|
-
const { visualElement } = node.options;
|
|
1566
|
-
if (visualElement && visualElement.props.style && visualElement.props.style.display === "contents") continue;
|
|
1567
|
-
if (isSharedTransition && node.options.layoutScroll && node.scroll && node !== node.root) {
|
|
1568
|
-
translateAxis(box.x, -node.scroll.offset.x);
|
|
1569
|
-
translateAxis(box.y, -node.scroll.offset.y);
|
|
1570
|
-
}
|
|
1571
|
-
if (delta) {
|
|
1572
|
-
treeScale.x *= delta.x.scale;
|
|
1573
|
-
treeScale.y *= delta.y.scale;
|
|
1574
|
-
applyBoxDelta(box, delta);
|
|
1575
|
-
}
|
|
1576
|
-
if (isSharedTransition && hasTransform(node.latestValues)) transformBox(box, node.latestValues, node.layout?.layoutBox);
|
|
1577
|
-
}
|
|
1578
|
-
if (treeScale.x < TREE_SCALE_SNAP_MAX && treeScale.x > TREE_SCALE_SNAP_MIN) treeScale.x = 1;
|
|
1579
|
-
if (treeScale.y < TREE_SCALE_SNAP_MAX && treeScale.y > TREE_SCALE_SNAP_MIN) treeScale.y = 1;
|
|
1580
|
-
}
|
|
1581
|
-
function translateAxis(axis, distance) {
|
|
1582
|
-
axis.min += distance;
|
|
1583
|
-
axis.max += distance;
|
|
1584
|
-
}
|
|
1585
|
-
function transformAxis(axis, axisTranslate, axisScale, boxScale, axisOrigin = 0.5) {
|
|
1586
|
-
applyAxisDelta(axis, axisTranslate, axisScale, mixNumber(axis.min, axis.max, axisOrigin), boxScale);
|
|
1587
|
-
}
|
|
1588
|
-
function resolveAxisTranslate(value, axis) {
|
|
1589
|
-
if (typeof value === "string") return parseFloat(value) / 100 * (axis.max - axis.min);
|
|
1590
|
-
return value;
|
|
1591
|
-
}
|
|
1592
|
-
function transformBox(box, transform, sourceBox) {
|
|
1593
|
-
const resolveBox = sourceBox ?? box;
|
|
1594
|
-
transformAxis(box.x, resolveAxisTranslate(transform.x, resolveBox.x), transform.scaleX, transform.scale, transform.originX);
|
|
1595
|
-
transformAxis(box.y, resolveAxisTranslate(transform.y, resolveBox.y), transform.scaleY, transform.scale, transform.originY);
|
|
1596
|
-
}
|
|
1597
|
-
function measureViewportBox(instance, transformPoint) {
|
|
1598
|
-
return convertBoundingBoxToBox(transformBoxPoints(instance.getBoundingClientRect(), transformPoint));
|
|
1599
|
-
}
|
|
1600
|
-
function measurePageBox(element, rootProjectionNode, transformPagePoint) {
|
|
1601
|
-
const viewportBox = measureViewportBox(element, transformPagePoint);
|
|
1602
|
-
const { scroll } = rootProjectionNode;
|
|
1603
|
-
if (scroll) {
|
|
1604
|
-
translateAxis(viewportBox.x, scroll.offset.x);
|
|
1605
|
-
translateAxis(viewportBox.y, scroll.offset.y);
|
|
1606
|
-
}
|
|
1607
|
-
return viewportBox;
|
|
1608
|
-
}
|
|
1609
|
-
function renderHTML(element, { style, vars }, styleProp, projection) {
|
|
1610
|
-
const elementStyle = element.style;
|
|
1611
|
-
let key;
|
|
1612
|
-
for (key in style) elementStyle[key] = style[key];
|
|
1613
|
-
projection?.applyProjectionStyles(elementStyle, styleProp);
|
|
1614
|
-
for (key in vars) elementStyle.setProperty(key, vars[key]);
|
|
1615
|
-
}
|
|
1616
|
-
function getComputedStyle$1(element) {
|
|
1617
|
-
return window.getComputedStyle(element);
|
|
1618
|
-
}
|
|
1619
|
-
var HTMLVisualElement = class extends DOMVisualElement {
|
|
1620
|
-
constructor() {
|
|
1621
|
-
super(...arguments);
|
|
1622
|
-
this.type = "html";
|
|
1623
|
-
this.renderInstance = renderHTML;
|
|
1624
|
-
}
|
|
1625
|
-
mount(instance) {
|
|
1626
|
-
invariant(Boolean(instance.style), "motion.create() components must forward their ref to a HTML or SVG element", "custom-component-ref");
|
|
1627
|
-
super.mount(instance);
|
|
1628
|
-
}
|
|
1629
|
-
readValueFromInstance(instance, key) {
|
|
1630
|
-
if (transformProps.has(key)) return this.projection?.isProjecting ? defaultTransformValue(key) : readTransformValue(instance, key);
|
|
1631
|
-
else {
|
|
1632
|
-
const computedStyle = getComputedStyle$1(instance);
|
|
1633
|
-
const value = (isCSSVariableName(key) ? computedStyle.getPropertyValue(key) : computedStyle[key]) || 0;
|
|
1634
|
-
return typeof value === "string" ? value.trim() : value;
|
|
1635
|
-
}
|
|
1636
|
-
}
|
|
1637
|
-
measureInstanceViewportBox(instance, { transformPagePoint }) {
|
|
1638
|
-
return measureViewportBox(instance, transformPagePoint);
|
|
1639
|
-
}
|
|
1640
|
-
build(renderState, latestValues, props) {
|
|
1641
|
-
buildHTMLStyles(renderState, latestValues, props.transformTemplate);
|
|
1642
|
-
}
|
|
1643
|
-
scrapeMotionValuesFromProps(props, prevProps, visualElement) {
|
|
1644
|
-
return scrapeMotionValuesFromProps$1(props, prevProps, visualElement);
|
|
1645
|
-
}
|
|
1646
|
-
};
|
|
1647
|
-
var camelCaseAttributes = /* @__PURE__ */ new Set([
|
|
1648
|
-
"baseFrequency",
|
|
1649
|
-
"diffuseConstant",
|
|
1650
|
-
"kernelMatrix",
|
|
1651
|
-
"kernelUnitLength",
|
|
1652
|
-
"keySplines",
|
|
1653
|
-
"keyTimes",
|
|
1654
|
-
"limitingConeAngle",
|
|
1655
|
-
"markerHeight",
|
|
1656
|
-
"markerWidth",
|
|
1657
|
-
"numOctaves",
|
|
1658
|
-
"targetX",
|
|
1659
|
-
"targetY",
|
|
1660
|
-
"surfaceScale",
|
|
1661
|
-
"specularConstant",
|
|
1662
|
-
"specularExponent",
|
|
1663
|
-
"stdDeviation",
|
|
1664
|
-
"tableValues",
|
|
1665
|
-
"viewBox",
|
|
1666
|
-
"gradientTransform",
|
|
1667
|
-
"pathLength",
|
|
1668
|
-
"startOffset",
|
|
1669
|
-
"textLength",
|
|
1670
|
-
"lengthAdjust"
|
|
1671
|
-
]);
|
|
1672
|
-
function renderSVG(element, renderState, _styleProp, projection) {
|
|
1673
|
-
renderHTML(element, renderState, void 0, projection);
|
|
1674
|
-
for (const key in renderState.attrs) element.setAttribute(!camelCaseAttributes.has(key) ? camelToDash(key) : key, renderState.attrs[key]);
|
|
1675
|
-
}
|
|
1676
|
-
var SVGVisualElement = class extends DOMVisualElement {
|
|
1677
|
-
constructor() {
|
|
1678
|
-
super(...arguments);
|
|
1679
|
-
this.type = "svg";
|
|
1680
|
-
this.isSVGTag = false;
|
|
1681
|
-
this.measureInstanceViewportBox = createBox;
|
|
1682
|
-
}
|
|
1683
|
-
getBaseTargetFromProps(props, key) {
|
|
1684
|
-
return props[key];
|
|
1685
|
-
}
|
|
1686
|
-
readValueFromInstance(instance, key) {
|
|
1687
|
-
if (transformProps.has(key)) {
|
|
1688
|
-
const defaultType = getDefaultValueType(key);
|
|
1689
|
-
return defaultType ? defaultType.default || 0 : 0;
|
|
1690
|
-
}
|
|
1691
|
-
if (cssStyleProperties.includes(key)) {
|
|
1692
|
-
const value = getComputedStyle(instance)[key];
|
|
1693
|
-
if (typeof value === "string" && value) return value.trim();
|
|
1694
|
-
}
|
|
1695
|
-
key = !camelCaseAttributes.has(key) ? camelToDash(key) : key;
|
|
1696
|
-
return instance.getAttribute(key);
|
|
1697
|
-
}
|
|
1698
|
-
scrapeMotionValuesFromProps(props, prevProps, visualElement) {
|
|
1699
|
-
return scrapeMotionValuesFromProps(props, prevProps, visualElement);
|
|
1700
|
-
}
|
|
1701
|
-
build(renderState, latestValues, props) {
|
|
1702
|
-
buildSVGAttrs(renderState, latestValues, this.isSVGTag, props.transformTemplate, props.style);
|
|
1703
|
-
}
|
|
1704
|
-
renderInstance(instance, renderState, styleProp, projection) {
|
|
1705
|
-
renderSVG(instance, renderState, styleProp, projection);
|
|
1706
|
-
}
|
|
1707
|
-
mount(instance) {
|
|
1708
|
-
this.isSVGTag = isSVGTag(instance.tagName);
|
|
1709
|
-
super.mount(instance);
|
|
1710
|
-
}
|
|
1711
|
-
};
|
|
1712
|
-
function animateSingleValue(value, keyframes2, options) {
|
|
1713
|
-
const motionValue$1 = isMotionValue(value) ? value : motionValue(value);
|
|
1714
|
-
motionValue$1.start(animateMotionValue("", motionValue$1, keyframes2, options));
|
|
1715
|
-
return motionValue$1.animation;
|
|
1716
|
-
}
|
|
1717
|
-
function MotionConfig({ children, ...config }) {
|
|
1718
|
-
const parentConfig = useContext(MotionConfigContext);
|
|
1719
|
-
config = {
|
|
1720
|
-
...parentConfig,
|
|
1721
|
-
...config
|
|
1722
|
-
};
|
|
1723
|
-
config.transition = resolveTransition(config.transition, parentConfig.transition);
|
|
1724
|
-
config.isStatic = useConstant(() => config.isStatic);
|
|
1725
|
-
const context = useMemo(() => config, [
|
|
1726
|
-
JSON.stringify(config.transition),
|
|
1727
|
-
config.transformPagePoint,
|
|
1728
|
-
config.reducedMotion,
|
|
1729
|
-
config.skipAnimations,
|
|
1730
|
-
config.isValidProp
|
|
1731
|
-
]);
|
|
1732
|
-
return jsx(MotionConfigContext.Provider, {
|
|
1733
|
-
value: context,
|
|
1734
|
-
children
|
|
1735
|
-
});
|
|
1736
|
-
}
|
|
13
|
+
// web/app/dist/server/assets/composer-completion-Bjb1zW3r.js
|
|
1737
14
|
function observeWebVitals(onVital) {
|
|
1738
15
|
if (typeof window === "undefined" || typeof PerformanceObserver === "undefined") return () => {
|
|
1739
16
|
};
|
|
@@ -1880,11 +157,13 @@ function initAnalytics() {
|
|
|
1880
157
|
var NETWORK_DISCONNECTED_MESSAGE = "Fleet Prime is not connected to the Prime Agent runtime. Start or reconnect the runtime, then try again.";
|
|
1881
158
|
var FLEET_ADAPTER_CAPABILITIES = {
|
|
1882
159
|
protocolVersion: 1,
|
|
1883
|
-
schemaRevision:
|
|
160
|
+
schemaRevision: 4,
|
|
1884
161
|
features: [
|
|
1885
162
|
"reasoning-summary-v1",
|
|
1886
163
|
"mcp-connections-v1",
|
|
1887
|
-
"session-tree-v1"
|
|
164
|
+
"session-tree-v1",
|
|
165
|
+
"composer-intent-v1",
|
|
166
|
+
"composer-completion-v1"
|
|
1888
167
|
]
|
|
1889
168
|
};
|
|
1890
169
|
var ChatModelInfoSchema = external_exports.object({
|
|
@@ -2057,6 +336,67 @@ var ChatCommandsResponseSchema = external_exports.object({
|
|
|
2057
336
|
commands: external_exports.array(ChatSlashCommandInfoSchema),
|
|
2058
337
|
diagnostics: external_exports.array(external_exports.string())
|
|
2059
338
|
}).openapi({ description: "Chat slash commands response" });
|
|
339
|
+
var ComposerCompletionSourceSchema = external_exports.enum(["session", "corpus"]).openapi({ description: "Where a completion came from: this session or another session" });
|
|
340
|
+
external_exports.enum(["append", "replace"]).openapi({ description: "Whether accepting appends the completion or replaces the draft with it" });
|
|
341
|
+
var ComposerCompletionRequestSchema = external_exports.object({
|
|
342
|
+
text: nonEmptyStringSchema.max(2e3),
|
|
343
|
+
/** The session being typed in; its own prompts are preferred over the corpus. */
|
|
344
|
+
sessionId: nonEmptyStringSchema.max(200).optional(),
|
|
345
|
+
projectId: ProjectIdSchema.optional()
|
|
346
|
+
}).openapi({ description: "Composer ghost-text completion request" });
|
|
347
|
+
external_exports.object({
|
|
348
|
+
completion: external_exports.string().min(1).max(2e3).optional(),
|
|
349
|
+
confidence: external_exports.number().min(0).max(1).optional(),
|
|
350
|
+
source: ComposerCompletionSourceSchema.optional()
|
|
351
|
+
}).openapi({ description: "Composer ghost-text completion from history; a verbatim string that always extends the draft, never model prose" });
|
|
352
|
+
var ComposerIntentStatusSchema = external_exports.enum([
|
|
353
|
+
"unconfigured",
|
|
354
|
+
"unverified",
|
|
355
|
+
"ready",
|
|
356
|
+
"error"
|
|
357
|
+
]).openapi({ description: "Coarse readiness of the optional composer intent classifier" });
|
|
358
|
+
var ComposerIntentReasonSchema = external_exports.enum([
|
|
359
|
+
"disabled",
|
|
360
|
+
"not_ready",
|
|
361
|
+
"empty",
|
|
362
|
+
"no_match",
|
|
363
|
+
"code_task",
|
|
364
|
+
"below_floor",
|
|
365
|
+
"unavailable",
|
|
366
|
+
"rate_limited"
|
|
367
|
+
]).openapi({ description: "Why a routing attempt produced no action" });
|
|
368
|
+
var ComposerIntentKeySourceSchema = external_exports.enum([
|
|
369
|
+
"settings",
|
|
370
|
+
"environment",
|
|
371
|
+
"none"
|
|
372
|
+
]).openapi({ description: "Which key the classifier is using; never the key itself" });
|
|
373
|
+
var ComposerIntentDispositionSchema = external_exports.enum(["execute", "suggest"]).openapi({ description: "Whether a matched command may run automatically or is only offered" });
|
|
374
|
+
var ComposerIntentRequestSchema = external_exports.object({
|
|
375
|
+
text: nonEmptyStringSchema.max(2e3),
|
|
376
|
+
projectId: ProjectIdSchema.optional()
|
|
377
|
+
}).openapi({ description: "Composer free-text intent routing request" });
|
|
378
|
+
external_exports.object({
|
|
379
|
+
enabled: external_exports.boolean(),
|
|
380
|
+
outcome: external_exports.enum(["none", "matched"]),
|
|
381
|
+
command: external_exports.string().min(1).max(64).optional(),
|
|
382
|
+
confidence: external_exports.number().min(0).max(1).optional(),
|
|
383
|
+
disposition: ComposerIntentDispositionSchema.optional(),
|
|
384
|
+
reason: ComposerIntentReasonSchema.optional(),
|
|
385
|
+
model: external_exports.string().max(120).optional(),
|
|
386
|
+
latencyMs: external_exports.number().nonnegative().optional()
|
|
387
|
+
}).openapi({ description: "Composer intent routing decision; never carries model prose or error text" });
|
|
388
|
+
external_exports.object({
|
|
389
|
+
/** The user's choice in Settings. Off until they turn it on. */
|
|
390
|
+
enabled: external_exports.boolean(),
|
|
391
|
+
/** Whether a usable key is present. `unverified` until a probe succeeds. */
|
|
392
|
+
status: ComposerIntentStatusSchema,
|
|
393
|
+
keySource: ComposerIntentKeySourceSchema
|
|
394
|
+
}).openapi({ description: "Composer intent routing availability; never reveals the key or a raw error" });
|
|
395
|
+
var ComposerIntentCredentialSchema = external_exports.object({
|
|
396
|
+
/** A key to store, or null to remove the stored one. */
|
|
397
|
+
apiKey: nonEmptyStringSchema.max(400).nullable()
|
|
398
|
+
}).openapi({ description: "Set or clear the stored classifier key; write-only" });
|
|
399
|
+
var ComposerIntentSettingsUpdateSchema = external_exports.object({ enabled: external_exports.boolean() }).openapi({ description: "Enable or disable composer intent routing" });
|
|
2060
400
|
var MCP_SERVER_NAME_PATTERN = /^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$/;
|
|
2061
401
|
var MCP_ENV_NAME_PATTERN = /^[A-Za-z_][A-Za-z0-9_]*$/;
|
|
2062
402
|
var mcpServerNameSchema = external_exports.string().regex(MCP_SERVER_NAME_PATTERN, "MCP server names must be 1-64 letters, numbers, underscores, or hyphens and start with a letter or number.");
|
|
@@ -2250,10 +590,27 @@ var ChatSettingsResponseSchema = external_exports.object({
|
|
|
2250
590
|
resourceReloadRequired: external_exports.boolean()
|
|
2251
591
|
})
|
|
2252
592
|
}).openapi({ description: "Pi settings response" });
|
|
593
|
+
function composerCompletionIgnores(draft) {
|
|
594
|
+
if (draft.trimStart().startsWith("/")) return true;
|
|
595
|
+
return /(?:^|\s)@[^\s@]*$/.test(draft);
|
|
596
|
+
}
|
|
597
|
+
function normalizeCompletionDraft(text) {
|
|
598
|
+
return text.trim().replace(/\s+/g, " ");
|
|
599
|
+
}
|
|
600
|
+
function composerCompletionGhost(draft, completion, mode = "append") {
|
|
601
|
+
if (!completion) return void 0;
|
|
602
|
+
const normalizedCompletion = normalizeCompletionDraft(completion);
|
|
603
|
+
if (mode === "replace") return normalizedCompletion.length > 0 ? normalizedCompletion : void 0;
|
|
604
|
+
const normalizedDraft = normalizeCompletionDraft(draft);
|
|
605
|
+
if (normalizedCompletion.length <= normalizedDraft.length) return void 0;
|
|
606
|
+
if (!normalizedCompletion.toLowerCase().startsWith(normalizedDraft.toLowerCase())) return void 0;
|
|
607
|
+
const suffix = normalizedCompletion.slice(normalizedDraft.length);
|
|
608
|
+
return /\s$/.test(draft) ? suffix.replace(/^\s+/, "") : suffix;
|
|
609
|
+
}
|
|
2253
610
|
|
|
2254
|
-
// node_modules/.pnpm/@tanstack+react-query@5.102.8_react@19.
|
|
611
|
+
// node_modules/.pnpm/@tanstack+react-query@5.102.8_react@19.3.0/node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js
|
|
2255
612
|
import * as React from "react";
|
|
2256
|
-
import { jsx
|
|
613
|
+
import { jsx } from "react/jsx-runtime";
|
|
2257
614
|
var QueryClientContext = React.createContext(void 0);
|
|
2258
615
|
var useQueryClient = (queryClient) => {
|
|
2259
616
|
const client = React.useContext(QueryClientContext);
|
|
@@ -2268,7 +625,7 @@ var QueryClientProvider = ({ client, children }) => {
|
|
|
2268
625
|
client.unmount();
|
|
2269
626
|
};
|
|
2270
627
|
}, [client]);
|
|
2271
|
-
return /* @__PURE__ */
|
|
628
|
+
return /* @__PURE__ */ jsx(QueryClientContext.Provider, {
|
|
2272
629
|
value: client,
|
|
2273
630
|
children
|
|
2274
631
|
});
|
|
@@ -2316,7 +673,7 @@ function systemSetTimeoutZero(callback) {
|
|
|
2316
673
|
|
|
2317
674
|
// node_modules/.pnpm/@tanstack+query-core@5.102.8/node_modules/@tanstack/query-core/build/modern/utils.js
|
|
2318
675
|
var isServer = typeof window === "undefined" || "Deno" in globalThis;
|
|
2319
|
-
function
|
|
676
|
+
function noop() {
|
|
2320
677
|
}
|
|
2321
678
|
function functionalUpdate(updater, input) {
|
|
2322
679
|
return typeof updater === "function" ? updater(input) : updater;
|
|
@@ -2715,7 +1072,7 @@ function createRetryer(config) {
|
|
|
2715
1072
|
promiseResolve = resolve2;
|
|
2716
1073
|
promiseReject = reject2;
|
|
2717
1074
|
});
|
|
2718
|
-
promise.catch(
|
|
1075
|
+
promise.catch(noop);
|
|
2719
1076
|
const isResolved = () => status !== "pending";
|
|
2720
1077
|
const cancel = (cancelOptions) => {
|
|
2721
1078
|
if (!isResolved()) {
|
|
@@ -3151,7 +1508,7 @@ var MutationCache = class extends Subscribable {
|
|
|
3151
1508
|
}
|
|
3152
1509
|
resumePausedMutations() {
|
|
3153
1510
|
const pausedMutations = this.getAll().filter((x) => x.state.isPaused);
|
|
3154
|
-
return notifyManager.batch(() => Promise.all(pausedMutations.map((mutation) => mutation.continue().catch(
|
|
1511
|
+
return notifyManager.batch(() => Promise.all(pausedMutations.map((mutation) => mutation.continue().catch(noop))));
|
|
3155
1512
|
}
|
|
3156
1513
|
};
|
|
3157
1514
|
function scopeFor(mutation) {
|
|
@@ -3307,7 +1664,7 @@ var Query = class extends Removable {
|
|
|
3307
1664
|
cancel(options) {
|
|
3308
1665
|
const promise = this.#retryer?.promise;
|
|
3309
1666
|
this.#retryer?.cancel(options);
|
|
3310
|
-
return promise ? promise.then(
|
|
1667
|
+
return promise ? promise.then(noop).catch(noop) : Promise.resolve();
|
|
3311
1668
|
}
|
|
3312
1669
|
destroy() {
|
|
3313
1670
|
super.destroy();
|
|
@@ -3840,7 +2197,7 @@ var QueryClient = class {
|
|
|
3840
2197
|
...cancelOptions
|
|
3841
2198
|
};
|
|
3842
2199
|
const promises = notifyManager.batch(() => this.#queryCache.findAll(filters).map((query) => query.cancel(defaultedCancelOptions)));
|
|
3843
|
-
return Promise.all(promises).then(
|
|
2200
|
+
return Promise.all(promises).then(noop).catch(noop);
|
|
3844
2201
|
}
|
|
3845
2202
|
invalidateQueries(filters, options = {}) {
|
|
3846
2203
|
return notifyManager.batch(() => {
|
|
@@ -3861,10 +2218,10 @@ var QueryClient = class {
|
|
|
3861
2218
|
};
|
|
3862
2219
|
const promises = notifyManager.batch(() => this.#queryCache.findAll(filters).filter((query) => !query.isDisabled() && !query.isStatic()).map((query) => {
|
|
3863
2220
|
let promise = query.fetch(void 0, fetchOptions);
|
|
3864
|
-
if (!fetchOptions.throwOnError) promise = promise.catch(
|
|
2221
|
+
if (!fetchOptions.throwOnError) promise = promise.catch(noop);
|
|
3865
2222
|
return query.state.fetchStatus === "paused" ? Promise.resolve() : promise;
|
|
3866
2223
|
}));
|
|
3867
|
-
return Promise.all(promises).then(
|
|
2224
|
+
return Promise.all(promises).then(noop);
|
|
3868
2225
|
}
|
|
3869
2226
|
async query(options) {
|
|
3870
2227
|
const defaultedOptions = this.defaultQueryOptions(options);
|
|
@@ -3888,7 +2245,7 @@ var QueryClient = class {
|
|
|
3888
2245
|
* @deprecated Use queryClient.query(options) instead. You can swallow errors with `.catch(noop)`. This method will be removed in the next major version.
|
|
3889
2246
|
*/
|
|
3890
2247
|
prefetchQuery(options) {
|
|
3891
|
-
return this.fetchQuery(options).then(
|
|
2248
|
+
return this.fetchQuery(options).then(noop).catch(noop);
|
|
3892
2249
|
}
|
|
3893
2250
|
infiniteQuery(options) {
|
|
3894
2251
|
options._type = "infinite";
|
|
@@ -3905,7 +2262,7 @@ var QueryClient = class {
|
|
|
3905
2262
|
* @deprecated Use queryClient.infiniteQuery(options) instead. You can swallow errors with `.catch(noop)`. This method will be removed in the next major version.
|
|
3906
2263
|
*/
|
|
3907
2264
|
prefetchInfiniteQuery(options) {
|
|
3908
|
-
return this.fetchInfiniteQuery(options).then(
|
|
2265
|
+
return this.fetchInfiniteQuery(options).then(noop).catch(noop);
|
|
3909
2266
|
}
|
|
3910
2267
|
/**
|
|
3911
2268
|
* @deprecated Use queryClient.infiniteQuery({ ...options, staleTime: 'static' }) instead. This method will be removed in the next major version.
|
|
@@ -4121,7 +2478,7 @@ var QueryObserver = class extends Subscribable {
|
|
|
4121
2478
|
#executeFetch(fetchOptions) {
|
|
4122
2479
|
this.#updateQuery();
|
|
4123
2480
|
let promise = this.#currentQuery.fetch(this.options, fetchOptions);
|
|
4124
|
-
if (!fetchOptions?.throwOnError) promise = promise.catch(
|
|
2481
|
+
if (!fetchOptions?.throwOnError) promise = promise.catch(noop);
|
|
4125
2482
|
return promise;
|
|
4126
2483
|
}
|
|
4127
2484
|
#shouldScheduleTimer(timeout) {
|
|
@@ -4428,15 +2785,15 @@ var MutationObserver = class extends Subscribable {
|
|
|
4428
2785
|
}
|
|
4429
2786
|
};
|
|
4430
2787
|
|
|
4431
|
-
// node_modules/.pnpm/@tanstack+react-query@5.102.8_react@19.
|
|
2788
|
+
// node_modules/.pnpm/@tanstack+react-query@5.102.8_react@19.3.0/node_modules/@tanstack/react-query/build/modern/IsRestoringProvider.js
|
|
4432
2789
|
import * as React2 from "react";
|
|
4433
2790
|
var IsRestoringContext = React2.createContext(false);
|
|
4434
2791
|
var useIsRestoring = () => React2.useContext(IsRestoringContext);
|
|
4435
2792
|
var IsRestoringProvider = IsRestoringContext.Provider;
|
|
4436
2793
|
|
|
4437
|
-
// node_modules/.pnpm/@tanstack+react-query@5.102.8_react@19.
|
|
2794
|
+
// node_modules/.pnpm/@tanstack+react-query@5.102.8_react@19.3.0/node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.js
|
|
4438
2795
|
import * as React3 from "react";
|
|
4439
|
-
import { jsx as
|
|
2796
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
4440
2797
|
function createValue() {
|
|
4441
2798
|
let isReset = false;
|
|
4442
2799
|
return {
|
|
@@ -4454,7 +2811,7 @@ function createValue() {
|
|
|
4454
2811
|
var QueryErrorResetBoundaryContext = React3.createContext(createValue());
|
|
4455
2812
|
var useQueryErrorResetBoundary = () => React3.useContext(QueryErrorResetBoundaryContext);
|
|
4456
2813
|
|
|
4457
|
-
// node_modules/.pnpm/@tanstack+react-query@5.102.8_react@19.
|
|
2814
|
+
// node_modules/.pnpm/@tanstack+react-query@5.102.8_react@19.3.0/node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.js
|
|
4458
2815
|
import * as React4 from "react";
|
|
4459
2816
|
var ensurePreventErrorBoundaryRetry = (options, errorResetBoundary, query) => {
|
|
4460
2817
|
const throwOnError = query?.state.error && typeof options.throwOnError === "function" ? shouldThrowError(options.throwOnError, [query.state.error, query]) : options.throwOnError;
|
|
@@ -4471,13 +2828,13 @@ var getHasError = ({ result, errorResetBoundary, throwOnError, query, suspense }
|
|
|
4471
2828
|
return result.isError && !errorResetBoundary.isReset() && !result.isFetching && query && (suspense && result.data === void 0 || shouldThrowError(throwOnError, [result.error, query]));
|
|
4472
2829
|
};
|
|
4473
2830
|
|
|
4474
|
-
// node_modules/.pnpm/@tanstack+react-query@5.102.8_react@19.
|
|
2831
|
+
// node_modules/.pnpm/@tanstack+react-query@5.102.8_react@19.3.0/node_modules/@tanstack/react-query/build/modern/suspense.js
|
|
4475
2832
|
var ensureSuspenseTimers = (defaultedOptions) => {
|
|
4476
2833
|
if (defaultedOptions.suspense) {
|
|
4477
2834
|
const MIN_SUSPENSE_TIME_MS = 1e3;
|
|
4478
|
-
const
|
|
2835
|
+
const clamp = (value) => value === "static" ? value : Math.max(value ?? MIN_SUSPENSE_TIME_MS, MIN_SUSPENSE_TIME_MS);
|
|
4479
2836
|
const originalStaleTime = defaultedOptions.staleTime;
|
|
4480
|
-
defaultedOptions.staleTime = typeof originalStaleTime === "function" ? (...args) =>
|
|
2837
|
+
defaultedOptions.staleTime = typeof originalStaleTime === "function" ? (...args) => clamp(originalStaleTime(...args)) : clamp(originalStaleTime);
|
|
4481
2838
|
if (typeof defaultedOptions.gcTime === "number") defaultedOptions.gcTime = Math.max(defaultedOptions.gcTime, MIN_SUSPENSE_TIME_MS);
|
|
4482
2839
|
}
|
|
4483
2840
|
};
|
|
@@ -4486,7 +2843,7 @@ var fetchOptimistic = (defaultedOptions, observer, errorResetBoundary) => observ
|
|
|
4486
2843
|
errorResetBoundary.clearReset();
|
|
4487
2844
|
});
|
|
4488
2845
|
|
|
4489
|
-
// node_modules/.pnpm/@tanstack+react-query@5.102.8_react@19.
|
|
2846
|
+
// node_modules/.pnpm/@tanstack+react-query@5.102.8_react@19.3.0/node_modules/@tanstack/react-query/build/modern/useBaseQuery.js
|
|
4490
2847
|
import * as React5 from "react";
|
|
4491
2848
|
function useBaseQuery(options, Observer, queryClient) {
|
|
4492
2849
|
if (process.env.NODE_ENV !== "production") {
|
|
@@ -4509,7 +2866,7 @@ function useBaseQuery(options, Observer, queryClient) {
|
|
|
4509
2866
|
const result = observer.getOptimisticResult(defaultedOptions);
|
|
4510
2867
|
const shouldSubscribe = !isRestoring && subscribed;
|
|
4511
2868
|
React5.useSyncExternalStore(React5.useCallback((onStoreChange) => {
|
|
4512
|
-
const unsubscribe = shouldSubscribe ? observer.subscribe(notifyManager.batchCalls(onStoreChange)) :
|
|
2869
|
+
const unsubscribe = shouldSubscribe ? observer.subscribe(notifyManager.batchCalls(onStoreChange)) : noop;
|
|
4513
2870
|
observer.updateResult();
|
|
4514
2871
|
return unsubscribe;
|
|
4515
2872
|
}, [observer, shouldSubscribe]), () => observer.getCurrentResult(), () => observer.getCurrentResult());
|
|
@@ -4527,12 +2884,12 @@ function useBaseQuery(options, Observer, queryClient) {
|
|
|
4527
2884
|
return !defaultedOptions.notifyOnChangeProps ? observer.trackResult(result) : result;
|
|
4528
2885
|
}
|
|
4529
2886
|
|
|
4530
|
-
// node_modules/.pnpm/@tanstack+react-query@5.102.8_react@19.
|
|
2887
|
+
// node_modules/.pnpm/@tanstack+react-query@5.102.8_react@19.3.0/node_modules/@tanstack/react-query/build/modern/useQuery.js
|
|
4531
2888
|
function useQuery(options, queryClient) {
|
|
4532
2889
|
return useBaseQuery(options, QueryObserver, queryClient);
|
|
4533
2890
|
}
|
|
4534
2891
|
|
|
4535
|
-
// node_modules/.pnpm/@tanstack+react-query@5.102.8_react@19.
|
|
2892
|
+
// node_modules/.pnpm/@tanstack+react-query@5.102.8_react@19.3.0/node_modules/@tanstack/react-query/build/modern/useMutation.js
|
|
4536
2893
|
import * as React6 from "react";
|
|
4537
2894
|
function useMutation(options, queryClient) {
|
|
4538
2895
|
const client = useQueryClient(queryClient);
|
|
@@ -4542,7 +2899,7 @@ function useMutation(options, queryClient) {
|
|
|
4542
2899
|
}, [observer, options]);
|
|
4543
2900
|
const result = React6.useSyncExternalStore(React6.useCallback((onStoreChange) => observer.subscribe(notifyManager.batchCalls(onStoreChange)), [observer]), () => observer.getCurrentResult(), () => observer.getCurrentResult());
|
|
4544
2901
|
const mutate = React6.useCallback((...args) => {
|
|
4545
|
-
observer.mutate(args[0], args[1]).catch(
|
|
2902
|
+
observer.mutate(args[0], args[1]).catch(noop);
|
|
4546
2903
|
}, [observer]);
|
|
4547
2904
|
if (result.error && shouldThrowError(observer.options.throwOnError, [result.error])) throw result.error;
|
|
4548
2905
|
return {
|
|
@@ -4553,40 +2910,6 @@ function useMutation(options, queryClient) {
|
|
|
4553
2910
|
}
|
|
4554
2911
|
|
|
4555
2912
|
export {
|
|
4556
|
-
pipe,
|
|
4557
|
-
progress,
|
|
4558
|
-
reverseEasing,
|
|
4559
|
-
circOut,
|
|
4560
|
-
isEasingArray,
|
|
4561
|
-
createGeneratorEasing,
|
|
4562
|
-
spring,
|
|
4563
|
-
fillOffset,
|
|
4564
|
-
defaultOffset,
|
|
4565
|
-
getValueTransition,
|
|
4566
|
-
animateMotionValue,
|
|
4567
|
-
resolveVariant,
|
|
4568
|
-
isKeyframesTarget,
|
|
4569
|
-
addValueToWillChange,
|
|
4570
|
-
getOptimisedAppearId,
|
|
4571
|
-
animateTarget,
|
|
4572
|
-
resolveElements,
|
|
4573
|
-
isSVGElement,
|
|
4574
|
-
isSVGSVGElement,
|
|
4575
|
-
convertBoundingBoxToBox,
|
|
4576
|
-
convertBoxToBoundingBox,
|
|
4577
|
-
hasScale,
|
|
4578
|
-
hasTransform,
|
|
4579
|
-
has2DTranslate,
|
|
4580
|
-
scalePoint,
|
|
4581
|
-
applyBoxDelta,
|
|
4582
|
-
applyTreeDeltas,
|
|
4583
|
-
translateAxis,
|
|
4584
|
-
transformBox,
|
|
4585
|
-
measurePageBox,
|
|
4586
|
-
HTMLVisualElement,
|
|
4587
|
-
SVGVisualElement,
|
|
4588
|
-
animateSingleValue,
|
|
4589
|
-
MotionConfig,
|
|
4590
2913
|
initAnalytics,
|
|
4591
2914
|
NETWORK_DISCONNECTED_MESSAGE,
|
|
4592
2915
|
FLEET_ADAPTER_CAPABILITIES,
|
|
@@ -4603,6 +2926,10 @@ export {
|
|
|
4603
2926
|
ChatProviderOAuthLoginRequestSchema,
|
|
4604
2927
|
ChatProviderOAuthLoginResponseSchema,
|
|
4605
2928
|
ChatCommandsResponseSchema,
|
|
2929
|
+
ComposerCompletionRequestSchema,
|
|
2930
|
+
ComposerIntentRequestSchema,
|
|
2931
|
+
ComposerIntentCredentialSchema,
|
|
2932
|
+
ComposerIntentSettingsUpdateSchema,
|
|
4606
2933
|
ChatMcpListResponseSchema,
|
|
4607
2934
|
ChatMcpUpsertRequestSchema,
|
|
4608
2935
|
ChatMcpDeleteRequestSchema,
|
|
@@ -4613,6 +2940,9 @@ export {
|
|
|
4613
2940
|
SessionTreeNavigateResponseSchema,
|
|
4614
2941
|
ChatSettingsUpdateRequestSchema,
|
|
4615
2942
|
ChatSettingsResponseSchema,
|
|
2943
|
+
composerCompletionIgnores,
|
|
2944
|
+
normalizeCompletionDraft,
|
|
2945
|
+
composerCompletionGhost,
|
|
4616
2946
|
useQueryClient,
|
|
4617
2947
|
QueryClientProvider,
|
|
4618
2948
|
isServer,
|