@qredence/fleet 0.6.2 → 0.6.4
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 +16 -0
- package/dist/web/client/assets/DialogTitle-BwQ9k-MZ.js +1 -0
- package/dist/web/client/assets/agent-disclosure-YgLa4c2y.js +1 -0
- package/dist/web/client/assets/alert-dialog-BfK7648p.js +1 -0
- 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-DdPlRVuL.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-DSxdh_1v.js +1 -0
- package/dist/web/client/assets/composer-intent-C5pz72T6.js +62 -0
- package/dist/web/client/assets/create-project-dialog-CaXurRpm.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-B9nXTto4.js +1 -0
- 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-CpwEwsxA.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-B-fD_O7k.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-BJIGh8ag.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-CPYj2iaw.js} +1 -1
- package/dist/web/client/assets/{model-selector-list-CRZCXeBf.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-Bkkx5kmA.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-a7UP_MAw.js +1 -0
- package/dist/web/client/assets/{prompt-suggestions-BNyTcyWg.js → prompt-suggestions-ULqmPijZ.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-BqtgZw7Z.js +2 -0
- package/dist/web/client/assets/rotate-ccw-DLkfsmG9.js +1 -0
- package/dist/web/client/assets/routes-C37r2W1K.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-DF3kuF0P.js +1 -0
- package/dist/web/client/assets/settings-dialog-BRWheaBZ.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-C5ukYiUx.js → subagent-chat-panel-B6d4Z3bV.js} +1 -1
- package/dist/web/client/assets/subagent-transcript-CQuPs6N4.js +1 -0
- package/dist/web/client/assets/{subagents-panel-SJKhaVTr.js → subagents-panel-ajf--C_-.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-BcUIpW6Y.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-Cr5Z97oW.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-Bcq088gZ.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-BZR0i182-OLTGGEDQ.js +96 -0
- package/dist/web/server/{artifacts-panel-BN3DgqfV-N73J6N5Y.js → artifacts-panel-BySfu7im-AKBWHYJS.js} +75 -67
- package/dist/web/server/{chat-command-palette-G8awyZRw-2QE7FXGT.js → chat-command-palette-BLGKnp-w-OKFIKD3T.js} +52 -43
- package/dist/web/server/{chunk-6SOMNRAX.js → chunk-22XP6PHK.js} +56 -17
- package/dist/web/server/{chunk-O2UYZT3Z.js → chunk-2GQATGF4.js} +93 -37
- package/dist/web/server/{chunk-EDAWH2MT.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-YMPJMHXZ.js → chunk-3YYNG52U.js} +5774 -4759
- package/dist/web/server/{chunk-NMBH57JT.js → chunk-47TH5VUT.js} +17 -15
- package/dist/web/server/{chunk-CCYLHNZJ.js → chunk-4B2PJSK5.js} +150 -1787
- package/dist/web/server/chunk-4IVORBQD.js +39 -0
- package/dist/web/server/{chunk-CW6KZUKT.js → chunk-4LBXVBM7.js} +5 -5
- package/dist/web/server/{chunk-DKD32TRM.js → chunk-5FIJPXUA.js} +3343 -14
- package/dist/web/server/{chunk-JVOW2NWC.js → chunk-5VPNOUVY.js} +13 -104
- 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-OVJYUWSQ.js → chunk-C2YGLMFE.js} +1 -1
- package/dist/web/server/{chunk-7HXCGBUP.js → chunk-CIE2PLNB.js} +5 -5
- 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-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-NCK2FJAD.js → chunk-FAJILEF2.js} +142 -110
- package/dist/web/server/{chunk-JPDRUSUD.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-43S5N7SH.js → chunk-FVWPODLT.js} +9 -8
- package/dist/web/server/chunk-G3WQTXJY.js +25 -0
- package/dist/web/server/{chunk-ESM7OCRL.js → chunk-GLNLSEZJ.js} +7 -7
- package/dist/web/server/chunk-GNDXVFJY.js +28 -0
- package/dist/web/server/chunk-GR765UTQ.js +102 -0
- 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-I36LJXNY.js +113 -0
- package/dist/web/server/{chunk-ZOVXMNJM.js → chunk-IIPUA4LB.js} +249 -304
- 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-4OTHKQMG.js → chunk-JLGBOCFM.js} +145 -111
- package/dist/web/server/chunk-JVXQQYXB.js +154 -0
- package/dist/web/server/{chunk-FT74GAAH.js → chunk-JZ2WBCIH.js} +674 -669
- package/dist/web/server/chunk-KABZXD6N.js +152 -0
- package/dist/web/server/{chunk-WB2LJC3R.js → chunk-L2SVMQWB.js} +14 -45
- 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-DLA5TLKX.js → chunk-NHZRY22Z.js} +110 -39
- package/dist/web/server/chunk-NZ5YXXQ5.js +39 -0
- package/dist/web/server/chunk-ONWT54IL.js +148 -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-33QA7BQJ.js → chunk-PYTU4DGR.js} +16 -10
- package/dist/web/server/{chunk-7E76R7MB.js → chunk-QHCQDVCQ.js} +1 -2
- package/dist/web/server/{chunk-ENGEUJIH.js → chunk-QN7KFCUW.js} +4321 -3650
- 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-BQROC4PL.js → chunk-TNZKPEE6.js} +13 -7
- package/dist/web/server/chunk-TSOBRZPG.js +41 -0
- package/dist/web/server/{chunk-BUXJSBE3.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-IXGLKAPN.js → chunk-VHLBXWEN.js} +57 -42
- package/dist/web/server/{chunk-OMEDERPG.js → chunk-WU6KNEGU.js} +47 -32
- 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-CigfFgAj-QS27NAJH.js +295 -0
- package/dist/web/server/{fork-picker-dialog-YKlapaxN-DR5L74ST.js → fork-picker-dialog-B5J-S5Nm-QOMVVHI7.js} +11 -10
- 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-RBJUC3AT.js → message-queue-BsrLcNPX-CUCBSF6U.js} +15 -14
- package/dist/web/server/{model-selector-list-BmzLiCx9-TK6JGGKU.js → model-selector-list-Csw4nOra-IOMN5JMO.js} +23 -22
- package/dist/web/server/openui-renderer-TbIFXEW2-BET2OXM2.js +39 -0
- package/dist/web/server/{prompt-suggestions-yPZqX__K-3VGJC4IF.js → prompt-suggestions-D6RXFQF4-7WHYRNMN.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-CPdFlpbe-LAD4MNZB.js → router-RPObiwZR-AFMFSYSZ.js} +2852 -186
- package/dist/web/server/{routes-hkom6S6L-DUPPQHPY.js → routes-Dn-deuPY-MDXEQXRU.js} +2219 -2435
- 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-WaHHv775-HRUHFSFO.js +229 -0
- package/dist/web/server/{settings-dialog-BCEfmgtP-T3WQEZHB.js → settings-dialog-CzeangBl-YKL7CLPF.js} +565 -388
- package/dist/web/server/{start-DVUbMfrb-ELVIFRUY.js → start-QK6aG02q-RXFV6K5L.js} +1 -1
- package/dist/web/server/{subagent-chat-panel-BTwI1kdB-LKBWA4GD.js → subagent-chat-panel-Fa31QewE-YDPOKN74.js} +49 -46
- package/dist/web/server/{subagents-panel-8Z9_csoV-HYMEEBHB.js → subagents-panel-DjOcQxp4-GZYOZOYC.js} +46 -44
- package/dist/web/server/tool-timeline-CfuizRid-L3Y3OSCH.js +15 -0
- package/dist/web/server/{workspace-panel-BHEB9nRM-TS62SYBA.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-DmQghvw8.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-C24kD2SP.js +0 -52
- package/dist/web/client/assets/chat-command-palette-BIwjhE6s.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-BUvM92nt.js +0 -1
- package/dist/web/client/assets/command-Dv96gATQ.js +0 -1
- package/dist/web/client/assets/createLucideIcon-_dfI7Arx.js +0 -1
- package/dist/web/client/assets/dialog-BCb4rQh0.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/globals-DCtBkCSD.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-BGnQeUYE.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-C0XBIasJ.js +0 -1
- package/dist/web/client/assets/provider-label-Cka0ep0S.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-BCW7fQTG.js +0 -2
- package/dist/web/client/assets/rotate-ccw-CfGhzOv7.js +0 -1
- package/dist/web/client/assets/routes-BWe5Iz-2.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-3E3cv8D0.js +0 -1395
- package/dist/web/client/assets/settings-dialog-B8lHq2tT.js +0 -2
- package/dist/web/client/assets/sparkles-D8XIY8pN.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-lqNcSVbH.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-BgUgX6tM.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-BDPifIFN-DTSNCHBX.js +0 -91
- 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-GS2IZGRC.js +0 -19
- 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-OOXWPL22.js +0 -22
- package/dist/web/server/chunk-OSMP55KI.js +0 -94
- 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-moJGf0LA-QCU3PI6H.js +0 -38
- package/dist/web/server/session-tool-renderer-CglQ2ky7-2JVYNZG2.js +0 -45
- package/dist/web/server/tool-timeline-QL9k5dzA-RLU26HXT.js +0 -16
|
@@ -1,1738 +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,
|
|
6
|
+
SessionIdSchema,
|
|
69
7
|
external_exports,
|
|
70
8
|
nonEmptyStringSchema,
|
|
71
9
|
nonNegativeIntSchema,
|
|
72
10
|
positiveIntSchema
|
|
73
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-3YYNG52U.js";
|
|
74
12
|
|
|
75
|
-
// web/app/dist/server/assets/
|
|
76
|
-
import { useContext, useMemo } from "react";
|
|
77
|
-
import { jsx } from "react/jsx-runtime";
|
|
78
|
-
var pipe = (...transformers) => transformers.reduce((a, b) => (v) => b(a(v)));
|
|
79
|
-
var progress = /* @__NO_SIDE_EFFECTS__ */ (from, to, value) => {
|
|
80
|
-
const range = to - from;
|
|
81
|
-
return range ? (value - from) / range : 1;
|
|
82
|
-
};
|
|
83
|
-
var calcBezier = (t, a1, a2) => (((1 - 3 * a2 + 3 * a1) * t + (3 * a2 - 6 * a1)) * t + 3 * a1) * t;
|
|
84
|
-
var subdivisionPrecision = 1e-7;
|
|
85
|
-
var subdivisionMaxIterations = 12;
|
|
86
|
-
function binarySubdivide(x, lowerBound, upperBound, mX1, mX2) {
|
|
87
|
-
let currentX;
|
|
88
|
-
let currentT;
|
|
89
|
-
let i = 0;
|
|
90
|
-
do {
|
|
91
|
-
currentT = lowerBound + (upperBound - lowerBound) / 2;
|
|
92
|
-
currentX = calcBezier(currentT, mX1, mX2) - x;
|
|
93
|
-
if (currentX > 0) upperBound = currentT;
|
|
94
|
-
else lowerBound = currentT;
|
|
95
|
-
} while (Math.abs(currentX) > subdivisionPrecision && ++i < subdivisionMaxIterations);
|
|
96
|
-
return currentT;
|
|
97
|
-
}
|
|
98
|
-
// @__NO_SIDE_EFFECTS__
|
|
99
|
-
function cubicBezier(mX1, mY1, mX2, mY2) {
|
|
100
|
-
if (mX1 === mY1 && mX2 === mY2) return noop;
|
|
101
|
-
const getTForX = (aX) => binarySubdivide(aX, 0, 1, mX1, mX2);
|
|
102
|
-
return (t) => t === 0 || t === 1 ? t : calcBezier(getTForX(t), mY1, mY2);
|
|
103
|
-
}
|
|
104
|
-
var mirrorEasing = /* @__NO_SIDE_EFFECTS__ */ (easing) => (p) => p <= 0.5 ? easing(2 * p) / 2 : (2 - easing(2 * (1 - p))) / 2;
|
|
105
|
-
var reverseEasing = /* @__NO_SIDE_EFFECTS__ */ (easing) => (p) => 1 - easing(1 - p);
|
|
106
|
-
var backOut = /* @__PURE__ */ cubicBezier(0.33, 1.53, 0.69, 0.99);
|
|
107
|
-
var backIn = /* @__PURE__ */ reverseEasing(backOut);
|
|
108
|
-
var backInOut = /* @__PURE__ */ mirrorEasing(backIn);
|
|
109
|
-
var anticipate = (p) => p >= 1 ? 1 : (p *= 2) < 1 ? 0.5 * backIn(p) : 0.5 * (2 - Math.pow(2, -10 * (p - 1)));
|
|
110
|
-
var circIn = (p) => 1 - Math.sin(Math.acos(p));
|
|
111
|
-
var circOut = /* @__PURE__ */ reverseEasing(circIn);
|
|
112
|
-
var circInOut = /* @__PURE__ */ mirrorEasing(circIn);
|
|
113
|
-
var easeIn = /* @__PURE__ */ cubicBezier(0.42, 0, 1, 1);
|
|
114
|
-
var easeOut = /* @__PURE__ */ cubicBezier(0, 0, 0.58, 1);
|
|
115
|
-
var easeInOut = /* @__PURE__ */ cubicBezier(0.42, 0, 0.58, 1);
|
|
116
|
-
var isEasingArray = /* @__NO_SIDE_EFFECTS__ */ (ease2) => {
|
|
117
|
-
return Array.isArray(ease2) && typeof ease2[0] !== "number";
|
|
118
|
-
};
|
|
119
|
-
var easingLookup = {
|
|
120
|
-
linear: noop,
|
|
121
|
-
easeIn,
|
|
122
|
-
easeInOut,
|
|
123
|
-
easeOut,
|
|
124
|
-
circIn,
|
|
125
|
-
circInOut,
|
|
126
|
-
circOut,
|
|
127
|
-
backIn,
|
|
128
|
-
backInOut,
|
|
129
|
-
backOut,
|
|
130
|
-
anticipate
|
|
131
|
-
};
|
|
132
|
-
var isValidEasing = (easing) => {
|
|
133
|
-
return typeof easing === "string";
|
|
134
|
-
};
|
|
135
|
-
var easingDefinitionToFunction = (definition) => {
|
|
136
|
-
if (isBezierDefinition(definition)) {
|
|
137
|
-
invariant(definition.length === 4, `Cubic bezier arrays must contain four numerical values.`, "cubic-bezier-length");
|
|
138
|
-
const [x1, y1, x2, y2] = definition;
|
|
139
|
-
return /* @__PURE__ */ cubicBezier(x1, y1, x2, y2);
|
|
140
|
-
} else if (isValidEasing(definition)) {
|
|
141
|
-
invariant(easingLookup[definition] !== void 0, `Invalid easing type '${definition}'`, "invalid-easing-type");
|
|
142
|
-
return easingLookup[definition];
|
|
143
|
-
}
|
|
144
|
-
return definition;
|
|
145
|
-
};
|
|
146
|
-
function hueToRgb(p, q, t) {
|
|
147
|
-
if (t < 0) t += 1;
|
|
148
|
-
if (t > 1) t -= 1;
|
|
149
|
-
if (t < 1 / 6) return p + (q - p) * 6 * t;
|
|
150
|
-
if (t < 1 / 2) return q;
|
|
151
|
-
if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;
|
|
152
|
-
return p;
|
|
153
|
-
}
|
|
154
|
-
function hslaToRgba({ hue, saturation, lightness, alpha }) {
|
|
155
|
-
hue /= 360;
|
|
156
|
-
saturation /= 100;
|
|
157
|
-
lightness /= 100;
|
|
158
|
-
let red = 0;
|
|
159
|
-
let green = 0;
|
|
160
|
-
let blue = 0;
|
|
161
|
-
if (!saturation) red = green = blue = lightness;
|
|
162
|
-
else {
|
|
163
|
-
const q = lightness < 0.5 ? lightness * (1 + saturation) : lightness + saturation - lightness * saturation;
|
|
164
|
-
const p = 2 * lightness - q;
|
|
165
|
-
red = hueToRgb(p, q, hue + 1 / 3);
|
|
166
|
-
green = hueToRgb(p, q, hue);
|
|
167
|
-
blue = hueToRgb(p, q, hue - 1 / 3);
|
|
168
|
-
}
|
|
169
|
-
return {
|
|
170
|
-
red: Math.round(red * 255),
|
|
171
|
-
green: Math.round(green * 255),
|
|
172
|
-
blue: Math.round(blue * 255),
|
|
173
|
-
alpha
|
|
174
|
-
};
|
|
175
|
-
}
|
|
176
|
-
function mixImmediate(a, b) {
|
|
177
|
-
return (p) => p > 0 ? b : a;
|
|
178
|
-
}
|
|
179
|
-
var mixLinearColor = (from, to, v) => {
|
|
180
|
-
const fromExpo = from * from;
|
|
181
|
-
const expo = v * (to * to - fromExpo) + fromExpo;
|
|
182
|
-
return expo < 0 ? 0 : Math.sqrt(expo);
|
|
183
|
-
};
|
|
184
|
-
var colorTypes = [
|
|
185
|
-
hex,
|
|
186
|
-
rgba,
|
|
187
|
-
hsla
|
|
188
|
-
];
|
|
189
|
-
var getColorType = (v) => colorTypes.find((type) => type.test(v));
|
|
190
|
-
function asRGBA(color2) {
|
|
191
|
-
const type = getColorType(color2);
|
|
192
|
-
warning(Boolean(type), `'${color2}' is not an animatable color. Use the equivalent color code instead.`, "color-not-animatable");
|
|
193
|
-
if (!Boolean(type)) return false;
|
|
194
|
-
let model = type.parse(color2);
|
|
195
|
-
if (type === hsla) model = hslaToRgba(model);
|
|
196
|
-
return model;
|
|
197
|
-
}
|
|
198
|
-
var mixColor = (from, to) => {
|
|
199
|
-
const fromRGBA = asRGBA(from);
|
|
200
|
-
const toRGBA = asRGBA(to);
|
|
201
|
-
if (!fromRGBA || !toRGBA) return mixImmediate(from, to);
|
|
202
|
-
const blended = { ...fromRGBA };
|
|
203
|
-
return (v) => {
|
|
204
|
-
blended.red = mixLinearColor(fromRGBA.red, toRGBA.red, v);
|
|
205
|
-
blended.green = mixLinearColor(fromRGBA.green, toRGBA.green, v);
|
|
206
|
-
blended.blue = mixLinearColor(fromRGBA.blue, toRGBA.blue, v);
|
|
207
|
-
blended.alpha = mixNumber(fromRGBA.alpha, toRGBA.alpha, v);
|
|
208
|
-
return rgba.transform(blended);
|
|
209
|
-
};
|
|
210
|
-
};
|
|
211
|
-
var invisibleValues = /* @__PURE__ */ new Set(["none", "hidden"]);
|
|
212
|
-
function mixVisibility(origin, target) {
|
|
213
|
-
if (invisibleValues.has(origin)) return (p) => p <= 0 ? origin : target;
|
|
214
|
-
else return (p) => p >= 1 ? target : origin;
|
|
215
|
-
}
|
|
216
|
-
function mixNumber2(a, b) {
|
|
217
|
-
return (p) => mixNumber(a, b, p);
|
|
218
|
-
}
|
|
219
|
-
function getMixer(a) {
|
|
220
|
-
if (typeof a === "number") return mixNumber2;
|
|
221
|
-
else if (typeof a === "string") return isCSSVariableToken(a) ? mixImmediate : color.test(a) ? mixColor : mixComplex;
|
|
222
|
-
else if (Array.isArray(a)) return mixArray;
|
|
223
|
-
else if (typeof a === "object") return color.test(a) ? mixColor : mixObject;
|
|
224
|
-
return mixImmediate;
|
|
225
|
-
}
|
|
226
|
-
function mixArray(a, b) {
|
|
227
|
-
const output = [...a];
|
|
228
|
-
const numValues = output.length;
|
|
229
|
-
const blendValue = a.map((v, i) => getMixer(v)(v, b[i]));
|
|
230
|
-
return (p) => {
|
|
231
|
-
for (let i = 0; i < numValues; i++) output[i] = blendValue[i](p);
|
|
232
|
-
return output;
|
|
233
|
-
};
|
|
234
|
-
}
|
|
235
|
-
function mixObject(a, b) {
|
|
236
|
-
const output = {
|
|
237
|
-
...a,
|
|
238
|
-
...b
|
|
239
|
-
};
|
|
240
|
-
const blendValue = {};
|
|
241
|
-
for (const key in output) if (a[key] !== void 0 && b[key] !== void 0) blendValue[key] = getMixer(a[key])(a[key], b[key]);
|
|
242
|
-
return (v) => {
|
|
243
|
-
for (const key in blendValue) output[key] = blendValue[key](v);
|
|
244
|
-
return output;
|
|
245
|
-
};
|
|
246
|
-
}
|
|
247
|
-
function matchOrder(origin, target) {
|
|
248
|
-
const orderedOrigin = [];
|
|
249
|
-
const pointers = {
|
|
250
|
-
color: 0,
|
|
251
|
-
var: 0,
|
|
252
|
-
number: 0
|
|
253
|
-
};
|
|
254
|
-
for (let i = 0; i < target.values.length; i++) {
|
|
255
|
-
const type = target.types[i];
|
|
256
|
-
const originIndex = origin.indexes[type][pointers[type]];
|
|
257
|
-
const originValue = origin.values[originIndex] ?? 0;
|
|
258
|
-
orderedOrigin[i] = originValue;
|
|
259
|
-
pointers[type]++;
|
|
260
|
-
}
|
|
261
|
-
return orderedOrigin;
|
|
262
|
-
}
|
|
263
|
-
var mixComplex = (origin, target) => {
|
|
264
|
-
const template = complex.createTransformer(target);
|
|
265
|
-
const originStats = analyseComplexValue(origin);
|
|
266
|
-
const targetStats = analyseComplexValue(target);
|
|
267
|
-
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) {
|
|
268
|
-
if (invisibleValues.has(origin) && !targetStats.values.length || invisibleValues.has(target) && !originStats.values.length) return mixVisibility(origin, target);
|
|
269
|
-
return pipe(mixArray(matchOrder(originStats, targetStats), targetStats.values), template);
|
|
270
|
-
} else {
|
|
271
|
-
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");
|
|
272
|
-
return mixImmediate(origin, target);
|
|
273
|
-
}
|
|
274
|
-
};
|
|
275
|
-
function mix(from, to, p) {
|
|
276
|
-
if (typeof from === "number" && typeof to === "number" && typeof p === "number") return mixNumber(from, to, p);
|
|
277
|
-
return getMixer(from)(from, to);
|
|
278
|
-
}
|
|
279
|
-
var frameloopDriver = (update) => {
|
|
280
|
-
const passTimestamp = ({ timestamp }) => update(timestamp);
|
|
281
|
-
return {
|
|
282
|
-
start: (keepAlive = true) => frame.update(passTimestamp, keepAlive),
|
|
283
|
-
stop: () => cancelFrame(passTimestamp),
|
|
284
|
-
/**
|
|
285
|
-
* If we're processing this frame we can use the
|
|
286
|
-
* framelocked timestamp to keep things in sync.
|
|
287
|
-
*/
|
|
288
|
-
now: () => frameData.isProcessing ? frameData.timestamp : time.now()
|
|
289
|
-
};
|
|
290
|
-
};
|
|
291
|
-
var maxGeneratorDuration = 2e4;
|
|
292
|
-
function calcGeneratorDuration(generator) {
|
|
293
|
-
let duration = 0;
|
|
294
|
-
const timeStep = 50;
|
|
295
|
-
let state = generator.next(duration);
|
|
296
|
-
while (!state.done && duration < 2e4) {
|
|
297
|
-
duration += timeStep;
|
|
298
|
-
state = generator.next(duration);
|
|
299
|
-
}
|
|
300
|
-
return duration >= 2e4 ? Infinity : duration;
|
|
301
|
-
}
|
|
302
|
-
function createGeneratorEasing(options, scale = 100, createGenerator) {
|
|
303
|
-
const generator = createGenerator({
|
|
304
|
-
...options,
|
|
305
|
-
keyframes: [0, scale]
|
|
306
|
-
});
|
|
307
|
-
const duration = Math.min(calcGeneratorDuration(generator), maxGeneratorDuration);
|
|
308
|
-
return {
|
|
309
|
-
type: "keyframes",
|
|
310
|
-
ease: (progress2) => {
|
|
311
|
-
return generator.next(duration * progress2).value / scale;
|
|
312
|
-
},
|
|
313
|
-
duration: millisecondsToSeconds(duration)
|
|
314
|
-
};
|
|
315
|
-
}
|
|
316
|
-
var springDefaults = {
|
|
317
|
-
stiffness: 100,
|
|
318
|
-
damping: 10,
|
|
319
|
-
mass: 1,
|
|
320
|
-
velocity: 0,
|
|
321
|
-
duration: 800,
|
|
322
|
-
bounce: 0.3,
|
|
323
|
-
visualDuration: 0.3,
|
|
324
|
-
restSpeed: {
|
|
325
|
-
granular: 0.01,
|
|
326
|
-
default: 2
|
|
327
|
-
},
|
|
328
|
-
restDelta: {
|
|
329
|
-
granular: 5e-3,
|
|
330
|
-
default: 0.5
|
|
331
|
-
},
|
|
332
|
-
minDuration: 0.01,
|
|
333
|
-
maxDuration: 10,
|
|
334
|
-
minDamping: 0.05,
|
|
335
|
-
maxDamping: 1
|
|
336
|
-
};
|
|
337
|
-
function calcAngularFreq(undampedFreq, dampingRatio) {
|
|
338
|
-
return undampedFreq * Math.sqrt(1 - dampingRatio * dampingRatio);
|
|
339
|
-
}
|
|
340
|
-
var rootIterations = 12;
|
|
341
|
-
function approximateRoot(envelope, derivative, initialGuess) {
|
|
342
|
-
let result = initialGuess;
|
|
343
|
-
for (let i = 1; i < rootIterations; i++) result = result - envelope(result) / derivative(result);
|
|
344
|
-
return result;
|
|
345
|
-
}
|
|
346
|
-
var safeMin = 1e-3;
|
|
347
|
-
function findSpring({ duration = springDefaults.duration, bounce = springDefaults.bounce, velocity = springDefaults.velocity, mass = springDefaults.mass }) {
|
|
348
|
-
let envelope;
|
|
349
|
-
let derivative;
|
|
350
|
-
warning(duration <= secondsToMilliseconds(springDefaults.maxDuration), "Spring duration must be 10 seconds or less", "spring-duration-limit");
|
|
351
|
-
let dampingRatio = 1 - bounce;
|
|
352
|
-
dampingRatio = clamp(springDefaults.minDamping, springDefaults.maxDamping, dampingRatio);
|
|
353
|
-
duration = clamp(springDefaults.minDuration, springDefaults.maxDuration, millisecondsToSeconds(duration));
|
|
354
|
-
if (dampingRatio < 1) {
|
|
355
|
-
envelope = (undampedFreq2) => {
|
|
356
|
-
const exponentialDecay = undampedFreq2 * dampingRatio;
|
|
357
|
-
const delta = exponentialDecay * duration;
|
|
358
|
-
const a = exponentialDecay - velocity;
|
|
359
|
-
const b = calcAngularFreq(undampedFreq2, dampingRatio);
|
|
360
|
-
const c = Math.exp(-delta);
|
|
361
|
-
return safeMin - a / b * c;
|
|
362
|
-
};
|
|
363
|
-
derivative = (undampedFreq2) => {
|
|
364
|
-
const delta = undampedFreq2 * dampingRatio * duration;
|
|
365
|
-
const d = delta * velocity + velocity;
|
|
366
|
-
const e = Math.pow(dampingRatio, 2) * Math.pow(undampedFreq2, 2) * duration;
|
|
367
|
-
const f = Math.exp(-delta);
|
|
368
|
-
const g = calcAngularFreq(Math.pow(undampedFreq2, 2), dampingRatio);
|
|
369
|
-
return (-envelope(undampedFreq2) + safeMin > 0 ? -1 : 1) * ((d - e) * f) / g;
|
|
370
|
-
};
|
|
371
|
-
} else {
|
|
372
|
-
envelope = (undampedFreq2) => {
|
|
373
|
-
return -1e-3 + Math.exp(-undampedFreq2 * duration) * ((undampedFreq2 - velocity) * duration + 1);
|
|
374
|
-
};
|
|
375
|
-
derivative = (undampedFreq2) => {
|
|
376
|
-
return Math.exp(-undampedFreq2 * duration) * ((velocity - undampedFreq2) * (duration * duration));
|
|
377
|
-
};
|
|
378
|
-
}
|
|
379
|
-
const initialGuess = 5 / duration;
|
|
380
|
-
const undampedFreq = approximateRoot(envelope, derivative, initialGuess);
|
|
381
|
-
duration = secondsToMilliseconds(duration);
|
|
382
|
-
if (isNaN(undampedFreq)) return {
|
|
383
|
-
stiffness: springDefaults.stiffness,
|
|
384
|
-
damping: springDefaults.damping,
|
|
385
|
-
duration
|
|
386
|
-
};
|
|
387
|
-
else {
|
|
388
|
-
const stiffness = Math.pow(undampedFreq, 2) * mass;
|
|
389
|
-
return {
|
|
390
|
-
stiffness,
|
|
391
|
-
damping: dampingRatio * 2 * Math.sqrt(mass * stiffness),
|
|
392
|
-
duration
|
|
393
|
-
};
|
|
394
|
-
}
|
|
395
|
-
}
|
|
396
|
-
var durationKeys = ["duration", "bounce"];
|
|
397
|
-
var physicsKeys = [
|
|
398
|
-
"stiffness",
|
|
399
|
-
"damping",
|
|
400
|
-
"mass"
|
|
401
|
-
];
|
|
402
|
-
function isSpringType(options, keys) {
|
|
403
|
-
return keys.some((key) => options[key] !== void 0);
|
|
404
|
-
}
|
|
405
|
-
function getSpringOptions(options) {
|
|
406
|
-
let springOptions = {
|
|
407
|
-
velocity: springDefaults.velocity,
|
|
408
|
-
stiffness: springDefaults.stiffness,
|
|
409
|
-
damping: springDefaults.damping,
|
|
410
|
-
mass: springDefaults.mass,
|
|
411
|
-
isResolvedFromDuration: false,
|
|
412
|
-
...options
|
|
413
|
-
};
|
|
414
|
-
if (!isSpringType(options, physicsKeys) && isSpringType(options, durationKeys)) {
|
|
415
|
-
springOptions.velocity = 0;
|
|
416
|
-
if (options.visualDuration) {
|
|
417
|
-
const visualDuration = options.visualDuration;
|
|
418
|
-
const root = 2 * Math.PI / (visualDuration * 1.2);
|
|
419
|
-
const stiffness = root * root;
|
|
420
|
-
const damping = 2 * clamp(0.05, 1, 1 - (options.bounce || 0)) * Math.sqrt(stiffness);
|
|
421
|
-
springOptions = {
|
|
422
|
-
...springOptions,
|
|
423
|
-
mass: springDefaults.mass,
|
|
424
|
-
stiffness,
|
|
425
|
-
damping
|
|
426
|
-
};
|
|
427
|
-
} else {
|
|
428
|
-
const derived = findSpring({
|
|
429
|
-
...options,
|
|
430
|
-
velocity: 0
|
|
431
|
-
});
|
|
432
|
-
springOptions = {
|
|
433
|
-
...springOptions,
|
|
434
|
-
...derived,
|
|
435
|
-
mass: springDefaults.mass
|
|
436
|
-
};
|
|
437
|
-
springOptions.isResolvedFromDuration = true;
|
|
438
|
-
}
|
|
439
|
-
}
|
|
440
|
-
return springOptions;
|
|
441
|
-
}
|
|
442
|
-
function spring(optionsOrVisualDuration = springDefaults.visualDuration, bounce = springDefaults.bounce) {
|
|
443
|
-
const options = typeof optionsOrVisualDuration !== "object" ? {
|
|
444
|
-
visualDuration: optionsOrVisualDuration,
|
|
445
|
-
keyframes: [0, 1],
|
|
446
|
-
bounce
|
|
447
|
-
} : optionsOrVisualDuration;
|
|
448
|
-
let { restSpeed, restDelta } = options;
|
|
449
|
-
const origin = options.keyframes[0];
|
|
450
|
-
const target = options.keyframes[options.keyframes.length - 1];
|
|
451
|
-
const state = {
|
|
452
|
-
done: false,
|
|
453
|
-
value: origin
|
|
454
|
-
};
|
|
455
|
-
const { stiffness, damping, mass, duration, velocity, isResolvedFromDuration } = getSpringOptions({
|
|
456
|
-
...options,
|
|
457
|
-
velocity: -millisecondsToSeconds(options.velocity || 0)
|
|
458
|
-
});
|
|
459
|
-
const initialVelocity = velocity || 0;
|
|
460
|
-
const dampingRatio = damping / (2 * Math.sqrt(stiffness * mass));
|
|
461
|
-
const initialDelta = target - origin;
|
|
462
|
-
const undampedAngularFreq = millisecondsToSeconds(Math.sqrt(stiffness / mass));
|
|
463
|
-
const isGranularScale = Math.abs(initialDelta) < 5;
|
|
464
|
-
restSpeed || (restSpeed = isGranularScale ? springDefaults.restSpeed.granular : springDefaults.restSpeed.default);
|
|
465
|
-
restDelta || (restDelta = isGranularScale ? springDefaults.restDelta.granular : springDefaults.restDelta.default);
|
|
466
|
-
let resolveSpring;
|
|
467
|
-
let resolveVelocity;
|
|
468
|
-
let angularFreq;
|
|
469
|
-
let A;
|
|
470
|
-
let sinCoeff;
|
|
471
|
-
let cosCoeff;
|
|
472
|
-
if (dampingRatio < 1) {
|
|
473
|
-
angularFreq = calcAngularFreq(undampedAngularFreq, dampingRatio);
|
|
474
|
-
A = (initialVelocity + dampingRatio * undampedAngularFreq * initialDelta) / angularFreq;
|
|
475
|
-
resolveSpring = (t) => {
|
|
476
|
-
const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);
|
|
477
|
-
return target - envelope * (A * Math.sin(angularFreq * t) + initialDelta * Math.cos(angularFreq * t));
|
|
478
|
-
};
|
|
479
|
-
sinCoeff = dampingRatio * undampedAngularFreq * A + initialDelta * angularFreq;
|
|
480
|
-
cosCoeff = dampingRatio * undampedAngularFreq * initialDelta - A * angularFreq;
|
|
481
|
-
resolveVelocity = (t) => {
|
|
482
|
-
return Math.exp(-dampingRatio * undampedAngularFreq * t) * (sinCoeff * Math.sin(angularFreq * t) + cosCoeff * Math.cos(angularFreq * t));
|
|
483
|
-
};
|
|
484
|
-
} else if (dampingRatio === 1) {
|
|
485
|
-
resolveSpring = (t) => target - Math.exp(-undampedAngularFreq * t) * (initialDelta + (initialVelocity + undampedAngularFreq * initialDelta) * t);
|
|
486
|
-
const C = initialVelocity + undampedAngularFreq * initialDelta;
|
|
487
|
-
resolveVelocity = (t) => Math.exp(-undampedAngularFreq * t) * (undampedAngularFreq * C * t - initialVelocity);
|
|
488
|
-
} else {
|
|
489
|
-
const dampedAngularFreq = undampedAngularFreq * Math.sqrt(dampingRatio * dampingRatio - 1);
|
|
490
|
-
resolveSpring = (t) => {
|
|
491
|
-
const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);
|
|
492
|
-
const freqForT = Math.min(dampedAngularFreq * t, 300);
|
|
493
|
-
return target - envelope * ((initialVelocity + dampingRatio * undampedAngularFreq * initialDelta) * Math.sinh(freqForT) + dampedAngularFreq * initialDelta * Math.cosh(freqForT)) / dampedAngularFreq;
|
|
494
|
-
};
|
|
495
|
-
const P = (initialVelocity + dampingRatio * undampedAngularFreq * initialDelta) / dampedAngularFreq;
|
|
496
|
-
const sinhCoeff = dampingRatio * undampedAngularFreq * P - initialDelta * dampedAngularFreq;
|
|
497
|
-
const coshCoeff = dampingRatio * undampedAngularFreq * initialDelta - P * dampedAngularFreq;
|
|
498
|
-
resolveVelocity = (t) => {
|
|
499
|
-
const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);
|
|
500
|
-
const freqForT = Math.min(dampedAngularFreq * t, 300);
|
|
501
|
-
return envelope * (sinhCoeff * Math.sinh(freqForT) + coshCoeff * Math.cosh(freqForT));
|
|
502
|
-
};
|
|
503
|
-
}
|
|
504
|
-
const generator = {
|
|
505
|
-
calculatedDuration: isResolvedFromDuration ? duration || null : null,
|
|
506
|
-
velocity: (t) => secondsToMilliseconds(resolveVelocity(t)),
|
|
507
|
-
next: (t) => {
|
|
508
|
-
if (!isResolvedFromDuration && dampingRatio < 1) {
|
|
509
|
-
const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);
|
|
510
|
-
const sin = Math.sin(angularFreq * t);
|
|
511
|
-
const cos = Math.cos(angularFreq * t);
|
|
512
|
-
const current2 = target - envelope * (A * sin + initialDelta * cos);
|
|
513
|
-
const currentVelocity = secondsToMilliseconds(envelope * (sinCoeff * sin + cosCoeff * cos));
|
|
514
|
-
state.done = Math.abs(currentVelocity) <= restSpeed && Math.abs(target - current2) <= restDelta;
|
|
515
|
-
state.value = state.done ? target : current2;
|
|
516
|
-
return state;
|
|
517
|
-
}
|
|
518
|
-
const current = resolveSpring(t);
|
|
519
|
-
if (!isResolvedFromDuration) {
|
|
520
|
-
const currentVelocity = secondsToMilliseconds(resolveVelocity(t));
|
|
521
|
-
state.done = Math.abs(currentVelocity) <= restSpeed && Math.abs(target - current) <= restDelta;
|
|
522
|
-
} else state.done = t >= duration;
|
|
523
|
-
state.value = state.done ? target : current;
|
|
524
|
-
return state;
|
|
525
|
-
},
|
|
526
|
-
toString: () => {
|
|
527
|
-
const calculatedDuration = Math.min(calcGeneratorDuration(generator), maxGeneratorDuration);
|
|
528
|
-
const easing = generateLinearEasing((progress2) => generator.next(calculatedDuration * progress2).value, calculatedDuration, 30);
|
|
529
|
-
return calculatedDuration + "ms " + easing;
|
|
530
|
-
},
|
|
531
|
-
toTransition: () => {
|
|
532
|
-
}
|
|
533
|
-
};
|
|
534
|
-
return generator;
|
|
535
|
-
}
|
|
536
|
-
spring.applyToOptions = (options) => {
|
|
537
|
-
const generatorOptions = createGeneratorEasing(options, 100, spring);
|
|
538
|
-
options.ease = generatorOptions.ease;
|
|
539
|
-
options.duration = secondsToMilliseconds(generatorOptions.duration);
|
|
540
|
-
options.type = "keyframes";
|
|
541
|
-
return options;
|
|
542
|
-
};
|
|
543
|
-
var velocitySampleDuration = 5;
|
|
544
|
-
function getGeneratorVelocity(resolveValue, t, current) {
|
|
545
|
-
const prevT = Math.max(t - velocitySampleDuration, 0);
|
|
546
|
-
return velocityPerSecond(current - resolveValue(prevT), t - prevT);
|
|
547
|
-
}
|
|
548
|
-
function inertia({ keyframes: keyframes2, velocity = 0, power = 0.8, timeConstant = 325, bounceDamping = 10, bounceStiffness = 500, modifyTarget, min, max, restDelta = 0.5, restSpeed }) {
|
|
549
|
-
const origin = keyframes2[0];
|
|
550
|
-
const state = {
|
|
551
|
-
done: false,
|
|
552
|
-
value: origin
|
|
553
|
-
};
|
|
554
|
-
const isOutOfBounds = (v) => min !== void 0 && v < min || max !== void 0 && v > max;
|
|
555
|
-
const nearestBoundary = (v) => {
|
|
556
|
-
if (min === void 0) return max;
|
|
557
|
-
if (max === void 0) return min;
|
|
558
|
-
return Math.abs(min - v) < Math.abs(max - v) ? min : max;
|
|
559
|
-
};
|
|
560
|
-
let amplitude = power * velocity;
|
|
561
|
-
const ideal = origin + amplitude;
|
|
562
|
-
const target = modifyTarget === void 0 ? ideal : modifyTarget(ideal);
|
|
563
|
-
if (target !== ideal) amplitude = target - origin;
|
|
564
|
-
const calcDelta = (t) => -amplitude * Math.exp(-t / timeConstant);
|
|
565
|
-
const calcLatest = (t) => target + calcDelta(t);
|
|
566
|
-
const applyFriction = (t) => {
|
|
567
|
-
const delta = calcDelta(t);
|
|
568
|
-
const latest = calcLatest(t);
|
|
569
|
-
state.done = Math.abs(delta) <= restDelta;
|
|
570
|
-
state.value = state.done ? target : latest;
|
|
571
|
-
};
|
|
572
|
-
let timeReachedBoundary;
|
|
573
|
-
let spring$1;
|
|
574
|
-
const checkCatchBoundary = (t) => {
|
|
575
|
-
if (!isOutOfBounds(state.value)) return;
|
|
576
|
-
timeReachedBoundary = t;
|
|
577
|
-
spring$1 = spring({
|
|
578
|
-
keyframes: [state.value, nearestBoundary(state.value)],
|
|
579
|
-
velocity: getGeneratorVelocity(calcLatest, t, state.value),
|
|
580
|
-
damping: bounceDamping,
|
|
581
|
-
stiffness: bounceStiffness,
|
|
582
|
-
restDelta,
|
|
583
|
-
restSpeed
|
|
584
|
-
});
|
|
585
|
-
};
|
|
586
|
-
checkCatchBoundary(0);
|
|
587
|
-
return {
|
|
588
|
-
calculatedDuration: null,
|
|
589
|
-
next: (t) => {
|
|
590
|
-
let hasUpdatedFrame = false;
|
|
591
|
-
if (!spring$1 && timeReachedBoundary === void 0) {
|
|
592
|
-
hasUpdatedFrame = true;
|
|
593
|
-
applyFriction(t);
|
|
594
|
-
checkCatchBoundary(t);
|
|
595
|
-
}
|
|
596
|
-
if (timeReachedBoundary !== void 0 && t >= timeReachedBoundary) return spring$1.next(t - timeReachedBoundary);
|
|
597
|
-
else {
|
|
598
|
-
!hasUpdatedFrame && applyFriction(t);
|
|
599
|
-
return state;
|
|
600
|
-
}
|
|
601
|
-
}
|
|
602
|
-
};
|
|
603
|
-
}
|
|
604
|
-
function createMixers(output, ease2, customMixer) {
|
|
605
|
-
const mixers = [];
|
|
606
|
-
const mixerFactory = customMixer || MotionGlobalConfig.mix || mix;
|
|
607
|
-
const numMixers = output.length - 1;
|
|
608
|
-
for (let i = 0; i < numMixers; i++) {
|
|
609
|
-
let mixer = mixerFactory(output[i], output[i + 1]);
|
|
610
|
-
if (ease2) mixer = pipe(Array.isArray(ease2) ? ease2[i] || noop : ease2, mixer);
|
|
611
|
-
mixers.push(mixer);
|
|
612
|
-
}
|
|
613
|
-
return mixers;
|
|
614
|
-
}
|
|
615
|
-
function interpolate(input, output, { clamp: isClamp = true, ease: ease2, mixer } = {}) {
|
|
616
|
-
const inputLength = input.length;
|
|
617
|
-
invariant(inputLength === output.length, "Both input and output ranges must be the same length", "range-length");
|
|
618
|
-
if (inputLength === 1) return () => output[0];
|
|
619
|
-
if (inputLength === 2 && output[0] === output[1]) return () => output[1];
|
|
620
|
-
const isZeroDeltaRange = input[0] === input[1];
|
|
621
|
-
if (input[0] > input[inputLength - 1]) {
|
|
622
|
-
input = [...input].reverse();
|
|
623
|
-
output = [...output].reverse();
|
|
624
|
-
}
|
|
625
|
-
const mixers = createMixers(output, ease2, mixer);
|
|
626
|
-
const numMixers = mixers.length;
|
|
627
|
-
const interpolator = (v) => {
|
|
628
|
-
if (isZeroDeltaRange && v < input[0]) return output[0];
|
|
629
|
-
let i = 0;
|
|
630
|
-
if (numMixers > 1) {
|
|
631
|
-
for (; i < input.length - 2; i++) if (v < input[i + 1]) break;
|
|
632
|
-
}
|
|
633
|
-
const progressInRange = /* @__PURE__ */ progress(input[i], input[i + 1], v);
|
|
634
|
-
return mixers[i](progressInRange);
|
|
635
|
-
};
|
|
636
|
-
return isClamp ? (v) => interpolator(clamp(input[0], input[inputLength - 1], v)) : interpolator;
|
|
637
|
-
}
|
|
638
|
-
function fillOffset(offset, remaining) {
|
|
639
|
-
const min = offset[offset.length - 1];
|
|
640
|
-
for (let i = 1; i <= remaining; i++) {
|
|
641
|
-
const offsetProgress = /* @__PURE__ */ progress(0, remaining, i);
|
|
642
|
-
offset.push(mixNumber(min, 1, offsetProgress));
|
|
643
|
-
}
|
|
644
|
-
}
|
|
645
|
-
function defaultOffset(arr) {
|
|
646
|
-
const offset = [0];
|
|
647
|
-
fillOffset(offset, arr.length - 1);
|
|
648
|
-
return offset;
|
|
649
|
-
}
|
|
650
|
-
function convertOffsetToTimes(offset, duration) {
|
|
651
|
-
return offset.map((o) => o * duration);
|
|
652
|
-
}
|
|
653
|
-
function defaultEasing(values, easing) {
|
|
654
|
-
return values.map(() => easing || easeInOut).splice(0, values.length - 1);
|
|
655
|
-
}
|
|
656
|
-
function keyframes({ duration = 300, keyframes: keyframeValues, times, ease: ease2 = "easeInOut" }) {
|
|
657
|
-
const easingFunctions = /* @__PURE__ */ isEasingArray(ease2) ? ease2.map(easingDefinitionToFunction) : easingDefinitionToFunction(ease2);
|
|
658
|
-
const state = {
|
|
659
|
-
done: false,
|
|
660
|
-
value: keyframeValues[0]
|
|
661
|
-
};
|
|
662
|
-
const mapTimeToKeyframe = interpolate(convertOffsetToTimes(times && times.length === keyframeValues.length ? times : defaultOffset(keyframeValues), duration), keyframeValues, { ease: Array.isArray(easingFunctions) ? easingFunctions : defaultEasing(keyframeValues, easingFunctions) });
|
|
663
|
-
return {
|
|
664
|
-
calculatedDuration: duration,
|
|
665
|
-
next: (t) => {
|
|
666
|
-
state.value = mapTimeToKeyframe(t);
|
|
667
|
-
state.done = t >= duration;
|
|
668
|
-
return state;
|
|
669
|
-
}
|
|
670
|
-
};
|
|
671
|
-
}
|
|
672
|
-
var transitionTypeMap = {
|
|
673
|
-
decay: inertia,
|
|
674
|
-
inertia,
|
|
675
|
-
tween: keyframes,
|
|
676
|
-
keyframes,
|
|
677
|
-
spring
|
|
678
|
-
};
|
|
679
|
-
function replaceTransitionType(transition) {
|
|
680
|
-
if (typeof transition.type === "string") transition.type = transitionTypeMap[transition.type];
|
|
681
|
-
}
|
|
682
|
-
var percentToProgress = (percent) => percent / 100;
|
|
683
|
-
var JSAnimation = class extends WithPromise {
|
|
684
|
-
constructor(options) {
|
|
685
|
-
super();
|
|
686
|
-
this.state = "idle";
|
|
687
|
-
this.startTime = null;
|
|
688
|
-
this.isStopped = false;
|
|
689
|
-
this.currentTime = 0;
|
|
690
|
-
this.holdTime = null;
|
|
691
|
-
this.playbackSpeed = 1;
|
|
692
|
-
this.delayState = {
|
|
693
|
-
done: false,
|
|
694
|
-
value: void 0
|
|
695
|
-
};
|
|
696
|
-
this.stop = () => {
|
|
697
|
-
const { motionValue: motionValue2 } = this.options;
|
|
698
|
-
if (motionValue2 && motionValue2.updatedAt !== time.now()) this.tick(time.now());
|
|
699
|
-
this.isStopped = true;
|
|
700
|
-
if (this.state === "idle") return;
|
|
701
|
-
this.teardown();
|
|
702
|
-
this.options.onStop?.();
|
|
703
|
-
};
|
|
704
|
-
this.options = options;
|
|
705
|
-
this.initAnimation();
|
|
706
|
-
this.play();
|
|
707
|
-
if (options.autoplay === false) this.pause();
|
|
708
|
-
}
|
|
709
|
-
initAnimation() {
|
|
710
|
-
const { options } = this;
|
|
711
|
-
replaceTransitionType(options);
|
|
712
|
-
const { type = keyframes, repeat = 0, repeatDelay = 0, repeatType, velocity = 0 } = options;
|
|
713
|
-
let { keyframes: keyframes$1 } = options;
|
|
714
|
-
const generatorFactory = type || keyframes;
|
|
715
|
-
if (generatorFactory !== keyframes && typeof keyframes$1[0] !== "number") {
|
|
716
|
-
this.mixKeyframes = pipe(percentToProgress, mix(keyframes$1[0], keyframes$1[1]));
|
|
717
|
-
keyframes$1 = [0, 100];
|
|
718
|
-
}
|
|
719
|
-
const generator = generatorFactory({
|
|
720
|
-
...options,
|
|
721
|
-
keyframes: keyframes$1
|
|
722
|
-
});
|
|
723
|
-
if (repeatType === "mirror") this.mirroredGenerator = generatorFactory({
|
|
724
|
-
...options,
|
|
725
|
-
keyframes: [...keyframes$1].reverse(),
|
|
726
|
-
velocity: -velocity
|
|
727
|
-
});
|
|
728
|
-
if (generator.calculatedDuration === null) generator.calculatedDuration = calcGeneratorDuration(generator);
|
|
729
|
-
const { calculatedDuration } = generator;
|
|
730
|
-
this.calculatedDuration = calculatedDuration;
|
|
731
|
-
this.resolvedDuration = calculatedDuration + repeatDelay;
|
|
732
|
-
this.totalDuration = this.resolvedDuration * (repeat + 1) - repeatDelay;
|
|
733
|
-
this.generator = generator;
|
|
734
|
-
}
|
|
735
|
-
updateTime(timestamp) {
|
|
736
|
-
const animationTime = Math.round(timestamp - this.startTime) * this.playbackSpeed;
|
|
737
|
-
if (this.holdTime !== null) this.currentTime = this.holdTime;
|
|
738
|
-
else this.currentTime = animationTime;
|
|
739
|
-
}
|
|
740
|
-
tick(timestamp, sample = false) {
|
|
741
|
-
const { generator, totalDuration, mixKeyframes, mirroredGenerator, resolvedDuration, calculatedDuration } = this;
|
|
742
|
-
if (this.startTime === null) return generator.next(0);
|
|
743
|
-
const { delay = 0, keyframes: keyframes2, repeat, repeatType, repeatDelay, type, onUpdate, finalKeyframe } = this.options;
|
|
744
|
-
if (this.speed > 0) this.startTime = Math.min(this.startTime, timestamp);
|
|
745
|
-
else if (this.speed < 0) this.startTime = Math.min(timestamp - totalDuration / this.speed, this.startTime);
|
|
746
|
-
if (sample) this.currentTime = timestamp;
|
|
747
|
-
else this.updateTime(timestamp);
|
|
748
|
-
const timeWithoutDelay = this.currentTime - delay * (this.playbackSpeed >= 0 ? 1 : -1);
|
|
749
|
-
const isInDelayPhase = this.playbackSpeed >= 0 ? timeWithoutDelay < 0 : timeWithoutDelay > totalDuration;
|
|
750
|
-
this.currentTime = Math.max(timeWithoutDelay, 0);
|
|
751
|
-
if (this.state === "finished" && this.holdTime === null) this.currentTime = totalDuration;
|
|
752
|
-
let elapsed = this.currentTime;
|
|
753
|
-
let frameGenerator = generator;
|
|
754
|
-
if (repeat) {
|
|
755
|
-
const progress2 = Math.min(this.currentTime, totalDuration) / resolvedDuration;
|
|
756
|
-
let currentIteration = Math.floor(progress2);
|
|
757
|
-
let iterationProgress = progress2 % 1;
|
|
758
|
-
if (!iterationProgress && progress2 >= 1) iterationProgress = 1;
|
|
759
|
-
iterationProgress === 1 && currentIteration--;
|
|
760
|
-
currentIteration = Math.min(currentIteration, repeat + 1);
|
|
761
|
-
if (Boolean(currentIteration % 2)) {
|
|
762
|
-
if (repeatType === "reverse") {
|
|
763
|
-
iterationProgress = 1 - iterationProgress;
|
|
764
|
-
if (repeatDelay) iterationProgress -= repeatDelay / resolvedDuration;
|
|
765
|
-
} else if (repeatType === "mirror") frameGenerator = mirroredGenerator;
|
|
766
|
-
}
|
|
767
|
-
elapsed = clamp(0, 1, iterationProgress) * resolvedDuration;
|
|
768
|
-
}
|
|
769
|
-
let state;
|
|
770
|
-
if (isInDelayPhase) {
|
|
771
|
-
this.delayState.value = keyframes2[0];
|
|
772
|
-
state = this.delayState;
|
|
773
|
-
} else state = frameGenerator.next(elapsed);
|
|
774
|
-
if (mixKeyframes && !isInDelayPhase) state.value = mixKeyframes(state.value);
|
|
775
|
-
let { done } = state;
|
|
776
|
-
if (!isInDelayPhase && calculatedDuration !== null) done = this.playbackSpeed >= 0 ? this.currentTime >= totalDuration : this.currentTime <= 0;
|
|
777
|
-
const isAnimationFinished = this.holdTime === null && (this.state === "finished" || this.state === "running" && done);
|
|
778
|
-
if (isAnimationFinished && type !== inertia) state.value = getFinalKeyframe(keyframes2, this.options, finalKeyframe, this.speed);
|
|
779
|
-
if (onUpdate) onUpdate(state.value);
|
|
780
|
-
if (isAnimationFinished) this.finish();
|
|
781
|
-
return state;
|
|
782
|
-
}
|
|
783
|
-
/**
|
|
784
|
-
* Allows the returned animation to be awaited or promise-chained. Currently
|
|
785
|
-
* resolves when the animation finishes at all but in a future update could/should
|
|
786
|
-
* reject if its cancels.
|
|
787
|
-
*/
|
|
788
|
-
then(resolve, reject) {
|
|
789
|
-
return this.finished.then(resolve, reject);
|
|
790
|
-
}
|
|
791
|
-
get duration() {
|
|
792
|
-
return millisecondsToSeconds(this.calculatedDuration);
|
|
793
|
-
}
|
|
794
|
-
get iterationDuration() {
|
|
795
|
-
const { delay = 0 } = this.options || {};
|
|
796
|
-
return this.duration + millisecondsToSeconds(delay);
|
|
797
|
-
}
|
|
798
|
-
get time() {
|
|
799
|
-
return millisecondsToSeconds(this.currentTime);
|
|
800
|
-
}
|
|
801
|
-
set time(newTime) {
|
|
802
|
-
newTime = secondsToMilliseconds(newTime);
|
|
803
|
-
this.currentTime = newTime;
|
|
804
|
-
if (this.startTime === null || this.holdTime !== null || this.playbackSpeed === 0) this.holdTime = newTime;
|
|
805
|
-
else if (this.driver) this.startTime = this.driver.now() - newTime / this.playbackSpeed;
|
|
806
|
-
if (this.driver) this.driver.start(false);
|
|
807
|
-
else {
|
|
808
|
-
this.startTime = 0;
|
|
809
|
-
this.state = "paused";
|
|
810
|
-
this.holdTime = newTime;
|
|
811
|
-
this.tick(newTime);
|
|
812
|
-
}
|
|
813
|
-
}
|
|
814
|
-
/**
|
|
815
|
-
* Returns the generator's velocity at the current time in units/second.
|
|
816
|
-
* Uses the analytical derivative when available (springs), avoiding
|
|
817
|
-
* the MotionValue's frame-dependent velocity estimation.
|
|
818
|
-
*/
|
|
819
|
-
getGeneratorVelocity() {
|
|
820
|
-
const t = this.currentTime;
|
|
821
|
-
if (t <= 0) return this.options.velocity || 0;
|
|
822
|
-
if (this.generator.velocity) return this.generator.velocity(t);
|
|
823
|
-
const current = this.generator.next(t).value;
|
|
824
|
-
return getGeneratorVelocity((s) => this.generator.next(s).value, t, current);
|
|
825
|
-
}
|
|
826
|
-
get speed() {
|
|
827
|
-
return this.playbackSpeed;
|
|
828
|
-
}
|
|
829
|
-
set speed(newSpeed) {
|
|
830
|
-
const hasChanged = this.playbackSpeed !== newSpeed;
|
|
831
|
-
if (hasChanged && this.driver) this.updateTime(time.now());
|
|
832
|
-
this.playbackSpeed = newSpeed;
|
|
833
|
-
if (hasChanged && this.driver) this.time = millisecondsToSeconds(this.currentTime);
|
|
834
|
-
}
|
|
835
|
-
play() {
|
|
836
|
-
if (this.isStopped) return;
|
|
837
|
-
const { driver = frameloopDriver, startTime } = this.options;
|
|
838
|
-
if (!this.driver) this.driver = driver((timestamp) => this.tick(timestamp));
|
|
839
|
-
this.options.onPlay?.();
|
|
840
|
-
const now = this.driver.now();
|
|
841
|
-
if (this.state === "finished") {
|
|
842
|
-
this.updateFinished();
|
|
843
|
-
this.startTime = now;
|
|
844
|
-
} else if (this.holdTime !== null) this.startTime = now - this.holdTime;
|
|
845
|
-
else if (!this.startTime) this.startTime = startTime ?? now;
|
|
846
|
-
if (this.state === "finished" && this.speed < 0) this.startTime += this.calculatedDuration;
|
|
847
|
-
this.holdTime = null;
|
|
848
|
-
this.state = "running";
|
|
849
|
-
this.driver.start();
|
|
850
|
-
}
|
|
851
|
-
pause() {
|
|
852
|
-
this.state = "paused";
|
|
853
|
-
this.updateTime(time.now());
|
|
854
|
-
this.holdTime = this.currentTime;
|
|
855
|
-
}
|
|
856
|
-
complete() {
|
|
857
|
-
if (this.state !== "running") this.play();
|
|
858
|
-
this.state = "finished";
|
|
859
|
-
this.holdTime = null;
|
|
860
|
-
}
|
|
861
|
-
finish() {
|
|
862
|
-
this.notifyFinished();
|
|
863
|
-
this.teardown();
|
|
864
|
-
this.state = "finished";
|
|
865
|
-
this.options.onComplete?.();
|
|
866
|
-
}
|
|
867
|
-
cancel() {
|
|
868
|
-
this.holdTime = null;
|
|
869
|
-
this.startTime = 0;
|
|
870
|
-
this.tick(0);
|
|
871
|
-
this.teardown();
|
|
872
|
-
this.options.onCancel?.();
|
|
873
|
-
}
|
|
874
|
-
teardown() {
|
|
875
|
-
this.state = "idle";
|
|
876
|
-
this.stopDriver();
|
|
877
|
-
this.startTime = this.holdTime = null;
|
|
878
|
-
}
|
|
879
|
-
stopDriver() {
|
|
880
|
-
if (!this.driver) return;
|
|
881
|
-
this.driver.stop();
|
|
882
|
-
this.driver = void 0;
|
|
883
|
-
}
|
|
884
|
-
sample(sampleTime) {
|
|
885
|
-
this.startTime = 0;
|
|
886
|
-
return this.tick(sampleTime, true);
|
|
887
|
-
}
|
|
888
|
-
attachTimeline(timeline) {
|
|
889
|
-
if (this.options.allowFlatten) {
|
|
890
|
-
this.options.type = "keyframes";
|
|
891
|
-
this.options.ease = "linear";
|
|
892
|
-
this.initAnimation();
|
|
893
|
-
}
|
|
894
|
-
this.driver?.stop();
|
|
895
|
-
return timeline.observe(this);
|
|
896
|
-
}
|
|
897
|
-
};
|
|
898
|
-
var unsupportedEasingFunctions = {
|
|
899
|
-
anticipate,
|
|
900
|
-
backInOut,
|
|
901
|
-
circInOut
|
|
902
|
-
};
|
|
903
|
-
function isUnsupportedEase(key) {
|
|
904
|
-
return key in unsupportedEasingFunctions;
|
|
905
|
-
}
|
|
906
|
-
function replaceStringEasing(transition) {
|
|
907
|
-
if (typeof transition.ease === "string" && isUnsupportedEase(transition.ease)) transition.ease = unsupportedEasingFunctions[transition.ease];
|
|
908
|
-
}
|
|
909
|
-
var sampleDelta = 10;
|
|
910
|
-
var NativeAnimationExtended = class extends NativeAnimation {
|
|
911
|
-
constructor(options) {
|
|
912
|
-
replaceStringEasing(options);
|
|
913
|
-
replaceTransitionType(options);
|
|
914
|
-
super(options);
|
|
915
|
-
if (options.startTime !== void 0 && options.autoplay !== false) this.startTime = options.startTime;
|
|
916
|
-
this.options = options;
|
|
917
|
-
}
|
|
918
|
-
/**
|
|
919
|
-
* WAAPI doesn't natively have any interruption capabilities.
|
|
920
|
-
*
|
|
921
|
-
* Rather than read committed styles back out of the DOM, we can
|
|
922
|
-
* create a renderless JS animation and sample it twice to calculate
|
|
923
|
-
* its current value, "previous" value, and therefore allow
|
|
924
|
-
* Motion to calculate velocity for any subsequent animation.
|
|
925
|
-
*/
|
|
926
|
-
updateMotionValue(value) {
|
|
927
|
-
const { motionValue: motionValue2, onUpdate, onComplete, element, ...options } = this.options;
|
|
928
|
-
if (!motionValue2) return;
|
|
929
|
-
if (value !== void 0) {
|
|
930
|
-
motionValue2.set(value);
|
|
931
|
-
return;
|
|
932
|
-
}
|
|
933
|
-
const sampleAnimation = new JSAnimation({
|
|
934
|
-
...options,
|
|
935
|
-
autoplay: false
|
|
936
|
-
});
|
|
937
|
-
const sampleTime = Math.max(sampleDelta, time.now() - this.startTime);
|
|
938
|
-
const delta = clamp(0, sampleDelta, sampleTime - sampleDelta);
|
|
939
|
-
const current = sampleAnimation.sample(sampleTime).value;
|
|
940
|
-
const { name } = this.options;
|
|
941
|
-
if (element && name) setStyle(element, name, current);
|
|
942
|
-
motionValue2.setWithVelocity(sampleAnimation.sample(Math.max(0, sampleTime - delta)).value, current, delta);
|
|
943
|
-
sampleAnimation.stop();
|
|
944
|
-
}
|
|
945
|
-
};
|
|
946
|
-
var isAnimatable = (value, name) => {
|
|
947
|
-
if (name === "zIndex") return false;
|
|
948
|
-
if (typeof value === "number" || Array.isArray(value)) return true;
|
|
949
|
-
if (typeof value === "string" && (complex.test(value) || value === "0") && !value.startsWith("url(")) return true;
|
|
950
|
-
return false;
|
|
951
|
-
};
|
|
952
|
-
function hasKeyframesChanged(keyframes2) {
|
|
953
|
-
const current = keyframes2[0];
|
|
954
|
-
if (keyframes2.length === 1) return true;
|
|
955
|
-
for (let i = 0; i < keyframes2.length; i++) if (keyframes2[i] !== current) return true;
|
|
956
|
-
}
|
|
957
|
-
function canAnimate(keyframes2, name, type, velocity) {
|
|
958
|
-
const originKeyframe = keyframes2[0];
|
|
959
|
-
if (originKeyframe === null) return false;
|
|
960
|
-
if (name === "display" || name === "visibility") return true;
|
|
961
|
-
const targetKeyframe = keyframes2[keyframes2.length - 1];
|
|
962
|
-
const isOriginAnimatable = isAnimatable(originKeyframe, name);
|
|
963
|
-
const isTargetAnimatable = isAnimatable(targetKeyframe, name);
|
|
964
|
-
warning(isOriginAnimatable === isTargetAnimatable, `You are trying to animate ${name} from "${originKeyframe}" to "${targetKeyframe}". "${isOriginAnimatable ? targetKeyframe : originKeyframe}" is not an animatable value.`, "value-not-animatable");
|
|
965
|
-
if (!isOriginAnimatable || !isTargetAnimatable) return false;
|
|
966
|
-
return hasKeyframesChanged(keyframes2) || (type === "spring" || isGenerator(type)) && velocity;
|
|
967
|
-
}
|
|
968
|
-
function makeAnimationInstant(options) {
|
|
969
|
-
options.duration = 0;
|
|
970
|
-
options.type = "keyframes";
|
|
971
|
-
}
|
|
972
|
-
var browserColorFunctions = /^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;
|
|
973
|
-
function hasBrowserOnlyColors(keyframes2) {
|
|
974
|
-
for (let i = 0; i < keyframes2.length; i++) if (typeof keyframes2[i] === "string" && browserColorFunctions.test(keyframes2[i])) return true;
|
|
975
|
-
return false;
|
|
976
|
-
}
|
|
977
|
-
var colorProperties = /* @__PURE__ */ new Set([
|
|
978
|
-
"color",
|
|
979
|
-
"backgroundColor",
|
|
980
|
-
"outlineColor",
|
|
981
|
-
"fill",
|
|
982
|
-
"stroke",
|
|
983
|
-
"borderColor",
|
|
984
|
-
"borderTopColor",
|
|
985
|
-
"borderRightColor",
|
|
986
|
-
"borderBottomColor",
|
|
987
|
-
"borderLeftColor"
|
|
988
|
-
]);
|
|
989
|
-
var supportsWaapi = /* @__PURE__ */ memo$1(() => Object.hasOwnProperty.call(Element.prototype, "animate"));
|
|
990
|
-
function supportsBrowserAnimation(options) {
|
|
991
|
-
const { motionValue: motionValue2, name, repeatDelay, repeatType, damping, type, keyframes: keyframes2 } = options;
|
|
992
|
-
const subject = motionValue2?.owner?.current;
|
|
993
|
-
if (!(subject instanceof HTMLElement) && !(subject instanceof SVGElement)) return false;
|
|
994
|
-
const { onUpdate, transformTemplate } = motionValue2.owner.getProps();
|
|
995
|
-
return supportsWaapi() && name && (acceleratedValues.has(name) || colorProperties.has(name) && hasBrowserOnlyColors(keyframes2)) && (name !== "transform" || !transformTemplate) && !onUpdate && !repeatDelay && repeatType !== "mirror" && damping !== 0 && type !== "inertia";
|
|
996
|
-
}
|
|
997
|
-
var MAX_RESOLVE_DELAY = 40;
|
|
998
|
-
var AsyncMotionValueAnimation = class extends WithPromise {
|
|
999
|
-
constructor({ autoplay = true, delay = 0, type = "keyframes", repeat = 0, repeatDelay = 0, repeatType = "loop", keyframes: keyframes2, name, motionValue: motionValue2, element, ...options }) {
|
|
1000
|
-
super();
|
|
1001
|
-
this.stop = () => {
|
|
1002
|
-
if (this._animation) {
|
|
1003
|
-
this._animation.stop();
|
|
1004
|
-
this.stopTimeline?.();
|
|
1005
|
-
}
|
|
1006
|
-
this.keyframeResolver?.cancel();
|
|
1007
|
-
};
|
|
1008
|
-
this.createdAt = time.now();
|
|
1009
|
-
const optionsWithDefaults = {
|
|
1010
|
-
autoplay,
|
|
1011
|
-
delay,
|
|
1012
|
-
type,
|
|
1013
|
-
repeat,
|
|
1014
|
-
repeatDelay,
|
|
1015
|
-
repeatType,
|
|
1016
|
-
name,
|
|
1017
|
-
motionValue: motionValue2,
|
|
1018
|
-
element,
|
|
1019
|
-
...options
|
|
1020
|
-
};
|
|
1021
|
-
const KeyframeResolver$1 = element?.KeyframeResolver || KeyframeResolver;
|
|
1022
|
-
this.keyframeResolver = new KeyframeResolver$1(keyframes2, (resolvedKeyframes, finalKeyframe, forced) => this.onKeyframesResolved(resolvedKeyframes, finalKeyframe, optionsWithDefaults, !forced), name, motionValue2, element);
|
|
1023
|
-
this.keyframeResolver?.scheduleResolve();
|
|
1024
|
-
}
|
|
1025
|
-
onKeyframesResolved(keyframes2, finalKeyframe, options, sync) {
|
|
1026
|
-
this.keyframeResolver = void 0;
|
|
1027
|
-
const { name, type, velocity, delay, isHandoff, onUpdate } = options;
|
|
1028
|
-
this.resolvedAt = time.now();
|
|
1029
|
-
let canAnimateValue = true;
|
|
1030
|
-
if (!canAnimate(keyframes2, name, type, velocity)) {
|
|
1031
|
-
canAnimateValue = false;
|
|
1032
|
-
if (MotionGlobalConfig.instantAnimations || !delay) onUpdate?.(getFinalKeyframe(keyframes2, options, finalKeyframe));
|
|
1033
|
-
keyframes2[0] = keyframes2[keyframes2.length - 1];
|
|
1034
|
-
makeAnimationInstant(options);
|
|
1035
|
-
options.repeat = 0;
|
|
1036
|
-
}
|
|
1037
|
-
const resolvedOptions = {
|
|
1038
|
-
startTime: sync ? !this.resolvedAt ? this.createdAt : this.resolvedAt - this.createdAt > MAX_RESOLVE_DELAY ? this.resolvedAt : this.createdAt : void 0,
|
|
1039
|
-
finalKeyframe,
|
|
1040
|
-
...options,
|
|
1041
|
-
keyframes: keyframes2
|
|
1042
|
-
};
|
|
1043
|
-
const useWaapi = canAnimateValue && !isHandoff && supportsBrowserAnimation(resolvedOptions);
|
|
1044
|
-
const element = resolvedOptions.motionValue?.owner?.current;
|
|
1045
|
-
let animation;
|
|
1046
|
-
if (useWaapi) try {
|
|
1047
|
-
animation = new NativeAnimationExtended({
|
|
1048
|
-
...resolvedOptions,
|
|
1049
|
-
element
|
|
1050
|
-
});
|
|
1051
|
-
} catch {
|
|
1052
|
-
animation = new JSAnimation(resolvedOptions);
|
|
1053
|
-
}
|
|
1054
|
-
else animation = new JSAnimation(resolvedOptions);
|
|
1055
|
-
animation.finished.then(() => {
|
|
1056
|
-
this.notifyFinished();
|
|
1057
|
-
}).catch(noop);
|
|
1058
|
-
if (this.pendingTimeline) {
|
|
1059
|
-
this.stopTimeline = animation.attachTimeline(this.pendingTimeline);
|
|
1060
|
-
this.pendingTimeline = void 0;
|
|
1061
|
-
}
|
|
1062
|
-
this._animation = animation;
|
|
1063
|
-
}
|
|
1064
|
-
get finished() {
|
|
1065
|
-
if (!this._animation) return this._finished;
|
|
1066
|
-
else return this.animation.finished;
|
|
1067
|
-
}
|
|
1068
|
-
then(onResolve, _onReject) {
|
|
1069
|
-
return this.finished.finally(onResolve).then(() => {
|
|
1070
|
-
});
|
|
1071
|
-
}
|
|
1072
|
-
get animation() {
|
|
1073
|
-
if (!this._animation) {
|
|
1074
|
-
this.keyframeResolver?.resume();
|
|
1075
|
-
flushKeyframeResolvers();
|
|
1076
|
-
}
|
|
1077
|
-
return this._animation;
|
|
1078
|
-
}
|
|
1079
|
-
get duration() {
|
|
1080
|
-
return this.animation.duration;
|
|
1081
|
-
}
|
|
1082
|
-
get iterationDuration() {
|
|
1083
|
-
return this.animation.iterationDuration;
|
|
1084
|
-
}
|
|
1085
|
-
get time() {
|
|
1086
|
-
return this.animation.time;
|
|
1087
|
-
}
|
|
1088
|
-
set time(newTime) {
|
|
1089
|
-
this.animation.time = newTime;
|
|
1090
|
-
}
|
|
1091
|
-
get speed() {
|
|
1092
|
-
return this.animation.speed;
|
|
1093
|
-
}
|
|
1094
|
-
get state() {
|
|
1095
|
-
return this.animation.state;
|
|
1096
|
-
}
|
|
1097
|
-
set speed(newSpeed) {
|
|
1098
|
-
this.animation.speed = newSpeed;
|
|
1099
|
-
}
|
|
1100
|
-
get startTime() {
|
|
1101
|
-
return this.animation.startTime;
|
|
1102
|
-
}
|
|
1103
|
-
attachTimeline(timeline) {
|
|
1104
|
-
if (this._animation) this.stopTimeline = this.animation.attachTimeline(timeline);
|
|
1105
|
-
else this.pendingTimeline = timeline;
|
|
1106
|
-
return () => this.stop();
|
|
1107
|
-
}
|
|
1108
|
-
play() {
|
|
1109
|
-
this.animation.play();
|
|
1110
|
-
}
|
|
1111
|
-
pause() {
|
|
1112
|
-
this.animation.pause();
|
|
1113
|
-
}
|
|
1114
|
-
complete() {
|
|
1115
|
-
this.animation.complete();
|
|
1116
|
-
}
|
|
1117
|
-
cancel() {
|
|
1118
|
-
if (this._animation) this.animation.cancel();
|
|
1119
|
-
this.keyframeResolver?.cancel();
|
|
1120
|
-
}
|
|
1121
|
-
};
|
|
1122
|
-
function resolveTransition(transition, parentTransition) {
|
|
1123
|
-
if (transition?.inherit && parentTransition) {
|
|
1124
|
-
const { inherit: _, ...rest } = transition;
|
|
1125
|
-
return {
|
|
1126
|
-
...parentTransition,
|
|
1127
|
-
...rest
|
|
1128
|
-
};
|
|
1129
|
-
}
|
|
1130
|
-
return transition;
|
|
1131
|
-
}
|
|
1132
|
-
function getValueTransition(transition, key) {
|
|
1133
|
-
const valueTransition = transition?.[key] ?? transition?.["default"] ?? transition;
|
|
1134
|
-
if (valueTransition !== transition) return resolveTransition(valueTransition, transition);
|
|
1135
|
-
return valueTransition;
|
|
1136
|
-
}
|
|
1137
|
-
var underDampedSpring = {
|
|
1138
|
-
type: "spring",
|
|
1139
|
-
stiffness: 500,
|
|
1140
|
-
damping: 25,
|
|
1141
|
-
restSpeed: 10
|
|
1142
|
-
};
|
|
1143
|
-
var criticallyDampedSpring = (target) => ({
|
|
1144
|
-
type: "spring",
|
|
1145
|
-
stiffness: 550,
|
|
1146
|
-
damping: target === 0 ? 2 * Math.sqrt(550) : 30,
|
|
1147
|
-
restSpeed: 10
|
|
1148
|
-
});
|
|
1149
|
-
var keyframesTransition = {
|
|
1150
|
-
type: "keyframes",
|
|
1151
|
-
duration: 0.8
|
|
1152
|
-
};
|
|
1153
|
-
var ease = {
|
|
1154
|
-
type: "keyframes",
|
|
1155
|
-
ease: [
|
|
1156
|
-
0.25,
|
|
1157
|
-
0.1,
|
|
1158
|
-
0.35,
|
|
1159
|
-
1
|
|
1160
|
-
],
|
|
1161
|
-
duration: 0.3
|
|
1162
|
-
};
|
|
1163
|
-
var getDefaultTransition = (valueKey, { keyframes: keyframes2 }) => {
|
|
1164
|
-
if (keyframes2.length > 2) return keyframesTransition;
|
|
1165
|
-
else if (transformProps.has(valueKey)) return valueKey.startsWith("scale") ? criticallyDampedSpring(keyframes2[1]) : underDampedSpring;
|
|
1166
|
-
return ease;
|
|
1167
|
-
};
|
|
1168
|
-
var orchestrationKeys = /* @__PURE__ */ new Set([
|
|
1169
|
-
"when",
|
|
1170
|
-
"delay",
|
|
1171
|
-
"delayChildren",
|
|
1172
|
-
"staggerChildren",
|
|
1173
|
-
"staggerDirection",
|
|
1174
|
-
"repeat",
|
|
1175
|
-
"repeatType",
|
|
1176
|
-
"repeatDelay",
|
|
1177
|
-
"from",
|
|
1178
|
-
"elapsed"
|
|
1179
|
-
]);
|
|
1180
|
-
function isTransitionDefined(transition) {
|
|
1181
|
-
for (const key in transition) if (!orchestrationKeys.has(key)) return true;
|
|
1182
|
-
return false;
|
|
1183
|
-
}
|
|
1184
|
-
var animateMotionValue = (name, value, target, transition = {}, element, isHandoff) => (onComplete) => {
|
|
1185
|
-
const valueTransition = getValueTransition(transition, name) || {};
|
|
1186
|
-
const delay = valueTransition.delay || transition.delay || 0;
|
|
1187
|
-
let { elapsed = 0 } = transition;
|
|
1188
|
-
elapsed = elapsed - secondsToMilliseconds(delay);
|
|
1189
|
-
const options = {
|
|
1190
|
-
keyframes: Array.isArray(target) ? target : [null, target],
|
|
1191
|
-
ease: "easeOut",
|
|
1192
|
-
velocity: value.getVelocity(),
|
|
1193
|
-
...valueTransition,
|
|
1194
|
-
delay: -elapsed,
|
|
1195
|
-
onUpdate: (v) => {
|
|
1196
|
-
value.set(v);
|
|
1197
|
-
valueTransition.onUpdate && valueTransition.onUpdate(v);
|
|
1198
|
-
},
|
|
1199
|
-
onComplete: () => {
|
|
1200
|
-
onComplete();
|
|
1201
|
-
valueTransition.onComplete && valueTransition.onComplete();
|
|
1202
|
-
},
|
|
1203
|
-
name,
|
|
1204
|
-
motionValue: value,
|
|
1205
|
-
element: isHandoff ? void 0 : element
|
|
1206
|
-
};
|
|
1207
|
-
if (!isTransitionDefined(valueTransition)) Object.assign(options, getDefaultTransition(name, options));
|
|
1208
|
-
options.duration && (options.duration = secondsToMilliseconds(options.duration));
|
|
1209
|
-
options.repeatDelay && (options.repeatDelay = secondsToMilliseconds(options.repeatDelay));
|
|
1210
|
-
if (options.from !== void 0) options.keyframes[0] = options.from;
|
|
1211
|
-
let shouldSkip = false;
|
|
1212
|
-
if (options.type === false || options.duration === 0 && !options.repeatDelay) {
|
|
1213
|
-
makeAnimationInstant(options);
|
|
1214
|
-
if (options.delay === 0) shouldSkip = true;
|
|
1215
|
-
}
|
|
1216
|
-
if (MotionGlobalConfig.instantAnimations || MotionGlobalConfig.skipAnimations || element?.shouldSkipAnimations || valueTransition.skipAnimations) {
|
|
1217
|
-
shouldSkip = true;
|
|
1218
|
-
makeAnimationInstant(options);
|
|
1219
|
-
options.delay = 0;
|
|
1220
|
-
}
|
|
1221
|
-
options.allowFlatten = !valueTransition.type && !valueTransition.ease;
|
|
1222
|
-
if (shouldSkip && !isHandoff && value.get() !== void 0) {
|
|
1223
|
-
const finalKeyframe = getFinalKeyframe(options.keyframes, valueTransition);
|
|
1224
|
-
if (finalKeyframe !== void 0) {
|
|
1225
|
-
frame.update(() => {
|
|
1226
|
-
options.onUpdate(finalKeyframe);
|
|
1227
|
-
options.onComplete();
|
|
1228
|
-
});
|
|
1229
|
-
return;
|
|
1230
|
-
}
|
|
1231
|
-
}
|
|
1232
|
-
return valueTransition.isSync ? new JSAnimation(options) : new AsyncMotionValueAnimation(options);
|
|
1233
|
-
};
|
|
1234
|
-
var splitCSSVariableRegex = /^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;
|
|
1235
|
-
function parseCSSVariable(current) {
|
|
1236
|
-
const match = splitCSSVariableRegex.exec(current);
|
|
1237
|
-
if (!match) return [,];
|
|
1238
|
-
const [, token1, token2, fallback] = match;
|
|
1239
|
-
return [`--${token1 ?? token2}`, fallback];
|
|
1240
|
-
}
|
|
1241
|
-
var maxDepth = 4;
|
|
1242
|
-
function getVariableValue(current, element, depth = 1) {
|
|
1243
|
-
invariant(depth <= maxDepth, `Max CSS variable fallback depth detected in property "${current}". This may indicate a circular fallback dependency.`, "max-css-var-depth");
|
|
1244
|
-
const [token, fallback] = parseCSSVariable(current);
|
|
1245
|
-
if (!token) return;
|
|
1246
|
-
const resolved = window.getComputedStyle(element).getPropertyValue(token);
|
|
1247
|
-
if (resolved) {
|
|
1248
|
-
const trimmed = resolved.trim();
|
|
1249
|
-
return isNumericalString(trimmed) ? parseFloat(trimmed) : trimmed;
|
|
1250
|
-
}
|
|
1251
|
-
return isCSSVariableToken(fallback) ? getVariableValue(fallback, element, depth + 1) : fallback;
|
|
1252
|
-
}
|
|
1253
|
-
function resolveVariant(visualElement, definition, custom) {
|
|
1254
|
-
const props = visualElement.getProps();
|
|
1255
|
-
return resolveVariantFromProps(props, definition, custom !== void 0 ? custom : props.custom, visualElement);
|
|
1256
|
-
}
|
|
1257
|
-
var positionalKeys = /* @__PURE__ */ new Set([
|
|
1258
|
-
"width",
|
|
1259
|
-
"height",
|
|
1260
|
-
"top",
|
|
1261
|
-
"left",
|
|
1262
|
-
"right",
|
|
1263
|
-
"bottom",
|
|
1264
|
-
...transformPropOrder
|
|
1265
|
-
]);
|
|
1266
|
-
var isKeyframesTarget = (v) => {
|
|
1267
|
-
return Array.isArray(v);
|
|
1268
|
-
};
|
|
1269
|
-
function setMotionValue(visualElement, key, value) {
|
|
1270
|
-
if (visualElement.hasValue(key)) visualElement.getValue(key).set(value);
|
|
1271
|
-
else visualElement.addValue(key, motionValue(value));
|
|
1272
|
-
}
|
|
1273
|
-
function resolveFinalValueInKeyframes(v) {
|
|
1274
|
-
return isKeyframesTarget(v) ? v[v.length - 1] || 0 : v;
|
|
1275
|
-
}
|
|
1276
|
-
function setTarget(visualElement, definition) {
|
|
1277
|
-
let { transitionEnd = {}, transition = {}, ...target } = resolveVariant(visualElement, definition) || {};
|
|
1278
|
-
target = {
|
|
1279
|
-
...target,
|
|
1280
|
-
...transitionEnd
|
|
1281
|
-
};
|
|
1282
|
-
for (const key in target) setMotionValue(visualElement, key, resolveFinalValueInKeyframes(target[key]));
|
|
1283
|
-
}
|
|
1284
|
-
function isWillChangeMotionValue(value) {
|
|
1285
|
-
return Boolean(isMotionValue(value) && value.add);
|
|
1286
|
-
}
|
|
1287
|
-
function addValueToWillChange(visualElement, key) {
|
|
1288
|
-
const willChange = visualElement.getValue("willChange");
|
|
1289
|
-
if (isWillChangeMotionValue(willChange)) return willChange.add(key);
|
|
1290
|
-
else if (!willChange && MotionGlobalConfig.WillChange) {
|
|
1291
|
-
const newWillChange = new MotionGlobalConfig.WillChange("auto");
|
|
1292
|
-
visualElement.addValue("willChange", newWillChange);
|
|
1293
|
-
newWillChange.add(key);
|
|
1294
|
-
}
|
|
1295
|
-
}
|
|
1296
|
-
function getOptimisedAppearId(visualElement) {
|
|
1297
|
-
return visualElement.props[optimizedAppearDataAttribute];
|
|
1298
|
-
}
|
|
1299
|
-
var isBrowser = typeof window !== "undefined";
|
|
1300
|
-
function shouldBlockAnimation({ protectedKeys, needsAnimating }, key) {
|
|
1301
|
-
const shouldBlock = protectedKeys.hasOwnProperty(key) && needsAnimating[key] !== true;
|
|
1302
|
-
needsAnimating[key] = false;
|
|
1303
|
-
return shouldBlock;
|
|
1304
|
-
}
|
|
1305
|
-
function animateTarget(visualElement, targetAndTransition, { delay = 0, transitionOverride, type } = {}) {
|
|
1306
|
-
let { transition, transitionEnd, ...target } = targetAndTransition;
|
|
1307
|
-
const defaultTransition = visualElement.getDefaultTransition();
|
|
1308
|
-
transition = transition ? resolveTransition(transition, defaultTransition) : defaultTransition;
|
|
1309
|
-
const reduceMotion = transition?.reduceMotion;
|
|
1310
|
-
const skipAnimations = transition?.skipAnimations;
|
|
1311
|
-
if (transitionOverride) transition = transitionOverride;
|
|
1312
|
-
const animations = [];
|
|
1313
|
-
const animationTypeState = type && visualElement.animationState && visualElement.animationState.getState()[type];
|
|
1314
|
-
const path = transition?.path;
|
|
1315
|
-
if (path) path.animateVisualElement(visualElement, target, transition, delay, animations);
|
|
1316
|
-
for (const key in target) {
|
|
1317
|
-
const value = visualElement.getValue(key, visualElement.latestValues[key] ?? null);
|
|
1318
|
-
const valueTarget = target[key];
|
|
1319
|
-
if (valueTarget === void 0 || animationTypeState && shouldBlockAnimation(animationTypeState, key)) continue;
|
|
1320
|
-
const valueTransition = {
|
|
1321
|
-
delay,
|
|
1322
|
-
...getValueTransition(transition || {}, key)
|
|
1323
|
-
};
|
|
1324
|
-
if (skipAnimations) valueTransition.skipAnimations = true;
|
|
1325
|
-
const currentValue = value.get();
|
|
1326
|
-
if (currentValue !== void 0 && !value.isAnimating() && !Array.isArray(valueTarget) && valueTarget === currentValue && !valueTransition.velocity) {
|
|
1327
|
-
frame.update(() => value.set(valueTarget));
|
|
1328
|
-
continue;
|
|
1329
|
-
}
|
|
1330
|
-
let isHandoff = false;
|
|
1331
|
-
if (isBrowser && window.MotionHandoffAnimation) {
|
|
1332
|
-
const appearId = getOptimisedAppearId(visualElement);
|
|
1333
|
-
if (appearId) {
|
|
1334
|
-
const startTime = window.MotionHandoffAnimation(appearId, key, frame);
|
|
1335
|
-
if (startTime !== null) {
|
|
1336
|
-
valueTransition.startTime = startTime;
|
|
1337
|
-
isHandoff = true;
|
|
1338
|
-
}
|
|
1339
|
-
}
|
|
1340
|
-
}
|
|
1341
|
-
addValueToWillChange(visualElement, key);
|
|
1342
|
-
const shouldReduceMotion = reduceMotion ?? visualElement.shouldReduceMotion;
|
|
1343
|
-
value.start(animateMotionValue(key, value, valueTarget, shouldReduceMotion && positionalKeys.has(key) ? { type: false } : valueTransition, visualElement, isHandoff));
|
|
1344
|
-
const animation = value.animation;
|
|
1345
|
-
if (animation) animations.push(animation);
|
|
1346
|
-
}
|
|
1347
|
-
if (transitionEnd) {
|
|
1348
|
-
const applyTransitionEnd = () => frame.update(() => {
|
|
1349
|
-
transitionEnd && setTarget(visualElement, transitionEnd);
|
|
1350
|
-
});
|
|
1351
|
-
if (animations.length) Promise.all(animations).then(applyTransitionEnd);
|
|
1352
|
-
else applyTransitionEnd();
|
|
1353
|
-
}
|
|
1354
|
-
return animations;
|
|
1355
|
-
}
|
|
1356
|
-
function isNone(value) {
|
|
1357
|
-
if (typeof value === "number") return value === 0;
|
|
1358
|
-
else if (value !== null) return value === "none" || value === "0" || isZeroValueString(value);
|
|
1359
|
-
else return true;
|
|
1360
|
-
}
|
|
1361
|
-
var invalidTemplates = /* @__PURE__ */ new Set([
|
|
1362
|
-
"auto",
|
|
1363
|
-
"none",
|
|
1364
|
-
"0"
|
|
1365
|
-
]);
|
|
1366
|
-
function makeNoneKeyframesAnimatable(unresolvedKeyframes, noneKeyframeIndexes, name) {
|
|
1367
|
-
let i = 0;
|
|
1368
|
-
let animatableTemplate = void 0;
|
|
1369
|
-
while (i < unresolvedKeyframes.length && !animatableTemplate) {
|
|
1370
|
-
const keyframe = unresolvedKeyframes[i];
|
|
1371
|
-
if (typeof keyframe === "string" && !invalidTemplates.has(keyframe) && analyseComplexValue(keyframe).values.length) animatableTemplate = unresolvedKeyframes[i];
|
|
1372
|
-
i++;
|
|
1373
|
-
}
|
|
1374
|
-
if (animatableTemplate && name) for (const noneIndex of noneKeyframeIndexes) unresolvedKeyframes[noneIndex] = getAnimatableNone(name, animatableTemplate);
|
|
1375
|
-
}
|
|
1376
|
-
var DOMKeyframesResolver = class extends KeyframeResolver {
|
|
1377
|
-
constructor(unresolvedKeyframes, onComplete, name, motionValue2, element) {
|
|
1378
|
-
super(unresolvedKeyframes, onComplete, name, motionValue2, element, true);
|
|
1379
|
-
}
|
|
1380
|
-
readKeyframes() {
|
|
1381
|
-
const { unresolvedKeyframes, element, name } = this;
|
|
1382
|
-
if (!element || !element.current) return;
|
|
1383
|
-
super.readKeyframes();
|
|
1384
|
-
for (let i = 0; i < unresolvedKeyframes.length; i++) {
|
|
1385
|
-
let keyframe = unresolvedKeyframes[i];
|
|
1386
|
-
if (typeof keyframe === "string") {
|
|
1387
|
-
keyframe = keyframe.trim();
|
|
1388
|
-
if (isCSSVariableToken(keyframe)) {
|
|
1389
|
-
const resolved = getVariableValue(keyframe, element.current);
|
|
1390
|
-
if (resolved !== void 0) unresolvedKeyframes[i] = resolved;
|
|
1391
|
-
if (i === unresolvedKeyframes.length - 1) this.finalKeyframe = keyframe;
|
|
1392
|
-
}
|
|
1393
|
-
}
|
|
1394
|
-
}
|
|
1395
|
-
this.resolveNoneKeyframes();
|
|
1396
|
-
if (!positionalKeys.has(name) || unresolvedKeyframes.length !== 2) return;
|
|
1397
|
-
const [origin, target] = unresolvedKeyframes;
|
|
1398
|
-
const originType = findDimensionValueType(origin);
|
|
1399
|
-
const targetType = findDimensionValueType(target);
|
|
1400
|
-
if (containsCSSVariable(origin) !== containsCSSVariable(target) && positionalValues[name]) {
|
|
1401
|
-
this.needsMeasurement = true;
|
|
1402
|
-
return;
|
|
1403
|
-
}
|
|
1404
|
-
if (originType === targetType) return;
|
|
1405
|
-
if (isNumOrPxType(originType) && isNumOrPxType(targetType)) for (let i = 0; i < unresolvedKeyframes.length; i++) {
|
|
1406
|
-
const value = unresolvedKeyframes[i];
|
|
1407
|
-
if (typeof value === "string") unresolvedKeyframes[i] = parseFloat(value);
|
|
1408
|
-
}
|
|
1409
|
-
else if (positionalValues[name])
|
|
1410
|
-
this.needsMeasurement = true;
|
|
1411
|
-
}
|
|
1412
|
-
resolveNoneKeyframes() {
|
|
1413
|
-
const { unresolvedKeyframes, name } = this;
|
|
1414
|
-
const noneKeyframeIndexes = [];
|
|
1415
|
-
for (let i = 0; i < unresolvedKeyframes.length; i++) if (unresolvedKeyframes[i] === null || isNone(unresolvedKeyframes[i])) noneKeyframeIndexes.push(i);
|
|
1416
|
-
if (noneKeyframeIndexes.length) makeNoneKeyframesAnimatable(unresolvedKeyframes, noneKeyframeIndexes, name);
|
|
1417
|
-
}
|
|
1418
|
-
measureInitialState() {
|
|
1419
|
-
const { element, unresolvedKeyframes, name } = this;
|
|
1420
|
-
if (!element || !element.current) return;
|
|
1421
|
-
if (name === "height") this.suspendedScrollY = window.pageYOffset;
|
|
1422
|
-
this.measuredOrigin = positionalValues[name](element.measureViewportBox(), window.getComputedStyle(element.current));
|
|
1423
|
-
unresolvedKeyframes[0] = this.measuredOrigin;
|
|
1424
|
-
const measureKeyframe = unresolvedKeyframes[unresolvedKeyframes.length - 1];
|
|
1425
|
-
if (measureKeyframe !== void 0) element.getValue(name, measureKeyframe).jump(measureKeyframe, false);
|
|
1426
|
-
}
|
|
1427
|
-
measureEndState() {
|
|
1428
|
-
const { element, name, unresolvedKeyframes } = this;
|
|
1429
|
-
if (!element || !element.current) return;
|
|
1430
|
-
const value = element.getValue(name);
|
|
1431
|
-
value && value.jump(this.measuredOrigin, false);
|
|
1432
|
-
const finalKeyframeIndex = unresolvedKeyframes.length - 1;
|
|
1433
|
-
const finalKeyframe = unresolvedKeyframes[finalKeyframeIndex];
|
|
1434
|
-
unresolvedKeyframes[finalKeyframeIndex] = positionalValues[name](element.measureViewportBox(), window.getComputedStyle(element.current));
|
|
1435
|
-
if (finalKeyframe !== null && this.finalKeyframe === void 0) this.finalKeyframe = finalKeyframe;
|
|
1436
|
-
if (this.removedTransforms?.length) this.removedTransforms.forEach(([unsetTransformName, unsetTransformValue]) => {
|
|
1437
|
-
element.getValue(unsetTransformName).set(unsetTransformValue);
|
|
1438
|
-
});
|
|
1439
|
-
this.resolveNoneKeyframes();
|
|
1440
|
-
}
|
|
1441
|
-
};
|
|
1442
|
-
function resolveElements(elementOrSelector, scope, selectorCache) {
|
|
1443
|
-
if (elementOrSelector == null) return [];
|
|
1444
|
-
if (elementOrSelector instanceof EventTarget) return [elementOrSelector];
|
|
1445
|
-
else if (typeof elementOrSelector === "string") {
|
|
1446
|
-
let root = document;
|
|
1447
|
-
if (scope) root = scope.current;
|
|
1448
|
-
const elements = selectorCache?.[elementOrSelector] ?? root.querySelectorAll(elementOrSelector);
|
|
1449
|
-
return elements ? Array.from(elements) : [];
|
|
1450
|
-
}
|
|
1451
|
-
return Array.from(elementOrSelector).filter((element) => element != null);
|
|
1452
|
-
}
|
|
1453
|
-
function isSVGElement(element) {
|
|
1454
|
-
return isObject(element) && "ownerSVGElement" in element;
|
|
1455
|
-
}
|
|
1456
|
-
function isSVGSVGElement(element) {
|
|
1457
|
-
return isSVGElement(element) && element.tagName === "svg";
|
|
1458
|
-
}
|
|
1459
|
-
var DOMVisualElement = class extends VisualElement {
|
|
1460
|
-
constructor() {
|
|
1461
|
-
super(...arguments);
|
|
1462
|
-
this.KeyframeResolver = DOMKeyframesResolver;
|
|
1463
|
-
}
|
|
1464
|
-
sortInstanceNodePosition(a, b) {
|
|
1465
|
-
return a.compareDocumentPosition(b) & 2 ? 1 : -1;
|
|
1466
|
-
}
|
|
1467
|
-
getBaseTargetFromProps(props, key) {
|
|
1468
|
-
const style = props.style;
|
|
1469
|
-
return style ? style[key] : void 0;
|
|
1470
|
-
}
|
|
1471
|
-
removeValueFromRenderState(key, { vars, style }) {
|
|
1472
|
-
delete vars[key];
|
|
1473
|
-
delete style[key];
|
|
1474
|
-
}
|
|
1475
|
-
handleChildMotionValue() {
|
|
1476
|
-
if (this.childSubscription) {
|
|
1477
|
-
this.childSubscription();
|
|
1478
|
-
delete this.childSubscription;
|
|
1479
|
-
}
|
|
1480
|
-
const { children } = this.props;
|
|
1481
|
-
if (isMotionValue(children)) this.childSubscription = children.on("change", (latest) => {
|
|
1482
|
-
if (this.current) this.current.textContent = `${latest}`;
|
|
1483
|
-
});
|
|
1484
|
-
}
|
|
1485
|
-
};
|
|
1486
|
-
function convertBoundingBoxToBox({ top, left, right, bottom }) {
|
|
1487
|
-
return {
|
|
1488
|
-
x: {
|
|
1489
|
-
min: left,
|
|
1490
|
-
max: right
|
|
1491
|
-
},
|
|
1492
|
-
y: {
|
|
1493
|
-
min: top,
|
|
1494
|
-
max: bottom
|
|
1495
|
-
}
|
|
1496
|
-
};
|
|
1497
|
-
}
|
|
1498
|
-
function convertBoxToBoundingBox({ x, y }) {
|
|
1499
|
-
return {
|
|
1500
|
-
top: y.min,
|
|
1501
|
-
right: x.max,
|
|
1502
|
-
bottom: y.max,
|
|
1503
|
-
left: x.min
|
|
1504
|
-
};
|
|
1505
|
-
}
|
|
1506
|
-
function transformBoxPoints(point, transformPoint) {
|
|
1507
|
-
if (!transformPoint) return point;
|
|
1508
|
-
const topLeft = transformPoint({
|
|
1509
|
-
x: point.left,
|
|
1510
|
-
y: point.top
|
|
1511
|
-
});
|
|
1512
|
-
const bottomRight = transformPoint({
|
|
1513
|
-
x: point.right,
|
|
1514
|
-
y: point.bottom
|
|
1515
|
-
});
|
|
1516
|
-
return {
|
|
1517
|
-
top: topLeft.y,
|
|
1518
|
-
left: topLeft.x,
|
|
1519
|
-
bottom: bottomRight.y,
|
|
1520
|
-
right: bottomRight.x
|
|
1521
|
-
};
|
|
1522
|
-
}
|
|
1523
|
-
function isIdentityScale(scale) {
|
|
1524
|
-
return scale === void 0 || scale === 1;
|
|
1525
|
-
}
|
|
1526
|
-
function hasScale({ scale, scaleX, scaleY }) {
|
|
1527
|
-
return !isIdentityScale(scale) || !isIdentityScale(scaleX) || !isIdentityScale(scaleY);
|
|
1528
|
-
}
|
|
1529
|
-
function hasTransform(values) {
|
|
1530
|
-
return hasScale(values) || has2DTranslate(values) || values.z || values.rotate || values.rotateX || values.rotateY || values.skewX || values.skewY;
|
|
1531
|
-
}
|
|
1532
|
-
function has2DTranslate(values) {
|
|
1533
|
-
return is2DTranslate(values.x) || is2DTranslate(values.y);
|
|
1534
|
-
}
|
|
1535
|
-
function is2DTranslate(value) {
|
|
1536
|
-
return value && value !== "0%";
|
|
1537
|
-
}
|
|
1538
|
-
function scalePoint(point, scale, originPoint) {
|
|
1539
|
-
return originPoint + scale * (point - originPoint);
|
|
1540
|
-
}
|
|
1541
|
-
function applyPointDelta(point, translate, scale, originPoint, boxScale) {
|
|
1542
|
-
if (boxScale !== void 0) point = scalePoint(point, boxScale, originPoint);
|
|
1543
|
-
return scalePoint(point, scale, originPoint) + translate;
|
|
1544
|
-
}
|
|
1545
|
-
function applyAxisDelta(axis, translate = 0, scale = 1, originPoint, boxScale) {
|
|
1546
|
-
axis.min = applyPointDelta(axis.min, translate, scale, originPoint, boxScale);
|
|
1547
|
-
axis.max = applyPointDelta(axis.max, translate, scale, originPoint, boxScale);
|
|
1548
|
-
}
|
|
1549
|
-
function applyBoxDelta(box, { x, y }) {
|
|
1550
|
-
applyAxisDelta(box.x, x.translate, x.scale, x.originPoint);
|
|
1551
|
-
applyAxisDelta(box.y, y.translate, y.scale, y.originPoint);
|
|
1552
|
-
}
|
|
1553
|
-
var TREE_SCALE_SNAP_MIN = 0.999999999999;
|
|
1554
|
-
var TREE_SCALE_SNAP_MAX = 1.0000000000001;
|
|
1555
|
-
function applyTreeDeltas(box, treeScale, treePath, isSharedTransition = false) {
|
|
1556
|
-
const treeLength = treePath.length;
|
|
1557
|
-
if (!treeLength) return;
|
|
1558
|
-
treeScale.x = treeScale.y = 1;
|
|
1559
|
-
let node;
|
|
1560
|
-
let delta;
|
|
1561
|
-
for (let i = 0; i < treeLength; i++) {
|
|
1562
|
-
node = treePath[i];
|
|
1563
|
-
delta = node.projectionDelta;
|
|
1564
|
-
const { visualElement } = node.options;
|
|
1565
|
-
if (visualElement && visualElement.props.style && visualElement.props.style.display === "contents") continue;
|
|
1566
|
-
if (isSharedTransition && node.options.layoutScroll && node.scroll && node !== node.root) {
|
|
1567
|
-
translateAxis(box.x, -node.scroll.offset.x);
|
|
1568
|
-
translateAxis(box.y, -node.scroll.offset.y);
|
|
1569
|
-
}
|
|
1570
|
-
if (delta) {
|
|
1571
|
-
treeScale.x *= delta.x.scale;
|
|
1572
|
-
treeScale.y *= delta.y.scale;
|
|
1573
|
-
applyBoxDelta(box, delta);
|
|
1574
|
-
}
|
|
1575
|
-
if (isSharedTransition && hasTransform(node.latestValues)) transformBox(box, node.latestValues, node.layout?.layoutBox);
|
|
1576
|
-
}
|
|
1577
|
-
if (treeScale.x < TREE_SCALE_SNAP_MAX && treeScale.x > TREE_SCALE_SNAP_MIN) treeScale.x = 1;
|
|
1578
|
-
if (treeScale.y < TREE_SCALE_SNAP_MAX && treeScale.y > TREE_SCALE_SNAP_MIN) treeScale.y = 1;
|
|
1579
|
-
}
|
|
1580
|
-
function translateAxis(axis, distance) {
|
|
1581
|
-
axis.min += distance;
|
|
1582
|
-
axis.max += distance;
|
|
1583
|
-
}
|
|
1584
|
-
function transformAxis(axis, axisTranslate, axisScale, boxScale, axisOrigin = 0.5) {
|
|
1585
|
-
applyAxisDelta(axis, axisTranslate, axisScale, mixNumber(axis.min, axis.max, axisOrigin), boxScale);
|
|
1586
|
-
}
|
|
1587
|
-
function resolveAxisTranslate(value, axis) {
|
|
1588
|
-
if (typeof value === "string") return parseFloat(value) / 100 * (axis.max - axis.min);
|
|
1589
|
-
return value;
|
|
1590
|
-
}
|
|
1591
|
-
function transformBox(box, transform, sourceBox) {
|
|
1592
|
-
const resolveBox = sourceBox ?? box;
|
|
1593
|
-
transformAxis(box.x, resolveAxisTranslate(transform.x, resolveBox.x), transform.scaleX, transform.scale, transform.originX);
|
|
1594
|
-
transformAxis(box.y, resolveAxisTranslate(transform.y, resolveBox.y), transform.scaleY, transform.scale, transform.originY);
|
|
1595
|
-
}
|
|
1596
|
-
function measureViewportBox(instance, transformPoint) {
|
|
1597
|
-
return convertBoundingBoxToBox(transformBoxPoints(instance.getBoundingClientRect(), transformPoint));
|
|
1598
|
-
}
|
|
1599
|
-
function measurePageBox(element, rootProjectionNode, transformPagePoint) {
|
|
1600
|
-
const viewportBox = measureViewportBox(element, transformPagePoint);
|
|
1601
|
-
const { scroll } = rootProjectionNode;
|
|
1602
|
-
if (scroll) {
|
|
1603
|
-
translateAxis(viewportBox.x, scroll.offset.x);
|
|
1604
|
-
translateAxis(viewportBox.y, scroll.offset.y);
|
|
1605
|
-
}
|
|
1606
|
-
return viewportBox;
|
|
1607
|
-
}
|
|
1608
|
-
function renderHTML(element, { style, vars }, styleProp, projection) {
|
|
1609
|
-
const elementStyle = element.style;
|
|
1610
|
-
let key;
|
|
1611
|
-
for (key in style) elementStyle[key] = style[key];
|
|
1612
|
-
projection?.applyProjectionStyles(elementStyle, styleProp);
|
|
1613
|
-
for (key in vars) elementStyle.setProperty(key, vars[key]);
|
|
1614
|
-
}
|
|
1615
|
-
function getComputedStyle$1(element) {
|
|
1616
|
-
return window.getComputedStyle(element);
|
|
1617
|
-
}
|
|
1618
|
-
var HTMLVisualElement = class extends DOMVisualElement {
|
|
1619
|
-
constructor() {
|
|
1620
|
-
super(...arguments);
|
|
1621
|
-
this.type = "html";
|
|
1622
|
-
this.renderInstance = renderHTML;
|
|
1623
|
-
}
|
|
1624
|
-
mount(instance) {
|
|
1625
|
-
invariant(Boolean(instance.style), "motion.create() components must forward their ref to a HTML or SVG element", "custom-component-ref");
|
|
1626
|
-
super.mount(instance);
|
|
1627
|
-
}
|
|
1628
|
-
readValueFromInstance(instance, key) {
|
|
1629
|
-
if (transformProps.has(key)) return this.projection?.isProjecting ? defaultTransformValue(key) : readTransformValue(instance, key);
|
|
1630
|
-
else {
|
|
1631
|
-
const computedStyle = getComputedStyle$1(instance);
|
|
1632
|
-
const value = (isCSSVariableName(key) ? computedStyle.getPropertyValue(key) : computedStyle[key]) || 0;
|
|
1633
|
-
return typeof value === "string" ? value.trim() : value;
|
|
1634
|
-
}
|
|
1635
|
-
}
|
|
1636
|
-
measureInstanceViewportBox(instance, { transformPagePoint }) {
|
|
1637
|
-
return measureViewportBox(instance, transformPagePoint);
|
|
1638
|
-
}
|
|
1639
|
-
build(renderState, latestValues, props) {
|
|
1640
|
-
buildHTMLStyles(renderState, latestValues, props.transformTemplate);
|
|
1641
|
-
}
|
|
1642
|
-
scrapeMotionValuesFromProps(props, prevProps, visualElement) {
|
|
1643
|
-
return scrapeMotionValuesFromProps$1(props, prevProps, visualElement);
|
|
1644
|
-
}
|
|
1645
|
-
};
|
|
1646
|
-
var camelCaseAttributes = /* @__PURE__ */ new Set([
|
|
1647
|
-
"baseFrequency",
|
|
1648
|
-
"diffuseConstant",
|
|
1649
|
-
"kernelMatrix",
|
|
1650
|
-
"kernelUnitLength",
|
|
1651
|
-
"keySplines",
|
|
1652
|
-
"keyTimes",
|
|
1653
|
-
"limitingConeAngle",
|
|
1654
|
-
"markerHeight",
|
|
1655
|
-
"markerWidth",
|
|
1656
|
-
"numOctaves",
|
|
1657
|
-
"targetX",
|
|
1658
|
-
"targetY",
|
|
1659
|
-
"surfaceScale",
|
|
1660
|
-
"specularConstant",
|
|
1661
|
-
"specularExponent",
|
|
1662
|
-
"stdDeviation",
|
|
1663
|
-
"tableValues",
|
|
1664
|
-
"viewBox",
|
|
1665
|
-
"gradientTransform",
|
|
1666
|
-
"pathLength",
|
|
1667
|
-
"startOffset",
|
|
1668
|
-
"textLength",
|
|
1669
|
-
"lengthAdjust"
|
|
1670
|
-
]);
|
|
1671
|
-
function renderSVG(element, renderState, _styleProp, projection) {
|
|
1672
|
-
renderHTML(element, renderState, void 0, projection);
|
|
1673
|
-
for (const key in renderState.attrs) element.setAttribute(!camelCaseAttributes.has(key) ? camelToDash(key) : key, renderState.attrs[key]);
|
|
1674
|
-
}
|
|
1675
|
-
var SVGVisualElement = class extends DOMVisualElement {
|
|
1676
|
-
constructor() {
|
|
1677
|
-
super(...arguments);
|
|
1678
|
-
this.type = "svg";
|
|
1679
|
-
this.isSVGTag = false;
|
|
1680
|
-
this.measureInstanceViewportBox = createBox;
|
|
1681
|
-
}
|
|
1682
|
-
getBaseTargetFromProps(props, key) {
|
|
1683
|
-
return props[key];
|
|
1684
|
-
}
|
|
1685
|
-
readValueFromInstance(instance, key) {
|
|
1686
|
-
if (transformProps.has(key)) {
|
|
1687
|
-
const defaultType = getDefaultValueType(key);
|
|
1688
|
-
return defaultType ? defaultType.default || 0 : 0;
|
|
1689
|
-
}
|
|
1690
|
-
if (cssStyleProperties.includes(key)) {
|
|
1691
|
-
const value = getComputedStyle(instance)[key];
|
|
1692
|
-
if (typeof value === "string" && value) return value.trim();
|
|
1693
|
-
}
|
|
1694
|
-
key = !camelCaseAttributes.has(key) ? camelToDash(key) : key;
|
|
1695
|
-
return instance.getAttribute(key);
|
|
1696
|
-
}
|
|
1697
|
-
scrapeMotionValuesFromProps(props, prevProps, visualElement) {
|
|
1698
|
-
return scrapeMotionValuesFromProps(props, prevProps, visualElement);
|
|
1699
|
-
}
|
|
1700
|
-
build(renderState, latestValues, props) {
|
|
1701
|
-
buildSVGAttrs(renderState, latestValues, this.isSVGTag, props.transformTemplate, props.style);
|
|
1702
|
-
}
|
|
1703
|
-
renderInstance(instance, renderState, styleProp, projection) {
|
|
1704
|
-
renderSVG(instance, renderState, styleProp, projection);
|
|
1705
|
-
}
|
|
1706
|
-
mount(instance) {
|
|
1707
|
-
this.isSVGTag = isSVGTag(instance.tagName);
|
|
1708
|
-
super.mount(instance);
|
|
1709
|
-
}
|
|
1710
|
-
};
|
|
1711
|
-
function animateSingleValue(value, keyframes2, options) {
|
|
1712
|
-
const motionValue$1 = isMotionValue(value) ? value : motionValue(value);
|
|
1713
|
-
motionValue$1.start(animateMotionValue("", motionValue$1, keyframes2, options));
|
|
1714
|
-
return motionValue$1.animation;
|
|
1715
|
-
}
|
|
1716
|
-
function MotionConfig({ children, ...config }) {
|
|
1717
|
-
const parentConfig = useContext(MotionConfigContext);
|
|
1718
|
-
config = {
|
|
1719
|
-
...parentConfig,
|
|
1720
|
-
...config
|
|
1721
|
-
};
|
|
1722
|
-
config.transition = resolveTransition(config.transition, parentConfig.transition);
|
|
1723
|
-
config.isStatic = useConstant(() => config.isStatic);
|
|
1724
|
-
const context = useMemo(() => config, [
|
|
1725
|
-
JSON.stringify(config.transition),
|
|
1726
|
-
config.transformPagePoint,
|
|
1727
|
-
config.reducedMotion,
|
|
1728
|
-
config.skipAnimations,
|
|
1729
|
-
config.isValidProp
|
|
1730
|
-
]);
|
|
1731
|
-
return jsx(MotionConfigContext.Provider, {
|
|
1732
|
-
value: context,
|
|
1733
|
-
children
|
|
1734
|
-
});
|
|
1735
|
-
}
|
|
13
|
+
// web/app/dist/server/assets/composer-completion-CqJ6R1s9.js
|
|
1736
14
|
function observeWebVitals(onVital) {
|
|
1737
15
|
if (typeof window === "undefined" || typeof PerformanceObserver === "undefined") return () => {
|
|
1738
16
|
};
|
|
@@ -1879,8 +157,14 @@ function initAnalytics() {
|
|
|
1879
157
|
var NETWORK_DISCONNECTED_MESSAGE = "Fleet Prime is not connected to the Prime Agent runtime. Start or reconnect the runtime, then try again.";
|
|
1880
158
|
var FLEET_ADAPTER_CAPABILITIES = {
|
|
1881
159
|
protocolVersion: 1,
|
|
1882
|
-
schemaRevision:
|
|
1883
|
-
features: [
|
|
160
|
+
schemaRevision: 4,
|
|
161
|
+
features: [
|
|
162
|
+
"reasoning-summary-v1",
|
|
163
|
+
"mcp-connections-v1",
|
|
164
|
+
"session-tree-v1",
|
|
165
|
+
"composer-intent-v1",
|
|
166
|
+
"composer-completion-v1"
|
|
167
|
+
]
|
|
1884
168
|
};
|
|
1885
169
|
var ChatModelInfoSchema = external_exports.object({
|
|
1886
170
|
key: external_exports.string(),
|
|
@@ -2052,6 +336,59 @@ var ChatCommandsResponseSchema = external_exports.object({
|
|
|
2052
336
|
commands: external_exports.array(ChatSlashCommandInfoSchema),
|
|
2053
337
|
diagnostics: external_exports.array(external_exports.string())
|
|
2054
338
|
}).openapi({ description: "Chat slash commands response" });
|
|
339
|
+
var ComposerCompletionRequestSchema = external_exports.object({
|
|
340
|
+
text: nonEmptyStringSchema.max(2e3),
|
|
341
|
+
projectId: ProjectIdSchema.optional()
|
|
342
|
+
}).openapi({ description: "Composer ghost-text completion request" });
|
|
343
|
+
external_exports.object({ completion: external_exports.string().min(1).max(2e3).optional() }).openapi({ description: "Composer ghost-text completion; a verbatim string, never model prose" });
|
|
344
|
+
var ComposerIntentStatusSchema = external_exports.enum([
|
|
345
|
+
"unconfigured",
|
|
346
|
+
"unverified",
|
|
347
|
+
"ready",
|
|
348
|
+
"error"
|
|
349
|
+
]).openapi({ description: "Coarse readiness of the optional composer intent classifier" });
|
|
350
|
+
var ComposerIntentReasonSchema = external_exports.enum([
|
|
351
|
+
"disabled",
|
|
352
|
+
"not_ready",
|
|
353
|
+
"empty",
|
|
354
|
+
"no_match",
|
|
355
|
+
"code_task",
|
|
356
|
+
"below_floor",
|
|
357
|
+
"unavailable",
|
|
358
|
+
"rate_limited"
|
|
359
|
+
]).openapi({ description: "Why a routing attempt produced no action" });
|
|
360
|
+
var ComposerIntentKeySourceSchema = external_exports.enum([
|
|
361
|
+
"settings",
|
|
362
|
+
"environment",
|
|
363
|
+
"none"
|
|
364
|
+
]).openapi({ description: "Which key the classifier is using; never the key itself" });
|
|
365
|
+
var ComposerIntentDispositionSchema = external_exports.enum(["execute", "suggest"]).openapi({ description: "Whether a matched command may run automatically or is only offered" });
|
|
366
|
+
var ComposerIntentRequestSchema = external_exports.object({
|
|
367
|
+
text: nonEmptyStringSchema.max(2e3),
|
|
368
|
+
projectId: ProjectIdSchema.optional()
|
|
369
|
+
}).openapi({ description: "Composer free-text intent routing request" });
|
|
370
|
+
external_exports.object({
|
|
371
|
+
enabled: external_exports.boolean(),
|
|
372
|
+
outcome: external_exports.enum(["none", "matched"]),
|
|
373
|
+
command: external_exports.string().min(1).max(64).optional(),
|
|
374
|
+
confidence: external_exports.number().min(0).max(1).optional(),
|
|
375
|
+
disposition: ComposerIntentDispositionSchema.optional(),
|
|
376
|
+
reason: ComposerIntentReasonSchema.optional(),
|
|
377
|
+
model: external_exports.string().max(120).optional(),
|
|
378
|
+
latencyMs: external_exports.number().nonnegative().optional()
|
|
379
|
+
}).openapi({ description: "Composer intent routing decision; never carries model prose or error text" });
|
|
380
|
+
external_exports.object({
|
|
381
|
+
/** The user's choice in Settings. Off until they turn it on. */
|
|
382
|
+
enabled: external_exports.boolean(),
|
|
383
|
+
/** Whether a usable key is present. `unverified` until a probe succeeds. */
|
|
384
|
+
status: ComposerIntentStatusSchema,
|
|
385
|
+
keySource: ComposerIntentKeySourceSchema
|
|
386
|
+
}).openapi({ description: "Composer intent routing availability; never reveals the key or a raw error" });
|
|
387
|
+
var ComposerIntentCredentialSchema = external_exports.object({
|
|
388
|
+
/** A key to store, or null to remove the stored one. */
|
|
389
|
+
apiKey: nonEmptyStringSchema.max(400).nullable()
|
|
390
|
+
}).openapi({ description: "Set or clear the stored classifier key; write-only" });
|
|
391
|
+
var ComposerIntentSettingsUpdateSchema = external_exports.object({ enabled: external_exports.boolean() }).openapi({ description: "Enable or disable composer intent routing" });
|
|
2055
392
|
var MCP_SERVER_NAME_PATTERN = /^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$/;
|
|
2056
393
|
var MCP_ENV_NAME_PATTERN = /^[A-Za-z_][A-Za-z0-9_]*$/;
|
|
2057
394
|
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.");
|
|
@@ -2127,6 +464,41 @@ var ChatMcpOAuthLoginResponseSchema = external_exports.object({
|
|
|
2127
464
|
}).openapi({ description: "MCP OAuth login snapshot" });
|
|
2128
465
|
external_exports.object({ message: external_exports.string() }).openapi({ description: "Error response" });
|
|
2129
466
|
external_exports.object({ status: external_exports.literal("ok") }).openapi({ description: "Health check response" });
|
|
467
|
+
var SessionTreeNodeRoleSchema = external_exports.enum([
|
|
468
|
+
"user",
|
|
469
|
+
"assistant",
|
|
470
|
+
"system",
|
|
471
|
+
"unknown"
|
|
472
|
+
]);
|
|
473
|
+
var SessionTreeNodeKindSchema = external_exports.enum([
|
|
474
|
+
"message",
|
|
475
|
+
"system",
|
|
476
|
+
"other"
|
|
477
|
+
]);
|
|
478
|
+
var SessionTreeNodeSchema = external_exports.lazy(() => external_exports.object({
|
|
479
|
+
id: external_exports.string().min(1),
|
|
480
|
+
parentId: external_exports.string().min(1).optional(),
|
|
481
|
+
kind: SessionTreeNodeKindSchema,
|
|
482
|
+
role: SessionTreeNodeRoleSchema.optional(),
|
|
483
|
+
label: external_exports.string(),
|
|
484
|
+
preview: external_exports.string(),
|
|
485
|
+
isLeaf: external_exports.boolean(),
|
|
486
|
+
isOnActiveBranch: external_exports.boolean(),
|
|
487
|
+
messageIndex: external_exports.number().int().nonnegative().optional(),
|
|
488
|
+
children: external_exports.array(SessionTreeNodeSchema)
|
|
489
|
+
}).openapi({ description: "Browser-safe session tree node" }));
|
|
490
|
+
var SessionTreeSnapshotSchema = external_exports.object({
|
|
491
|
+
sessionId: SessionIdSchema,
|
|
492
|
+
leafId: external_exports.string().min(1).nullable(),
|
|
493
|
+
nodes: external_exports.array(SessionTreeNodeSchema)
|
|
494
|
+
}).openapi({ description: "Session entry tree snapshot for the active branch and branches" });
|
|
495
|
+
var SessionTreeSnapshotResponseSchema = external_exports.object({ snapshot: SessionTreeSnapshotSchema }).openapi({ description: "Session tree read response" });
|
|
496
|
+
var SessionTreeNavigateRequestSchema = external_exports.object({
|
|
497
|
+
sessionId: SessionIdSchema,
|
|
498
|
+
targetEntryId: external_exports.string().min(1).max(256),
|
|
499
|
+
expectedLeafId: external_exports.string().min(1).max(256).optional()
|
|
500
|
+
}).openapi({ description: "Navigate the live session tree to an earlier entry" });
|
|
501
|
+
var SessionTreeNavigateResponseSchema = external_exports.object({ snapshot: SessionTreeSnapshotSchema }).openapi({ description: "Session tree navigate response with authoritative snapshot" });
|
|
2130
502
|
var chatResourcePathSchema = nonEmptyStringSchema.max(1024);
|
|
2131
503
|
var chatResourcePathArraySchema = external_exports.array(chatResourcePathSchema);
|
|
2132
504
|
var chatResourcePathUpdateArraySchema = chatResourcePathArraySchema.max(100);
|
|
@@ -2210,10 +582,26 @@ var ChatSettingsResponseSchema = external_exports.object({
|
|
|
2210
582
|
resourceReloadRequired: external_exports.boolean()
|
|
2211
583
|
})
|
|
2212
584
|
}).openapi({ description: "Pi settings response" });
|
|
585
|
+
function composerCompletionIgnores(draft) {
|
|
586
|
+
if (draft.trimStart().startsWith("/")) return true;
|
|
587
|
+
return /(?:^|\s)@[^\s@]*$/.test(draft);
|
|
588
|
+
}
|
|
589
|
+
function normalizeCompletionDraft(text) {
|
|
590
|
+
return text.trim().replace(/\s+/g, " ");
|
|
591
|
+
}
|
|
592
|
+
function composerCompletionGhost(draft, completion) {
|
|
593
|
+
if (!completion) return void 0;
|
|
594
|
+
const normalizedDraft = normalizeCompletionDraft(draft);
|
|
595
|
+
const normalizedCompletion = normalizeCompletionDraft(completion);
|
|
596
|
+
if (normalizedCompletion.length <= normalizedDraft.length) return void 0;
|
|
597
|
+
if (!normalizedCompletion.toLowerCase().startsWith(normalizedDraft.toLowerCase())) return void 0;
|
|
598
|
+
const suffix = normalizedCompletion.slice(normalizedDraft.length);
|
|
599
|
+
return /\s$/.test(draft) ? suffix.replace(/^\s+/, "") : suffix;
|
|
600
|
+
}
|
|
2213
601
|
|
|
2214
|
-
// node_modules/.pnpm/@tanstack+react-query@5.102.8_react@19.
|
|
602
|
+
// node_modules/.pnpm/@tanstack+react-query@5.102.8_react@19.3.0/node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js
|
|
2215
603
|
import * as React from "react";
|
|
2216
|
-
import { jsx
|
|
604
|
+
import { jsx } from "react/jsx-runtime";
|
|
2217
605
|
var QueryClientContext = React.createContext(void 0);
|
|
2218
606
|
var useQueryClient = (queryClient) => {
|
|
2219
607
|
const client = React.useContext(QueryClientContext);
|
|
@@ -2228,7 +616,7 @@ var QueryClientProvider = ({ client, children }) => {
|
|
|
2228
616
|
client.unmount();
|
|
2229
617
|
};
|
|
2230
618
|
}, [client]);
|
|
2231
|
-
return /* @__PURE__ */
|
|
619
|
+
return /* @__PURE__ */ jsx(QueryClientContext.Provider, {
|
|
2232
620
|
value: client,
|
|
2233
621
|
children
|
|
2234
622
|
});
|
|
@@ -2276,7 +664,7 @@ function systemSetTimeoutZero(callback) {
|
|
|
2276
664
|
|
|
2277
665
|
// node_modules/.pnpm/@tanstack+query-core@5.102.8/node_modules/@tanstack/query-core/build/modern/utils.js
|
|
2278
666
|
var isServer = typeof window === "undefined" || "Deno" in globalThis;
|
|
2279
|
-
function
|
|
667
|
+
function noop() {
|
|
2280
668
|
}
|
|
2281
669
|
function functionalUpdate(updater, input) {
|
|
2282
670
|
return typeof updater === "function" ? updater(input) : updater;
|
|
@@ -2675,7 +1063,7 @@ function createRetryer(config) {
|
|
|
2675
1063
|
promiseResolve = resolve2;
|
|
2676
1064
|
promiseReject = reject2;
|
|
2677
1065
|
});
|
|
2678
|
-
promise.catch(
|
|
1066
|
+
promise.catch(noop);
|
|
2679
1067
|
const isResolved = () => status !== "pending";
|
|
2680
1068
|
const cancel = (cancelOptions) => {
|
|
2681
1069
|
if (!isResolved()) {
|
|
@@ -3111,7 +1499,7 @@ var MutationCache = class extends Subscribable {
|
|
|
3111
1499
|
}
|
|
3112
1500
|
resumePausedMutations() {
|
|
3113
1501
|
const pausedMutations = this.getAll().filter((x) => x.state.isPaused);
|
|
3114
|
-
return notifyManager.batch(() => Promise.all(pausedMutations.map((mutation) => mutation.continue().catch(
|
|
1502
|
+
return notifyManager.batch(() => Promise.all(pausedMutations.map((mutation) => mutation.continue().catch(noop))));
|
|
3115
1503
|
}
|
|
3116
1504
|
};
|
|
3117
1505
|
function scopeFor(mutation) {
|
|
@@ -3267,7 +1655,7 @@ var Query = class extends Removable {
|
|
|
3267
1655
|
cancel(options) {
|
|
3268
1656
|
const promise = this.#retryer?.promise;
|
|
3269
1657
|
this.#retryer?.cancel(options);
|
|
3270
|
-
return promise ? promise.then(
|
|
1658
|
+
return promise ? promise.then(noop).catch(noop) : Promise.resolve();
|
|
3271
1659
|
}
|
|
3272
1660
|
destroy() {
|
|
3273
1661
|
super.destroy();
|
|
@@ -3800,7 +2188,7 @@ var QueryClient = class {
|
|
|
3800
2188
|
...cancelOptions
|
|
3801
2189
|
};
|
|
3802
2190
|
const promises = notifyManager.batch(() => this.#queryCache.findAll(filters).map((query) => query.cancel(defaultedCancelOptions)));
|
|
3803
|
-
return Promise.all(promises).then(
|
|
2191
|
+
return Promise.all(promises).then(noop).catch(noop);
|
|
3804
2192
|
}
|
|
3805
2193
|
invalidateQueries(filters, options = {}) {
|
|
3806
2194
|
return notifyManager.batch(() => {
|
|
@@ -3821,10 +2209,10 @@ var QueryClient = class {
|
|
|
3821
2209
|
};
|
|
3822
2210
|
const promises = notifyManager.batch(() => this.#queryCache.findAll(filters).filter((query) => !query.isDisabled() && !query.isStatic()).map((query) => {
|
|
3823
2211
|
let promise = query.fetch(void 0, fetchOptions);
|
|
3824
|
-
if (!fetchOptions.throwOnError) promise = promise.catch(
|
|
2212
|
+
if (!fetchOptions.throwOnError) promise = promise.catch(noop);
|
|
3825
2213
|
return query.state.fetchStatus === "paused" ? Promise.resolve() : promise;
|
|
3826
2214
|
}));
|
|
3827
|
-
return Promise.all(promises).then(
|
|
2215
|
+
return Promise.all(promises).then(noop);
|
|
3828
2216
|
}
|
|
3829
2217
|
async query(options) {
|
|
3830
2218
|
const defaultedOptions = this.defaultQueryOptions(options);
|
|
@@ -3848,7 +2236,7 @@ var QueryClient = class {
|
|
|
3848
2236
|
* @deprecated Use queryClient.query(options) instead. You can swallow errors with `.catch(noop)`. This method will be removed in the next major version.
|
|
3849
2237
|
*/
|
|
3850
2238
|
prefetchQuery(options) {
|
|
3851
|
-
return this.fetchQuery(options).then(
|
|
2239
|
+
return this.fetchQuery(options).then(noop).catch(noop);
|
|
3852
2240
|
}
|
|
3853
2241
|
infiniteQuery(options) {
|
|
3854
2242
|
options._type = "infinite";
|
|
@@ -3865,7 +2253,7 @@ var QueryClient = class {
|
|
|
3865
2253
|
* @deprecated Use queryClient.infiniteQuery(options) instead. You can swallow errors with `.catch(noop)`. This method will be removed in the next major version.
|
|
3866
2254
|
*/
|
|
3867
2255
|
prefetchInfiniteQuery(options) {
|
|
3868
|
-
return this.fetchInfiniteQuery(options).then(
|
|
2256
|
+
return this.fetchInfiniteQuery(options).then(noop).catch(noop);
|
|
3869
2257
|
}
|
|
3870
2258
|
/**
|
|
3871
2259
|
* @deprecated Use queryClient.infiniteQuery({ ...options, staleTime: 'static' }) instead. This method will be removed in the next major version.
|
|
@@ -4081,7 +2469,7 @@ var QueryObserver = class extends Subscribable {
|
|
|
4081
2469
|
#executeFetch(fetchOptions) {
|
|
4082
2470
|
this.#updateQuery();
|
|
4083
2471
|
let promise = this.#currentQuery.fetch(this.options, fetchOptions);
|
|
4084
|
-
if (!fetchOptions?.throwOnError) promise = promise.catch(
|
|
2472
|
+
if (!fetchOptions?.throwOnError) promise = promise.catch(noop);
|
|
4085
2473
|
return promise;
|
|
4086
2474
|
}
|
|
4087
2475
|
#shouldScheduleTimer(timeout) {
|
|
@@ -4388,15 +2776,15 @@ var MutationObserver = class extends Subscribable {
|
|
|
4388
2776
|
}
|
|
4389
2777
|
};
|
|
4390
2778
|
|
|
4391
|
-
// node_modules/.pnpm/@tanstack+react-query@5.102.8_react@19.
|
|
2779
|
+
// node_modules/.pnpm/@tanstack+react-query@5.102.8_react@19.3.0/node_modules/@tanstack/react-query/build/modern/IsRestoringProvider.js
|
|
4392
2780
|
import * as React2 from "react";
|
|
4393
2781
|
var IsRestoringContext = React2.createContext(false);
|
|
4394
2782
|
var useIsRestoring = () => React2.useContext(IsRestoringContext);
|
|
4395
2783
|
var IsRestoringProvider = IsRestoringContext.Provider;
|
|
4396
2784
|
|
|
4397
|
-
// node_modules/.pnpm/@tanstack+react-query@5.102.8_react@19.
|
|
2785
|
+
// node_modules/.pnpm/@tanstack+react-query@5.102.8_react@19.3.0/node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.js
|
|
4398
2786
|
import * as React3 from "react";
|
|
4399
|
-
import { jsx as
|
|
2787
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
4400
2788
|
function createValue() {
|
|
4401
2789
|
let isReset = false;
|
|
4402
2790
|
return {
|
|
@@ -4414,7 +2802,7 @@ function createValue() {
|
|
|
4414
2802
|
var QueryErrorResetBoundaryContext = React3.createContext(createValue());
|
|
4415
2803
|
var useQueryErrorResetBoundary = () => React3.useContext(QueryErrorResetBoundaryContext);
|
|
4416
2804
|
|
|
4417
|
-
// node_modules/.pnpm/@tanstack+react-query@5.102.8_react@19.
|
|
2805
|
+
// node_modules/.pnpm/@tanstack+react-query@5.102.8_react@19.3.0/node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.js
|
|
4418
2806
|
import * as React4 from "react";
|
|
4419
2807
|
var ensurePreventErrorBoundaryRetry = (options, errorResetBoundary, query) => {
|
|
4420
2808
|
const throwOnError = query?.state.error && typeof options.throwOnError === "function" ? shouldThrowError(options.throwOnError, [query.state.error, query]) : options.throwOnError;
|
|
@@ -4431,13 +2819,13 @@ var getHasError = ({ result, errorResetBoundary, throwOnError, query, suspense }
|
|
|
4431
2819
|
return result.isError && !errorResetBoundary.isReset() && !result.isFetching && query && (suspense && result.data === void 0 || shouldThrowError(throwOnError, [result.error, query]));
|
|
4432
2820
|
};
|
|
4433
2821
|
|
|
4434
|
-
// node_modules/.pnpm/@tanstack+react-query@5.102.8_react@19.
|
|
2822
|
+
// node_modules/.pnpm/@tanstack+react-query@5.102.8_react@19.3.0/node_modules/@tanstack/react-query/build/modern/suspense.js
|
|
4435
2823
|
var ensureSuspenseTimers = (defaultedOptions) => {
|
|
4436
2824
|
if (defaultedOptions.suspense) {
|
|
4437
2825
|
const MIN_SUSPENSE_TIME_MS = 1e3;
|
|
4438
|
-
const
|
|
2826
|
+
const clamp = (value) => value === "static" ? value : Math.max(value ?? MIN_SUSPENSE_TIME_MS, MIN_SUSPENSE_TIME_MS);
|
|
4439
2827
|
const originalStaleTime = defaultedOptions.staleTime;
|
|
4440
|
-
defaultedOptions.staleTime = typeof originalStaleTime === "function" ? (...args) =>
|
|
2828
|
+
defaultedOptions.staleTime = typeof originalStaleTime === "function" ? (...args) => clamp(originalStaleTime(...args)) : clamp(originalStaleTime);
|
|
4441
2829
|
if (typeof defaultedOptions.gcTime === "number") defaultedOptions.gcTime = Math.max(defaultedOptions.gcTime, MIN_SUSPENSE_TIME_MS);
|
|
4442
2830
|
}
|
|
4443
2831
|
};
|
|
@@ -4446,7 +2834,7 @@ var fetchOptimistic = (defaultedOptions, observer, errorResetBoundary) => observ
|
|
|
4446
2834
|
errorResetBoundary.clearReset();
|
|
4447
2835
|
});
|
|
4448
2836
|
|
|
4449
|
-
// node_modules/.pnpm/@tanstack+react-query@5.102.8_react@19.
|
|
2837
|
+
// node_modules/.pnpm/@tanstack+react-query@5.102.8_react@19.3.0/node_modules/@tanstack/react-query/build/modern/useBaseQuery.js
|
|
4450
2838
|
import * as React5 from "react";
|
|
4451
2839
|
function useBaseQuery(options, Observer, queryClient) {
|
|
4452
2840
|
if (process.env.NODE_ENV !== "production") {
|
|
@@ -4469,7 +2857,7 @@ function useBaseQuery(options, Observer, queryClient) {
|
|
|
4469
2857
|
const result = observer.getOptimisticResult(defaultedOptions);
|
|
4470
2858
|
const shouldSubscribe = !isRestoring && subscribed;
|
|
4471
2859
|
React5.useSyncExternalStore(React5.useCallback((onStoreChange) => {
|
|
4472
|
-
const unsubscribe = shouldSubscribe ? observer.subscribe(notifyManager.batchCalls(onStoreChange)) :
|
|
2860
|
+
const unsubscribe = shouldSubscribe ? observer.subscribe(notifyManager.batchCalls(onStoreChange)) : noop;
|
|
4473
2861
|
observer.updateResult();
|
|
4474
2862
|
return unsubscribe;
|
|
4475
2863
|
}, [observer, shouldSubscribe]), () => observer.getCurrentResult(), () => observer.getCurrentResult());
|
|
@@ -4487,12 +2875,12 @@ function useBaseQuery(options, Observer, queryClient) {
|
|
|
4487
2875
|
return !defaultedOptions.notifyOnChangeProps ? observer.trackResult(result) : result;
|
|
4488
2876
|
}
|
|
4489
2877
|
|
|
4490
|
-
// node_modules/.pnpm/@tanstack+react-query@5.102.8_react@19.
|
|
2878
|
+
// node_modules/.pnpm/@tanstack+react-query@5.102.8_react@19.3.0/node_modules/@tanstack/react-query/build/modern/useQuery.js
|
|
4491
2879
|
function useQuery(options, queryClient) {
|
|
4492
2880
|
return useBaseQuery(options, QueryObserver, queryClient);
|
|
4493
2881
|
}
|
|
4494
2882
|
|
|
4495
|
-
// node_modules/.pnpm/@tanstack+react-query@5.102.8_react@19.
|
|
2883
|
+
// node_modules/.pnpm/@tanstack+react-query@5.102.8_react@19.3.0/node_modules/@tanstack/react-query/build/modern/useMutation.js
|
|
4496
2884
|
import * as React6 from "react";
|
|
4497
2885
|
function useMutation(options, queryClient) {
|
|
4498
2886
|
const client = useQueryClient(queryClient);
|
|
@@ -4502,7 +2890,7 @@ function useMutation(options, queryClient) {
|
|
|
4502
2890
|
}, [observer, options]);
|
|
4503
2891
|
const result = React6.useSyncExternalStore(React6.useCallback((onStoreChange) => observer.subscribe(notifyManager.batchCalls(onStoreChange)), [observer]), () => observer.getCurrentResult(), () => observer.getCurrentResult());
|
|
4504
2892
|
const mutate = React6.useCallback((...args) => {
|
|
4505
|
-
observer.mutate(args[0], args[1]).catch(
|
|
2893
|
+
observer.mutate(args[0], args[1]).catch(noop);
|
|
4506
2894
|
}, [observer]);
|
|
4507
2895
|
if (result.error && shouldThrowError(observer.options.throwOnError, [result.error])) throw result.error;
|
|
4508
2896
|
return {
|
|
@@ -4513,40 +2901,6 @@ function useMutation(options, queryClient) {
|
|
|
4513
2901
|
}
|
|
4514
2902
|
|
|
4515
2903
|
export {
|
|
4516
|
-
pipe,
|
|
4517
|
-
progress,
|
|
4518
|
-
reverseEasing,
|
|
4519
|
-
circOut,
|
|
4520
|
-
isEasingArray,
|
|
4521
|
-
createGeneratorEasing,
|
|
4522
|
-
spring,
|
|
4523
|
-
fillOffset,
|
|
4524
|
-
defaultOffset,
|
|
4525
|
-
getValueTransition,
|
|
4526
|
-
animateMotionValue,
|
|
4527
|
-
resolveVariant,
|
|
4528
|
-
isKeyframesTarget,
|
|
4529
|
-
addValueToWillChange,
|
|
4530
|
-
getOptimisedAppearId,
|
|
4531
|
-
animateTarget,
|
|
4532
|
-
resolveElements,
|
|
4533
|
-
isSVGElement,
|
|
4534
|
-
isSVGSVGElement,
|
|
4535
|
-
convertBoundingBoxToBox,
|
|
4536
|
-
convertBoxToBoundingBox,
|
|
4537
|
-
hasScale,
|
|
4538
|
-
hasTransform,
|
|
4539
|
-
has2DTranslate,
|
|
4540
|
-
scalePoint,
|
|
4541
|
-
applyBoxDelta,
|
|
4542
|
-
applyTreeDeltas,
|
|
4543
|
-
translateAxis,
|
|
4544
|
-
transformBox,
|
|
4545
|
-
measurePageBox,
|
|
4546
|
-
HTMLVisualElement,
|
|
4547
|
-
SVGVisualElement,
|
|
4548
|
-
animateSingleValue,
|
|
4549
|
-
MotionConfig,
|
|
4550
2904
|
initAnalytics,
|
|
4551
2905
|
NETWORK_DISCONNECTED_MESSAGE,
|
|
4552
2906
|
FLEET_ADAPTER_CAPABILITIES,
|
|
@@ -4563,13 +2917,22 @@ export {
|
|
|
4563
2917
|
ChatProviderOAuthLoginRequestSchema,
|
|
4564
2918
|
ChatProviderOAuthLoginResponseSchema,
|
|
4565
2919
|
ChatCommandsResponseSchema,
|
|
2920
|
+
ComposerCompletionRequestSchema,
|
|
2921
|
+
ComposerIntentRequestSchema,
|
|
2922
|
+
ComposerIntentCredentialSchema,
|
|
2923
|
+
ComposerIntentSettingsUpdateSchema,
|
|
4566
2924
|
ChatMcpListResponseSchema,
|
|
4567
2925
|
ChatMcpUpsertRequestSchema,
|
|
4568
2926
|
ChatMcpDeleteRequestSchema,
|
|
4569
2927
|
ChatMcpOAuthLoginRequestSchema,
|
|
4570
2928
|
ChatMcpOAuthLoginResponseSchema,
|
|
2929
|
+
SessionTreeSnapshotResponseSchema,
|
|
2930
|
+
SessionTreeNavigateRequestSchema,
|
|
2931
|
+
SessionTreeNavigateResponseSchema,
|
|
4571
2932
|
ChatSettingsUpdateRequestSchema,
|
|
4572
2933
|
ChatSettingsResponseSchema,
|
|
2934
|
+
composerCompletionIgnores,
|
|
2935
|
+
composerCompletionGhost,
|
|
4573
2936
|
useQueryClient,
|
|
4574
2937
|
QueryClientProvider,
|
|
4575
2938
|
isServer,
|