@thednp/tween 0.0.1 → 0.0.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/README.md +112 -109
- package/dist/preact/preact.d.mts +62 -0
- package/dist/preact/preact.d.mts.map +1 -0
- package/dist/preact/preact.mjs +181 -0
- package/dist/preact/preact.mjs.map +1 -0
- package/dist/react/react.d.mts +62 -0
- package/dist/react/react.d.mts.map +1 -0
- package/dist/react/react.mjs +183 -0
- package/dist/react/react.mjs.map +1 -0
- package/dist/solid/solid.d.mts +60 -0
- package/dist/solid/solid.d.mts.map +1 -0
- package/dist/solid/solid.mjs +157 -0
- package/dist/solid/solid.mjs.map +1 -0
- package/dist/svelte/svelte.d.mts.map +1 -0
- package/dist/svelte/svelte.mjs.map +1 -0
- package/dist/svelte/tween.svelte.d.ts +58 -0
- package/dist/svelte/tween.svelte.js +156 -0
- package/dist/tween/index.d.mts +939 -0
- package/dist/tween/index.d.mts.map +1 -0
- package/dist/tween/index.mjs +1929 -0
- package/dist/tween/index.mjs.map +1 -0
- package/dist/tween.min.js +8 -0
- package/dist/tween.min.js.map +1 -0
- package/dist/vue/vue.d.mts +61 -0
- package/dist/vue/vue.d.mts.map +1 -0
- package/dist/vue/vue.mjs +157 -0
- package/dist/vue/vue.mjs.map +1 -0
- package/package.json +49 -40
- package/dist/index.cjs +0 -621
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts +0 -184
- package/dist/index.d.mts +0 -184
- package/dist/index.mjs +0 -610
- package/dist/index.mjs.map +0 -1
- package/dist/react.cjs +0 -61
- package/dist/react.cjs.map +0 -1
- package/dist/react.d.cts +0 -9
- package/dist/react.d.mts +0 -9
- package/dist/react.mjs +0 -55
- package/dist/react.mjs.map +0 -1
- package/dist/solid.cjs +0 -81
- package/dist/solid.cjs.map +0 -1
- package/dist/solid.d.cts +0 -9
- package/dist/solid.d.mts +0 -9
- package/dist/solid.mjs +0 -75
- package/dist/solid.mjs.map +0 -1
- package/dist/tween.iife.js +0 -2
- package/dist/tween.iife.js.map +0 -1
- package/wiki/Easing.md +0 -58
- package/wiki/React.md +0 -255
- package/wiki/Solid.md +0 -149
- package/wiki/Timeline.md +0 -207
- package/wiki/Tween.md +0 -230
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* @thednp/tween composables for Vue v0.0.3 (https://github.com/thednp/tween)
|
|
3
|
+
* Copyright 2026 © thednp
|
|
4
|
+
* Licensed under MIT (https://github.com/thednp/tween/blob/master/LICENSE)
|
|
5
|
+
*/
|
|
6
|
+
"use strict";
|
|
7
|
+
|
|
8
|
+
import { Timeline, Tween, TweenProps } from "@thednp/tween";
|
|
9
|
+
|
|
10
|
+
//#region src/vue/miniStore.d.ts
|
|
11
|
+
declare function miniStore<T extends TweenProps>(init: T): T;
|
|
12
|
+
//#endregion
|
|
13
|
+
//#region src/vue/index.d.ts
|
|
14
|
+
/**
|
|
15
|
+
* Vue composable for updating values with Tween.
|
|
16
|
+
*
|
|
17
|
+
* @param initialValues - Initial tween values
|
|
18
|
+
* @returns [store, tween] Tuple of reactive store and Tween instance
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* <script setup lang="ts">
|
|
22
|
+
* const [state, tween] = useTween({ x: 0, y: 0 })
|
|
23
|
+
*
|
|
24
|
+
* // configuration is free-form, no re-render ever happens
|
|
25
|
+
* tween.to({ x: 100, y: 100 })
|
|
26
|
+
*
|
|
27
|
+
* onMounted(() => {
|
|
28
|
+
* tween.start()
|
|
29
|
+
* })
|
|
30
|
+
* </script>
|
|
31
|
+
* <template>
|
|
32
|
+
* <div :style="{ translate: `${state.x}px ${state.y}px` }" />
|
|
33
|
+
* </template>
|
|
34
|
+
*/
|
|
35
|
+
declare function useTween<T extends TweenProps>(initialValues: T): readonly [T, Tween<T>];
|
|
36
|
+
/**
|
|
37
|
+
* Vue composable for sequencing values update with Timeline.
|
|
38
|
+
*
|
|
39
|
+
* @param initialValues - Initial tween values
|
|
40
|
+
* @returns [store, timeline] Tuple of reactive store and Timeline instance
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* <script setup lang="ts">
|
|
44
|
+
* const [state, timeline] = useTimeline({ x: 0, y: 0 })
|
|
45
|
+
*
|
|
46
|
+
* // configuration is free-form
|
|
47
|
+
* timeline.to({ x: 100, y: 100 })
|
|
48
|
+
*
|
|
49
|
+
* onMounted(() => {
|
|
50
|
+
* timeline.start()
|
|
51
|
+
* })
|
|
52
|
+
* </script>
|
|
53
|
+
*
|
|
54
|
+
* <template>
|
|
55
|
+
* <div :style="{ translate: `${state.x}px ${state.y}px` }" />
|
|
56
|
+
* </template>
|
|
57
|
+
*/
|
|
58
|
+
declare function useTimeline<T extends TweenProps>(initialValues: T): readonly [T, Timeline<T>];
|
|
59
|
+
//#endregion
|
|
60
|
+
export { Timeline, Tween, miniStore, useTimeline, useTween };
|
|
61
|
+
//# sourceMappingURL=vue.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vue.d.mts","names":[],"sources":["../../src/vue/miniStore.ts","../../src/vue/index.ts"],"mappings":";;;;;;;;;;iBA4HgB,SAAA,WAAoB,UAAA,CAAA,CAAY,IAAA,EAAM,CAAA,GAChB,CAAA;;;AADtC;;;;;;;;;;;;;;;;;;AC3FA;;;AD2FA,iBC3FgB,QAAA,WAAmB,UAAA,CAAA,CAAY,aAAA,EAAe,CAAA,aAAC,CAAA,EAAA,KAAA,CAAA,CAAA;;;;;;;;;;;;;;;;AAqC/D;;;;;;;iBAAgB,WAAA,WAAsB,UAAA,CAAA,CAAY,aAAA,EAAe,CAAA,aAAC,CAAA,EAAA,QAAA,CAAA,CAAA"}
|
package/dist/vue/vue.mjs
ADDED
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* @thednp/tween composables for Vue v0.0.3 (https://github.com/thednp/tween)
|
|
3
|
+
* Copyright 2026 © thednp
|
|
4
|
+
* Licensed under MIT (https://github.com/thednp/tween/blob/master/LICENSE)
|
|
5
|
+
*/
|
|
6
|
+
"use strict";
|
|
7
|
+
|
|
8
|
+
import { Timeline, Tween, dummyInstance, isArray, isPlainObject, isServer, objectHasProp } from "@thednp/tween";
|
|
9
|
+
import { onUnmounted, ref } from "vue";
|
|
10
|
+
|
|
11
|
+
//#region src/vue/miniStore.ts
|
|
12
|
+
const STATE_PROXY = "_proxy";
|
|
13
|
+
const proxyProps = {
|
|
14
|
+
value: 1,
|
|
15
|
+
enumerable: false,
|
|
16
|
+
configurable: false,
|
|
17
|
+
writable: false
|
|
18
|
+
};
|
|
19
|
+
function defineArrayProxy(index, value, target, sourceLen, notifyListeners) {
|
|
20
|
+
const itemIsLast = index === sourceLen - 1;
|
|
21
|
+
if (isArray(value)) {
|
|
22
|
+
const subArray = [];
|
|
23
|
+
const valueLen = value.length;
|
|
24
|
+
value.forEach((itm, idx) => {
|
|
25
|
+
const subItemIsLast = itemIsLast && idx === valueLen - 1;
|
|
26
|
+
let currentItem = itm;
|
|
27
|
+
Object.defineProperty(subArray, idx, {
|
|
28
|
+
get: () => currentItem,
|
|
29
|
+
set: (newValue) => {
|
|
30
|
+
currentItem = newValue;
|
|
31
|
+
if (subItemIsLast) notifyListeners();
|
|
32
|
+
},
|
|
33
|
+
enumerable: true
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
target[index] = subArray;
|
|
37
|
+
} else {
|
|
38
|
+
let currentValue = value;
|
|
39
|
+
const getter = () => currentValue;
|
|
40
|
+
const setter = (newVal) => {
|
|
41
|
+
currentValue = newVal;
|
|
42
|
+
if (itemIsLast) notifyListeners();
|
|
43
|
+
};
|
|
44
|
+
Object.defineProperties(target, { [index]: {
|
|
45
|
+
get: getter,
|
|
46
|
+
set: setter,
|
|
47
|
+
enumerable: true
|
|
48
|
+
} });
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
function defineStateProxy(key, value, target) {
|
|
52
|
+
const state = ref(value);
|
|
53
|
+
let getter = () => state.value;
|
|
54
|
+
let setter;
|
|
55
|
+
if (isArray(value)) {
|
|
56
|
+
const arrayProxy = [];
|
|
57
|
+
const valLength = value.length;
|
|
58
|
+
const version = ref(0);
|
|
59
|
+
for (let i = 0; i < valLength; i++) defineArrayProxy(i, value[i], arrayProxy, valLength, () => {
|
|
60
|
+
version.value = 1 - version.value;
|
|
61
|
+
});
|
|
62
|
+
getter = () => {
|
|
63
|
+
version.value;
|
|
64
|
+
return state.value;
|
|
65
|
+
};
|
|
66
|
+
state.value = arrayProxy;
|
|
67
|
+
} else setter = (newVal) => {
|
|
68
|
+
state.value = newVal;
|
|
69
|
+
};
|
|
70
|
+
Object.defineProperties(target, {
|
|
71
|
+
[STATE_PROXY]: proxyProps,
|
|
72
|
+
[key]: {
|
|
73
|
+
get: getter,
|
|
74
|
+
set: setter,
|
|
75
|
+
enumerable: true
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
function createMiniState(obj, parentReceiver) {
|
|
80
|
+
if (objectHasProp(obj, STATE_PROXY)) return obj;
|
|
81
|
+
for (const [key, value] of Object.entries(obj)) if (isPlainObject(value)) parentReceiver[key] = createMiniState(value, {});
|
|
82
|
+
else defineStateProxy(key, value, parentReceiver);
|
|
83
|
+
return parentReceiver;
|
|
84
|
+
}
|
|
85
|
+
function miniStore(init) {
|
|
86
|
+
return createMiniState(init, {});
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
//#endregion
|
|
90
|
+
//#region src/vue/index.ts
|
|
91
|
+
/**
|
|
92
|
+
* Vue composable for updating values with Tween.
|
|
93
|
+
*
|
|
94
|
+
* @param initialValues - Initial tween values
|
|
95
|
+
* @returns [store, tween] Tuple of reactive store and Tween instance
|
|
96
|
+
*
|
|
97
|
+
* @example
|
|
98
|
+
* <script setup lang="ts">
|
|
99
|
+
* const [state, tween] = useTween({ x: 0, y: 0 })
|
|
100
|
+
*
|
|
101
|
+
* // configuration is free-form, no re-render ever happens
|
|
102
|
+
* tween.to({ x: 100, y: 100 })
|
|
103
|
+
*
|
|
104
|
+
* onMounted(() => {
|
|
105
|
+
* tween.start()
|
|
106
|
+
* })
|
|
107
|
+
* <\/script>
|
|
108
|
+
* <template>
|
|
109
|
+
* <div :style="{ translate: `${state.x}px ${state.y}px` }" />
|
|
110
|
+
* </template>
|
|
111
|
+
*/
|
|
112
|
+
function useTween(initialValues) {
|
|
113
|
+
if (isServer) return [initialValues, dummyInstance];
|
|
114
|
+
const store = miniStore(initialValues);
|
|
115
|
+
const tween = new Tween(store);
|
|
116
|
+
onUnmounted(() => {
|
|
117
|
+
tween.stop();
|
|
118
|
+
tween.clear();
|
|
119
|
+
});
|
|
120
|
+
return [store, tween];
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Vue composable for sequencing values update with Timeline.
|
|
124
|
+
*
|
|
125
|
+
* @param initialValues - Initial tween values
|
|
126
|
+
* @returns [store, timeline] Tuple of reactive store and Timeline instance
|
|
127
|
+
*
|
|
128
|
+
* @example
|
|
129
|
+
* <script setup lang="ts">
|
|
130
|
+
* const [state, timeline] = useTimeline({ x: 0, y: 0 })
|
|
131
|
+
*
|
|
132
|
+
* // configuration is free-form
|
|
133
|
+
* timeline.to({ x: 100, y: 100 })
|
|
134
|
+
*
|
|
135
|
+
* onMounted(() => {
|
|
136
|
+
* timeline.start()
|
|
137
|
+
* })
|
|
138
|
+
* <\/script>
|
|
139
|
+
*
|
|
140
|
+
* <template>
|
|
141
|
+
* <div :style="{ translate: `${state.x}px ${state.y}px` }" />
|
|
142
|
+
* </template>
|
|
143
|
+
*/
|
|
144
|
+
function useTimeline(initialValues) {
|
|
145
|
+
if (isServer) return [initialValues, dummyInstance];
|
|
146
|
+
const store = miniStore(initialValues);
|
|
147
|
+
const timeline = new Timeline(store);
|
|
148
|
+
onUnmounted(() => {
|
|
149
|
+
timeline.stop();
|
|
150
|
+
timeline.clear();
|
|
151
|
+
});
|
|
152
|
+
return [store, timeline];
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
//#endregion
|
|
156
|
+
export { Timeline, Tween, miniStore, useTimeline, useTween };
|
|
157
|
+
//# sourceMappingURL=vue.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vue.mjs","names":[],"sources":["../../src/vue/miniStore.ts","../../src/vue/index.ts"],"sourcesContent":["import { ref } from \"vue\";\nimport {\n type ArrayVal,\n isArray,\n isPlainObject,\n objectHasProp,\n type TweenProps,\n} from \"@thednp/tween\";\n\nconst STATE_PROXY = \"_proxy\";\nconst proxyProps = {\n value: 1,\n enumerable: false,\n configurable: false,\n writable: false,\n};\n\nfunction defineArrayProxy<T extends ArrayVal>(\n index: number,\n value: T[number] | ArrayVal,\n target: T | ArrayVal | ArrayVal[],\n sourceLen: number,\n notifyListeners: () => void,\n) {\n const itemIsLast = index === sourceLen - 1;\n\n if (isArray(value)) {\n const subArray: typeof value = [];\n const valueLen = value.length;\n\n value.forEach((itm, idx) => {\n const subItemIsLast = itemIsLast && idx === valueLen - 1;\n\n let currentItem = itm;\n Object.defineProperty(subArray, idx, {\n get: () => currentItem,\n set: (newValue: typeof itm) => {\n currentItem = newValue;\n\n // Only notify on last element to batch updates\n if (subItemIsLast) {\n notifyListeners();\n }\n },\n enumerable: true,\n });\n });\n target[index] = subArray;\n } else {\n let currentValue = value;\n const getter = () => currentValue;\n const setter = (newVal: typeof value) => {\n currentValue = newVal;\n if (itemIsLast) {\n notifyListeners();\n }\n };\n Object.defineProperties(target, {\n [index]: {\n get: getter,\n set: setter,\n enumerable: true,\n },\n });\n }\n}\n\nfunction defineStateProxy<T extends Omit<TweenProps, \"_proxy\">>(\n key: number | keyof T,\n value: T[keyof T] | ArrayVal,\n target: T | ArrayVal,\n) {\n const state = ref(value);\n let getter = () => state.value;\n let setter;\n\n if (isArray(value)) {\n const arrayProxy: typeof value = [];\n const valLength = value.length;\n const version = ref(0);\n for (let i = 0; i < valLength; i++) {\n defineArrayProxy(i, (value as ArrayVal)[i], arrayProxy, valLength, () => {\n version.value = 1 - version.value;\n });\n }\n getter = () => {\n version.value;\n return state.value;\n };\n\n state.value = arrayProxy;\n } else {\n setter = (newVal: typeof value) => {\n state.value = newVal;\n };\n }\n\n Object.defineProperties(target, {\n [STATE_PROXY]: proxyProps,\n [key]: {\n get: getter,\n set: setter,\n enumerable: true,\n },\n });\n}\n\nfunction createMiniState<T extends TweenProps>(\n obj: T,\n parentReceiver: TweenProps | number[] | [string, ...number[]][],\n) {\n if (objectHasProp(obj, STATE_PROXY)) return obj;\n\n for (const [key, value] of Object.entries(obj)) {\n if (isPlainObject(value)) {\n (parentReceiver as TweenProps)[key] = createMiniState(value, {});\n } else {\n defineStateProxy(key, value, parentReceiver);\n }\n }\n\n return parentReceiver as T;\n}\n\nexport function miniStore<T extends TweenProps>(init: T) {\n return createMiniState(init, {}) as T;\n}\n","import {\n dummyInstance,\n isServer,\n Timeline,\n Tween,\n type TweenProps,\n} from \"@thednp/tween\";\nimport { onUnmounted } from \"vue\";\nimport { miniStore } from \"./miniStore.ts\";\n\nexport { miniStore, Timeline, Tween };\n\n/**\n * Vue composable for updating values with Tween.\n *\n * @param initialValues - Initial tween values\n * @returns [store, tween] Tuple of reactive store and Tween instance\n *\n * @example\n * <script setup lang=\"ts\">\n * const [state, tween] = useTween({ x: 0, y: 0 })\n *\n * // configuration is free-form, no re-render ever happens\n * tween.to({ x: 100, y: 100 })\n *\n * onMounted(() => {\n * tween.start()\n * })\n * </script>\n * <template>\n * <div :style=\"{ translate: `${state.x}px ${state.y}px` }\" />\n * </template>\n */\nexport function useTween<T extends TweenProps>(initialValues: T) {\n if (isServer) {\n return [initialValues, dummyInstance as unknown as Tween<T>] as const;\n }\n const store = miniStore(initialValues);\n const tween = new Tween(store);\n\n onUnmounted(() => {\n tween.stop();\n tween.clear();\n });\n\n return [store, tween] as [T, Tween<T>];\n}\n\n/**\n * Vue composable for sequencing values update with Timeline.\n *\n * @param initialValues - Initial tween values\n * @returns [store, timeline] Tuple of reactive store and Timeline instance\n *\n * @example\n * <script setup lang=\"ts\">\n * const [state, timeline] = useTimeline({ x: 0, y: 0 })\n *\n * // configuration is free-form\n * timeline.to({ x: 100, y: 100 })\n *\n * onMounted(() => {\n * timeline.start()\n * })\n * </script>\n *\n * <template>\n * <div :style=\"{ translate: `${state.x}px ${state.y}px` }\" />\n * </template>\n */\nexport function useTimeline<T extends TweenProps>(initialValues: T) {\n if (isServer) {\n return [initialValues, dummyInstance as unknown as Timeline<T>] as const;\n }\n const store = miniStore(initialValues);\n const timeline = new Timeline(store);\n\n onUnmounted(() => {\n timeline.stop();\n timeline.clear();\n });\n\n return [store, timeline] as [T, Timeline<T>];\n}\n"],"mappings":";;;;;;;;;;;AASA,MAAM,cAAc;AACpB,MAAM,aAAa;CACjB,OAAO;CACP,YAAY;CACZ,cAAc;CACd,UAAU;CACX;AAED,SAAS,iBACP,OACA,OACA,QACA,WACA,iBACA;CACA,MAAM,aAAa,UAAU,YAAY;AAEzC,KAAI,QAAQ,MAAM,EAAE;EAClB,MAAM,WAAyB,EAAE;EACjC,MAAM,WAAW,MAAM;AAEvB,QAAM,SAAS,KAAK,QAAQ;GAC1B,MAAM,gBAAgB,cAAc,QAAQ,WAAW;GAEvD,IAAI,cAAc;AAClB,UAAO,eAAe,UAAU,KAAK;IACnC,WAAW;IACX,MAAM,aAAyB;AAC7B,mBAAc;AAGd,SAAI,cACF,kBAAiB;;IAGrB,YAAY;IACb,CAAC;IACF;AACF,SAAO,SAAS;QACX;EACL,IAAI,eAAe;EACnB,MAAM,eAAe;EACrB,MAAM,UAAU,WAAyB;AACvC,kBAAe;AACf,OAAI,WACF,kBAAiB;;AAGrB,SAAO,iBAAiB,QAAQ,GAC7B,QAAQ;GACP,KAAK;GACL,KAAK;GACL,YAAY;GACb,EACF,CAAC;;;AAIN,SAAS,iBACP,KACA,OACA,QACA;CACA,MAAM,QAAQ,IAAI,MAAM;CACxB,IAAI,eAAe,MAAM;CACzB,IAAI;AAEJ,KAAI,QAAQ,MAAM,EAAE;EAClB,MAAM,aAA2B,EAAE;EACnC,MAAM,YAAY,MAAM;EACxB,MAAM,UAAU,IAAI,EAAE;AACtB,OAAK,IAAI,IAAI,GAAG,IAAI,WAAW,IAC7B,kBAAiB,GAAI,MAAmB,IAAI,YAAY,iBAAiB;AACvE,WAAQ,QAAQ,IAAI,QAAQ;IAC5B;AAEJ,iBAAe;AACb,WAAQ;AACR,UAAO,MAAM;;AAGf,QAAM,QAAQ;OAEd,WAAU,WAAyB;AACjC,QAAM,QAAQ;;AAIlB,QAAO,iBAAiB,QAAQ;GAC7B,cAAc;GACd,MAAM;GACL,KAAK;GACL,KAAK;GACL,YAAY;GACb;EACF,CAAC;;AAGJ,SAAS,gBACP,KACA,gBACA;AACA,KAAI,cAAc,KAAK,YAAY,CAAE,QAAO;AAE5C,MAAK,MAAM,CAAC,KAAK,UAAU,OAAO,QAAQ,IAAI,CAC5C,KAAI,cAAc,MAAM,CACtB,CAAC,eAA8B,OAAO,gBAAgB,OAAO,EAAE,CAAC;KAEhE,kBAAiB,KAAK,OAAO,eAAe;AAIhD,QAAO;;AAGT,SAAgB,UAAgC,MAAS;AACvD,QAAO,gBAAgB,MAAM,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;AC5FlC,SAAgB,SAA+B,eAAkB;AAC/D,KAAI,SACF,QAAO,CAAC,eAAe,cAAqC;CAE9D,MAAM,QAAQ,UAAU,cAAc;CACtC,MAAM,QAAQ,IAAI,MAAM,MAAM;AAE9B,mBAAkB;AAChB,QAAM,MAAM;AACZ,QAAM,OAAO;GACb;AAEF,QAAO,CAAC,OAAO,MAAM;;;;;;;;;;;;;;;;;;;;;;;;AAyBvB,SAAgB,YAAkC,eAAkB;AAClE,KAAI,SACF,QAAO,CAAC,eAAe,cAAwC;CAEjE,MAAM,QAAQ,UAAU,cAAc;CACtC,MAAM,WAAW,IAAI,SAAS,MAAM;AAEpC,mBAAkB;AAChB,WAAS,MAAM;AACf,WAAS,OAAO;GAChB;AAEF,QAAO,CAAC,OAAO,SAAS"}
|
package/package.json
CHANGED
|
@@ -1,34 +1,27 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thednp/tween",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.0.3",
|
|
4
|
+
"description": "🌸 A Typescript sourced tweening engine with Tween and Timeline",
|
|
5
5
|
"homepage": "https://github.com/thednp/tween",
|
|
6
6
|
"author": "thednp",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"type": "module",
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
9
|
+
"sideEffects": false,
|
|
10
|
+
"browser": "./dist/tween.min.js",
|
|
11
|
+
"types": "./dist/tween/index.d.mts",
|
|
12
12
|
"files": [
|
|
13
|
-
"wiki",
|
|
14
13
|
"dist",
|
|
15
14
|
"package.json",
|
|
16
15
|
"README.md",
|
|
17
16
|
"LICENSE"
|
|
18
17
|
],
|
|
19
18
|
"exports": {
|
|
20
|
-
".":
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
"./
|
|
25
|
-
|
|
26
|
-
"import": "./dist/react.mjs"
|
|
27
|
-
},
|
|
28
|
-
"./solid": {
|
|
29
|
-
"require": "./dist/solid.cjs",
|
|
30
|
-
"import": "./dist/solid.mjs"
|
|
31
|
-
},
|
|
19
|
+
".": "./dist/tween/index.mjs",
|
|
20
|
+
"./preact": "./dist/preact/preact.mjs",
|
|
21
|
+
"./react": "./dist/react/react.mjs",
|
|
22
|
+
"./solid": "./dist/solid/solid.mjs",
|
|
23
|
+
"./svelte": "./dist/svelte/tween.svelte.js",
|
|
24
|
+
"./vue": "./dist/vue/vue.mjs",
|
|
32
25
|
"./package.json": "./package.json"
|
|
33
26
|
},
|
|
34
27
|
"bugs": {
|
|
@@ -45,6 +38,11 @@
|
|
|
45
38
|
"keywords": [
|
|
46
39
|
"tween",
|
|
47
40
|
"timeline",
|
|
41
|
+
"react",
|
|
42
|
+
"solid-js",
|
|
43
|
+
"svelte",
|
|
44
|
+
"preact",
|
|
45
|
+
"vue",
|
|
48
46
|
"cubic-bezier",
|
|
49
47
|
"cubic-tween",
|
|
50
48
|
"easing",
|
|
@@ -53,44 +51,55 @@
|
|
|
53
51
|
"animation engine",
|
|
54
52
|
"animation",
|
|
55
53
|
"animations",
|
|
54
|
+
"SSR",
|
|
55
|
+
"server-side rendering",
|
|
56
56
|
"typescript"
|
|
57
57
|
],
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@
|
|
60
|
-
"@
|
|
61
|
-
"@types/
|
|
62
|
-
"@
|
|
63
|
-
"@vitest/
|
|
64
|
-
"
|
|
65
|
-
"
|
|
59
|
+
"@sveltejs/vite-plugin-svelte": "^6.2.4",
|
|
60
|
+
"@types/node": "^25.2.3",
|
|
61
|
+
"@types/react": "^19.2.14",
|
|
62
|
+
"@types/react-dom": "^19.2.3",
|
|
63
|
+
"@vitest/coverage-istanbul": "^4.0.18",
|
|
64
|
+
"@vitest/ui": "^4.0.18",
|
|
65
|
+
"happy-dom": "^20.6.1",
|
|
66
|
+
"react-dom": "^19.2.4",
|
|
67
|
+
"rollup-plugin-svelte": "^7.2.3",
|
|
68
|
+
"svelte-preprocess": "^6.0.3",
|
|
69
|
+
"tsdown": "^0.20.3",
|
|
66
70
|
"typescript": "^5.9.3",
|
|
67
|
-
"vite": "^
|
|
68
|
-
"
|
|
69
|
-
|
|
71
|
+
"vite-plugin-strip-comments": "^0.0.9",
|
|
72
|
+
"vitest": "^4.0.18"
|
|
73
|
+
},
|
|
74
|
+
"dependencies": {
|
|
75
|
+
"@thednp/dommatrix": "^3.0.2",
|
|
76
|
+
"preact": "^10.28.3",
|
|
77
|
+
"react": "^19.2.4",
|
|
78
|
+
"solid-js": "^1.9.11",
|
|
79
|
+
"svelte": "^5.51.2",
|
|
80
|
+
"vue": "^3.5.28"
|
|
70
81
|
},
|
|
71
82
|
"packageManager": "pnpm@8.6.12",
|
|
72
83
|
"engines": {
|
|
73
84
|
"node": ">=20",
|
|
74
85
|
"pnpm": ">=8.6.0"
|
|
75
86
|
},
|
|
76
|
-
"dependencies": {
|
|
77
|
-
"@types/react": "^19.2.8",
|
|
78
|
-
"react": "^19.2.3",
|
|
79
|
-
"solid-js": "^1.9.10"
|
|
80
|
-
},
|
|
81
|
-
"types": "./dist/index.d.cts",
|
|
82
87
|
"scripts": {
|
|
83
88
|
"pre-test": "pnpm clean-coverage",
|
|
84
89
|
"clean-coverage": "rm -rf coverage .nyc_output",
|
|
85
|
-
"test": "
|
|
86
|
-
"test-ui": "
|
|
87
|
-
"badges": "npx -p dependency-version-badge update-badge typescript vitest vite",
|
|
90
|
+
"test": "vitest",
|
|
91
|
+
"test-ui": "vitest --ui",
|
|
88
92
|
"format": "deno fmt src",
|
|
89
|
-
"lint": "pnpm lint:ts
|
|
93
|
+
"lint": "pnpm lint:ts",
|
|
90
94
|
"lint:ts": "deno lint src",
|
|
91
95
|
"lint:types": "tsc --noEmit",
|
|
92
96
|
"fix:ts": "deno lint src --fix",
|
|
93
|
-
"build_": "vite build",
|
|
94
|
-
"build": "tsdown
|
|
97
|
+
"build_": "tsdown && vite build",
|
|
98
|
+
"build": "tsdown",
|
|
99
|
+
"clean:playground": "rm -rf playground/**/node_modules playground/**/package-lock.json playground/**/pnpm-lock.yaml playground/**/bun.lockb playground/**/deno.lock",
|
|
100
|
+
"clean:test": "rm -rf test/node_modules test/package-lock.json test/pnpm-lock.yaml test/bun.lockb test/deno.lock",
|
|
101
|
+
"clean": "rm -rf node_modules && pnpm clean:playground && pnpm clean:test",
|
|
102
|
+
"update-r": "pnpm clean && pnpm update -r --latest",
|
|
103
|
+
"update-deps": "pnpm clean && pnpm update --latest"
|
|
95
104
|
}
|
|
96
105
|
}
|