motion-v 1.2.0 → 1.2.1
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/dist/cjs/index.js
CHANGED
|
@@ -9892,18 +9892,19 @@ function useCombineMotionValues(combineValues) {
|
|
|
9892
9892
|
return {
|
|
9893
9893
|
subscribe,
|
|
9894
9894
|
unsubscribe,
|
|
9895
|
-
value
|
|
9895
|
+
value,
|
|
9896
|
+
updateValue
|
|
9896
9897
|
};
|
|
9897
9898
|
}
|
|
9898
9899
|
function useComputed(computed) {
|
|
9899
9900
|
collectMotionValues.current = [];
|
|
9900
|
-
const { value, subscribe, unsubscribe } = useCombineMotionValues(computed);
|
|
9901
|
+
const { value, subscribe, unsubscribe, updateValue } = useCombineMotionValues(computed);
|
|
9901
9902
|
subscribe(collectMotionValues.current);
|
|
9902
9903
|
collectMotionValues.current = void 0;
|
|
9903
|
-
vue.
|
|
9904
|
+
vue.watchEffect(() => {
|
|
9904
9905
|
unsubscribe();
|
|
9905
9906
|
collectMotionValues.current = [];
|
|
9906
|
-
|
|
9907
|
+
updateValue();
|
|
9907
9908
|
subscribe(collectMotionValues.current);
|
|
9908
9909
|
collectMotionValues.current = void 0;
|
|
9909
9910
|
});
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { useCombineMotionValues } from "./use-combine-values.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { watchEffect } from "vue";
|
|
3
3
|
import { collectMotionValues } from "../external/.pnpm/motion-dom@12.16.0/external/motion-dom/dist/es/value/index.mjs";
|
|
4
4
|
function useComputed(computed) {
|
|
5
5
|
collectMotionValues.current = [];
|
|
6
|
-
const { value, subscribe, unsubscribe } = useCombineMotionValues(computed);
|
|
6
|
+
const { value, subscribe, unsubscribe, updateValue } = useCombineMotionValues(computed);
|
|
7
7
|
subscribe(collectMotionValues.current);
|
|
8
8
|
collectMotionValues.current = void 0;
|
|
9
|
-
|
|
9
|
+
watchEffect(() => {
|
|
10
10
|
unsubscribe();
|
|
11
11
|
collectMotionValues.current = [];
|
|
12
|
-
|
|
12
|
+
updateValue();
|
|
13
13
|
subscribe(collectMotionValues.current);
|
|
14
14
|
collectMotionValues.current = void 0;
|
|
15
15
|
});
|