fix: 修复关闭SSH终端标签页时会话状态未更新的问题

This commit is contained in:
2026-04-18 02:35:38 +08:00
commit 6e2e2f9387
43467 changed files with 5489040 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to this
software under copyright law.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
For more information, please refer to <https://unlicense.org>
+28
View File
@@ -0,0 +1,28 @@
# ts-easing
Collection of easing function in TypeScript.
All functions accept a number in range of `[0..1]`.
All functions return a number, which is guaranteed to start at 0 and end at 1.
```
f(t), where t in [0..1]
f(0) -> 0
f(1) -> 1
```
## Usage
```js
import {easing} from 'ts-easing';
console.log(easing.quadratic(0.5));
```
## License
[Unlicense](./LICENSE) &mdash; public domain.
+29
View File
@@ -0,0 +1,29 @@
export declare type TEasing = (time: number) => number;
export interface IEasingMap {
linear: TEasing;
quadratic: TEasing;
cubic: TEasing;
elastic: TEasing;
inQuad: TEasing;
outQuad: TEasing;
inOutQuad: TEasing;
inCubic: TEasing;
outCubic: TEasing;
inOutCubic: TEasing;
inQuart: TEasing;
outQuart: TEasing;
inOutQuart: TEasing;
inQuint: TEasing;
outQuint: TEasing;
inOutQuint: TEasing;
inSine: TEasing;
outSine: TEasing;
inOutSine: TEasing;
inExpo: TEasing;
outExpo: TEasing;
inOutExpo: TEasing;
inCirc: TEasing;
outCirc: TEasing;
inOutCirc: TEasing;
}
export declare const easing: IEasingMap;
+69
View File
@@ -0,0 +1,69 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.easing = {
// No easing, no acceleration
linear: function (t) { return t; },
// Accelerates fast, then slows quickly towards end.
quadratic: function (t) { return t * (-(t * t) * t + 4 * t * t - 6 * t + 4); },
// Overshoots over 1 and then returns to 1 towards end.
cubic: function (t) { return t * (4 * t * t - 9 * t + 6); },
// Overshoots over 1 multiple times - wiggles around 1.
elastic: function (t) { return t * (33 * t * t * t * t - 106 * t * t * t + 126 * t * t - 67 * t + 15); },
// Accelerating from zero velocity
inQuad: function (t) { return t * t; },
// Decelerating to zero velocity
outQuad: function (t) { return t * (2 - t); },
// Acceleration until halfway, then deceleration
inOutQuad: function (t) { return t < .5 ? 2 * t * t : -1 + (4 - 2 * t) * t; },
// Accelerating from zero velocity
inCubic: function (t) { return t * t * t; },
// Decelerating to zero velocity
outCubic: function (t) { return (--t) * t * t + 1; },
// Acceleration until halfway, then deceleration
inOutCubic: function (t) { return t < .5 ? 4 * t * t * t : (t - 1) * (2 * t - 2) * (2 * t - 2) + 1; },
// Accelerating from zero velocity
inQuart: function (t) { return t * t * t * t; },
// Decelerating to zero velocity
outQuart: function (t) { return 1 - (--t) * t * t * t; },
// Acceleration until halfway, then deceleration
inOutQuart: function (t) { return t < .5 ? 8 * t * t * t * t : 1 - 8 * (--t) * t * t * t; },
// Accelerating from zero velocity
inQuint: function (t) { return t * t * t * t * t; },
// Decelerating to zero velocity
outQuint: function (t) { return 1 + (--t) * t * t * t * t; },
// Acceleration until halfway, then deceleration
inOutQuint: function (t) { return t < .5 ? 16 * t * t * t * t * t : 1 + 16 * (--t) * t * t * t * t; },
// Accelerating from zero velocity
inSine: function (t) { return -Math.cos(t * (Math.PI / 2)) + 1; },
// Decelerating to zero velocity
outSine: function (t) { return Math.sin(t * (Math.PI / 2)); },
// Accelerating until halfway, then decelerating
inOutSine: function (t) { return -(Math.cos(Math.PI * t) - 1) / 2; },
// Exponential accelerating from zero velocity
inExpo: function (t) { return Math.pow(2, 10 * (t - 1)); },
// Exponential decelerating to zero velocity
outExpo: function (t) { return -Math.pow(2, -10 * t) + 1; },
// Exponential accelerating until halfway, then decelerating
inOutExpo: function (t) {
t /= .5;
if (t < 1)
return Math.pow(2, 10 * (t - 1)) / 2;
t--;
return (-Math.pow(2, -10 * t) + 2) / 2;
},
// Circular accelerating from zero velocity
inCirc: function (t) { return -Math.sqrt(1 - t * t) + 1; },
// Circular decelerating to zero velocity Moves VERY fast at the beginning and
// then quickly slows down in the middle. This tween can actually be used
// in continuous transitions where target value changes all the time,
// because of the very quick start, it hides the jitter between target value changes.
outCirc: function (t) { return Math.sqrt(1 - (t = t - 1) * t); },
// Circular acceleration until halfway, then deceleration
inOutCirc: function (t) {
t /= .5;
if (t < 1)
return -(Math.sqrt(1 - t * t) - 1) / 2;
t -= 2;
return (Math.sqrt(1 - t * t) + 1) / 2;
}
};
+31
View File
@@ -0,0 +1,31 @@
{
"name": "ts-easing",
"version": "0.2.0",
"description": "Collection of easing functions in TypeScript",
"main": "lib/index.js",
"files": [
"lib/"
],
"types": "lib/index.d.ts",
"typings": "lib/index.d.ts",
"scripts": {
"build": "tsc",
"clean": "rimraf lib"
},
"author": "@streamich",
"license": "Unlicense",
"repository": {
"type": "git",
"url": "https://github.com/streamich/ts-easing.git"
},
"bugs": {
"url": "https://github.com/streamich/ts-easing/issues"
},
"homepage": "https://github.com/streamich/ts-easing#readme",
"dependencies": {
},
"devDependencies": {
"typescript": "^3.1.3",
"rimraf": "^2.6.2"
}
}