@qredence/fleet 0.6.1 → 0.6.3
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 +17 -0
- package/dist/web/client/assets/DialogTitle-DiAm7YNe.js +1 -0
- package/dist/web/client/assets/agent-disclosure-CMrxF7L-.js +1 -0
- package/dist/web/client/assets/alert-dialog-CYE37KMM.js +1 -0
- package/dist/web/client/assets/analytics-stub-C2vgmGm_.js +1 -0
- package/dist/web/client/assets/artifacts-panel-ClDpGWOU.js +1 -0
- package/dist/web/client/assets/{bot-Bs7QWJ2q.js → bot-DbB9BKL0.js} +1 -1
- package/dist/web/client/assets/bundle-mjs-cJTHqqzI.js +1 -0
- package/dist/web/client/assets/button-Dl0ce3Y5.js +1 -0
- package/dist/web/client/assets/{card-DA3Vnqay.js → card-DCEnYd2G.js} +1 -1
- package/dist/web/client/assets/chat-BVMnC5Qh.js +52 -0
- package/dist/web/client/assets/chat-command-palette-YuyaJNbi.js +1 -0
- package/dist/web/client/assets/check-B3LlvM65.js +1 -0
- package/dist/web/client/assets/{chevron-down-BEVGmnSb.js → chevron-down-DUUprRP5.js} +1 -1
- package/dist/web/client/assets/chevron-right-NVqQIoiO.js +1 -0
- package/dist/web/client/assets/{chunk-YOKDWASO-BAf618wr.js → chunk-YOKDWASO-Bte3iwlH.js} +6 -6
- package/dist/web/client/assets/citations-DXqV2NLy.js +1 -0
- package/dist/web/client/assets/collapsible-CUxOjhDJ.js +1 -0
- package/dist/web/client/assets/command-Cw4X8Bpk.js +1 -0
- package/dist/web/client/assets/createBaseUIEventDetails-B58Jldei.js +1 -0
- package/dist/web/client/assets/createLucideIcon-_dfI7Arx.js +1 -0
- package/dist/web/client/assets/dialog-BzcIOvFC.js +1 -0
- package/dist/web/client/assets/dist-52wg4XPY.js +1 -0
- package/dist/web/client/assets/dist-DbHxXSgQ.js +41 -0
- package/dist/web/client/assets/ease-CMumuPlX.js +1 -0
- package/dist/web/client/assets/{eye-B0DFz5hL.js → eye-CDHqtVoE.js} +1 -1
- package/dist/web/client/assets/file-text-TmalmYrb.js +1 -0
- package/dist/web/client/assets/{folder-BC5p7qK7.js → folder-vuNT4shY.js} +1 -1
- package/dist/web/client/assets/{fork-picker-dialog-B7NNpVmW.js → fork-picker-dialog-BYRr-xTy.js} +1 -1
- package/dist/web/client/assets/gauge-BsDqNM1A.js +1 -0
- package/dist/web/client/assets/git-branch-CTq9aACS.js +1 -0
- package/dist/web/client/assets/globals-BtCXZXL_.css +2 -0
- package/dist/web/client/assets/{hard-drive-CHqgr7VQ.js → hard-drive-BT7UxHQu.js} +1 -1
- package/dist/web/client/assets/highlighted-body-KPVGNVTW-CgT7gqvs.js +1 -0
- package/dist/web/client/assets/horizontal-resize-VLjLByUV.js +1 -0
- package/dist/web/client/assets/index-B9aXxpOv.js +12 -0
- package/dist/web/client/assets/input-CxZp56Im.js +1 -0
- package/dist/web/client/assets/input-group-D7lAfKHR.js +1 -0
- package/dist/web/client/assets/ipython-tool-CkHaO3PW.js +3 -0
- package/dist/web/client/assets/is-ref-object-BcRWZ4l7.js +1 -0
- package/dist/web/client/assets/{loader-circle-DjfHXUPB.js → loader-circle-B5GIZGxd.js} +1 -1
- package/dist/web/client/assets/markdown-BHkByC9K.js +2 -0
- package/dist/web/client/assets/{markdown-code-xNyjdZ4g.js → markdown-code-CDTRq-HZ.js} +1 -1
- package/dist/web/client/assets/mermaid-HWGCJPDP-CY3N5ECk.js +1 -0
- package/dist/web/client/assets/message-queue-Dl8wbCOu.js +1 -0
- package/dist/web/client/assets/model-selector-list-CHD8lMAl.js +1 -0
- package/dist/web/client/assets/{notify-DxL0VD7Z.js → notify-DjVixft7.js} +1 -1
- package/dist/web/client/assets/{openui-renderer-TLNe5e_Q.js → openui-renderer-C4e9FOVR.js} +38 -38
- package/dist/web/client/assets/{package-CdcJFPf2.js → package-BKBPgwMP.js} +1 -1
- package/dist/web/client/assets/{pencil-DcUwsKLn.js → pencil-CdO6qfv3.js} +1 -1
- package/dist/web/client/assets/{plug-Dt6VN0zF.js → plug-BRROUIw-.js} +1 -1
- package/dist/web/client/assets/prompt-input-WaGSKZCU.js +1 -0
- package/dist/web/client/assets/prompt-suggestions-BNyTcyWg.js +1 -0
- package/dist/web/client/assets/provider-catalog-ClVvphe0.js +1 -0
- package/dist/web/client/assets/provider-label-CwZ-KDxk.js +1 -0
- package/dist/web/client/assets/react-CwJFpaho.js +1 -0
- package/dist/web/client/assets/react-dom-DX3XddaT.js +1 -0
- package/dist/web/client/assets/{refresh-cw-IThTJ3j-.js → refresh-cw-l9WPHRkq.js} +1 -1
- package/dist/web/client/assets/repl-panel-L9dmPqio.js +1 -0
- package/dist/web/client/assets/{resource-helpers-Q2T0YCMO.js → resource-helpers-BuWybA8l.js} +1 -1
- package/dist/web/client/assets/resources-panel-mT-aMCvV.js +1 -0
- package/dist/web/client/assets/right-panel-context-CS8tJMzE.js +1 -0
- package/dist/web/client/assets/right-panel-registry-BnYCffmM.js +2 -0
- package/dist/web/client/assets/{rotate-ccw-WNFNkKQD.js → rotate-ccw-CfGhzOv7.js} +1 -1
- package/dist/web/client/assets/routes-DUontXSG.js +16 -0
- package/dist/web/client/assets/safe-external-url-BbAom7Bm.js +1 -0
- package/dist/web/client/assets/search-BjcXAUrI.js +1 -0
- package/dist/web/client/assets/session-insights-panel-B0rl37lo.js +1 -0
- package/dist/web/client/assets/session-reasoning-panel-8D2P7iaJ.js +1 -0
- package/dist/web/client/assets/session-tool-renderer-Bd3dsE2D.js +1395 -0
- package/dist/web/client/assets/session-tree-panel-CM4_wwrM.js +1 -0
- package/dist/web/client/assets/settings-dialog-DMTD9m6z.js +2 -0
- package/dist/web/client/assets/{skeleton-CkR2VmWc.js → skeleton-C3mo31Qu.js} +1 -1
- package/dist/web/client/assets/skeleton-loaders-BMa_G4yX.js +1 -0
- package/dist/web/client/assets/sparkles-BY5MFyk6.js +1 -0
- package/dist/web/client/assets/square-DQaQu9bp.js +1 -0
- package/dist/web/client/assets/{square-terminal-BYTN_I86.js → square-terminal-BsopiuN7.js} +1 -1
- package/dist/web/client/assets/{subagent-chat-panel-oeLDPDAK.js → subagent-chat-panel-BESrXxAR.js} +1 -1
- package/dist/web/client/assets/subagent-transcript-CAqFJfMj.js +1 -0
- package/dist/web/client/assets/subagents-panel-8aKOwWLs.js +1 -0
- package/dist/web/client/assets/{sun-BWiZFty0.js → sun-D0llhiMU.js} +1 -1
- package/dist/web/client/assets/surfaces-CpfsGAIA.js +1 -0
- package/dist/web/client/assets/switch-D3FhZU-S.js +1 -0
- package/dist/web/client/assets/terminal-BQAKkBY6.js +1 -0
- package/dist/web/client/assets/toast-lnCWGgSE.js +1 -0
- package/dist/web/client/assets/tokens-Ch5WqXC_.js +1 -0
- package/dist/web/client/assets/tool-result-B_yb2JoE.js +4 -0
- package/dist/web/client/assets/tool-timeline-VnMRQoLS.js +1 -0
- package/dist/web/client/assets/{triangle-alert-CU-gd7ui.js → triangle-alert-GAYh_5d3.js} +1 -1
- package/dist/web/client/assets/ui-preferences-aG2U2jjW.js +1 -0
- package/dist/web/client/assets/use-presence-7I2qv4qI.js +1 -0
- package/dist/web/client/assets/use-reduced-motion-BOcG709U.js +9 -0
- package/dist/web/client/assets/useBaseUiId-D9ZGPZ6f.js +1 -0
- package/dist/web/client/assets/useControlled-CgAAWIy9.js +1 -0
- package/dist/web/client/assets/utils-Brtgag-m.js +1 -0
- package/dist/web/client/assets/virtualized-turn-list-mL3ONUUA.js +6 -0
- package/dist/web/client/assets/workspace-panel-CKF5JQl2.js +1 -0
- package/dist/web/client/assets/workspace-path-nav-DqPbETfJ.js +2 -0
- package/dist/web/client/assets/{wrench-BJNNe07k.js → wrench-Myc12BTA.js} +1 -1
- package/dist/web/client/assets/x-BGsDD848.js +1 -0
- package/dist/web/client/bundle-budget.json +6 -6
- package/dist/web/server/_tanstack-start-manifest_v-Cm8xE-Rb-TMLYN3GY.js +93 -0
- package/dist/web/server/{artifacts-panel-D3ySO--V-XSL53CXL.js → artifacts-panel-CwLVBqyi-CDORJY75.js} +37 -41
- package/dist/web/server/{chat-command-palette-kAbXhWVg-TJWXH2WW.js → chat-command-palette-DUha04ia-5OV7WVJZ.js} +20 -18
- package/dist/web/server/{chunk-SALXCFVO.js → chunk-33QA7BQJ.js} +19 -1
- package/dist/web/server/chunk-3Q3QKLHC.js +386 -0
- package/dist/web/server/chunk-4EBSM4JR.js +74 -0
- package/dist/web/server/{chunk-5UCAJBAH.js → chunk-5RTGRTPD.js} +82 -49
- package/dist/web/server/chunk-7E76R7MB.js +2138 -0
- package/dist/web/server/{chunk-EBG3XFGQ.js → chunk-7FK6YEMA.js} +49 -44
- package/dist/web/server/chunk-7HXCGBUP.js +56 -0
- package/dist/web/server/{chunk-P66QQWUM.js → chunk-7NZ3FJDA.js} +14 -1
- package/dist/web/server/{chunk-HF7DG7PC.js → chunk-7UTDOTOU.js} +80 -78
- package/dist/web/server/{chunk-NNKJTKOQ.js → chunk-ADYZWC5L.js} +311 -281
- package/dist/web/server/{chunk-NJ4QEZHK.js → chunk-B2LF64HM.js} +7 -5
- package/dist/web/server/{chunk-OZO5ARFA.js → chunk-BQROC4PL.js} +11 -2
- package/dist/web/server/{chunk-NIZBFVJF.js → chunk-CAPTFJOC.js} +9 -7
- package/dist/web/server/{chunk-DJMHPJBP.js → chunk-CHEC7TWB.js} +3 -1
- package/dist/web/server/chunk-DLA5TLKX.js +164 -0
- package/dist/web/server/{chunk-PLYZ7P2Y.js → chunk-DP26GVWH.js} +43 -5
- package/dist/web/server/{chunk-MNBGB2SP.js → chunk-E5HALE4M.js} +4 -4
- package/dist/web/server/chunk-ETCO5KZK.js +113 -0
- package/dist/web/server/{chunk-NGCQJ33Y.js → chunk-FMAYMBRS.js} +1492 -1640
- package/dist/web/server/{chunk-KP2PNDGL.js → chunk-FTLJ66KU.js} +30 -33
- package/dist/web/server/{chunk-BLSX7WHW.js → chunk-H5D5DX3K.js} +23 -21
- package/dist/web/server/chunk-HGVJEUV4.js +102 -0
- package/dist/web/server/{chunk-WNCAL4HN.js → chunk-HQ5TEXHT.js} +132 -152
- package/dist/web/server/{chunk-YOM42BKD.js → chunk-IPV4GLJL.js} +16 -16
- package/dist/web/server/chunk-K6PTNSCW.js +31 -0
- package/dist/web/server/{chunk-AR7O7JXD.js → chunk-KBWUBWVJ.js} +24 -1
- package/dist/web/server/{chunk-O3HDELZ2.js → chunk-KZ35W5M7.js} +667 -661
- package/dist/web/server/{chunk-QIULBRTU.js → chunk-MJXXVQNA.js} +79 -84
- package/dist/web/server/{chunk-EAJTWMK5.js → chunk-NZ6KQT2X.js} +2 -2
- package/dist/web/server/{chunk-YGYOBX7G.js → chunk-O2IC376F.js} +1811 -53
- package/dist/web/server/chunk-OMPXUTMX.js +33 -0
- package/dist/web/server/{chunk-S3PQ6HKH.js → chunk-OVJYUWSQ.js} +2 -2
- package/dist/web/server/{chunk-JTCCQZLN.js → chunk-RJNGEU6C.js} +2 -2
- package/dist/web/server/{chunk-UCUFC553.js → chunk-RXUMFFUV.js} +3 -3
- package/dist/web/server/{chunk-DLUZFOG3.js → chunk-S2IBIJIG.js} +18 -22
- package/dist/web/server/{chunk-DO2O27B2.js → chunk-SDV3P3IW.js} +2 -2
- package/dist/web/server/{chunk-2DDWXTVG.js → chunk-T2UTBHJ4.js} +55 -11
- package/dist/web/server/chunk-TLNZNR7C.js +46 -0
- package/dist/web/server/{chunk-UL2725KQ.js → chunk-TR2GA5OF.js} +57 -49
- package/dist/web/server/{chunk-QFRCJWQQ.js → chunk-TU2WNRAL.js} +93 -32
- package/dist/web/server/{chunk-FYDQK6UX.js → chunk-UDD5W4CR.js} +32 -10
- package/dist/web/server/{chunk-MNPHMZU7.js → chunk-UE32PAV2.js} +47 -57
- package/dist/web/server/{chunk-3TIMGWWI.js → chunk-UM3RHJNZ.js} +2 -2
- package/dist/web/server/{chunk-ZIFSJ3HQ.js → chunk-V5IFFLZQ.js} +185 -109
- package/dist/web/server/{chunk-ETTDO4UO.js → chunk-WTYNN6EV.js} +1 -26
- package/dist/web/server/{chunk-EJEPDVK6.js → chunk-WU6X3GPJ.js} +48 -5
- package/dist/web/server/{chunk-D27LRYVT.js → chunk-XEG4JTND.js} +10 -9
- package/dist/web/server/{chunk-XIB6XNUX.js → chunk-XJ6TGSUB.js} +425 -404
- package/dist/web/server/{chunk-NWDI3OWB.js → chunk-XSOUURPF.js} +30 -26
- package/dist/web/server/{chunk-RIP3PBWT.js → chunk-YCCF676T.js} +4 -4
- package/dist/web/server/{chunk-4WBFCB4O.js → chunk-YDDDSVNB.js} +178 -269
- package/dist/web/server/{chunk-GETSIVNU.js → chunk-YVGCPUAW.js} +7 -7
- package/dist/web/server/{chunk-4UBOIY2S.js → chunk-ZNFXBGLK.js} +1 -1
- package/dist/web/server/{fork-picker-dialog-Ds6Tgtu3-DIBWN7MV.js → fork-picker-dialog-DeMiLZtS-WTRTTP64.js} +10 -8
- package/dist/web/server/{markdown-DTnMbD87-FXGGAPJD.js → markdown-BzNejPoZ-6ITTDAV6.js} +2 -3
- package/dist/web/server/{markdown-code-BStjFfsy-SSLWUT4S.js → markdown-code-DAwXuW6m-HHVELO6I.js} +3 -4
- package/dist/web/server/{fleet-message-queue-D_w8lSeY-T3HB7HVQ.js → message-queue-Demph1x4-GGXJUUKO.js} +14 -10
- package/dist/web/server/{model-selector-list-DxeGZoD2-P6S6FSJH.js → model-selector-list-BeGQHwKV-UJYFO4KX.js} +21 -19
- package/dist/web/server/{openui-renderer-MKFv6LlH-MDRSVFEY.js → openui-renderer-B4z18Brm-HSMKJ47D.js} +17 -17
- package/dist/web/server/{prompt-suggestions-BOItmGnD-YQA7RHLG.js → prompt-suggestions-yPZqX__K-3VGJC4IF.js} +7 -6
- package/dist/web/server/{repl-panel-CuyF8wt5-CHDT2Q3N.js → repl-panel-CgUF1qUw-3DFD2V53.js} +10 -11
- package/dist/web/server/{resources-panel-CE5pD4vy-V5FXBTYC.js → resources-panel-ChUliWV--JITAGS6Q.js} +6 -7
- package/dist/web/server/{router-Dg72SESP-PCWKLFRG.js → router-DfG45nTQ-3VXEUYG5.js} +3336 -238
- package/dist/web/server/{routes-BGrVtPYF-SURPAJN6.js → routes-B9F9UfF1-UN2IVBMJ.js} +5156 -4242
- package/dist/web/server/server.js +2 -2
- package/dist/web/server/{session-insights-panel-CUhdgvRt-VB2HUCQP.js → session-insights-panel-xgrkX1Rp-FDNURBXZ.js} +9 -9
- package/dist/web/server/{fleet-reasoning-panel-DG_vuvv0-NCZWEEIT.js → session-reasoning-panel-m1RgcIph-NUXGXVKE.js} +21 -22
- package/dist/web/server/session-tool-renderer-CT65wuet-RQBMXHEZ.js +46 -0
- package/dist/web/server/session-tree-panel-rS0t1wbf-HNA6AJBY.js +229 -0
- package/dist/web/server/{settings-dialog-CK0FJlTg-HZRBAXDZ.js → settings-dialog-CqkrDSnm-LFEKSS7Y.js} +186 -1380
- package/dist/web/server/{subagent-chat-panel-gzamnTgK-PQ2TLLJF.js → subagent-chat-panel-Cf7QdDqH-DPPSVLSY.js} +31 -39
- package/dist/web/server/{subagents-panel-Berjd7HJ-EI5ZKC6V.js → subagents-panel-_JsUw-6t-MZWM5P45.js} +38 -45
- package/dist/web/server/{fleet-tool-timeline-D6yM4ZMz-ZSFVRRRI.js → tool-timeline-QL9k5dzA-RLU26HXT.js} +6 -6
- package/dist/web/server/{workspace-panel-CBBa_3UO-B4PPFPMA.js → workspace-panel-BHEB9nRM-Y6KGIVGP.js} +23 -30
- package/package.json +1 -1
- package/dist/web/client/assets/action-swap-roll-COzQ86wm.js +0 -1
- package/dist/web/client/assets/agent-activity-svETLf_5.js +0 -1
- package/dist/web/client/assets/agent-disclosure-DAMuuGcM.js +0 -1
- package/dist/web/client/assets/analytics-stub-B6zGMuSV.js +0 -1
- package/dist/web/client/assets/artifacts-panel-HVjqBMyx.js +0 -1
- package/dist/web/client/assets/artifacts-utils-N_kUFbz2.js +0 -1
- package/dist/web/client/assets/bundle-mjs-DKHVkVWu.js +0 -1
- package/dist/web/client/assets/button-C5wFDY5_.js +0 -1
- package/dist/web/client/assets/chat-BhYseKd6.js +0 -52
- package/dist/web/client/assets/chat-command-palette-LILDO_vG.js +0 -1
- package/dist/web/client/assets/check-JjHKAZas.js +0 -1
- package/dist/web/client/assets/chevron-right-DrJxToLs.js +0 -1
- package/dist/web/client/assets/chevron-up-CnSvySGH.js +0 -1
- package/dist/web/client/assets/circle-alert-CONlFReH.js +0 -1
- package/dist/web/client/assets/circle-x-CkKCB__4.js +0 -1
- package/dist/web/client/assets/citations-BPv8HIpf.js +0 -2
- package/dist/web/client/assets/cn-C8c0S2mI.js +0 -1
- package/dist/web/client/assets/collapsible-BoXtZZWN.js +0 -1
- package/dist/web/client/assets/command-PhicLCoO.js +0 -1
- package/dist/web/client/assets/createBaseUIEventDetails-DV0dQrBX.js +0 -1
- package/dist/web/client/assets/createLucideIcon-DwxZHm0M.js +0 -1
- package/dist/web/client/assets/dialog-pBGUjAQ7.js +0 -1
- package/dist/web/client/assets/dist-BPaFisIZ.js +0 -41
- package/dist/web/client/assets/earth-DGZXAN5r.js +0 -1
- package/dist/web/client/assets/ease-u56MhKYS.js +0 -1
- package/dist/web/client/assets/file-text-T-NcAlZs.js +0 -1
- package/dist/web/client/assets/fleet-message-queue-fbYYwMj0.js +0 -1
- package/dist/web/client/assets/fleet-pi-tool-renderer-BRgNnmaJ.js +0 -1395
- package/dist/web/client/assets/fleet-reasoning-panel-CjA2dwUJ.js +0 -1
- package/dist/web/client/assets/fleet-subagent-list-iKUtLJKZ.js +0 -1
- package/dist/web/client/assets/fleet-tool-timeline-C8heL7ae.js +0 -1
- package/dist/web/client/assets/gauge-DNpstbBn.js +0 -1
- package/dist/web/client/assets/globals-CuIiqOTg.css +0 -2
- package/dist/web/client/assets/highlighted-body-KPVGNVTW-sUCZ1fHv.js +0 -1
- package/dist/web/client/assets/horizontal-resize-Cp3iHMH7.js +0 -1
- package/dist/web/client/assets/image-BbPmlw-n.js +0 -1
- package/dist/web/client/assets/index-CSGplyr_.js +0 -12
- package/dist/web/client/assets/input-PcdubeKn.js +0 -1
- package/dist/web/client/assets/input-group-C2HJEZvl.js +0 -1
- package/dist/web/client/assets/ipython-tool-CyuMOxz1.js +0 -3
- package/dist/web/client/assets/layout-gyLzPvVv.js +0 -1
- package/dist/web/client/assets/markdown-lvexwooo.js +0 -2
- package/dist/web/client/assets/mermaid-HWGCJPDP-Bm7CuruA.js +0 -1
- package/dist/web/client/assets/message-square-hbDao-A1.js +0 -1
- package/dist/web/client/assets/model-selector-list-CoXX358G.js +0 -1
- package/dist/web/client/assets/plus-DXN1Bg_z.js +0 -1
- package/dist/web/client/assets/prompt-input-fwP8TsgQ.js +0 -1
- package/dist/web/client/assets/prompt-suggestions-BlGXmWS7.js +0 -1
- package/dist/web/client/assets/provider-catalog-DYMFdbKc.js +0 -1
- package/dist/web/client/assets/provider-label-B4q5mI65.js +0 -1
- package/dist/web/client/assets/react-dom-Bwxum3ti.js +0 -1
- package/dist/web/client/assets/repl-panel-C5om8MGU.js +0 -1
- package/dist/web/client/assets/resources-panel-D867-goy.js +0 -1
- package/dist/web/client/assets/right-panel-context-DHlNWJsF.js +0 -1
- package/dist/web/client/assets/right-panel-registry-BBlxLxnx.js +0 -2
- package/dist/web/client/assets/routes-XGsAIqBJ.js +0 -16
- package/dist/web/client/assets/safe-external-url-D3PJJIcM.js +0 -1
- package/dist/web/client/assets/search-eWVnAJsb.js +0 -1
- package/dist/web/client/assets/session-insights-panel-YnaXvTpi.js +0 -1
- package/dist/web/client/assets/settings-dialog-BSBasR3o.js +0 -2
- package/dist/web/client/assets/shield-check-CkA2viVW.js +0 -1
- package/dist/web/client/assets/skeleton-loaders-C9vHwAYV.js +0 -1
- package/dist/web/client/assets/sparkles-DuclzqlE.js +0 -1
- package/dist/web/client/assets/square-Bhn8gjr0.js +0 -1
- package/dist/web/client/assets/subagent-transcript-DaVHjNUH.js +0 -1
- package/dist/web/client/assets/subagent-utils-DDH5qm9Z.js +0 -1
- package/dist/web/client/assets/subagents-panel-D_aVgSCi.js +0 -1
- package/dist/web/client/assets/surfaces-BhAXz9So.js +0 -1
- package/dist/web/client/assets/switch-WhXeJNNY.js +0 -1
- package/dist/web/client/assets/terminal-DOS1s1gm.js +0 -1
- package/dist/web/client/assets/toast-D3c9XeGe.js +0 -1
- package/dist/web/client/assets/tool-result-Cki8WUNc.js +0 -4
- package/dist/web/client/assets/ui-preferences-CImQGZm_.js +0 -1
- package/dist/web/client/assets/use-reduced-motion-eORd7fqW.js +0 -9
- package/dist/web/client/assets/useBaseUiId-CHqXB2UQ.js +0 -1
- package/dist/web/client/assets/useControlled-CJJ9BOQB.js +0 -1
- package/dist/web/client/assets/utils-Eg7xtNmV.js +0 -1
- package/dist/web/client/assets/virtualized-turn-list-CdMa-ydT.js +0 -6
- package/dist/web/client/assets/workspace-panel-77bDbprs.js +0 -1
- package/dist/web/client/assets/workspace-path-nav-C0AQNZyy.js +0 -1
- package/dist/web/client/assets/x-CsRC_tCI.js +0 -1
- package/dist/web/server/_tanstack-start-manifest_v-0L7fqnH4-KMVGUFE4.js +0 -95
- package/dist/web/server/agent-activity-BuEE6iVw-CDZLK4D2.js +0 -514
- package/dist/web/server/chunk-2JHTYWD5.js +0 -1196
- package/dist/web/server/chunk-3JMESBAT.js +0 -35
- package/dist/web/server/chunk-42XU6WV7.js +0 -56
- package/dist/web/server/chunk-AQ66E5OW.js +0 -33
- package/dist/web/server/chunk-BYXBJQAS.js +0 -0
- package/dist/web/server/chunk-FAGDMGLK.js +0 -6589
- package/dist/web/server/chunk-FJV6EQDW.js +0 -36
- package/dist/web/server/chunk-GL6HWDJB.js +0 -19
- package/dist/web/server/chunk-L46H6IDX.js +0 -13
- package/dist/web/server/chunk-NIDBN7BQ.js +0 -86
- package/dist/web/server/chunk-ON33WDZX.js +0 -31
- package/dist/web/server/chunk-PVJCTQFK.js +0 -22
- package/dist/web/server/chunk-QPNUGF3V.js +0 -35
- package/dist/web/server/chunk-S5LFXXDY.js +0 -1265
- package/dist/web/server/chunk-VPKX7QRU.js +0 -42
- package/dist/web/server/chunk-ZCVWADNW.js +0 -37
- package/dist/web/server/fleet-pi-tool-renderer-qwc-qZFq-4U556N5Q.js +0 -51
- package/dist/web/server/fleet-subagent-list-BGb0PjhF-2X67FMUV.js +0 -18
|
@@ -1,54 +1,1739 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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";
|
|
8
65
|
import {
|
|
9
66
|
ChatDeliveryModeSchema,
|
|
10
67
|
ChatThinkingLevelSchema,
|
|
11
68
|
ChatTransportSchema,
|
|
69
|
+
SessionIdSchema,
|
|
12
70
|
external_exports,
|
|
13
71
|
nonEmptyStringSchema,
|
|
14
72
|
nonNegativeIntSchema,
|
|
15
73
|
positiveIntSchema
|
|
16
|
-
} from "./chunk-
|
|
74
|
+
} from "./chunk-DP26GVWH.js";
|
|
17
75
|
|
|
18
|
-
// web/app/dist/server/assets/chat-protocol.zod-
|
|
19
|
-
import {
|
|
76
|
+
// web/app/dist/server/assets/chat-protocol.zod-gvwn378O.js
|
|
77
|
+
import { useContext, useMemo } from "react";
|
|
20
78
|
import { jsx } from "react/jsx-runtime";
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
79
|
+
var pipe = (...transformers) => transformers.reduce((a, b) => (v) => b(a(v)));
|
|
80
|
+
var progress = /* @__NO_SIDE_EFFECTS__ */ (from, to, value) => {
|
|
81
|
+
const range = to - from;
|
|
82
|
+
return range ? (value - from) / range : 1;
|
|
83
|
+
};
|
|
84
|
+
var calcBezier = (t, a1, a2) => (((1 - 3 * a2 + 3 * a1) * t + (3 * a2 - 6 * a1)) * t + 3 * a1) * t;
|
|
85
|
+
var subdivisionPrecision = 1e-7;
|
|
86
|
+
var subdivisionMaxIterations = 12;
|
|
87
|
+
function binarySubdivide(x, lowerBound, upperBound, mX1, mX2) {
|
|
88
|
+
let currentX;
|
|
89
|
+
let currentT;
|
|
90
|
+
let i = 0;
|
|
91
|
+
do {
|
|
92
|
+
currentT = lowerBound + (upperBound - lowerBound) / 2;
|
|
93
|
+
currentX = calcBezier(currentT, mX1, mX2) - x;
|
|
94
|
+
if (currentX > 0) upperBound = currentT;
|
|
95
|
+
else lowerBound = currentT;
|
|
96
|
+
} while (Math.abs(currentX) > subdivisionPrecision && ++i < subdivisionMaxIterations);
|
|
97
|
+
return currentT;
|
|
98
|
+
}
|
|
99
|
+
// @__NO_SIDE_EFFECTS__
|
|
100
|
+
function cubicBezier(mX1, mY1, mX2, mY2) {
|
|
101
|
+
if (mX1 === mY1 && mX2 === mY2) return noop;
|
|
102
|
+
const getTForX = (aX) => binarySubdivide(aX, 0, 1, mX1, mX2);
|
|
103
|
+
return (t) => t === 0 || t === 1 ? t : calcBezier(getTForX(t), mY1, mY2);
|
|
104
|
+
}
|
|
105
|
+
var mirrorEasing = /* @__NO_SIDE_EFFECTS__ */ (easing) => (p) => p <= 0.5 ? easing(2 * p) / 2 : (2 - easing(2 * (1 - p))) / 2;
|
|
106
|
+
var reverseEasing = /* @__NO_SIDE_EFFECTS__ */ (easing) => (p) => 1 - easing(1 - p);
|
|
107
|
+
var backOut = /* @__PURE__ */ cubicBezier(0.33, 1.53, 0.69, 0.99);
|
|
108
|
+
var backIn = /* @__PURE__ */ reverseEasing(backOut);
|
|
109
|
+
var backInOut = /* @__PURE__ */ mirrorEasing(backIn);
|
|
110
|
+
var anticipate = (p) => p >= 1 ? 1 : (p *= 2) < 1 ? 0.5 * backIn(p) : 0.5 * (2 - Math.pow(2, -10 * (p - 1)));
|
|
111
|
+
var circIn = (p) => 1 - Math.sin(Math.acos(p));
|
|
112
|
+
var circOut = /* @__PURE__ */ reverseEasing(circIn);
|
|
113
|
+
var circInOut = /* @__PURE__ */ mirrorEasing(circIn);
|
|
114
|
+
var easeIn = /* @__PURE__ */ cubicBezier(0.42, 0, 1, 1);
|
|
115
|
+
var easeOut = /* @__PURE__ */ cubicBezier(0, 0, 0.58, 1);
|
|
116
|
+
var easeInOut = /* @__PURE__ */ cubicBezier(0.42, 0, 0.58, 1);
|
|
117
|
+
var isEasingArray = /* @__NO_SIDE_EFFECTS__ */ (ease2) => {
|
|
118
|
+
return Array.isArray(ease2) && typeof ease2[0] !== "number";
|
|
119
|
+
};
|
|
120
|
+
var easingLookup = {
|
|
121
|
+
linear: noop,
|
|
122
|
+
easeIn,
|
|
123
|
+
easeInOut,
|
|
124
|
+
easeOut,
|
|
125
|
+
circIn,
|
|
126
|
+
circInOut,
|
|
127
|
+
circOut,
|
|
128
|
+
backIn,
|
|
129
|
+
backInOut,
|
|
130
|
+
backOut,
|
|
131
|
+
anticipate
|
|
132
|
+
};
|
|
133
|
+
var isValidEasing = (easing) => {
|
|
134
|
+
return typeof easing === "string";
|
|
135
|
+
};
|
|
136
|
+
var easingDefinitionToFunction = (definition) => {
|
|
137
|
+
if (isBezierDefinition(definition)) {
|
|
138
|
+
invariant(definition.length === 4, `Cubic bezier arrays must contain four numerical values.`, "cubic-bezier-length");
|
|
139
|
+
const [x1, y1, x2, y2] = definition;
|
|
140
|
+
return /* @__PURE__ */ cubicBezier(x1, y1, x2, y2);
|
|
141
|
+
} else if (isValidEasing(definition)) {
|
|
142
|
+
invariant(easingLookup[definition] !== void 0, `Invalid easing type '${definition}'`, "invalid-easing-type");
|
|
143
|
+
return easingLookup[definition];
|
|
144
|
+
}
|
|
145
|
+
return definition;
|
|
146
|
+
};
|
|
147
|
+
function hueToRgb(p, q, t) {
|
|
148
|
+
if (t < 0) t += 1;
|
|
149
|
+
if (t > 1) t -= 1;
|
|
150
|
+
if (t < 1 / 6) return p + (q - p) * 6 * t;
|
|
151
|
+
if (t < 1 / 2) return q;
|
|
152
|
+
if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;
|
|
153
|
+
return p;
|
|
154
|
+
}
|
|
155
|
+
function hslaToRgba({ hue, saturation, lightness, alpha }) {
|
|
156
|
+
hue /= 360;
|
|
157
|
+
saturation /= 100;
|
|
158
|
+
lightness /= 100;
|
|
159
|
+
let red = 0;
|
|
160
|
+
let green = 0;
|
|
161
|
+
let blue = 0;
|
|
162
|
+
if (!saturation) red = green = blue = lightness;
|
|
163
|
+
else {
|
|
164
|
+
const q = lightness < 0.5 ? lightness * (1 + saturation) : lightness + saturation - lightness * saturation;
|
|
165
|
+
const p = 2 * lightness - q;
|
|
166
|
+
red = hueToRgb(p, q, hue + 1 / 3);
|
|
167
|
+
green = hueToRgb(p, q, hue);
|
|
168
|
+
blue = hueToRgb(p, q, hue - 1 / 3);
|
|
169
|
+
}
|
|
170
|
+
return {
|
|
171
|
+
red: Math.round(red * 255),
|
|
172
|
+
green: Math.round(green * 255),
|
|
173
|
+
blue: Math.round(blue * 255),
|
|
174
|
+
alpha
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
function mixImmediate(a, b) {
|
|
178
|
+
return (p) => p > 0 ? b : a;
|
|
179
|
+
}
|
|
180
|
+
var mixLinearColor = (from, to, v) => {
|
|
181
|
+
const fromExpo = from * from;
|
|
182
|
+
const expo = v * (to * to - fromExpo) + fromExpo;
|
|
183
|
+
return expo < 0 ? 0 : Math.sqrt(expo);
|
|
184
|
+
};
|
|
185
|
+
var colorTypes = [
|
|
186
|
+
hex,
|
|
187
|
+
rgba,
|
|
188
|
+
hsla
|
|
189
|
+
];
|
|
190
|
+
var getColorType = (v) => colorTypes.find((type) => type.test(v));
|
|
191
|
+
function asRGBA(color2) {
|
|
192
|
+
const type = getColorType(color2);
|
|
193
|
+
warning(Boolean(type), `'${color2}' is not an animatable color. Use the equivalent color code instead.`, "color-not-animatable");
|
|
194
|
+
if (!Boolean(type)) return false;
|
|
195
|
+
let model = type.parse(color2);
|
|
196
|
+
if (type === hsla) model = hslaToRgba(model);
|
|
197
|
+
return model;
|
|
198
|
+
}
|
|
199
|
+
var mixColor = (from, to) => {
|
|
200
|
+
const fromRGBA = asRGBA(from);
|
|
201
|
+
const toRGBA = asRGBA(to);
|
|
202
|
+
if (!fromRGBA || !toRGBA) return mixImmediate(from, to);
|
|
203
|
+
const blended = { ...fromRGBA };
|
|
204
|
+
return (v) => {
|
|
205
|
+
blended.red = mixLinearColor(fromRGBA.red, toRGBA.red, v);
|
|
206
|
+
blended.green = mixLinearColor(fromRGBA.green, toRGBA.green, v);
|
|
207
|
+
blended.blue = mixLinearColor(fromRGBA.blue, toRGBA.blue, v);
|
|
208
|
+
blended.alpha = mixNumber(fromRGBA.alpha, toRGBA.alpha, v);
|
|
209
|
+
return rgba.transform(blended);
|
|
210
|
+
};
|
|
211
|
+
};
|
|
212
|
+
var invisibleValues = /* @__PURE__ */ new Set(["none", "hidden"]);
|
|
213
|
+
function mixVisibility(origin, target) {
|
|
214
|
+
if (invisibleValues.has(origin)) return (p) => p <= 0 ? origin : target;
|
|
215
|
+
else return (p) => p >= 1 ? target : origin;
|
|
216
|
+
}
|
|
217
|
+
function mixNumber2(a, b) {
|
|
218
|
+
return (p) => mixNumber(a, b, p);
|
|
219
|
+
}
|
|
220
|
+
function getMixer(a) {
|
|
221
|
+
if (typeof a === "number") return mixNumber2;
|
|
222
|
+
else if (typeof a === "string") return isCSSVariableToken(a) ? mixImmediate : color.test(a) ? mixColor : mixComplex;
|
|
223
|
+
else if (Array.isArray(a)) return mixArray;
|
|
224
|
+
else if (typeof a === "object") return color.test(a) ? mixColor : mixObject;
|
|
225
|
+
return mixImmediate;
|
|
226
|
+
}
|
|
227
|
+
function mixArray(a, b) {
|
|
228
|
+
const output = [...a];
|
|
229
|
+
const numValues = output.length;
|
|
230
|
+
const blendValue = a.map((v, i) => getMixer(v)(v, b[i]));
|
|
231
|
+
return (p) => {
|
|
232
|
+
for (let i = 0; i < numValues; i++) output[i] = blendValue[i](p);
|
|
233
|
+
return output;
|
|
234
|
+
};
|
|
235
|
+
}
|
|
236
|
+
function mixObject(a, b) {
|
|
237
|
+
const output = {
|
|
238
|
+
...a,
|
|
239
|
+
...b
|
|
240
|
+
};
|
|
241
|
+
const blendValue = {};
|
|
242
|
+
for (const key in output) if (a[key] !== void 0 && b[key] !== void 0) blendValue[key] = getMixer(a[key])(a[key], b[key]);
|
|
243
|
+
return (v) => {
|
|
244
|
+
for (const key in blendValue) output[key] = blendValue[key](v);
|
|
245
|
+
return output;
|
|
246
|
+
};
|
|
247
|
+
}
|
|
248
|
+
function matchOrder(origin, target) {
|
|
249
|
+
const orderedOrigin = [];
|
|
250
|
+
const pointers = {
|
|
251
|
+
color: 0,
|
|
252
|
+
var: 0,
|
|
253
|
+
number: 0
|
|
254
|
+
};
|
|
255
|
+
for (let i = 0; i < target.values.length; i++) {
|
|
256
|
+
const type = target.types[i];
|
|
257
|
+
const originIndex = origin.indexes[type][pointers[type]];
|
|
258
|
+
const originValue = origin.values[originIndex] ?? 0;
|
|
259
|
+
orderedOrigin[i] = originValue;
|
|
260
|
+
pointers[type]++;
|
|
261
|
+
}
|
|
262
|
+
return orderedOrigin;
|
|
263
|
+
}
|
|
264
|
+
var mixComplex = (origin, target) => {
|
|
265
|
+
const template = complex.createTransformer(target);
|
|
266
|
+
const originStats = analyseComplexValue(origin);
|
|
267
|
+
const targetStats = analyseComplexValue(target);
|
|
268
|
+
if (originStats.indexes.var.length === targetStats.indexes.var.length && originStats.indexes.color.length === targetStats.indexes.color.length && originStats.indexes.number.length >= targetStats.indexes.number.length) {
|
|
269
|
+
if (invisibleValues.has(origin) && !targetStats.values.length || invisibleValues.has(target) && !originStats.values.length) return mixVisibility(origin, target);
|
|
270
|
+
return pipe(mixArray(matchOrder(originStats, targetStats), targetStats.values), template);
|
|
271
|
+
} else {
|
|
272
|
+
warning(true, `Complex values '${origin}' and '${target}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`, "complex-values-different");
|
|
273
|
+
return mixImmediate(origin, target);
|
|
274
|
+
}
|
|
275
|
+
};
|
|
276
|
+
function mix(from, to, p) {
|
|
277
|
+
if (typeof from === "number" && typeof to === "number" && typeof p === "number") return mixNumber(from, to, p);
|
|
278
|
+
return getMixer(from)(from, to);
|
|
279
|
+
}
|
|
280
|
+
var frameloopDriver = (update) => {
|
|
281
|
+
const passTimestamp = ({ timestamp }) => update(timestamp);
|
|
282
|
+
return {
|
|
283
|
+
start: (keepAlive = true) => frame.update(passTimestamp, keepAlive),
|
|
284
|
+
stop: () => cancelFrame(passTimestamp),
|
|
285
|
+
/**
|
|
286
|
+
* If we're processing this frame we can use the
|
|
287
|
+
* framelocked timestamp to keep things in sync.
|
|
288
|
+
*/
|
|
289
|
+
now: () => frameData.isProcessing ? frameData.timestamp : time.now()
|
|
290
|
+
};
|
|
291
|
+
};
|
|
292
|
+
var maxGeneratorDuration = 2e4;
|
|
293
|
+
function calcGeneratorDuration(generator) {
|
|
294
|
+
let duration = 0;
|
|
295
|
+
const timeStep = 50;
|
|
296
|
+
let state = generator.next(duration);
|
|
297
|
+
while (!state.done && duration < 2e4) {
|
|
298
|
+
duration += timeStep;
|
|
299
|
+
state = generator.next(duration);
|
|
300
|
+
}
|
|
301
|
+
return duration >= 2e4 ? Infinity : duration;
|
|
302
|
+
}
|
|
303
|
+
function createGeneratorEasing(options, scale = 100, createGenerator) {
|
|
304
|
+
const generator = createGenerator({
|
|
305
|
+
...options,
|
|
306
|
+
keyframes: [0, scale]
|
|
307
|
+
});
|
|
308
|
+
const duration = Math.min(calcGeneratorDuration(generator), maxGeneratorDuration);
|
|
309
|
+
return {
|
|
310
|
+
type: "keyframes",
|
|
311
|
+
ease: (progress2) => {
|
|
312
|
+
return generator.next(duration * progress2).value / scale;
|
|
313
|
+
},
|
|
314
|
+
duration: millisecondsToSeconds(duration)
|
|
315
|
+
};
|
|
316
|
+
}
|
|
317
|
+
var springDefaults = {
|
|
318
|
+
stiffness: 100,
|
|
319
|
+
damping: 10,
|
|
320
|
+
mass: 1,
|
|
321
|
+
velocity: 0,
|
|
322
|
+
duration: 800,
|
|
323
|
+
bounce: 0.3,
|
|
324
|
+
visualDuration: 0.3,
|
|
325
|
+
restSpeed: {
|
|
326
|
+
granular: 0.01,
|
|
327
|
+
default: 2
|
|
328
|
+
},
|
|
329
|
+
restDelta: {
|
|
330
|
+
granular: 5e-3,
|
|
331
|
+
default: 0.5
|
|
332
|
+
},
|
|
333
|
+
minDuration: 0.01,
|
|
334
|
+
maxDuration: 10,
|
|
335
|
+
minDamping: 0.05,
|
|
336
|
+
maxDamping: 1
|
|
337
|
+
};
|
|
338
|
+
function calcAngularFreq(undampedFreq, dampingRatio) {
|
|
339
|
+
return undampedFreq * Math.sqrt(1 - dampingRatio * dampingRatio);
|
|
340
|
+
}
|
|
341
|
+
var rootIterations = 12;
|
|
342
|
+
function approximateRoot(envelope, derivative, initialGuess) {
|
|
343
|
+
let result = initialGuess;
|
|
344
|
+
for (let i = 1; i < rootIterations; i++) result = result - envelope(result) / derivative(result);
|
|
345
|
+
return result;
|
|
346
|
+
}
|
|
347
|
+
var safeMin = 1e-3;
|
|
348
|
+
function findSpring({ duration = springDefaults.duration, bounce = springDefaults.bounce, velocity = springDefaults.velocity, mass = springDefaults.mass }) {
|
|
349
|
+
let envelope;
|
|
350
|
+
let derivative;
|
|
351
|
+
warning(duration <= secondsToMilliseconds(springDefaults.maxDuration), "Spring duration must be 10 seconds or less", "spring-duration-limit");
|
|
352
|
+
let dampingRatio = 1 - bounce;
|
|
353
|
+
dampingRatio = clamp(springDefaults.minDamping, springDefaults.maxDamping, dampingRatio);
|
|
354
|
+
duration = clamp(springDefaults.minDuration, springDefaults.maxDuration, millisecondsToSeconds(duration));
|
|
355
|
+
if (dampingRatio < 1) {
|
|
356
|
+
envelope = (undampedFreq2) => {
|
|
357
|
+
const exponentialDecay = undampedFreq2 * dampingRatio;
|
|
358
|
+
const delta = exponentialDecay * duration;
|
|
359
|
+
const a = exponentialDecay - velocity;
|
|
360
|
+
const b = calcAngularFreq(undampedFreq2, dampingRatio);
|
|
361
|
+
const c = Math.exp(-delta);
|
|
362
|
+
return safeMin - a / b * c;
|
|
363
|
+
};
|
|
364
|
+
derivative = (undampedFreq2) => {
|
|
365
|
+
const delta = undampedFreq2 * dampingRatio * duration;
|
|
366
|
+
const d = delta * velocity + velocity;
|
|
367
|
+
const e = Math.pow(dampingRatio, 2) * Math.pow(undampedFreq2, 2) * duration;
|
|
368
|
+
const f = Math.exp(-delta);
|
|
369
|
+
const g = calcAngularFreq(Math.pow(undampedFreq2, 2), dampingRatio);
|
|
370
|
+
return (-envelope(undampedFreq2) + safeMin > 0 ? -1 : 1) * ((d - e) * f) / g;
|
|
371
|
+
};
|
|
372
|
+
} else {
|
|
373
|
+
envelope = (undampedFreq2) => {
|
|
374
|
+
return -1e-3 + Math.exp(-undampedFreq2 * duration) * ((undampedFreq2 - velocity) * duration + 1);
|
|
375
|
+
};
|
|
376
|
+
derivative = (undampedFreq2) => {
|
|
377
|
+
return Math.exp(-undampedFreq2 * duration) * ((velocity - undampedFreq2) * (duration * duration));
|
|
378
|
+
};
|
|
379
|
+
}
|
|
380
|
+
const initialGuess = 5 / duration;
|
|
381
|
+
const undampedFreq = approximateRoot(envelope, derivative, initialGuess);
|
|
382
|
+
duration = secondsToMilliseconds(duration);
|
|
383
|
+
if (isNaN(undampedFreq)) return {
|
|
384
|
+
stiffness: springDefaults.stiffness,
|
|
385
|
+
damping: springDefaults.damping,
|
|
386
|
+
duration
|
|
387
|
+
};
|
|
388
|
+
else {
|
|
389
|
+
const stiffness = Math.pow(undampedFreq, 2) * mass;
|
|
390
|
+
return {
|
|
391
|
+
stiffness,
|
|
392
|
+
damping: dampingRatio * 2 * Math.sqrt(mass * stiffness),
|
|
393
|
+
duration
|
|
394
|
+
};
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
var durationKeys = ["duration", "bounce"];
|
|
398
|
+
var physicsKeys = [
|
|
399
|
+
"stiffness",
|
|
400
|
+
"damping",
|
|
401
|
+
"mass"
|
|
402
|
+
];
|
|
403
|
+
function isSpringType(options, keys) {
|
|
404
|
+
return keys.some((key) => options[key] !== void 0);
|
|
405
|
+
}
|
|
406
|
+
function getSpringOptions(options) {
|
|
407
|
+
let springOptions = {
|
|
408
|
+
velocity: springDefaults.velocity,
|
|
409
|
+
stiffness: springDefaults.stiffness,
|
|
410
|
+
damping: springDefaults.damping,
|
|
411
|
+
mass: springDefaults.mass,
|
|
412
|
+
isResolvedFromDuration: false,
|
|
413
|
+
...options
|
|
414
|
+
};
|
|
415
|
+
if (!isSpringType(options, physicsKeys) && isSpringType(options, durationKeys)) {
|
|
416
|
+
springOptions.velocity = 0;
|
|
417
|
+
if (options.visualDuration) {
|
|
418
|
+
const visualDuration = options.visualDuration;
|
|
419
|
+
const root = 2 * Math.PI / (visualDuration * 1.2);
|
|
420
|
+
const stiffness = root * root;
|
|
421
|
+
const damping = 2 * clamp(0.05, 1, 1 - (options.bounce || 0)) * Math.sqrt(stiffness);
|
|
422
|
+
springOptions = {
|
|
423
|
+
...springOptions,
|
|
424
|
+
mass: springDefaults.mass,
|
|
425
|
+
stiffness,
|
|
426
|
+
damping
|
|
427
|
+
};
|
|
428
|
+
} else {
|
|
429
|
+
const derived = findSpring({
|
|
430
|
+
...options,
|
|
431
|
+
velocity: 0
|
|
432
|
+
});
|
|
433
|
+
springOptions = {
|
|
434
|
+
...springOptions,
|
|
435
|
+
...derived,
|
|
436
|
+
mass: springDefaults.mass
|
|
437
|
+
};
|
|
438
|
+
springOptions.isResolvedFromDuration = true;
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
return springOptions;
|
|
442
|
+
}
|
|
443
|
+
function spring(optionsOrVisualDuration = springDefaults.visualDuration, bounce = springDefaults.bounce) {
|
|
444
|
+
const options = typeof optionsOrVisualDuration !== "object" ? {
|
|
445
|
+
visualDuration: optionsOrVisualDuration,
|
|
446
|
+
keyframes: [0, 1],
|
|
447
|
+
bounce
|
|
448
|
+
} : optionsOrVisualDuration;
|
|
449
|
+
let { restSpeed, restDelta } = options;
|
|
450
|
+
const origin = options.keyframes[0];
|
|
451
|
+
const target = options.keyframes[options.keyframes.length - 1];
|
|
452
|
+
const state = {
|
|
453
|
+
done: false,
|
|
454
|
+
value: origin
|
|
455
|
+
};
|
|
456
|
+
const { stiffness, damping, mass, duration, velocity, isResolvedFromDuration } = getSpringOptions({
|
|
457
|
+
...options,
|
|
458
|
+
velocity: -millisecondsToSeconds(options.velocity || 0)
|
|
459
|
+
});
|
|
460
|
+
const initialVelocity = velocity || 0;
|
|
461
|
+
const dampingRatio = damping / (2 * Math.sqrt(stiffness * mass));
|
|
462
|
+
const initialDelta = target - origin;
|
|
463
|
+
const undampedAngularFreq = millisecondsToSeconds(Math.sqrt(stiffness / mass));
|
|
464
|
+
const isGranularScale = Math.abs(initialDelta) < 5;
|
|
465
|
+
restSpeed || (restSpeed = isGranularScale ? springDefaults.restSpeed.granular : springDefaults.restSpeed.default);
|
|
466
|
+
restDelta || (restDelta = isGranularScale ? springDefaults.restDelta.granular : springDefaults.restDelta.default);
|
|
467
|
+
let resolveSpring;
|
|
468
|
+
let resolveVelocity;
|
|
469
|
+
let angularFreq;
|
|
470
|
+
let A;
|
|
471
|
+
let sinCoeff;
|
|
472
|
+
let cosCoeff;
|
|
473
|
+
if (dampingRatio < 1) {
|
|
474
|
+
angularFreq = calcAngularFreq(undampedAngularFreq, dampingRatio);
|
|
475
|
+
A = (initialVelocity + dampingRatio * undampedAngularFreq * initialDelta) / angularFreq;
|
|
476
|
+
resolveSpring = (t) => {
|
|
477
|
+
const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);
|
|
478
|
+
return target - envelope * (A * Math.sin(angularFreq * t) + initialDelta * Math.cos(angularFreq * t));
|
|
479
|
+
};
|
|
480
|
+
sinCoeff = dampingRatio * undampedAngularFreq * A + initialDelta * angularFreq;
|
|
481
|
+
cosCoeff = dampingRatio * undampedAngularFreq * initialDelta - A * angularFreq;
|
|
482
|
+
resolveVelocity = (t) => {
|
|
483
|
+
return Math.exp(-dampingRatio * undampedAngularFreq * t) * (sinCoeff * Math.sin(angularFreq * t) + cosCoeff * Math.cos(angularFreq * t));
|
|
484
|
+
};
|
|
485
|
+
} else if (dampingRatio === 1) {
|
|
486
|
+
resolveSpring = (t) => target - Math.exp(-undampedAngularFreq * t) * (initialDelta + (initialVelocity + undampedAngularFreq * initialDelta) * t);
|
|
487
|
+
const C = initialVelocity + undampedAngularFreq * initialDelta;
|
|
488
|
+
resolveVelocity = (t) => Math.exp(-undampedAngularFreq * t) * (undampedAngularFreq * C * t - initialVelocity);
|
|
489
|
+
} else {
|
|
490
|
+
const dampedAngularFreq = undampedAngularFreq * Math.sqrt(dampingRatio * dampingRatio - 1);
|
|
491
|
+
resolveSpring = (t) => {
|
|
492
|
+
const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);
|
|
493
|
+
const freqForT = Math.min(dampedAngularFreq * t, 300);
|
|
494
|
+
return target - envelope * ((initialVelocity + dampingRatio * undampedAngularFreq * initialDelta) * Math.sinh(freqForT) + dampedAngularFreq * initialDelta * Math.cosh(freqForT)) / dampedAngularFreq;
|
|
495
|
+
};
|
|
496
|
+
const P = (initialVelocity + dampingRatio * undampedAngularFreq * initialDelta) / dampedAngularFreq;
|
|
497
|
+
const sinhCoeff = dampingRatio * undampedAngularFreq * P - initialDelta * dampedAngularFreq;
|
|
498
|
+
const coshCoeff = dampingRatio * undampedAngularFreq * initialDelta - P * dampedAngularFreq;
|
|
499
|
+
resolveVelocity = (t) => {
|
|
500
|
+
const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);
|
|
501
|
+
const freqForT = Math.min(dampedAngularFreq * t, 300);
|
|
502
|
+
return envelope * (sinhCoeff * Math.sinh(freqForT) + coshCoeff * Math.cosh(freqForT));
|
|
503
|
+
};
|
|
504
|
+
}
|
|
505
|
+
const generator = {
|
|
506
|
+
calculatedDuration: isResolvedFromDuration ? duration || null : null,
|
|
507
|
+
velocity: (t) => secondsToMilliseconds(resolveVelocity(t)),
|
|
508
|
+
next: (t) => {
|
|
509
|
+
if (!isResolvedFromDuration && dampingRatio < 1) {
|
|
510
|
+
const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);
|
|
511
|
+
const sin = Math.sin(angularFreq * t);
|
|
512
|
+
const cos = Math.cos(angularFreq * t);
|
|
513
|
+
const current2 = target - envelope * (A * sin + initialDelta * cos);
|
|
514
|
+
const currentVelocity = secondsToMilliseconds(envelope * (sinCoeff * sin + cosCoeff * cos));
|
|
515
|
+
state.done = Math.abs(currentVelocity) <= restSpeed && Math.abs(target - current2) <= restDelta;
|
|
516
|
+
state.value = state.done ? target : current2;
|
|
517
|
+
return state;
|
|
518
|
+
}
|
|
519
|
+
const current = resolveSpring(t);
|
|
520
|
+
if (!isResolvedFromDuration) {
|
|
521
|
+
const currentVelocity = secondsToMilliseconds(resolveVelocity(t));
|
|
522
|
+
state.done = Math.abs(currentVelocity) <= restSpeed && Math.abs(target - current) <= restDelta;
|
|
523
|
+
} else state.done = t >= duration;
|
|
524
|
+
state.value = state.done ? target : current;
|
|
525
|
+
return state;
|
|
526
|
+
},
|
|
527
|
+
toString: () => {
|
|
528
|
+
const calculatedDuration = Math.min(calcGeneratorDuration(generator), maxGeneratorDuration);
|
|
529
|
+
const easing = generateLinearEasing((progress2) => generator.next(calculatedDuration * progress2).value, calculatedDuration, 30);
|
|
530
|
+
return calculatedDuration + "ms " + easing;
|
|
531
|
+
},
|
|
532
|
+
toTransition: () => {
|
|
533
|
+
}
|
|
534
|
+
};
|
|
535
|
+
return generator;
|
|
536
|
+
}
|
|
537
|
+
spring.applyToOptions = (options) => {
|
|
538
|
+
const generatorOptions = createGeneratorEasing(options, 100, spring);
|
|
539
|
+
options.ease = generatorOptions.ease;
|
|
540
|
+
options.duration = secondsToMilliseconds(generatorOptions.duration);
|
|
541
|
+
options.type = "keyframes";
|
|
542
|
+
return options;
|
|
543
|
+
};
|
|
544
|
+
var velocitySampleDuration = 5;
|
|
545
|
+
function getGeneratorVelocity(resolveValue, t, current) {
|
|
546
|
+
const prevT = Math.max(t - velocitySampleDuration, 0);
|
|
547
|
+
return velocityPerSecond(current - resolveValue(prevT), t - prevT);
|
|
548
|
+
}
|
|
549
|
+
function inertia({ keyframes: keyframes2, velocity = 0, power = 0.8, timeConstant = 325, bounceDamping = 10, bounceStiffness = 500, modifyTarget, min, max, restDelta = 0.5, restSpeed }) {
|
|
550
|
+
const origin = keyframes2[0];
|
|
551
|
+
const state = {
|
|
552
|
+
done: false,
|
|
553
|
+
value: origin
|
|
554
|
+
};
|
|
555
|
+
const isOutOfBounds = (v) => min !== void 0 && v < min || max !== void 0 && v > max;
|
|
556
|
+
const nearestBoundary = (v) => {
|
|
557
|
+
if (min === void 0) return max;
|
|
558
|
+
if (max === void 0) return min;
|
|
559
|
+
return Math.abs(min - v) < Math.abs(max - v) ? min : max;
|
|
560
|
+
};
|
|
561
|
+
let amplitude = power * velocity;
|
|
562
|
+
const ideal = origin + amplitude;
|
|
563
|
+
const target = modifyTarget === void 0 ? ideal : modifyTarget(ideal);
|
|
564
|
+
if (target !== ideal) amplitude = target - origin;
|
|
565
|
+
const calcDelta = (t) => -amplitude * Math.exp(-t / timeConstant);
|
|
566
|
+
const calcLatest = (t) => target + calcDelta(t);
|
|
567
|
+
const applyFriction = (t) => {
|
|
568
|
+
const delta = calcDelta(t);
|
|
569
|
+
const latest = calcLatest(t);
|
|
570
|
+
state.done = Math.abs(delta) <= restDelta;
|
|
571
|
+
state.value = state.done ? target : latest;
|
|
572
|
+
};
|
|
573
|
+
let timeReachedBoundary;
|
|
574
|
+
let spring$1;
|
|
575
|
+
const checkCatchBoundary = (t) => {
|
|
576
|
+
if (!isOutOfBounds(state.value)) return;
|
|
577
|
+
timeReachedBoundary = t;
|
|
578
|
+
spring$1 = spring({
|
|
579
|
+
keyframes: [state.value, nearestBoundary(state.value)],
|
|
580
|
+
velocity: getGeneratorVelocity(calcLatest, t, state.value),
|
|
581
|
+
damping: bounceDamping,
|
|
582
|
+
stiffness: bounceStiffness,
|
|
583
|
+
restDelta,
|
|
584
|
+
restSpeed
|
|
585
|
+
});
|
|
586
|
+
};
|
|
587
|
+
checkCatchBoundary(0);
|
|
588
|
+
return {
|
|
589
|
+
calculatedDuration: null,
|
|
590
|
+
next: (t) => {
|
|
591
|
+
let hasUpdatedFrame = false;
|
|
592
|
+
if (!spring$1 && timeReachedBoundary === void 0) {
|
|
593
|
+
hasUpdatedFrame = true;
|
|
594
|
+
applyFriction(t);
|
|
595
|
+
checkCatchBoundary(t);
|
|
596
|
+
}
|
|
597
|
+
if (timeReachedBoundary !== void 0 && t >= timeReachedBoundary) return spring$1.next(t - timeReachedBoundary);
|
|
598
|
+
else {
|
|
599
|
+
!hasUpdatedFrame && applyFriction(t);
|
|
600
|
+
return state;
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
};
|
|
604
|
+
}
|
|
605
|
+
function createMixers(output, ease2, customMixer) {
|
|
606
|
+
const mixers = [];
|
|
607
|
+
const mixerFactory = customMixer || MotionGlobalConfig.mix || mix;
|
|
608
|
+
const numMixers = output.length - 1;
|
|
609
|
+
for (let i = 0; i < numMixers; i++) {
|
|
610
|
+
let mixer = mixerFactory(output[i], output[i + 1]);
|
|
611
|
+
if (ease2) mixer = pipe(Array.isArray(ease2) ? ease2[i] || noop : ease2, mixer);
|
|
612
|
+
mixers.push(mixer);
|
|
613
|
+
}
|
|
614
|
+
return mixers;
|
|
615
|
+
}
|
|
616
|
+
function interpolate(input, output, { clamp: isClamp = true, ease: ease2, mixer } = {}) {
|
|
617
|
+
const inputLength = input.length;
|
|
618
|
+
invariant(inputLength === output.length, "Both input and output ranges must be the same length", "range-length");
|
|
619
|
+
if (inputLength === 1) return () => output[0];
|
|
620
|
+
if (inputLength === 2 && output[0] === output[1]) return () => output[1];
|
|
621
|
+
const isZeroDeltaRange = input[0] === input[1];
|
|
622
|
+
if (input[0] > input[inputLength - 1]) {
|
|
623
|
+
input = [...input].reverse();
|
|
624
|
+
output = [...output].reverse();
|
|
625
|
+
}
|
|
626
|
+
const mixers = createMixers(output, ease2, mixer);
|
|
627
|
+
const numMixers = mixers.length;
|
|
628
|
+
const interpolator = (v) => {
|
|
629
|
+
if (isZeroDeltaRange && v < input[0]) return output[0];
|
|
630
|
+
let i = 0;
|
|
631
|
+
if (numMixers > 1) {
|
|
632
|
+
for (; i < input.length - 2; i++) if (v < input[i + 1]) break;
|
|
633
|
+
}
|
|
634
|
+
const progressInRange = /* @__PURE__ */ progress(input[i], input[i + 1], v);
|
|
635
|
+
return mixers[i](progressInRange);
|
|
636
|
+
};
|
|
637
|
+
return isClamp ? (v) => interpolator(clamp(input[0], input[inputLength - 1], v)) : interpolator;
|
|
638
|
+
}
|
|
639
|
+
function fillOffset(offset, remaining) {
|
|
640
|
+
const min = offset[offset.length - 1];
|
|
641
|
+
for (let i = 1; i <= remaining; i++) {
|
|
642
|
+
const offsetProgress = /* @__PURE__ */ progress(0, remaining, i);
|
|
643
|
+
offset.push(mixNumber(min, 1, offsetProgress));
|
|
644
|
+
}
|
|
645
|
+
}
|
|
646
|
+
function defaultOffset(arr) {
|
|
647
|
+
const offset = [0];
|
|
648
|
+
fillOffset(offset, arr.length - 1);
|
|
649
|
+
return offset;
|
|
650
|
+
}
|
|
651
|
+
function convertOffsetToTimes(offset, duration) {
|
|
652
|
+
return offset.map((o) => o * duration);
|
|
653
|
+
}
|
|
654
|
+
function defaultEasing(values, easing) {
|
|
655
|
+
return values.map(() => easing || easeInOut).splice(0, values.length - 1);
|
|
656
|
+
}
|
|
657
|
+
function keyframes({ duration = 300, keyframes: keyframeValues, times, ease: ease2 = "easeInOut" }) {
|
|
658
|
+
const easingFunctions = /* @__PURE__ */ isEasingArray(ease2) ? ease2.map(easingDefinitionToFunction) : easingDefinitionToFunction(ease2);
|
|
659
|
+
const state = {
|
|
660
|
+
done: false,
|
|
661
|
+
value: keyframeValues[0]
|
|
662
|
+
};
|
|
663
|
+
const mapTimeToKeyframe = interpolate(convertOffsetToTimes(times && times.length === keyframeValues.length ? times : defaultOffset(keyframeValues), duration), keyframeValues, { ease: Array.isArray(easingFunctions) ? easingFunctions : defaultEasing(keyframeValues, easingFunctions) });
|
|
664
|
+
return {
|
|
665
|
+
calculatedDuration: duration,
|
|
666
|
+
next: (t) => {
|
|
667
|
+
state.value = mapTimeToKeyframe(t);
|
|
668
|
+
state.done = t >= duration;
|
|
669
|
+
return state;
|
|
670
|
+
}
|
|
671
|
+
};
|
|
672
|
+
}
|
|
673
|
+
var transitionTypeMap = {
|
|
674
|
+
decay: inertia,
|
|
675
|
+
inertia,
|
|
676
|
+
tween: keyframes,
|
|
677
|
+
keyframes,
|
|
678
|
+
spring
|
|
679
|
+
};
|
|
680
|
+
function replaceTransitionType(transition) {
|
|
681
|
+
if (typeof transition.type === "string") transition.type = transitionTypeMap[transition.type];
|
|
682
|
+
}
|
|
683
|
+
var percentToProgress = (percent) => percent / 100;
|
|
684
|
+
var JSAnimation = class extends WithPromise {
|
|
685
|
+
constructor(options) {
|
|
686
|
+
super();
|
|
687
|
+
this.state = "idle";
|
|
688
|
+
this.startTime = null;
|
|
689
|
+
this.isStopped = false;
|
|
690
|
+
this.currentTime = 0;
|
|
691
|
+
this.holdTime = null;
|
|
692
|
+
this.playbackSpeed = 1;
|
|
693
|
+
this.delayState = {
|
|
694
|
+
done: false,
|
|
695
|
+
value: void 0
|
|
696
|
+
};
|
|
697
|
+
this.stop = () => {
|
|
698
|
+
const { motionValue: motionValue2 } = this.options;
|
|
699
|
+
if (motionValue2 && motionValue2.updatedAt !== time.now()) this.tick(time.now());
|
|
700
|
+
this.isStopped = true;
|
|
701
|
+
if (this.state === "idle") return;
|
|
702
|
+
this.teardown();
|
|
703
|
+
this.options.onStop?.();
|
|
704
|
+
};
|
|
705
|
+
this.options = options;
|
|
706
|
+
this.initAnimation();
|
|
707
|
+
this.play();
|
|
708
|
+
if (options.autoplay === false) this.pause();
|
|
709
|
+
}
|
|
710
|
+
initAnimation() {
|
|
711
|
+
const { options } = this;
|
|
712
|
+
replaceTransitionType(options);
|
|
713
|
+
const { type = keyframes, repeat = 0, repeatDelay = 0, repeatType, velocity = 0 } = options;
|
|
714
|
+
let { keyframes: keyframes$1 } = options;
|
|
715
|
+
const generatorFactory = type || keyframes;
|
|
716
|
+
if (generatorFactory !== keyframes && typeof keyframes$1[0] !== "number") {
|
|
717
|
+
this.mixKeyframes = pipe(percentToProgress, mix(keyframes$1[0], keyframes$1[1]));
|
|
718
|
+
keyframes$1 = [0, 100];
|
|
719
|
+
}
|
|
720
|
+
const generator = generatorFactory({
|
|
721
|
+
...options,
|
|
722
|
+
keyframes: keyframes$1
|
|
723
|
+
});
|
|
724
|
+
if (repeatType === "mirror") this.mirroredGenerator = generatorFactory({
|
|
725
|
+
...options,
|
|
726
|
+
keyframes: [...keyframes$1].reverse(),
|
|
727
|
+
velocity: -velocity
|
|
728
|
+
});
|
|
729
|
+
if (generator.calculatedDuration === null) generator.calculatedDuration = calcGeneratorDuration(generator);
|
|
730
|
+
const { calculatedDuration } = generator;
|
|
731
|
+
this.calculatedDuration = calculatedDuration;
|
|
732
|
+
this.resolvedDuration = calculatedDuration + repeatDelay;
|
|
733
|
+
this.totalDuration = this.resolvedDuration * (repeat + 1) - repeatDelay;
|
|
734
|
+
this.generator = generator;
|
|
735
|
+
}
|
|
736
|
+
updateTime(timestamp) {
|
|
737
|
+
const animationTime = Math.round(timestamp - this.startTime) * this.playbackSpeed;
|
|
738
|
+
if (this.holdTime !== null) this.currentTime = this.holdTime;
|
|
739
|
+
else this.currentTime = animationTime;
|
|
740
|
+
}
|
|
741
|
+
tick(timestamp, sample = false) {
|
|
742
|
+
const { generator, totalDuration, mixKeyframes, mirroredGenerator, resolvedDuration, calculatedDuration } = this;
|
|
743
|
+
if (this.startTime === null) return generator.next(0);
|
|
744
|
+
const { delay = 0, keyframes: keyframes2, repeat, repeatType, repeatDelay, type, onUpdate, finalKeyframe } = this.options;
|
|
745
|
+
if (this.speed > 0) this.startTime = Math.min(this.startTime, timestamp);
|
|
746
|
+
else if (this.speed < 0) this.startTime = Math.min(timestamp - totalDuration / this.speed, this.startTime);
|
|
747
|
+
if (sample) this.currentTime = timestamp;
|
|
748
|
+
else this.updateTime(timestamp);
|
|
749
|
+
const timeWithoutDelay = this.currentTime - delay * (this.playbackSpeed >= 0 ? 1 : -1);
|
|
750
|
+
const isInDelayPhase = this.playbackSpeed >= 0 ? timeWithoutDelay < 0 : timeWithoutDelay > totalDuration;
|
|
751
|
+
this.currentTime = Math.max(timeWithoutDelay, 0);
|
|
752
|
+
if (this.state === "finished" && this.holdTime === null) this.currentTime = totalDuration;
|
|
753
|
+
let elapsed = this.currentTime;
|
|
754
|
+
let frameGenerator = generator;
|
|
755
|
+
if (repeat) {
|
|
756
|
+
const progress2 = Math.min(this.currentTime, totalDuration) / resolvedDuration;
|
|
757
|
+
let currentIteration = Math.floor(progress2);
|
|
758
|
+
let iterationProgress = progress2 % 1;
|
|
759
|
+
if (!iterationProgress && progress2 >= 1) iterationProgress = 1;
|
|
760
|
+
iterationProgress === 1 && currentIteration--;
|
|
761
|
+
currentIteration = Math.min(currentIteration, repeat + 1);
|
|
762
|
+
if (Boolean(currentIteration % 2)) {
|
|
763
|
+
if (repeatType === "reverse") {
|
|
764
|
+
iterationProgress = 1 - iterationProgress;
|
|
765
|
+
if (repeatDelay) iterationProgress -= repeatDelay / resolvedDuration;
|
|
766
|
+
} else if (repeatType === "mirror") frameGenerator = mirroredGenerator;
|
|
767
|
+
}
|
|
768
|
+
elapsed = clamp(0, 1, iterationProgress) * resolvedDuration;
|
|
769
|
+
}
|
|
770
|
+
let state;
|
|
771
|
+
if (isInDelayPhase) {
|
|
772
|
+
this.delayState.value = keyframes2[0];
|
|
773
|
+
state = this.delayState;
|
|
774
|
+
} else state = frameGenerator.next(elapsed);
|
|
775
|
+
if (mixKeyframes && !isInDelayPhase) state.value = mixKeyframes(state.value);
|
|
776
|
+
let { done } = state;
|
|
777
|
+
if (!isInDelayPhase && calculatedDuration !== null) done = this.playbackSpeed >= 0 ? this.currentTime >= totalDuration : this.currentTime <= 0;
|
|
778
|
+
const isAnimationFinished = this.holdTime === null && (this.state === "finished" || this.state === "running" && done);
|
|
779
|
+
if (isAnimationFinished && type !== inertia) state.value = getFinalKeyframe(keyframes2, this.options, finalKeyframe, this.speed);
|
|
780
|
+
if (onUpdate) onUpdate(state.value);
|
|
781
|
+
if (isAnimationFinished) this.finish();
|
|
782
|
+
return state;
|
|
783
|
+
}
|
|
784
|
+
/**
|
|
785
|
+
* Allows the returned animation to be awaited or promise-chained. Currently
|
|
786
|
+
* resolves when the animation finishes at all but in a future update could/should
|
|
787
|
+
* reject if its cancels.
|
|
788
|
+
*/
|
|
789
|
+
then(resolve, reject) {
|
|
790
|
+
return this.finished.then(resolve, reject);
|
|
791
|
+
}
|
|
792
|
+
get duration() {
|
|
793
|
+
return millisecondsToSeconds(this.calculatedDuration);
|
|
794
|
+
}
|
|
795
|
+
get iterationDuration() {
|
|
796
|
+
const { delay = 0 } = this.options || {};
|
|
797
|
+
return this.duration + millisecondsToSeconds(delay);
|
|
798
|
+
}
|
|
799
|
+
get time() {
|
|
800
|
+
return millisecondsToSeconds(this.currentTime);
|
|
801
|
+
}
|
|
802
|
+
set time(newTime) {
|
|
803
|
+
newTime = secondsToMilliseconds(newTime);
|
|
804
|
+
this.currentTime = newTime;
|
|
805
|
+
if (this.startTime === null || this.holdTime !== null || this.playbackSpeed === 0) this.holdTime = newTime;
|
|
806
|
+
else if (this.driver) this.startTime = this.driver.now() - newTime / this.playbackSpeed;
|
|
807
|
+
if (this.driver) this.driver.start(false);
|
|
808
|
+
else {
|
|
809
|
+
this.startTime = 0;
|
|
810
|
+
this.state = "paused";
|
|
811
|
+
this.holdTime = newTime;
|
|
812
|
+
this.tick(newTime);
|
|
813
|
+
}
|
|
814
|
+
}
|
|
815
|
+
/**
|
|
816
|
+
* Returns the generator's velocity at the current time in units/second.
|
|
817
|
+
* Uses the analytical derivative when available (springs), avoiding
|
|
818
|
+
* the MotionValue's frame-dependent velocity estimation.
|
|
819
|
+
*/
|
|
820
|
+
getGeneratorVelocity() {
|
|
821
|
+
const t = this.currentTime;
|
|
822
|
+
if (t <= 0) return this.options.velocity || 0;
|
|
823
|
+
if (this.generator.velocity) return this.generator.velocity(t);
|
|
824
|
+
const current = this.generator.next(t).value;
|
|
825
|
+
return getGeneratorVelocity((s) => this.generator.next(s).value, t, current);
|
|
826
|
+
}
|
|
827
|
+
get speed() {
|
|
828
|
+
return this.playbackSpeed;
|
|
829
|
+
}
|
|
830
|
+
set speed(newSpeed) {
|
|
831
|
+
const hasChanged = this.playbackSpeed !== newSpeed;
|
|
832
|
+
if (hasChanged && this.driver) this.updateTime(time.now());
|
|
833
|
+
this.playbackSpeed = newSpeed;
|
|
834
|
+
if (hasChanged && this.driver) this.time = millisecondsToSeconds(this.currentTime);
|
|
835
|
+
}
|
|
836
|
+
play() {
|
|
837
|
+
if (this.isStopped) return;
|
|
838
|
+
const { driver = frameloopDriver, startTime } = this.options;
|
|
839
|
+
if (!this.driver) this.driver = driver((timestamp) => this.tick(timestamp));
|
|
840
|
+
this.options.onPlay?.();
|
|
841
|
+
const now = this.driver.now();
|
|
842
|
+
if (this.state === "finished") {
|
|
843
|
+
this.updateFinished();
|
|
844
|
+
this.startTime = now;
|
|
845
|
+
} else if (this.holdTime !== null) this.startTime = now - this.holdTime;
|
|
846
|
+
else if (!this.startTime) this.startTime = startTime ?? now;
|
|
847
|
+
if (this.state === "finished" && this.speed < 0) this.startTime += this.calculatedDuration;
|
|
848
|
+
this.holdTime = null;
|
|
849
|
+
this.state = "running";
|
|
850
|
+
this.driver.start();
|
|
851
|
+
}
|
|
852
|
+
pause() {
|
|
853
|
+
this.state = "paused";
|
|
854
|
+
this.updateTime(time.now());
|
|
855
|
+
this.holdTime = this.currentTime;
|
|
856
|
+
}
|
|
857
|
+
complete() {
|
|
858
|
+
if (this.state !== "running") this.play();
|
|
859
|
+
this.state = "finished";
|
|
860
|
+
this.holdTime = null;
|
|
861
|
+
}
|
|
862
|
+
finish() {
|
|
863
|
+
this.notifyFinished();
|
|
864
|
+
this.teardown();
|
|
865
|
+
this.state = "finished";
|
|
866
|
+
this.options.onComplete?.();
|
|
867
|
+
}
|
|
868
|
+
cancel() {
|
|
869
|
+
this.holdTime = null;
|
|
870
|
+
this.startTime = 0;
|
|
871
|
+
this.tick(0);
|
|
872
|
+
this.teardown();
|
|
873
|
+
this.options.onCancel?.();
|
|
874
|
+
}
|
|
875
|
+
teardown() {
|
|
876
|
+
this.state = "idle";
|
|
877
|
+
this.stopDriver();
|
|
878
|
+
this.startTime = this.holdTime = null;
|
|
879
|
+
}
|
|
880
|
+
stopDriver() {
|
|
881
|
+
if (!this.driver) return;
|
|
882
|
+
this.driver.stop();
|
|
883
|
+
this.driver = void 0;
|
|
884
|
+
}
|
|
885
|
+
sample(sampleTime) {
|
|
886
|
+
this.startTime = 0;
|
|
887
|
+
return this.tick(sampleTime, true);
|
|
888
|
+
}
|
|
889
|
+
attachTimeline(timeline) {
|
|
890
|
+
if (this.options.allowFlatten) {
|
|
891
|
+
this.options.type = "keyframes";
|
|
892
|
+
this.options.ease = "linear";
|
|
893
|
+
this.initAnimation();
|
|
894
|
+
}
|
|
895
|
+
this.driver?.stop();
|
|
896
|
+
return timeline.observe(this);
|
|
897
|
+
}
|
|
898
|
+
};
|
|
899
|
+
var unsupportedEasingFunctions = {
|
|
900
|
+
anticipate,
|
|
901
|
+
backInOut,
|
|
902
|
+
circInOut
|
|
903
|
+
};
|
|
904
|
+
function isUnsupportedEase(key) {
|
|
905
|
+
return key in unsupportedEasingFunctions;
|
|
906
|
+
}
|
|
907
|
+
function replaceStringEasing(transition) {
|
|
908
|
+
if (typeof transition.ease === "string" && isUnsupportedEase(transition.ease)) transition.ease = unsupportedEasingFunctions[transition.ease];
|
|
909
|
+
}
|
|
910
|
+
var sampleDelta = 10;
|
|
911
|
+
var NativeAnimationExtended = class extends NativeAnimation {
|
|
912
|
+
constructor(options) {
|
|
913
|
+
replaceStringEasing(options);
|
|
914
|
+
replaceTransitionType(options);
|
|
915
|
+
super(options);
|
|
916
|
+
if (options.startTime !== void 0 && options.autoplay !== false) this.startTime = options.startTime;
|
|
917
|
+
this.options = options;
|
|
918
|
+
}
|
|
919
|
+
/**
|
|
920
|
+
* WAAPI doesn't natively have any interruption capabilities.
|
|
921
|
+
*
|
|
922
|
+
* Rather than read committed styles back out of the DOM, we can
|
|
923
|
+
* create a renderless JS animation and sample it twice to calculate
|
|
924
|
+
* its current value, "previous" value, and therefore allow
|
|
925
|
+
* Motion to calculate velocity for any subsequent animation.
|
|
926
|
+
*/
|
|
927
|
+
updateMotionValue(value) {
|
|
928
|
+
const { motionValue: motionValue2, onUpdate, onComplete, element, ...options } = this.options;
|
|
929
|
+
if (!motionValue2) return;
|
|
930
|
+
if (value !== void 0) {
|
|
931
|
+
motionValue2.set(value);
|
|
932
|
+
return;
|
|
933
|
+
}
|
|
934
|
+
const sampleAnimation = new JSAnimation({
|
|
935
|
+
...options,
|
|
936
|
+
autoplay: false
|
|
34
937
|
});
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
value
|
|
38
|
-
|
|
39
|
-
|
|
938
|
+
const sampleTime = Math.max(sampleDelta, time.now() - this.startTime);
|
|
939
|
+
const delta = clamp(0, sampleDelta, sampleTime - sampleDelta);
|
|
940
|
+
const current = sampleAnimation.sample(sampleTime).value;
|
|
941
|
+
const { name } = this.options;
|
|
942
|
+
if (element && name) setStyle(element, name, current);
|
|
943
|
+
motionValue2.setWithVelocity(sampleAnimation.sample(Math.max(0, sampleTime - delta)).value, current, delta);
|
|
944
|
+
sampleAnimation.stop();
|
|
945
|
+
}
|
|
946
|
+
};
|
|
947
|
+
var isAnimatable = (value, name) => {
|
|
948
|
+
if (name === "zIndex") return false;
|
|
949
|
+
if (typeof value === "number" || Array.isArray(value)) return true;
|
|
950
|
+
if (typeof value === "string" && (complex.test(value) || value === "0") && !value.startsWith("url(")) return true;
|
|
951
|
+
return false;
|
|
952
|
+
};
|
|
953
|
+
function hasKeyframesChanged(keyframes2) {
|
|
954
|
+
const current = keyframes2[0];
|
|
955
|
+
if (keyframes2.length === 1) return true;
|
|
956
|
+
for (let i = 0; i < keyframes2.length; i++) if (keyframes2[i] !== current) return true;
|
|
957
|
+
}
|
|
958
|
+
function canAnimate(keyframes2, name, type, velocity) {
|
|
959
|
+
const originKeyframe = keyframes2[0];
|
|
960
|
+
if (originKeyframe === null) return false;
|
|
961
|
+
if (name === "display" || name === "visibility") return true;
|
|
962
|
+
const targetKeyframe = keyframes2[keyframes2.length - 1];
|
|
963
|
+
const isOriginAnimatable = isAnimatable(originKeyframe, name);
|
|
964
|
+
const isTargetAnimatable = isAnimatable(targetKeyframe, name);
|
|
965
|
+
warning(isOriginAnimatable === isTargetAnimatable, `You are trying to animate ${name} from "${originKeyframe}" to "${targetKeyframe}". "${isOriginAnimatable ? targetKeyframe : originKeyframe}" is not an animatable value.`, "value-not-animatable");
|
|
966
|
+
if (!isOriginAnimatable || !isTargetAnimatable) return false;
|
|
967
|
+
return hasKeyframesChanged(keyframes2) || (type === "spring" || isGenerator(type)) && velocity;
|
|
968
|
+
}
|
|
969
|
+
function makeAnimationInstant(options) {
|
|
970
|
+
options.duration = 0;
|
|
971
|
+
options.type = "keyframes";
|
|
972
|
+
}
|
|
973
|
+
var browserColorFunctions = /^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;
|
|
974
|
+
function hasBrowserOnlyColors(keyframes2) {
|
|
975
|
+
for (let i = 0; i < keyframes2.length; i++) if (typeof keyframes2[i] === "string" && browserColorFunctions.test(keyframes2[i])) return true;
|
|
976
|
+
return false;
|
|
977
|
+
}
|
|
978
|
+
var colorProperties = /* @__PURE__ */ new Set([
|
|
979
|
+
"color",
|
|
980
|
+
"backgroundColor",
|
|
981
|
+
"outlineColor",
|
|
982
|
+
"fill",
|
|
983
|
+
"stroke",
|
|
984
|
+
"borderColor",
|
|
985
|
+
"borderTopColor",
|
|
986
|
+
"borderRightColor",
|
|
987
|
+
"borderBottomColor",
|
|
988
|
+
"borderLeftColor"
|
|
989
|
+
]);
|
|
990
|
+
var supportsWaapi = /* @__PURE__ */ memo$1(() => Object.hasOwnProperty.call(Element.prototype, "animate"));
|
|
991
|
+
function supportsBrowserAnimation(options) {
|
|
992
|
+
const { motionValue: motionValue2, name, repeatDelay, repeatType, damping, type, keyframes: keyframes2 } = options;
|
|
993
|
+
const subject = motionValue2?.owner?.current;
|
|
994
|
+
if (!(subject instanceof HTMLElement) && !(subject instanceof SVGElement)) return false;
|
|
995
|
+
const { onUpdate, transformTemplate } = motionValue2.owner.getProps();
|
|
996
|
+
return supportsWaapi() && name && (acceleratedValues.has(name) || colorProperties.has(name) && hasBrowserOnlyColors(keyframes2)) && (name !== "transform" || !transformTemplate) && !onUpdate && !repeatDelay && repeatType !== "mirror" && damping !== 0 && type !== "inertia";
|
|
997
|
+
}
|
|
998
|
+
var MAX_RESOLVE_DELAY = 40;
|
|
999
|
+
var AsyncMotionValueAnimation = class extends WithPromise {
|
|
1000
|
+
constructor({ autoplay = true, delay = 0, type = "keyframes", repeat = 0, repeatDelay = 0, repeatType = "loop", keyframes: keyframes2, name, motionValue: motionValue2, element, ...options }) {
|
|
1001
|
+
super();
|
|
1002
|
+
this.stop = () => {
|
|
1003
|
+
if (this._animation) {
|
|
1004
|
+
this._animation.stop();
|
|
1005
|
+
this.stopTimeline?.();
|
|
1006
|
+
}
|
|
1007
|
+
this.keyframeResolver?.cancel();
|
|
1008
|
+
};
|
|
1009
|
+
this.createdAt = time.now();
|
|
1010
|
+
const optionsWithDefaults = {
|
|
1011
|
+
autoplay,
|
|
1012
|
+
delay,
|
|
1013
|
+
type,
|
|
1014
|
+
repeat,
|
|
1015
|
+
repeatDelay,
|
|
1016
|
+
repeatType,
|
|
1017
|
+
name,
|
|
1018
|
+
motionValue: motionValue2,
|
|
1019
|
+
element,
|
|
1020
|
+
...options
|
|
1021
|
+
};
|
|
1022
|
+
const KeyframeResolver$1 = element?.KeyframeResolver || KeyframeResolver;
|
|
1023
|
+
this.keyframeResolver = new KeyframeResolver$1(keyframes2, (resolvedKeyframes, finalKeyframe, forced) => this.onKeyframesResolved(resolvedKeyframes, finalKeyframe, optionsWithDefaults, !forced), name, motionValue2, element);
|
|
1024
|
+
this.keyframeResolver?.scheduleResolve();
|
|
1025
|
+
}
|
|
1026
|
+
onKeyframesResolved(keyframes2, finalKeyframe, options, sync) {
|
|
1027
|
+
this.keyframeResolver = void 0;
|
|
1028
|
+
const { name, type, velocity, delay, isHandoff, onUpdate } = options;
|
|
1029
|
+
this.resolvedAt = time.now();
|
|
1030
|
+
let canAnimateValue = true;
|
|
1031
|
+
if (!canAnimate(keyframes2, name, type, velocity)) {
|
|
1032
|
+
canAnimateValue = false;
|
|
1033
|
+
if (MotionGlobalConfig.instantAnimations || !delay) onUpdate?.(getFinalKeyframe(keyframes2, options, finalKeyframe));
|
|
1034
|
+
keyframes2[0] = keyframes2[keyframes2.length - 1];
|
|
1035
|
+
makeAnimationInstant(options);
|
|
1036
|
+
options.repeat = 0;
|
|
1037
|
+
}
|
|
1038
|
+
const resolvedOptions = {
|
|
1039
|
+
startTime: sync ? !this.resolvedAt ? this.createdAt : this.resolvedAt - this.createdAt > MAX_RESOLVE_DELAY ? this.resolvedAt : this.createdAt : void 0,
|
|
1040
|
+
finalKeyframe,
|
|
1041
|
+
...options,
|
|
1042
|
+
keyframes: keyframes2
|
|
1043
|
+
};
|
|
1044
|
+
const useWaapi = canAnimateValue && !isHandoff && supportsBrowserAnimation(resolvedOptions);
|
|
1045
|
+
const element = resolvedOptions.motionValue?.owner?.current;
|
|
1046
|
+
let animation;
|
|
1047
|
+
if (useWaapi) try {
|
|
1048
|
+
animation = new NativeAnimationExtended({
|
|
1049
|
+
...resolvedOptions,
|
|
1050
|
+
element
|
|
1051
|
+
});
|
|
1052
|
+
} catch {
|
|
1053
|
+
animation = new JSAnimation(resolvedOptions);
|
|
1054
|
+
}
|
|
1055
|
+
else animation = new JSAnimation(resolvedOptions);
|
|
1056
|
+
animation.finished.then(() => {
|
|
1057
|
+
this.notifyFinished();
|
|
1058
|
+
}).catch(noop);
|
|
1059
|
+
if (this.pendingTimeline) {
|
|
1060
|
+
this.stopTimeline = animation.attachTimeline(this.pendingTimeline);
|
|
1061
|
+
this.pendingTimeline = void 0;
|
|
1062
|
+
}
|
|
1063
|
+
this._animation = animation;
|
|
1064
|
+
}
|
|
1065
|
+
get finished() {
|
|
1066
|
+
if (!this._animation) return this._finished;
|
|
1067
|
+
else return this.animation.finished;
|
|
1068
|
+
}
|
|
1069
|
+
then(onResolve, _onReject) {
|
|
1070
|
+
return this.finished.finally(onResolve).then(() => {
|
|
1071
|
+
});
|
|
1072
|
+
}
|
|
1073
|
+
get animation() {
|
|
1074
|
+
if (!this._animation) {
|
|
1075
|
+
this.keyframeResolver?.resume();
|
|
1076
|
+
flushKeyframeResolvers();
|
|
1077
|
+
}
|
|
1078
|
+
return this._animation;
|
|
1079
|
+
}
|
|
1080
|
+
get duration() {
|
|
1081
|
+
return this.animation.duration;
|
|
1082
|
+
}
|
|
1083
|
+
get iterationDuration() {
|
|
1084
|
+
return this.animation.iterationDuration;
|
|
1085
|
+
}
|
|
1086
|
+
get time() {
|
|
1087
|
+
return this.animation.time;
|
|
1088
|
+
}
|
|
1089
|
+
set time(newTime) {
|
|
1090
|
+
this.animation.time = newTime;
|
|
1091
|
+
}
|
|
1092
|
+
get speed() {
|
|
1093
|
+
return this.animation.speed;
|
|
1094
|
+
}
|
|
1095
|
+
get state() {
|
|
1096
|
+
return this.animation.state;
|
|
1097
|
+
}
|
|
1098
|
+
set speed(newSpeed) {
|
|
1099
|
+
this.animation.speed = newSpeed;
|
|
1100
|
+
}
|
|
1101
|
+
get startTime() {
|
|
1102
|
+
return this.animation.startTime;
|
|
1103
|
+
}
|
|
1104
|
+
attachTimeline(timeline) {
|
|
1105
|
+
if (this._animation) this.stopTimeline = this.animation.attachTimeline(timeline);
|
|
1106
|
+
else this.pendingTimeline = timeline;
|
|
1107
|
+
return () => this.stop();
|
|
1108
|
+
}
|
|
1109
|
+
play() {
|
|
1110
|
+
this.animation.play();
|
|
1111
|
+
}
|
|
1112
|
+
pause() {
|
|
1113
|
+
this.animation.pause();
|
|
1114
|
+
}
|
|
1115
|
+
complete() {
|
|
1116
|
+
this.animation.complete();
|
|
1117
|
+
}
|
|
1118
|
+
cancel() {
|
|
1119
|
+
if (this._animation) this.animation.cancel();
|
|
1120
|
+
this.keyframeResolver?.cancel();
|
|
1121
|
+
}
|
|
1122
|
+
};
|
|
1123
|
+
function resolveTransition(transition, parentTransition) {
|
|
1124
|
+
if (transition?.inherit && parentTransition) {
|
|
1125
|
+
const { inherit: _, ...rest } = transition;
|
|
1126
|
+
return {
|
|
1127
|
+
...parentTransition,
|
|
1128
|
+
...rest
|
|
1129
|
+
};
|
|
1130
|
+
}
|
|
1131
|
+
return transition;
|
|
1132
|
+
}
|
|
1133
|
+
function getValueTransition(transition, key) {
|
|
1134
|
+
const valueTransition = transition?.[key] ?? transition?.["default"] ?? transition;
|
|
1135
|
+
if (valueTransition !== transition) return resolveTransition(valueTransition, transition);
|
|
1136
|
+
return valueTransition;
|
|
1137
|
+
}
|
|
1138
|
+
var underDampedSpring = {
|
|
1139
|
+
type: "spring",
|
|
1140
|
+
stiffness: 500,
|
|
1141
|
+
damping: 25,
|
|
1142
|
+
restSpeed: 10
|
|
1143
|
+
};
|
|
1144
|
+
var criticallyDampedSpring = (target) => ({
|
|
1145
|
+
type: "spring",
|
|
1146
|
+
stiffness: 550,
|
|
1147
|
+
damping: target === 0 ? 2 * Math.sqrt(550) : 30,
|
|
1148
|
+
restSpeed: 10
|
|
1149
|
+
});
|
|
1150
|
+
var keyframesTransition = {
|
|
1151
|
+
type: "keyframes",
|
|
1152
|
+
duration: 0.8
|
|
1153
|
+
};
|
|
1154
|
+
var ease = {
|
|
1155
|
+
type: "keyframes",
|
|
1156
|
+
ease: [
|
|
1157
|
+
0.25,
|
|
1158
|
+
0.1,
|
|
1159
|
+
0.35,
|
|
1160
|
+
1
|
|
1161
|
+
],
|
|
1162
|
+
duration: 0.3
|
|
1163
|
+
};
|
|
1164
|
+
var getDefaultTransition = (valueKey, { keyframes: keyframes2 }) => {
|
|
1165
|
+
if (keyframes2.length > 2) return keyframesTransition;
|
|
1166
|
+
else if (transformProps.has(valueKey)) return valueKey.startsWith("scale") ? criticallyDampedSpring(keyframes2[1]) : underDampedSpring;
|
|
1167
|
+
return ease;
|
|
1168
|
+
};
|
|
1169
|
+
var orchestrationKeys = /* @__PURE__ */ new Set([
|
|
1170
|
+
"when",
|
|
1171
|
+
"delay",
|
|
1172
|
+
"delayChildren",
|
|
1173
|
+
"staggerChildren",
|
|
1174
|
+
"staggerDirection",
|
|
1175
|
+
"repeat",
|
|
1176
|
+
"repeatType",
|
|
1177
|
+
"repeatDelay",
|
|
1178
|
+
"from",
|
|
1179
|
+
"elapsed"
|
|
1180
|
+
]);
|
|
1181
|
+
function isTransitionDefined(transition) {
|
|
1182
|
+
for (const key in transition) if (!orchestrationKeys.has(key)) return true;
|
|
1183
|
+
return false;
|
|
1184
|
+
}
|
|
1185
|
+
var animateMotionValue = (name, value, target, transition = {}, element, isHandoff) => (onComplete) => {
|
|
1186
|
+
const valueTransition = getValueTransition(transition, name) || {};
|
|
1187
|
+
const delay = valueTransition.delay || transition.delay || 0;
|
|
1188
|
+
let { elapsed = 0 } = transition;
|
|
1189
|
+
elapsed = elapsed - secondsToMilliseconds(delay);
|
|
1190
|
+
const options = {
|
|
1191
|
+
keyframes: Array.isArray(target) ? target : [null, target],
|
|
1192
|
+
ease: "easeOut",
|
|
1193
|
+
velocity: value.getVelocity(),
|
|
1194
|
+
...valueTransition,
|
|
1195
|
+
delay: -elapsed,
|
|
1196
|
+
onUpdate: (v) => {
|
|
1197
|
+
value.set(v);
|
|
1198
|
+
valueTransition.onUpdate && valueTransition.onUpdate(v);
|
|
40
1199
|
},
|
|
41
|
-
|
|
1200
|
+
onComplete: () => {
|
|
1201
|
+
onComplete();
|
|
1202
|
+
valueTransition.onComplete && valueTransition.onComplete();
|
|
1203
|
+
},
|
|
1204
|
+
name,
|
|
1205
|
+
motionValue: value,
|
|
1206
|
+
element: isHandoff ? void 0 : element
|
|
1207
|
+
};
|
|
1208
|
+
if (!isTransitionDefined(valueTransition)) Object.assign(options, getDefaultTransition(name, options));
|
|
1209
|
+
options.duration && (options.duration = secondsToMilliseconds(options.duration));
|
|
1210
|
+
options.repeatDelay && (options.repeatDelay = secondsToMilliseconds(options.repeatDelay));
|
|
1211
|
+
if (options.from !== void 0) options.keyframes[0] = options.from;
|
|
1212
|
+
let shouldSkip = false;
|
|
1213
|
+
if (options.type === false || options.duration === 0 && !options.repeatDelay) {
|
|
1214
|
+
makeAnimationInstant(options);
|
|
1215
|
+
if (options.delay === 0) shouldSkip = true;
|
|
1216
|
+
}
|
|
1217
|
+
if (MotionGlobalConfig.instantAnimations || MotionGlobalConfig.skipAnimations || element?.shouldSkipAnimations || valueTransition.skipAnimations) {
|
|
1218
|
+
shouldSkip = true;
|
|
1219
|
+
makeAnimationInstant(options);
|
|
1220
|
+
options.delay = 0;
|
|
1221
|
+
}
|
|
1222
|
+
options.allowFlatten = !valueTransition.type && !valueTransition.ease;
|
|
1223
|
+
if (shouldSkip && !isHandoff && value.get() !== void 0) {
|
|
1224
|
+
const finalKeyframe = getFinalKeyframe(options.keyframes, valueTransition);
|
|
1225
|
+
if (finalKeyframe !== void 0) {
|
|
1226
|
+
frame.update(() => {
|
|
1227
|
+
options.onUpdate(finalKeyframe);
|
|
1228
|
+
options.onComplete();
|
|
1229
|
+
});
|
|
1230
|
+
return;
|
|
1231
|
+
}
|
|
1232
|
+
}
|
|
1233
|
+
return valueTransition.isSync ? new JSAnimation(options) : new AsyncMotionValueAnimation(options);
|
|
1234
|
+
};
|
|
1235
|
+
var splitCSSVariableRegex = /^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;
|
|
1236
|
+
function parseCSSVariable(current) {
|
|
1237
|
+
const match = splitCSSVariableRegex.exec(current);
|
|
1238
|
+
if (!match) return [,];
|
|
1239
|
+
const [, token1, token2, fallback] = match;
|
|
1240
|
+
return [`--${token1 ?? token2}`, fallback];
|
|
1241
|
+
}
|
|
1242
|
+
var maxDepth = 4;
|
|
1243
|
+
function getVariableValue(current, element, depth = 1) {
|
|
1244
|
+
invariant(depth <= maxDepth, `Max CSS variable fallback depth detected in property "${current}". This may indicate a circular fallback dependency.`, "max-css-var-depth");
|
|
1245
|
+
const [token, fallback] = parseCSSVariable(current);
|
|
1246
|
+
if (!token) return;
|
|
1247
|
+
const resolved = window.getComputedStyle(element).getPropertyValue(token);
|
|
1248
|
+
if (resolved) {
|
|
1249
|
+
const trimmed = resolved.trim();
|
|
1250
|
+
return isNumericalString(trimmed) ? parseFloat(trimmed) : trimmed;
|
|
1251
|
+
}
|
|
1252
|
+
return isCSSVariableToken(fallback) ? getVariableValue(fallback, element, depth + 1) : fallback;
|
|
1253
|
+
}
|
|
1254
|
+
function resolveVariant(visualElement, definition, custom) {
|
|
1255
|
+
const props = visualElement.getProps();
|
|
1256
|
+
return resolveVariantFromProps(props, definition, custom !== void 0 ? custom : props.custom, visualElement);
|
|
1257
|
+
}
|
|
1258
|
+
var positionalKeys = /* @__PURE__ */ new Set([
|
|
1259
|
+
"width",
|
|
1260
|
+
"height",
|
|
1261
|
+
"top",
|
|
1262
|
+
"left",
|
|
1263
|
+
"right",
|
|
1264
|
+
"bottom",
|
|
1265
|
+
...transformPropOrder
|
|
1266
|
+
]);
|
|
1267
|
+
var isKeyframesTarget = (v) => {
|
|
1268
|
+
return Array.isArray(v);
|
|
1269
|
+
};
|
|
1270
|
+
function setMotionValue(visualElement, key, value) {
|
|
1271
|
+
if (visualElement.hasValue(key)) visualElement.getValue(key).set(value);
|
|
1272
|
+
else visualElement.addValue(key, motionValue(value));
|
|
1273
|
+
}
|
|
1274
|
+
function resolveFinalValueInKeyframes(v) {
|
|
1275
|
+
return isKeyframesTarget(v) ? v[v.length - 1] || 0 : v;
|
|
1276
|
+
}
|
|
1277
|
+
function setTarget(visualElement, definition) {
|
|
1278
|
+
let { transitionEnd = {}, transition = {}, ...target } = resolveVariant(visualElement, definition) || {};
|
|
1279
|
+
target = {
|
|
1280
|
+
...target,
|
|
1281
|
+
...transitionEnd
|
|
1282
|
+
};
|
|
1283
|
+
for (const key in target) setMotionValue(visualElement, key, resolveFinalValueInKeyframes(target[key]));
|
|
1284
|
+
}
|
|
1285
|
+
function isWillChangeMotionValue(value) {
|
|
1286
|
+
return Boolean(isMotionValue(value) && value.add);
|
|
1287
|
+
}
|
|
1288
|
+
function addValueToWillChange(visualElement, key) {
|
|
1289
|
+
const willChange = visualElement.getValue("willChange");
|
|
1290
|
+
if (isWillChangeMotionValue(willChange)) return willChange.add(key);
|
|
1291
|
+
else if (!willChange && MotionGlobalConfig.WillChange) {
|
|
1292
|
+
const newWillChange = new MotionGlobalConfig.WillChange("auto");
|
|
1293
|
+
visualElement.addValue("willChange", newWillChange);
|
|
1294
|
+
newWillChange.add(key);
|
|
1295
|
+
}
|
|
1296
|
+
}
|
|
1297
|
+
function getOptimisedAppearId(visualElement) {
|
|
1298
|
+
return visualElement.props[optimizedAppearDataAttribute];
|
|
1299
|
+
}
|
|
1300
|
+
var isBrowser = typeof window !== "undefined";
|
|
1301
|
+
function shouldBlockAnimation({ protectedKeys, needsAnimating }, key) {
|
|
1302
|
+
const shouldBlock = protectedKeys.hasOwnProperty(key) && needsAnimating[key] !== true;
|
|
1303
|
+
needsAnimating[key] = false;
|
|
1304
|
+
return shouldBlock;
|
|
1305
|
+
}
|
|
1306
|
+
function animateTarget(visualElement, targetAndTransition, { delay = 0, transitionOverride, type } = {}) {
|
|
1307
|
+
let { transition, transitionEnd, ...target } = targetAndTransition;
|
|
1308
|
+
const defaultTransition = visualElement.getDefaultTransition();
|
|
1309
|
+
transition = transition ? resolveTransition(transition, defaultTransition) : defaultTransition;
|
|
1310
|
+
const reduceMotion = transition?.reduceMotion;
|
|
1311
|
+
const skipAnimations = transition?.skipAnimations;
|
|
1312
|
+
if (transitionOverride) transition = transitionOverride;
|
|
1313
|
+
const animations = [];
|
|
1314
|
+
const animationTypeState = type && visualElement.animationState && visualElement.animationState.getState()[type];
|
|
1315
|
+
const path = transition?.path;
|
|
1316
|
+
if (path) path.animateVisualElement(visualElement, target, transition, delay, animations);
|
|
1317
|
+
for (const key in target) {
|
|
1318
|
+
const value = visualElement.getValue(key, visualElement.latestValues[key] ?? null);
|
|
1319
|
+
const valueTarget = target[key];
|
|
1320
|
+
if (valueTarget === void 0 || animationTypeState && shouldBlockAnimation(animationTypeState, key)) continue;
|
|
1321
|
+
const valueTransition = {
|
|
1322
|
+
delay,
|
|
1323
|
+
...getValueTransition(transition || {}, key)
|
|
1324
|
+
};
|
|
1325
|
+
if (skipAnimations) valueTransition.skipAnimations = true;
|
|
1326
|
+
const currentValue = value.get();
|
|
1327
|
+
if (currentValue !== void 0 && !value.isAnimating() && !Array.isArray(valueTarget) && valueTarget === currentValue && !valueTransition.velocity) {
|
|
1328
|
+
frame.update(() => value.set(valueTarget));
|
|
1329
|
+
continue;
|
|
1330
|
+
}
|
|
1331
|
+
let isHandoff = false;
|
|
1332
|
+
if (isBrowser && window.MotionHandoffAnimation) {
|
|
1333
|
+
const appearId = getOptimisedAppearId(visualElement);
|
|
1334
|
+
if (appearId) {
|
|
1335
|
+
const startTime = window.MotionHandoffAnimation(appearId, key, frame);
|
|
1336
|
+
if (startTime !== null) {
|
|
1337
|
+
valueTransition.startTime = startTime;
|
|
1338
|
+
isHandoff = true;
|
|
1339
|
+
}
|
|
1340
|
+
}
|
|
1341
|
+
}
|
|
1342
|
+
addValueToWillChange(visualElement, key);
|
|
1343
|
+
const shouldReduceMotion = reduceMotion ?? visualElement.shouldReduceMotion;
|
|
1344
|
+
value.start(animateMotionValue(key, value, valueTarget, shouldReduceMotion && positionalKeys.has(key) ? { type: false } : valueTransition, visualElement, isHandoff));
|
|
1345
|
+
const animation = value.animation;
|
|
1346
|
+
if (animation) animations.push(animation);
|
|
1347
|
+
}
|
|
1348
|
+
if (transitionEnd) {
|
|
1349
|
+
const applyTransitionEnd = () => frame.update(() => {
|
|
1350
|
+
transitionEnd && setTarget(visualElement, transitionEnd);
|
|
1351
|
+
});
|
|
1352
|
+
if (animations.length) Promise.all(animations).then(applyTransitionEnd);
|
|
1353
|
+
else applyTransitionEnd();
|
|
1354
|
+
}
|
|
1355
|
+
return animations;
|
|
1356
|
+
}
|
|
1357
|
+
function isNone(value) {
|
|
1358
|
+
if (typeof value === "number") return value === 0;
|
|
1359
|
+
else if (value !== null) return value === "none" || value === "0" || isZeroValueString(value);
|
|
1360
|
+
else return true;
|
|
1361
|
+
}
|
|
1362
|
+
var invalidTemplates = /* @__PURE__ */ new Set([
|
|
1363
|
+
"auto",
|
|
1364
|
+
"none",
|
|
1365
|
+
"0"
|
|
1366
|
+
]);
|
|
1367
|
+
function makeNoneKeyframesAnimatable(unresolvedKeyframes, noneKeyframeIndexes, name) {
|
|
1368
|
+
let i = 0;
|
|
1369
|
+
let animatableTemplate = void 0;
|
|
1370
|
+
while (i < unresolvedKeyframes.length && !animatableTemplate) {
|
|
1371
|
+
const keyframe = unresolvedKeyframes[i];
|
|
1372
|
+
if (typeof keyframe === "string" && !invalidTemplates.has(keyframe) && analyseComplexValue(keyframe).values.length) animatableTemplate = unresolvedKeyframes[i];
|
|
1373
|
+
i++;
|
|
1374
|
+
}
|
|
1375
|
+
if (animatableTemplate && name) for (const noneIndex of noneKeyframeIndexes) unresolvedKeyframes[noneIndex] = getAnimatableNone(name, animatableTemplate);
|
|
1376
|
+
}
|
|
1377
|
+
var DOMKeyframesResolver = class extends KeyframeResolver {
|
|
1378
|
+
constructor(unresolvedKeyframes, onComplete, name, motionValue2, element) {
|
|
1379
|
+
super(unresolvedKeyframes, onComplete, name, motionValue2, element, true);
|
|
1380
|
+
}
|
|
1381
|
+
readKeyframes() {
|
|
1382
|
+
const { unresolvedKeyframes, element, name } = this;
|
|
1383
|
+
if (!element || !element.current) return;
|
|
1384
|
+
super.readKeyframes();
|
|
1385
|
+
for (let i = 0; i < unresolvedKeyframes.length; i++) {
|
|
1386
|
+
let keyframe = unresolvedKeyframes[i];
|
|
1387
|
+
if (typeof keyframe === "string") {
|
|
1388
|
+
keyframe = keyframe.trim();
|
|
1389
|
+
if (isCSSVariableToken(keyframe)) {
|
|
1390
|
+
const resolved = getVariableValue(keyframe, element.current);
|
|
1391
|
+
if (resolved !== void 0) unresolvedKeyframes[i] = resolved;
|
|
1392
|
+
if (i === unresolvedKeyframes.length - 1) this.finalKeyframe = keyframe;
|
|
1393
|
+
}
|
|
1394
|
+
}
|
|
1395
|
+
}
|
|
1396
|
+
this.resolveNoneKeyframes();
|
|
1397
|
+
if (!positionalKeys.has(name) || unresolvedKeyframes.length !== 2) return;
|
|
1398
|
+
const [origin, target] = unresolvedKeyframes;
|
|
1399
|
+
const originType = findDimensionValueType(origin);
|
|
1400
|
+
const targetType = findDimensionValueType(target);
|
|
1401
|
+
if (containsCSSVariable(origin) !== containsCSSVariable(target) && positionalValues[name]) {
|
|
1402
|
+
this.needsMeasurement = true;
|
|
1403
|
+
return;
|
|
1404
|
+
}
|
|
1405
|
+
if (originType === targetType) return;
|
|
1406
|
+
if (isNumOrPxType(originType) && isNumOrPxType(targetType)) for (let i = 0; i < unresolvedKeyframes.length; i++) {
|
|
1407
|
+
const value = unresolvedKeyframes[i];
|
|
1408
|
+
if (typeof value === "string") unresolvedKeyframes[i] = parseFloat(value);
|
|
1409
|
+
}
|
|
1410
|
+
else if (positionalValues[name])
|
|
1411
|
+
this.needsMeasurement = true;
|
|
1412
|
+
}
|
|
1413
|
+
resolveNoneKeyframes() {
|
|
1414
|
+
const { unresolvedKeyframes, name } = this;
|
|
1415
|
+
const noneKeyframeIndexes = [];
|
|
1416
|
+
for (let i = 0; i < unresolvedKeyframes.length; i++) if (unresolvedKeyframes[i] === null || isNone(unresolvedKeyframes[i])) noneKeyframeIndexes.push(i);
|
|
1417
|
+
if (noneKeyframeIndexes.length) makeNoneKeyframesAnimatable(unresolvedKeyframes, noneKeyframeIndexes, name);
|
|
1418
|
+
}
|
|
1419
|
+
measureInitialState() {
|
|
1420
|
+
const { element, unresolvedKeyframes, name } = this;
|
|
1421
|
+
if (!element || !element.current) return;
|
|
1422
|
+
if (name === "height") this.suspendedScrollY = window.pageYOffset;
|
|
1423
|
+
this.measuredOrigin = positionalValues[name](element.measureViewportBox(), window.getComputedStyle(element.current));
|
|
1424
|
+
unresolvedKeyframes[0] = this.measuredOrigin;
|
|
1425
|
+
const measureKeyframe = unresolvedKeyframes[unresolvedKeyframes.length - 1];
|
|
1426
|
+
if (measureKeyframe !== void 0) element.getValue(name, measureKeyframe).jump(measureKeyframe, false);
|
|
1427
|
+
}
|
|
1428
|
+
measureEndState() {
|
|
1429
|
+
const { element, name, unresolvedKeyframes } = this;
|
|
1430
|
+
if (!element || !element.current) return;
|
|
1431
|
+
const value = element.getValue(name);
|
|
1432
|
+
value && value.jump(this.measuredOrigin, false);
|
|
1433
|
+
const finalKeyframeIndex = unresolvedKeyframes.length - 1;
|
|
1434
|
+
const finalKeyframe = unresolvedKeyframes[finalKeyframeIndex];
|
|
1435
|
+
unresolvedKeyframes[finalKeyframeIndex] = positionalValues[name](element.measureViewportBox(), window.getComputedStyle(element.current));
|
|
1436
|
+
if (finalKeyframe !== null && this.finalKeyframe === void 0) this.finalKeyframe = finalKeyframe;
|
|
1437
|
+
if (this.removedTransforms?.length) this.removedTransforms.forEach(([unsetTransformName, unsetTransformValue]) => {
|
|
1438
|
+
element.getValue(unsetTransformName).set(unsetTransformValue);
|
|
1439
|
+
});
|
|
1440
|
+
this.resolveNoneKeyframes();
|
|
1441
|
+
}
|
|
1442
|
+
};
|
|
1443
|
+
function resolveElements(elementOrSelector, scope, selectorCache) {
|
|
1444
|
+
if (elementOrSelector == null) return [];
|
|
1445
|
+
if (elementOrSelector instanceof EventTarget) return [elementOrSelector];
|
|
1446
|
+
else if (typeof elementOrSelector === "string") {
|
|
1447
|
+
let root = document;
|
|
1448
|
+
if (scope) root = scope.current;
|
|
1449
|
+
const elements = selectorCache?.[elementOrSelector] ?? root.querySelectorAll(elementOrSelector);
|
|
1450
|
+
return elements ? Array.from(elements) : [];
|
|
1451
|
+
}
|
|
1452
|
+
return Array.from(elementOrSelector).filter((element) => element != null);
|
|
1453
|
+
}
|
|
1454
|
+
function isSVGElement(element) {
|
|
1455
|
+
return isObject(element) && "ownerSVGElement" in element;
|
|
1456
|
+
}
|
|
1457
|
+
function isSVGSVGElement(element) {
|
|
1458
|
+
return isSVGElement(element) && element.tagName === "svg";
|
|
1459
|
+
}
|
|
1460
|
+
var DOMVisualElement = class extends VisualElement {
|
|
1461
|
+
constructor() {
|
|
1462
|
+
super(...arguments);
|
|
1463
|
+
this.KeyframeResolver = DOMKeyframesResolver;
|
|
1464
|
+
}
|
|
1465
|
+
sortInstanceNodePosition(a, b) {
|
|
1466
|
+
return a.compareDocumentPosition(b) & 2 ? 1 : -1;
|
|
1467
|
+
}
|
|
1468
|
+
getBaseTargetFromProps(props, key) {
|
|
1469
|
+
const style = props.style;
|
|
1470
|
+
return style ? style[key] : void 0;
|
|
1471
|
+
}
|
|
1472
|
+
removeValueFromRenderState(key, { vars, style }) {
|
|
1473
|
+
delete vars[key];
|
|
1474
|
+
delete style[key];
|
|
1475
|
+
}
|
|
1476
|
+
handleChildMotionValue() {
|
|
1477
|
+
if (this.childSubscription) {
|
|
1478
|
+
this.childSubscription();
|
|
1479
|
+
delete this.childSubscription;
|
|
1480
|
+
}
|
|
1481
|
+
const { children } = this.props;
|
|
1482
|
+
if (isMotionValue(children)) this.childSubscription = children.on("change", (latest) => {
|
|
1483
|
+
if (this.current) this.current.textContent = `${latest}`;
|
|
1484
|
+
});
|
|
1485
|
+
}
|
|
1486
|
+
};
|
|
1487
|
+
function convertBoundingBoxToBox({ top, left, right, bottom }) {
|
|
1488
|
+
return {
|
|
1489
|
+
x: {
|
|
1490
|
+
min: left,
|
|
1491
|
+
max: right
|
|
1492
|
+
},
|
|
1493
|
+
y: {
|
|
1494
|
+
min: top,
|
|
1495
|
+
max: bottom
|
|
1496
|
+
}
|
|
1497
|
+
};
|
|
1498
|
+
}
|
|
1499
|
+
function convertBoxToBoundingBox({ x, y }) {
|
|
1500
|
+
return {
|
|
1501
|
+
top: y.min,
|
|
1502
|
+
right: x.max,
|
|
1503
|
+
bottom: y.max,
|
|
1504
|
+
left: x.min
|
|
1505
|
+
};
|
|
1506
|
+
}
|
|
1507
|
+
function transformBoxPoints(point, transformPoint) {
|
|
1508
|
+
if (!transformPoint) return point;
|
|
1509
|
+
const topLeft = transformPoint({
|
|
1510
|
+
x: point.left,
|
|
1511
|
+
y: point.top
|
|
1512
|
+
});
|
|
1513
|
+
const bottomRight = transformPoint({
|
|
1514
|
+
x: point.right,
|
|
1515
|
+
y: point.bottom
|
|
42
1516
|
});
|
|
1517
|
+
return {
|
|
1518
|
+
top: topLeft.y,
|
|
1519
|
+
left: topLeft.x,
|
|
1520
|
+
bottom: bottomRight.y,
|
|
1521
|
+
right: bottomRight.x
|
|
1522
|
+
};
|
|
1523
|
+
}
|
|
1524
|
+
function isIdentityScale(scale) {
|
|
1525
|
+
return scale === void 0 || scale === 1;
|
|
1526
|
+
}
|
|
1527
|
+
function hasScale({ scale, scaleX, scaleY }) {
|
|
1528
|
+
return !isIdentityScale(scale) || !isIdentityScale(scaleX) || !isIdentityScale(scaleY);
|
|
1529
|
+
}
|
|
1530
|
+
function hasTransform(values) {
|
|
1531
|
+
return hasScale(values) || has2DTranslate(values) || values.z || values.rotate || values.rotateX || values.rotateY || values.skewX || values.skewY;
|
|
1532
|
+
}
|
|
1533
|
+
function has2DTranslate(values) {
|
|
1534
|
+
return is2DTranslate(values.x) || is2DTranslate(values.y);
|
|
1535
|
+
}
|
|
1536
|
+
function is2DTranslate(value) {
|
|
1537
|
+
return value && value !== "0%";
|
|
1538
|
+
}
|
|
1539
|
+
function scalePoint(point, scale, originPoint) {
|
|
1540
|
+
return originPoint + scale * (point - originPoint);
|
|
1541
|
+
}
|
|
1542
|
+
function applyPointDelta(point, translate, scale, originPoint, boxScale) {
|
|
1543
|
+
if (boxScale !== void 0) point = scalePoint(point, boxScale, originPoint);
|
|
1544
|
+
return scalePoint(point, scale, originPoint) + translate;
|
|
43
1545
|
}
|
|
44
|
-
function
|
|
45
|
-
|
|
1546
|
+
function applyAxisDelta(axis, translate = 0, scale = 1, originPoint, boxScale) {
|
|
1547
|
+
axis.min = applyPointDelta(axis.min, translate, scale, originPoint, boxScale);
|
|
1548
|
+
axis.max = applyPointDelta(axis.max, translate, scale, originPoint, boxScale);
|
|
46
1549
|
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
1550
|
+
function applyBoxDelta(box, { x, y }) {
|
|
1551
|
+
applyAxisDelta(box.x, x.translate, x.scale, x.originPoint);
|
|
1552
|
+
applyAxisDelta(box.y, y.translate, y.scale, y.originPoint);
|
|
1553
|
+
}
|
|
1554
|
+
var TREE_SCALE_SNAP_MIN = 0.999999999999;
|
|
1555
|
+
var TREE_SCALE_SNAP_MAX = 1.0000000000001;
|
|
1556
|
+
function applyTreeDeltas(box, treeScale, treePath, isSharedTransition = false) {
|
|
1557
|
+
const treeLength = treePath.length;
|
|
1558
|
+
if (!treeLength) return;
|
|
1559
|
+
treeScale.x = treeScale.y = 1;
|
|
1560
|
+
let node;
|
|
1561
|
+
let delta;
|
|
1562
|
+
for (let i = 0; i < treeLength; i++) {
|
|
1563
|
+
node = treePath[i];
|
|
1564
|
+
delta = node.projectionDelta;
|
|
1565
|
+
const { visualElement } = node.options;
|
|
1566
|
+
if (visualElement && visualElement.props.style && visualElement.props.style.display === "contents") continue;
|
|
1567
|
+
if (isSharedTransition && node.options.layoutScroll && node.scroll && node !== node.root) {
|
|
1568
|
+
translateAxis(box.x, -node.scroll.offset.x);
|
|
1569
|
+
translateAxis(box.y, -node.scroll.offset.y);
|
|
1570
|
+
}
|
|
1571
|
+
if (delta) {
|
|
1572
|
+
treeScale.x *= delta.x.scale;
|
|
1573
|
+
treeScale.y *= delta.y.scale;
|
|
1574
|
+
applyBoxDelta(box, delta);
|
|
1575
|
+
}
|
|
1576
|
+
if (isSharedTransition && hasTransform(node.latestValues)) transformBox(box, node.latestValues, node.layout?.layoutBox);
|
|
1577
|
+
}
|
|
1578
|
+
if (treeScale.x < TREE_SCALE_SNAP_MAX && treeScale.x > TREE_SCALE_SNAP_MIN) treeScale.x = 1;
|
|
1579
|
+
if (treeScale.y < TREE_SCALE_SNAP_MAX && treeScale.y > TREE_SCALE_SNAP_MIN) treeScale.y = 1;
|
|
1580
|
+
}
|
|
1581
|
+
function translateAxis(axis, distance) {
|
|
1582
|
+
axis.min += distance;
|
|
1583
|
+
axis.max += distance;
|
|
1584
|
+
}
|
|
1585
|
+
function transformAxis(axis, axisTranslate, axisScale, boxScale, axisOrigin = 0.5) {
|
|
1586
|
+
applyAxisDelta(axis, axisTranslate, axisScale, mixNumber(axis.min, axis.max, axisOrigin), boxScale);
|
|
1587
|
+
}
|
|
1588
|
+
function resolveAxisTranslate(value, axis) {
|
|
1589
|
+
if (typeof value === "string") return parseFloat(value) / 100 * (axis.max - axis.min);
|
|
1590
|
+
return value;
|
|
1591
|
+
}
|
|
1592
|
+
function transformBox(box, transform, sourceBox) {
|
|
1593
|
+
const resolveBox = sourceBox ?? box;
|
|
1594
|
+
transformAxis(box.x, resolveAxisTranslate(transform.x, resolveBox.x), transform.scaleX, transform.scale, transform.originX);
|
|
1595
|
+
transformAxis(box.y, resolveAxisTranslate(transform.y, resolveBox.y), transform.scaleY, transform.scale, transform.originY);
|
|
1596
|
+
}
|
|
1597
|
+
function measureViewportBox(instance, transformPoint) {
|
|
1598
|
+
return convertBoundingBoxToBox(transformBoxPoints(instance.getBoundingClientRect(), transformPoint));
|
|
1599
|
+
}
|
|
1600
|
+
function measurePageBox(element, rootProjectionNode, transformPagePoint) {
|
|
1601
|
+
const viewportBox = measureViewportBox(element, transformPagePoint);
|
|
1602
|
+
const { scroll } = rootProjectionNode;
|
|
1603
|
+
if (scroll) {
|
|
1604
|
+
translateAxis(viewportBox.x, scroll.offset.x);
|
|
1605
|
+
translateAxis(viewportBox.y, scroll.offset.y);
|
|
1606
|
+
}
|
|
1607
|
+
return viewportBox;
|
|
1608
|
+
}
|
|
1609
|
+
function renderHTML(element, { style, vars }, styleProp, projection) {
|
|
1610
|
+
const elementStyle = element.style;
|
|
1611
|
+
let key;
|
|
1612
|
+
for (key in style) elementStyle[key] = style[key];
|
|
1613
|
+
projection?.applyProjectionStyles(elementStyle, styleProp);
|
|
1614
|
+
for (key in vars) elementStyle.setProperty(key, vars[key]);
|
|
1615
|
+
}
|
|
1616
|
+
function getComputedStyle$1(element) {
|
|
1617
|
+
return window.getComputedStyle(element);
|
|
1618
|
+
}
|
|
1619
|
+
var HTMLVisualElement = class extends DOMVisualElement {
|
|
1620
|
+
constructor() {
|
|
1621
|
+
super(...arguments);
|
|
1622
|
+
this.type = "html";
|
|
1623
|
+
this.renderInstance = renderHTML;
|
|
1624
|
+
}
|
|
1625
|
+
mount(instance) {
|
|
1626
|
+
invariant(Boolean(instance.style), "motion.create() components must forward their ref to a HTML or SVG element", "custom-component-ref");
|
|
1627
|
+
super.mount(instance);
|
|
1628
|
+
}
|
|
1629
|
+
readValueFromInstance(instance, key) {
|
|
1630
|
+
if (transformProps.has(key)) return this.projection?.isProjecting ? defaultTransformValue(key) : readTransformValue(instance, key);
|
|
1631
|
+
else {
|
|
1632
|
+
const computedStyle = getComputedStyle$1(instance);
|
|
1633
|
+
const value = (isCSSVariableName(key) ? computedStyle.getPropertyValue(key) : computedStyle[key]) || 0;
|
|
1634
|
+
return typeof value === "string" ? value.trim() : value;
|
|
1635
|
+
}
|
|
1636
|
+
}
|
|
1637
|
+
measureInstanceViewportBox(instance, { transformPagePoint }) {
|
|
1638
|
+
return measureViewportBox(instance, transformPagePoint);
|
|
1639
|
+
}
|
|
1640
|
+
build(renderState, latestValues, props) {
|
|
1641
|
+
buildHTMLStyles(renderState, latestValues, props.transformTemplate);
|
|
1642
|
+
}
|
|
1643
|
+
scrapeMotionValuesFromProps(props, prevProps, visualElement) {
|
|
1644
|
+
return scrapeMotionValuesFromProps$1(props, prevProps, visualElement);
|
|
1645
|
+
}
|
|
51
1646
|
};
|
|
1647
|
+
var camelCaseAttributes = /* @__PURE__ */ new Set([
|
|
1648
|
+
"baseFrequency",
|
|
1649
|
+
"diffuseConstant",
|
|
1650
|
+
"kernelMatrix",
|
|
1651
|
+
"kernelUnitLength",
|
|
1652
|
+
"keySplines",
|
|
1653
|
+
"keyTimes",
|
|
1654
|
+
"limitingConeAngle",
|
|
1655
|
+
"markerHeight",
|
|
1656
|
+
"markerWidth",
|
|
1657
|
+
"numOctaves",
|
|
1658
|
+
"targetX",
|
|
1659
|
+
"targetY",
|
|
1660
|
+
"surfaceScale",
|
|
1661
|
+
"specularConstant",
|
|
1662
|
+
"specularExponent",
|
|
1663
|
+
"stdDeviation",
|
|
1664
|
+
"tableValues",
|
|
1665
|
+
"viewBox",
|
|
1666
|
+
"gradientTransform",
|
|
1667
|
+
"pathLength",
|
|
1668
|
+
"startOffset",
|
|
1669
|
+
"textLength",
|
|
1670
|
+
"lengthAdjust"
|
|
1671
|
+
]);
|
|
1672
|
+
function renderSVG(element, renderState, _styleProp, projection) {
|
|
1673
|
+
renderHTML(element, renderState, void 0, projection);
|
|
1674
|
+
for (const key in renderState.attrs) element.setAttribute(!camelCaseAttributes.has(key) ? camelToDash(key) : key, renderState.attrs[key]);
|
|
1675
|
+
}
|
|
1676
|
+
var SVGVisualElement = class extends DOMVisualElement {
|
|
1677
|
+
constructor() {
|
|
1678
|
+
super(...arguments);
|
|
1679
|
+
this.type = "svg";
|
|
1680
|
+
this.isSVGTag = false;
|
|
1681
|
+
this.measureInstanceViewportBox = createBox;
|
|
1682
|
+
}
|
|
1683
|
+
getBaseTargetFromProps(props, key) {
|
|
1684
|
+
return props[key];
|
|
1685
|
+
}
|
|
1686
|
+
readValueFromInstance(instance, key) {
|
|
1687
|
+
if (transformProps.has(key)) {
|
|
1688
|
+
const defaultType = getDefaultValueType(key);
|
|
1689
|
+
return defaultType ? defaultType.default || 0 : 0;
|
|
1690
|
+
}
|
|
1691
|
+
if (cssStyleProperties.includes(key)) {
|
|
1692
|
+
const value = getComputedStyle(instance)[key];
|
|
1693
|
+
if (typeof value === "string" && value) return value.trim();
|
|
1694
|
+
}
|
|
1695
|
+
key = !camelCaseAttributes.has(key) ? camelToDash(key) : key;
|
|
1696
|
+
return instance.getAttribute(key);
|
|
1697
|
+
}
|
|
1698
|
+
scrapeMotionValuesFromProps(props, prevProps, visualElement) {
|
|
1699
|
+
return scrapeMotionValuesFromProps(props, prevProps, visualElement);
|
|
1700
|
+
}
|
|
1701
|
+
build(renderState, latestValues, props) {
|
|
1702
|
+
buildSVGAttrs(renderState, latestValues, this.isSVGTag, props.transformTemplate, props.style);
|
|
1703
|
+
}
|
|
1704
|
+
renderInstance(instance, renderState, styleProp, projection) {
|
|
1705
|
+
renderSVG(instance, renderState, styleProp, projection);
|
|
1706
|
+
}
|
|
1707
|
+
mount(instance) {
|
|
1708
|
+
this.isSVGTag = isSVGTag(instance.tagName);
|
|
1709
|
+
super.mount(instance);
|
|
1710
|
+
}
|
|
1711
|
+
};
|
|
1712
|
+
function animateSingleValue(value, keyframes2, options) {
|
|
1713
|
+
const motionValue$1 = isMotionValue(value) ? value : motionValue(value);
|
|
1714
|
+
motionValue$1.start(animateMotionValue("", motionValue$1, keyframes2, options));
|
|
1715
|
+
return motionValue$1.animation;
|
|
1716
|
+
}
|
|
1717
|
+
function MotionConfig({ children, ...config }) {
|
|
1718
|
+
const parentConfig = useContext(MotionConfigContext);
|
|
1719
|
+
config = {
|
|
1720
|
+
...parentConfig,
|
|
1721
|
+
...config
|
|
1722
|
+
};
|
|
1723
|
+
config.transition = resolveTransition(config.transition, parentConfig.transition);
|
|
1724
|
+
config.isStatic = useConstant(() => config.isStatic);
|
|
1725
|
+
const context = useMemo(() => config, [
|
|
1726
|
+
JSON.stringify(config.transition),
|
|
1727
|
+
config.transformPagePoint,
|
|
1728
|
+
config.reducedMotion,
|
|
1729
|
+
config.skipAnimations,
|
|
1730
|
+
config.isValidProp
|
|
1731
|
+
]);
|
|
1732
|
+
return jsx(MotionConfigContext.Provider, {
|
|
1733
|
+
value: context,
|
|
1734
|
+
children
|
|
1735
|
+
});
|
|
1736
|
+
}
|
|
52
1737
|
function observeWebVitals(onVital) {
|
|
53
1738
|
if (typeof window === "undefined" || typeof PerformanceObserver === "undefined") return () => {
|
|
54
1739
|
};
|
|
@@ -196,7 +1881,11 @@ var NETWORK_DISCONNECTED_MESSAGE = "Fleet Prime is not connected to the Prime Ag
|
|
|
196
1881
|
var FLEET_ADAPTER_CAPABILITIES = {
|
|
197
1882
|
protocolVersion: 1,
|
|
198
1883
|
schemaRevision: 2,
|
|
199
|
-
features: [
|
|
1884
|
+
features: [
|
|
1885
|
+
"reasoning-summary-v1",
|
|
1886
|
+
"mcp-connections-v1",
|
|
1887
|
+
"session-tree-v1"
|
|
1888
|
+
]
|
|
200
1889
|
};
|
|
201
1890
|
var ChatModelInfoSchema = external_exports.object({
|
|
202
1891
|
key: external_exports.string(),
|
|
@@ -279,7 +1968,7 @@ var WorkspaceBrowseEntrySchema = external_exports.object({
|
|
|
279
1968
|
name: external_exports.string(),
|
|
280
1969
|
path: external_exports.string()
|
|
281
1970
|
}).openapi({ description: "Directory entry in the project-folder picker" });
|
|
282
|
-
|
|
1971
|
+
external_exports.object({
|
|
283
1972
|
path: external_exports.string(),
|
|
284
1973
|
parent: external_exports.string().nullable(),
|
|
285
1974
|
entries: external_exports.array(WorkspaceBrowseEntrySchema)
|
|
@@ -443,6 +2132,41 @@ var ChatMcpOAuthLoginResponseSchema = external_exports.object({
|
|
|
443
2132
|
}).openapi({ description: "MCP OAuth login snapshot" });
|
|
444
2133
|
external_exports.object({ message: external_exports.string() }).openapi({ description: "Error response" });
|
|
445
2134
|
external_exports.object({ status: external_exports.literal("ok") }).openapi({ description: "Health check response" });
|
|
2135
|
+
var SessionTreeNodeRoleSchema = external_exports.enum([
|
|
2136
|
+
"user",
|
|
2137
|
+
"assistant",
|
|
2138
|
+
"system",
|
|
2139
|
+
"unknown"
|
|
2140
|
+
]);
|
|
2141
|
+
var SessionTreeNodeKindSchema = external_exports.enum([
|
|
2142
|
+
"message",
|
|
2143
|
+
"system",
|
|
2144
|
+
"other"
|
|
2145
|
+
]);
|
|
2146
|
+
var SessionTreeNodeSchema = external_exports.lazy(() => external_exports.object({
|
|
2147
|
+
id: external_exports.string().min(1),
|
|
2148
|
+
parentId: external_exports.string().min(1).optional(),
|
|
2149
|
+
kind: SessionTreeNodeKindSchema,
|
|
2150
|
+
role: SessionTreeNodeRoleSchema.optional(),
|
|
2151
|
+
label: external_exports.string(),
|
|
2152
|
+
preview: external_exports.string(),
|
|
2153
|
+
isLeaf: external_exports.boolean(),
|
|
2154
|
+
isOnActiveBranch: external_exports.boolean(),
|
|
2155
|
+
messageIndex: external_exports.number().int().nonnegative().optional(),
|
|
2156
|
+
children: external_exports.array(SessionTreeNodeSchema)
|
|
2157
|
+
}).openapi({ description: "Browser-safe session tree node" }));
|
|
2158
|
+
var SessionTreeSnapshotSchema = external_exports.object({
|
|
2159
|
+
sessionId: SessionIdSchema,
|
|
2160
|
+
leafId: external_exports.string().min(1).nullable(),
|
|
2161
|
+
nodes: external_exports.array(SessionTreeNodeSchema)
|
|
2162
|
+
}).openapi({ description: "Session entry tree snapshot for the active branch and branches" });
|
|
2163
|
+
var SessionTreeSnapshotResponseSchema = external_exports.object({ snapshot: SessionTreeSnapshotSchema }).openapi({ description: "Session tree read response" });
|
|
2164
|
+
var SessionTreeNavigateRequestSchema = external_exports.object({
|
|
2165
|
+
sessionId: SessionIdSchema,
|
|
2166
|
+
targetEntryId: external_exports.string().min(1).max(256),
|
|
2167
|
+
expectedLeafId: external_exports.string().min(1).max(256).optional()
|
|
2168
|
+
}).openapi({ description: "Navigate the live session tree to an earlier entry" });
|
|
2169
|
+
var SessionTreeNavigateResponseSchema = external_exports.object({ snapshot: SessionTreeSnapshotSchema }).openapi({ description: "Session tree navigate response with authoritative snapshot" });
|
|
446
2170
|
var chatResourcePathSchema = nonEmptyStringSchema.max(1024);
|
|
447
2171
|
var chatResourcePathArraySchema = external_exports.array(chatResourcePathSchema);
|
|
448
2172
|
var chatResourcePathUpdateArraySchema = chatResourcePathArraySchema.max(100);
|
|
@@ -592,7 +2316,7 @@ function systemSetTimeoutZero(callback) {
|
|
|
592
2316
|
|
|
593
2317
|
// node_modules/.pnpm/@tanstack+query-core@5.102.8/node_modules/@tanstack/query-core/build/modern/utils.js
|
|
594
2318
|
var isServer = typeof window === "undefined" || "Deno" in globalThis;
|
|
595
|
-
function
|
|
2319
|
+
function noop2() {
|
|
596
2320
|
}
|
|
597
2321
|
function functionalUpdate(updater, input) {
|
|
598
2322
|
return typeof updater === "function" ? updater(input) : updater;
|
|
@@ -991,7 +2715,7 @@ function createRetryer(config) {
|
|
|
991
2715
|
promiseResolve = resolve2;
|
|
992
2716
|
promiseReject = reject2;
|
|
993
2717
|
});
|
|
994
|
-
promise.catch(
|
|
2718
|
+
promise.catch(noop2);
|
|
995
2719
|
const isResolved = () => status !== "pending";
|
|
996
2720
|
const cancel = (cancelOptions) => {
|
|
997
2721
|
if (!isResolved()) {
|
|
@@ -1427,7 +3151,7 @@ var MutationCache = class extends Subscribable {
|
|
|
1427
3151
|
}
|
|
1428
3152
|
resumePausedMutations() {
|
|
1429
3153
|
const pausedMutations = this.getAll().filter((x) => x.state.isPaused);
|
|
1430
|
-
return notifyManager.batch(() => Promise.all(pausedMutations.map((mutation) => mutation.continue().catch(
|
|
3154
|
+
return notifyManager.batch(() => Promise.all(pausedMutations.map((mutation) => mutation.continue().catch(noop2))));
|
|
1431
3155
|
}
|
|
1432
3156
|
};
|
|
1433
3157
|
function scopeFor(mutation) {
|
|
@@ -1583,7 +3307,7 @@ var Query = class extends Removable {
|
|
|
1583
3307
|
cancel(options) {
|
|
1584
3308
|
const promise = this.#retryer?.promise;
|
|
1585
3309
|
this.#retryer?.cancel(options);
|
|
1586
|
-
return promise ? promise.then(
|
|
3310
|
+
return promise ? promise.then(noop2).catch(noop2) : Promise.resolve();
|
|
1587
3311
|
}
|
|
1588
3312
|
destroy() {
|
|
1589
3313
|
super.destroy();
|
|
@@ -2116,7 +3840,7 @@ var QueryClient = class {
|
|
|
2116
3840
|
...cancelOptions
|
|
2117
3841
|
};
|
|
2118
3842
|
const promises = notifyManager.batch(() => this.#queryCache.findAll(filters).map((query) => query.cancel(defaultedCancelOptions)));
|
|
2119
|
-
return Promise.all(promises).then(
|
|
3843
|
+
return Promise.all(promises).then(noop2).catch(noop2);
|
|
2120
3844
|
}
|
|
2121
3845
|
invalidateQueries(filters, options = {}) {
|
|
2122
3846
|
return notifyManager.batch(() => {
|
|
@@ -2137,10 +3861,10 @@ var QueryClient = class {
|
|
|
2137
3861
|
};
|
|
2138
3862
|
const promises = notifyManager.batch(() => this.#queryCache.findAll(filters).filter((query) => !query.isDisabled() && !query.isStatic()).map((query) => {
|
|
2139
3863
|
let promise = query.fetch(void 0, fetchOptions);
|
|
2140
|
-
if (!fetchOptions.throwOnError) promise = promise.catch(
|
|
3864
|
+
if (!fetchOptions.throwOnError) promise = promise.catch(noop2);
|
|
2141
3865
|
return query.state.fetchStatus === "paused" ? Promise.resolve() : promise;
|
|
2142
3866
|
}));
|
|
2143
|
-
return Promise.all(promises).then(
|
|
3867
|
+
return Promise.all(promises).then(noop2);
|
|
2144
3868
|
}
|
|
2145
3869
|
async query(options) {
|
|
2146
3870
|
const defaultedOptions = this.defaultQueryOptions(options);
|
|
@@ -2164,7 +3888,7 @@ var QueryClient = class {
|
|
|
2164
3888
|
* @deprecated Use queryClient.query(options) instead. You can swallow errors with `.catch(noop)`. This method will be removed in the next major version.
|
|
2165
3889
|
*/
|
|
2166
3890
|
prefetchQuery(options) {
|
|
2167
|
-
return this.fetchQuery(options).then(
|
|
3891
|
+
return this.fetchQuery(options).then(noop2).catch(noop2);
|
|
2168
3892
|
}
|
|
2169
3893
|
infiniteQuery(options) {
|
|
2170
3894
|
options._type = "infinite";
|
|
@@ -2181,7 +3905,7 @@ var QueryClient = class {
|
|
|
2181
3905
|
* @deprecated Use queryClient.infiniteQuery(options) instead. You can swallow errors with `.catch(noop)`. This method will be removed in the next major version.
|
|
2182
3906
|
*/
|
|
2183
3907
|
prefetchInfiniteQuery(options) {
|
|
2184
|
-
return this.fetchInfiniteQuery(options).then(
|
|
3908
|
+
return this.fetchInfiniteQuery(options).then(noop2).catch(noop2);
|
|
2185
3909
|
}
|
|
2186
3910
|
/**
|
|
2187
3911
|
* @deprecated Use queryClient.infiniteQuery({ ...options, staleTime: 'static' }) instead. This method will be removed in the next major version.
|
|
@@ -2397,7 +4121,7 @@ var QueryObserver = class extends Subscribable {
|
|
|
2397
4121
|
#executeFetch(fetchOptions) {
|
|
2398
4122
|
this.#updateQuery();
|
|
2399
4123
|
let promise = this.#currentQuery.fetch(this.options, fetchOptions);
|
|
2400
|
-
if (!fetchOptions?.throwOnError) promise = promise.catch(
|
|
4124
|
+
if (!fetchOptions?.throwOnError) promise = promise.catch(noop2);
|
|
2401
4125
|
return promise;
|
|
2402
4126
|
}
|
|
2403
4127
|
#shouldScheduleTimer(timeout) {
|
|
@@ -2751,9 +4475,9 @@ var getHasError = ({ result, errorResetBoundary, throwOnError, query, suspense }
|
|
|
2751
4475
|
var ensureSuspenseTimers = (defaultedOptions) => {
|
|
2752
4476
|
if (defaultedOptions.suspense) {
|
|
2753
4477
|
const MIN_SUSPENSE_TIME_MS = 1e3;
|
|
2754
|
-
const
|
|
4478
|
+
const clamp2 = (value) => value === "static" ? value : Math.max(value ?? MIN_SUSPENSE_TIME_MS, MIN_SUSPENSE_TIME_MS);
|
|
2755
4479
|
const originalStaleTime = defaultedOptions.staleTime;
|
|
2756
|
-
defaultedOptions.staleTime = typeof originalStaleTime === "function" ? (...args) =>
|
|
4480
|
+
defaultedOptions.staleTime = typeof originalStaleTime === "function" ? (...args) => clamp2(originalStaleTime(...args)) : clamp2(originalStaleTime);
|
|
2757
4481
|
if (typeof defaultedOptions.gcTime === "number") defaultedOptions.gcTime = Math.max(defaultedOptions.gcTime, MIN_SUSPENSE_TIME_MS);
|
|
2758
4482
|
}
|
|
2759
4483
|
};
|
|
@@ -2785,7 +4509,7 @@ function useBaseQuery(options, Observer, queryClient) {
|
|
|
2785
4509
|
const result = observer.getOptimisticResult(defaultedOptions);
|
|
2786
4510
|
const shouldSubscribe = !isRestoring && subscribed;
|
|
2787
4511
|
React5.useSyncExternalStore(React5.useCallback((onStoreChange) => {
|
|
2788
|
-
const unsubscribe = shouldSubscribe ? observer.subscribe(notifyManager.batchCalls(onStoreChange)) :
|
|
4512
|
+
const unsubscribe = shouldSubscribe ? observer.subscribe(notifyManager.batchCalls(onStoreChange)) : noop2;
|
|
2789
4513
|
observer.updateResult();
|
|
2790
4514
|
return unsubscribe;
|
|
2791
4515
|
}, [observer, shouldSubscribe]), () => observer.getCurrentResult(), () => observer.getCurrentResult());
|
|
@@ -2818,7 +4542,7 @@ function useMutation(options, queryClient) {
|
|
|
2818
4542
|
}, [observer, options]);
|
|
2819
4543
|
const result = React6.useSyncExternalStore(React6.useCallback((onStoreChange) => observer.subscribe(notifyManager.batchCalls(onStoreChange)), [observer]), () => observer.getCurrentResult(), () => observer.getCurrentResult());
|
|
2820
4544
|
const mutate = React6.useCallback((...args) => {
|
|
2821
|
-
observer.mutate(args[0], args[1]).catch(
|
|
4545
|
+
observer.mutate(args[0], args[1]).catch(noop2);
|
|
2822
4546
|
}, [observer]);
|
|
2823
4547
|
if (result.error && shouldThrowError(observer.options.throwOnError, [result.error])) throw result.error;
|
|
2824
4548
|
return {
|
|
@@ -2829,8 +4553,40 @@ function useMutation(options, queryClient) {
|
|
|
2829
4553
|
}
|
|
2830
4554
|
|
|
2831
4555
|
export {
|
|
2832
|
-
|
|
2833
|
-
|
|
4556
|
+
pipe,
|
|
4557
|
+
progress,
|
|
4558
|
+
reverseEasing,
|
|
4559
|
+
circOut,
|
|
4560
|
+
isEasingArray,
|
|
4561
|
+
createGeneratorEasing,
|
|
4562
|
+
spring,
|
|
4563
|
+
fillOffset,
|
|
4564
|
+
defaultOffset,
|
|
4565
|
+
getValueTransition,
|
|
4566
|
+
animateMotionValue,
|
|
4567
|
+
resolveVariant,
|
|
4568
|
+
isKeyframesTarget,
|
|
4569
|
+
addValueToWillChange,
|
|
4570
|
+
getOptimisedAppearId,
|
|
4571
|
+
animateTarget,
|
|
4572
|
+
resolveElements,
|
|
4573
|
+
isSVGElement,
|
|
4574
|
+
isSVGSVGElement,
|
|
4575
|
+
convertBoundingBoxToBox,
|
|
4576
|
+
convertBoxToBoundingBox,
|
|
4577
|
+
hasScale,
|
|
4578
|
+
hasTransform,
|
|
4579
|
+
has2DTranslate,
|
|
4580
|
+
scalePoint,
|
|
4581
|
+
applyBoxDelta,
|
|
4582
|
+
applyTreeDeltas,
|
|
4583
|
+
translateAxis,
|
|
4584
|
+
transformBox,
|
|
4585
|
+
measurePageBox,
|
|
4586
|
+
HTMLVisualElement,
|
|
4587
|
+
SVGVisualElement,
|
|
4588
|
+
animateSingleValue,
|
|
4589
|
+
MotionConfig,
|
|
2834
4590
|
initAnalytics,
|
|
2835
4591
|
NETWORK_DISCONNECTED_MESSAGE,
|
|
2836
4592
|
FLEET_ADAPTER_CAPABILITIES,
|
|
@@ -2840,7 +4596,6 @@ export {
|
|
|
2840
4596
|
ChatResourcesResponseSchema,
|
|
2841
4597
|
WorkspaceTreeResponseSchema,
|
|
2842
4598
|
WorkspaceFileResponseSchema,
|
|
2843
|
-
WorkspaceBrowseResponseSchema,
|
|
2844
4599
|
ChatProvidersResponseSchema,
|
|
2845
4600
|
ChatProviderUpdateRequestSchema,
|
|
2846
4601
|
ChatProviderUpdateResponseSchema,
|
|
@@ -2853,6 +4608,9 @@ export {
|
|
|
2853
4608
|
ChatMcpDeleteRequestSchema,
|
|
2854
4609
|
ChatMcpOAuthLoginRequestSchema,
|
|
2855
4610
|
ChatMcpOAuthLoginResponseSchema,
|
|
4611
|
+
SessionTreeSnapshotResponseSchema,
|
|
4612
|
+
SessionTreeNavigateRequestSchema,
|
|
4613
|
+
SessionTreeNavigateResponseSchema,
|
|
2856
4614
|
ChatSettingsUpdateRequestSchema,
|
|
2857
4615
|
ChatSettingsResponseSchema,
|
|
2858
4616
|
useQueryClient,
|