fix typings
remove dist
This commit is contained in:
18
dist/easings/easings.d.ts
vendored
18
dist/easings/easings.d.ts
vendored
@@ -1,18 +0,0 @@
|
|||||||
//#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: TransitionConfig;
|
|
||||||
in: TransitionConfig;
|
|
||||||
inOut: TransitionConfig;
|
|
||||||
};
|
|
||||||
type EasingFunction = (duration: number, delay?: number) => EasingCollection;
|
|
||||||
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
195
dist/easings/easings.js
vendored
@@ -1,195 +0,0 @@
|
|||||||
//#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 };
|
|
||||||
2
dist/index.d.ts
vendored
2
dist/index.d.ts
vendored
@@ -1,2 +0,0 @@
|
|||||||
import Easings from "./easings/easings.js";
|
|
||||||
export { Easings as ease };
|
|
||||||
3
dist/index.js
vendored
3
dist/index.js
vendored
@@ -1,3 +0,0 @@
|
|||||||
import easings_default from "./easings/easings.js";
|
|
||||||
|
|
||||||
export { easings_default as ease };
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@unom/style",
|
"name": "@unom/style",
|
||||||
"version": "0.4.1",
|
"version": "0.4.2",
|
||||||
"description": "The official unom-style library",
|
"description": "The official unom-style library",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"files": [
|
"files": [
|
||||||
@@ -40,6 +40,9 @@
|
|||||||
"npm": "8.9.0",
|
"npm": "8.9.0",
|
||||||
"yarn": "1.22.19"
|
"yarn": "1.22.19"
|
||||||
},
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"motion": "^12"
|
||||||
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git+https://git.unom.io/unom/style"
|
"url": "git+https://git.unom.io/unom/style"
|
||||||
|
|||||||
2030
pnpm-lock.yaml
generated
Normal file
2030
pnpm-lock.yaml
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,16 +1,11 @@
|
|||||||
|
import type { Transition } from "motion";
|
||||||
|
|
||||||
type CubicBezierEase = [number, number, number, number];
|
type CubicBezierEase = [number, number, number, number];
|
||||||
|
|
||||||
type TransitionConfig = {
|
|
||||||
type: string;
|
|
||||||
duration: number;
|
|
||||||
ease: CubicBezierEase;
|
|
||||||
delay?: number;
|
|
||||||
};
|
|
||||||
|
|
||||||
type EasingCollection = {
|
type EasingCollection = {
|
||||||
out: TransitionConfig;
|
out: Transition;
|
||||||
in: TransitionConfig;
|
in: Transition;
|
||||||
inOut: TransitionConfig;
|
inOut: Transition;
|
||||||
};
|
};
|
||||||
|
|
||||||
type EasingFunction = (duration: number, delay?: number) => EasingCollection;
|
type EasingFunction = (duration: number, delay?: number) => EasingCollection;
|
||||||
|
|||||||
Reference in New Issue
Block a user