@nil-/xit 0.2.2 → 0.2.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/package.json +5 -4
- package/test.d.ts +8 -0
- package/test.js +31 -0
- package/assets/bundler.js +0 -276
- package/assets/index.js +0 -2536
- package/assets/svelte/animate.js +0 -29
- package/assets/svelte/easing.js +0 -130
- package/assets/svelte/events.js +0 -4
- package/assets/svelte/index.js +0 -2316
- package/assets/svelte/internal/client.js +0 -2304
- package/assets/svelte/internal/disclose-version.js +0 -2
- package/assets/svelte/motion.js +0 -460
- package/assets/svelte/store.js +0 -168
- package/assets/svelte/transition.js +0 -142
package/assets/svelte/animate.js
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { cubicOut as O } from "./easing.js";
|
|
2
|
-
function b(a, { from: t, to: r }, p = {}) {
|
|
3
|
-
var { delay: u = 0, duration: n = (i) => Math.sqrt(i) * 120, easing: y = O } = p, h = getComputedStyle(a), g = h.transform === "none" ? "" : h.transform, [s, v] = h.transformOrigin.split(" ").map(parseFloat);
|
|
4
|
-
s /= a.clientWidth, v /= a.clientHeight;
|
|
5
|
-
var c = W(a), d = a.clientWidth / r.width / c, f = a.clientHeight / r.height / c, x = t.left + t.width * s, m = t.top + t.height * v, w = r.left + r.width * s, S = r.top + r.height * v, l = (x - w) * d, o = (m - S) * f, $ = t.width / r.width, z = t.height / r.height;
|
|
6
|
-
return {
|
|
7
|
-
delay: u,
|
|
8
|
-
duration: typeof n == "function" ? n(Math.sqrt(l * l + o * o)) : n,
|
|
9
|
-
easing: y,
|
|
10
|
-
css: (i, e) => {
|
|
11
|
-
var C = e * l, q = e * o, H = i + e * $, M = i + e * z;
|
|
12
|
-
return `transform: ${g} translate(${C}px, ${q}px) scale(${H}, ${M});`;
|
|
13
|
-
}
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
function W(a) {
|
|
17
|
-
if ("currentCSSZoom" in a)
|
|
18
|
-
return (
|
|
19
|
-
/** @type {number} */
|
|
20
|
-
a.currentCSSZoom
|
|
21
|
-
);
|
|
22
|
-
for (var t = a, r = 1; t !== null; )
|
|
23
|
-
r *= +getComputedStyle(t).zoom, t = /** @type {Element | null} */
|
|
24
|
-
t.parentElement;
|
|
25
|
-
return r;
|
|
26
|
-
}
|
|
27
|
-
export {
|
|
28
|
-
b as flip
|
|
29
|
-
};
|
package/assets/svelte/easing.js
DELETED
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
function s(n) {
|
|
2
|
-
return n;
|
|
3
|
-
}
|
|
4
|
-
function f(n) {
|
|
5
|
-
const u = 2.5949095;
|
|
6
|
-
return (n *= 2) < 1 ? 0.5 * (n * n * ((u + 1) * n - u)) : 0.5 * ((n -= 2) * n * ((u + 1) * n + u) + 2);
|
|
7
|
-
}
|
|
8
|
-
function h(n) {
|
|
9
|
-
return n * n * ((1.70158 + 1) * n - 1.70158);
|
|
10
|
-
}
|
|
11
|
-
function M(n) {
|
|
12
|
-
return --n * n * ((1.70158 + 1) * n + 1.70158) + 1;
|
|
13
|
-
}
|
|
14
|
-
function c(n) {
|
|
15
|
-
const u = 0.36363636363636365, t = 8 / 11, o = 9 / 10, i = 4356 / 361, e = 35442 / 1805, a = 16061 / 1805, r = n * n;
|
|
16
|
-
return n < u ? 7.5625 * r : n < t ? 9.075 * r - 9.9 * n + 3.4 : n < o ? i * r - e * n + a : 10.8 * n * n - 20.52 * n + 10.72;
|
|
17
|
-
}
|
|
18
|
-
function I(n) {
|
|
19
|
-
return n < 0.5 ? 0.5 * (1 - c(1 - n * 2)) : 0.5 * c(n * 2 - 1) + 0.5;
|
|
20
|
-
}
|
|
21
|
-
function O(n) {
|
|
22
|
-
return 1 - c(1 - n);
|
|
23
|
-
}
|
|
24
|
-
function p(n) {
|
|
25
|
-
return (n *= 2) < 1 ? -0.5 * (Math.sqrt(1 - n * n) - 1) : 0.5 * (Math.sqrt(1 - (n -= 2) * n) + 1);
|
|
26
|
-
}
|
|
27
|
-
function q(n) {
|
|
28
|
-
return 1 - Math.sqrt(1 - n * n);
|
|
29
|
-
}
|
|
30
|
-
function w(n) {
|
|
31
|
-
return Math.sqrt(1 - --n * n);
|
|
32
|
-
}
|
|
33
|
-
function b(n) {
|
|
34
|
-
return n < 0.5 ? 4 * n * n * n : 0.5 * Math.pow(2 * n - 2, 3) + 1;
|
|
35
|
-
}
|
|
36
|
-
function P(n) {
|
|
37
|
-
return n * n * n;
|
|
38
|
-
}
|
|
39
|
-
function l(n) {
|
|
40
|
-
const u = n - 1;
|
|
41
|
-
return u * u * u + 1;
|
|
42
|
-
}
|
|
43
|
-
function x(n) {
|
|
44
|
-
return n < 0.5 ? 0.5 * Math.sin(13 * Math.PI / 2 * 2 * n) * Math.pow(2, 10 * (2 * n - 1)) : 0.5 * Math.sin(-13 * Math.PI / 2 * (2 * n - 1 + 1)) * Math.pow(2, -10 * (2 * n - 1)) + 1;
|
|
45
|
-
}
|
|
46
|
-
function d(n) {
|
|
47
|
-
return Math.sin(13 * n * Math.PI / 2) * Math.pow(2, 10 * (n - 1));
|
|
48
|
-
}
|
|
49
|
-
function k(n) {
|
|
50
|
-
return Math.sin(-13 * (n + 1) * Math.PI / 2) * Math.pow(2, -10 * n) + 1;
|
|
51
|
-
}
|
|
52
|
-
function v(n) {
|
|
53
|
-
return n === 0 || n === 1 ? n : n < 0.5 ? 0.5 * Math.pow(2, 20 * n - 10) : -0.5 * Math.pow(2, 10 - n * 20) + 1;
|
|
54
|
-
}
|
|
55
|
-
function g(n) {
|
|
56
|
-
return n === 0 ? n : Math.pow(2, 10 * (n - 1));
|
|
57
|
-
}
|
|
58
|
-
function j(n) {
|
|
59
|
-
return n === 1 ? n : 1 - Math.pow(2, -10 * n);
|
|
60
|
-
}
|
|
61
|
-
function m(n) {
|
|
62
|
-
return n /= 0.5, n < 1 ? 0.5 * n * n : (n--, -0.5 * (n * (n - 2) - 1));
|
|
63
|
-
}
|
|
64
|
-
function y(n) {
|
|
65
|
-
return n * n;
|
|
66
|
-
}
|
|
67
|
-
function z(n) {
|
|
68
|
-
return -n * (n - 2);
|
|
69
|
-
}
|
|
70
|
-
function A(n) {
|
|
71
|
-
return n < 0.5 ? 8 * Math.pow(n, 4) : -8 * Math.pow(n - 1, 4) + 1;
|
|
72
|
-
}
|
|
73
|
-
function B(n) {
|
|
74
|
-
return Math.pow(n, 4);
|
|
75
|
-
}
|
|
76
|
-
function C(n) {
|
|
77
|
-
return Math.pow(n - 1, 3) * (1 - n) + 1;
|
|
78
|
-
}
|
|
79
|
-
function D(n) {
|
|
80
|
-
return (n *= 2) < 1 ? 0.5 * n * n * n * n * n : 0.5 * ((n -= 2) * n * n * n * n + 2);
|
|
81
|
-
}
|
|
82
|
-
function E(n) {
|
|
83
|
-
return n * n * n * n * n;
|
|
84
|
-
}
|
|
85
|
-
function F(n) {
|
|
86
|
-
return --n * n * n * n * n + 1;
|
|
87
|
-
}
|
|
88
|
-
function G(n) {
|
|
89
|
-
return -0.5 * (Math.cos(Math.PI * n) - 1);
|
|
90
|
-
}
|
|
91
|
-
function H(n) {
|
|
92
|
-
const u = Math.cos(n * Math.PI * 0.5);
|
|
93
|
-
return Math.abs(u) < 1e-14 ? 1 : 1 - u;
|
|
94
|
-
}
|
|
95
|
-
function J(n) {
|
|
96
|
-
return Math.sin(n * Math.PI / 2);
|
|
97
|
-
}
|
|
98
|
-
export {
|
|
99
|
-
h as backIn,
|
|
100
|
-
f as backInOut,
|
|
101
|
-
M as backOut,
|
|
102
|
-
O as bounceIn,
|
|
103
|
-
I as bounceInOut,
|
|
104
|
-
c as bounceOut,
|
|
105
|
-
q as circIn,
|
|
106
|
-
p as circInOut,
|
|
107
|
-
w as circOut,
|
|
108
|
-
P as cubicIn,
|
|
109
|
-
b as cubicInOut,
|
|
110
|
-
l as cubicOut,
|
|
111
|
-
d as elasticIn,
|
|
112
|
-
x as elasticInOut,
|
|
113
|
-
k as elasticOut,
|
|
114
|
-
g as expoIn,
|
|
115
|
-
v as expoInOut,
|
|
116
|
-
j as expoOut,
|
|
117
|
-
s as linear,
|
|
118
|
-
y as quadIn,
|
|
119
|
-
m as quadInOut,
|
|
120
|
-
z as quadOut,
|
|
121
|
-
B as quartIn,
|
|
122
|
-
A as quartInOut,
|
|
123
|
-
C as quartOut,
|
|
124
|
-
E as quintIn,
|
|
125
|
-
D as quintInOut,
|
|
126
|
-
F as quintOut,
|
|
127
|
-
H as sineIn,
|
|
128
|
-
G as sineInOut,
|
|
129
|
-
J as sineOut
|
|
130
|
-
};
|
package/assets/svelte/events.js
DELETED