modernize
- replace vite with tsdown - update registry - update deps
This commit is contained in:
72
dist/easings.js
vendored
72
dist/easings.js
vendored
@@ -1,72 +0,0 @@
|
||||
const r = {
|
||||
quart: (t, e) => n(
|
||||
[0.895, 0.03, 0.685, 0.22],
|
||||
[0.165, 0.84, 0.44, 1],
|
||||
[0.77, 0, 0.175, 1],
|
||||
t,
|
||||
e
|
||||
),
|
||||
circ: (t, e) => n(
|
||||
[0.6, 0.04, 0.98, 0.335],
|
||||
[0.075, 0.82, 0.165, 1],
|
||||
[0.785, 0.135, 0.15, 0.86],
|
||||
t,
|
||||
e
|
||||
),
|
||||
quint: (t, e) => n(
|
||||
[0.755, 0.05, 0.855, 0.06],
|
||||
[0.23, 1, 0.32, 1],
|
||||
[0.86, 0, 0.07, 1],
|
||||
t,
|
||||
e
|
||||
),
|
||||
sine: (t, e) => n(
|
||||
[0.47, 0, 0.745, 0.715],
|
||||
[0.39, 0.575, 0.565, 1],
|
||||
[0.445, 0.05, 0.55, 0.95],
|
||||
t,
|
||||
e
|
||||
),
|
||||
expo: (t, e) => n(
|
||||
[0.95, 0.05, 0.795, 0.035],
|
||||
[0.19, 1, 0.22, 1],
|
||||
[1, 0, 0, 1],
|
||||
t,
|
||||
e
|
||||
),
|
||||
cubic: (t, e) => n(
|
||||
[0.55, 0.055, 0.675, 0.19],
|
||||
[0.215, 0.61, 0.355, 1],
|
||||
[0.645, 0.045, 0.355, 1],
|
||||
t,
|
||||
e
|
||||
)
|
||||
}, a = {
|
||||
type: "tween",
|
||||
duration: 0.7
|
||||
}, n = (t, e, u, c, o) => {
|
||||
const s = c ? { duration: c } : {}, i = o ? { delay: o } : {};
|
||||
return {
|
||||
in: {
|
||||
...a,
|
||||
ease: t,
|
||||
...s,
|
||||
...i
|
||||
},
|
||||
out: {
|
||||
...a,
|
||||
ease: e,
|
||||
...s,
|
||||
...i
|
||||
},
|
||||
inOut: {
|
||||
...a,
|
||||
ease: u,
|
||||
...s,
|
||||
...i
|
||||
}
|
||||
};
|
||||
};
|
||||
export {
|
||||
r as default
|
||||
};
|
||||
22
dist/easings/easings.d.ts
vendored
22
dist/easings/easings.d.ts
vendored
@@ -1,10 +1,18 @@
|
||||
//#region src/easings/easings.d.ts
|
||||
type CubicBezierEase = [number, number, number, number];
|
||||
type TransitionConfig = {
|
||||
type: string;
|
||||
duration: number;
|
||||
ease: CubicBezierEase;
|
||||
delay?: number;
|
||||
};
|
||||
type EasingCollection = {
|
||||
out: any;
|
||||
in: any;
|
||||
inOut: any;
|
||||
out: TransitionConfig;
|
||||
in: TransitionConfig;
|
||||
inOut: TransitionConfig;
|
||||
};
|
||||
type EasingFunction = (duration: number, delay?: number) => EasingCollection;
|
||||
declare const Easings: {
|
||||
[key: string]: EasingFunction;
|
||||
};
|
||||
export default Easings;
|
||||
type EasingName = "sine" | "quad" | "cubic" | "quart" | "quint" | "expo" | "circ" | "back" | "elastic" | "bounce";
|
||||
declare const Easings: Record<EasingName, EasingFunction>;
|
||||
//#endregion
|
||||
export { Easings as default };
|
||||
195
dist/easings/easings.js
vendored
Normal file
195
dist/easings/easings.js
vendored
Normal file
@@ -0,0 +1,195 @@
|
||||
//#region src/easings/easings.ts
|
||||
const Easings = {
|
||||
sine: (duration, delay) => easing([
|
||||
.47,
|
||||
0,
|
||||
.745,
|
||||
.715
|
||||
], [
|
||||
.39,
|
||||
.575,
|
||||
.565,
|
||||
1
|
||||
], [
|
||||
.445,
|
||||
.05,
|
||||
.55,
|
||||
.95
|
||||
], duration, delay),
|
||||
quad: (duration, delay) => easing([
|
||||
.55,
|
||||
.085,
|
||||
.68,
|
||||
.19
|
||||
], [
|
||||
.25,
|
||||
.46,
|
||||
.45,
|
||||
1
|
||||
], [
|
||||
.455,
|
||||
.03,
|
||||
.515,
|
||||
.955
|
||||
], duration, delay),
|
||||
cubic: (duration, delay) => easing([
|
||||
.55,
|
||||
.055,
|
||||
.675,
|
||||
.19
|
||||
], [
|
||||
.215,
|
||||
.61,
|
||||
.355,
|
||||
1
|
||||
], [
|
||||
.645,
|
||||
.045,
|
||||
.355,
|
||||
1
|
||||
], duration, delay),
|
||||
quart: (duration, delay) => easing([
|
||||
.895,
|
||||
.03,
|
||||
.685,
|
||||
.22
|
||||
], [
|
||||
.165,
|
||||
.84,
|
||||
.44,
|
||||
1
|
||||
], [
|
||||
.77,
|
||||
0,
|
||||
.175,
|
||||
1
|
||||
], duration, delay),
|
||||
quint: (duration, delay) => easing([
|
||||
.755,
|
||||
.05,
|
||||
.855,
|
||||
.06
|
||||
], [
|
||||
.23,
|
||||
1,
|
||||
.32,
|
||||
1
|
||||
], [
|
||||
.86,
|
||||
0,
|
||||
.07,
|
||||
1
|
||||
], duration, delay),
|
||||
expo: (duration, delay) => easing([
|
||||
.95,
|
||||
.05,
|
||||
.795,
|
||||
.035
|
||||
], [
|
||||
.19,
|
||||
1,
|
||||
.22,
|
||||
1
|
||||
], [
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
1
|
||||
], duration, delay),
|
||||
circ: (duration, delay) => easing([
|
||||
.6,
|
||||
.04,
|
||||
.98,
|
||||
.335
|
||||
], [
|
||||
.075,
|
||||
.82,
|
||||
.165,
|
||||
1
|
||||
], [
|
||||
.785,
|
||||
.135,
|
||||
.15,
|
||||
.86
|
||||
], duration, delay),
|
||||
back: (duration, delay) => easing([
|
||||
.55,
|
||||
.055,
|
||||
.675,
|
||||
.19
|
||||
], [
|
||||
.175,
|
||||
.885,
|
||||
.32,
|
||||
1.275
|
||||
], [
|
||||
.68,
|
||||
-.55,
|
||||
.265,
|
||||
1.585
|
||||
], duration, delay),
|
||||
elastic: (duration, delay) => easing([
|
||||
.95,
|
||||
0,
|
||||
.7,
|
||||
.01
|
||||
], [
|
||||
.37,
|
||||
0,
|
||||
.63,
|
||||
1
|
||||
], [
|
||||
.37,
|
||||
0,
|
||||
.63,
|
||||
1
|
||||
], duration, delay),
|
||||
bounce: (duration, delay) => easing([
|
||||
.55,
|
||||
.06,
|
||||
.67,
|
||||
.19
|
||||
], [
|
||||
.215,
|
||||
.61,
|
||||
.355,
|
||||
1
|
||||
], [
|
||||
.215,
|
||||
.61,
|
||||
.355,
|
||||
1
|
||||
], duration, delay)
|
||||
};
|
||||
const defaultCubicTransition = {
|
||||
type: "tween",
|
||||
duration: .7
|
||||
};
|
||||
const easing = (easeIn, easeOut, easeInOut, duration, delay) => {
|
||||
const durationObj = duration ? { duration } : {};
|
||||
const delayObj = delay ? { delay } : {};
|
||||
return {
|
||||
in: {
|
||||
...defaultCubicTransition,
|
||||
ease: easeIn,
|
||||
...durationObj,
|
||||
...delayObj
|
||||
},
|
||||
out: {
|
||||
...defaultCubicTransition,
|
||||
ease: easeOut,
|
||||
...durationObj,
|
||||
...delayObj
|
||||
},
|
||||
inOut: {
|
||||
...defaultCubicTransition,
|
||||
ease: easeInOut,
|
||||
...durationObj,
|
||||
...delayObj
|
||||
}
|
||||
};
|
||||
};
|
||||
var easings_default = Easings;
|
||||
|
||||
//#endregion
|
||||
export { easings_default as default };
|
||||
9
dist/unom-style.d.ts
vendored
9
dist/unom-style.d.ts
vendored
@@ -1,7 +1,2 @@
|
||||
import ease from "./easings/easings";
|
||||
export {
|
||||
/**
|
||||
* @public
|
||||
* Util function to create framer-motion transitions based on penner's functions
|
||||
*/
|
||||
ease };
|
||||
import Easings from "./easings/easings.js";
|
||||
export { Easings as ease };
|
||||
7
dist/unom-style.js
vendored
7
dist/unom-style.js
vendored
@@ -1,4 +1,3 @@
|
||||
import { default as f } from "./easings.js";
|
||||
export {
|
||||
f as ease
|
||||
};
|
||||
import easings_default from "./easings/easings.js";
|
||||
|
||||
export { easings_default as ease };
|
||||
Reference in New Issue
Block a user