1313 * limitations under the License.
1414 */
1515
16- import { UpdatingElement } from 'lit-element/lib/updating-element ' ;
16+ import { ReactiveElement } from 'lit' ;
1717import { EvaluatedStyle , Intrinsics , StyleEvaluator } from './styles/evaluators' ;
1818import { parseExpressions , Unit } from './styles/parsers' ;
1919import { StyleEffector } from './styles/style-effector' ;
2020
2121// An IntrinsicsFactory generates up-to-date intrinsics for a given ModelViewer
2222// element instance when it is invoked.
2323export type IntrinsicsFactory < T extends Intrinsics < Array < Unit > > ,
24- U extends UpdatingElement > =
24+ U extends ReactiveElement > =
2525 ( element : U ) => T ;
2626
2727// When applying the @style decorator, it needs to be configured with
2828// corresponding Intrinsics and the property key of a method to receive updated
2929// values. Optionally, it can also be configured to observe environment effects,
3030// which causes a StyleEffector to be created for the property.
3131export interface StyleDecoratorConfig < T extends Intrinsics < Array < Unit > > ,
32- U extends UpdatingElement > {
32+ U extends ReactiveElement > {
3333 intrinsics : T | IntrinsicsFactory < T , U > ;
3434 updateHandler : symbol ;
3535 observeEffects ?: boolean ;
@@ -66,14 +66,14 @@ export interface StyleDecoratorConfig<T extends Intrinsics<Array<Unit>>,
6666 * static).
6767 */
6868export const style =
69- < T extends Intrinsics < Array < Unit > > , U extends UpdatingElement > (
69+ < T extends Intrinsics < Array < Unit > > , U extends ReactiveElement > (
7070 config : StyleDecoratorConfig < T , U > ) => {
7171 const observeEffects : boolean = config . observeEffects || false ;
7272 const getIntrinsics = config . intrinsics instanceof Function ?
7373 config . intrinsics :
7474 ( ( ) => config . intrinsics ) as IntrinsicsFactory < T , U > ;
7575
76- return < U extends typeof UpdatingElement [ 'prototype' ] > (
76+ return < U extends typeof ReactiveElement [ 'prototype' ] > (
7777 proto : U , propertyName : string ) => {
7878 const originalUpdated = ( proto as any ) . updated ;
7979 const originalConnectedCallback = proto . connectedCallback ;
@@ -93,7 +93,7 @@ export const style =
9393 [ $updateEvaluator ] : {
9494 value : function ( ) {
9595 const ast = parseExpressions (
96- this [ propertyName as keyof UpdatingElement ] as string ) ;
96+ this [ propertyName as keyof ReactiveElement ] as string ) ;
9797 this [ $styleEvaluator ] =
9898 new StyleEvaluator ( ast , getIntrinsics ( this ) ) ;
9999
0 commit comments