-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d5abf47
commit 23f98fc
Showing
15 changed files
with
81 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ based on [email protected], | |
Copyright (c) 2018 Framer B.V. | ||
*/ | ||
|
||
import { get } from 'svelte/store'; | ||
import { fromStore } from 'svelte/store'; | ||
import type { ResolvedValues, ScrapeMotionValuesFromProps } from '../../render/types'; | ||
import type { MotionProps } from '../types'; | ||
import { isAnimationControls } from '../../animation/utils/is-animation-controls.js'; | ||
|
@@ -55,9 +55,9 @@ function makeState<I, RS>( | |
export const makeUseVisualState = | ||
<I, RS>(config: UseVisualStateConfig<I, RS>): UseVisualState<I, RS> => | ||
(props: MotionProps, isStatic: boolean, isCustom = false): VisualState<I, RS> => { | ||
const context = useContext(MotionContext, isCustom); | ||
const presenceContext = useContext(PresenceContext, isCustom); | ||
const make = () => makeState(config, props, get(context), get(presenceContext)); | ||
const context = fromStore(useContext(MotionContext, isCustom)); | ||
const presenceContext = fromStore(useContext(PresenceContext, isCustom)); | ||
const make = () => makeState(config, props, context.current, presenceContext.current); | ||
|
||
let state = make(); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.