File tree Expand file tree Collapse file tree
apps/builder/app/builder/features/navigator Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,10 +20,7 @@ import {
2020 TreeSortableItem ,
2121 type TreeDropTarget ,
2222} from "@webstudio-is/design-system" ;
23- import {
24- animationCanPlayOnCanvasAttribute ,
25- showAttribute ,
26- } from "@webstudio-is/react-sdk" ;
23+ import { showAttribute } from "@webstudio-is/react-sdk" ;
2724import {
2825 ROOT_INSTANCE_ID ,
2926 collectionComponent ,
@@ -34,6 +31,7 @@ import {
3431 type Instance ,
3532 type WsComponentMeta ,
3633} from "@webstudio-is/sdk" ;
34+ import { animationCanPlayOnCanvasProperty } from "@webstudio-is/sdk/runtime" ;
3735import {
3836 EyeClosedIcon ,
3937 EyeOpenIcon ,
@@ -675,7 +673,7 @@ export const NavigatorTree = () => {
675673
676674 // Hook memory prop
677675 const isAnimationSelected =
678- propValues ?. get ( animationCanPlayOnCanvasAttribute ) === true ;
676+ propValues ?. get ( animationCanPlayOnCanvasProperty ) === true ;
679677
680678 const props = propsByInstanceId . get ( item . instance . id ) ;
681679 const actionProp = props ?. find (
Original file line number Diff line number Diff line change @@ -128,8 +128,6 @@ export const componentAttribute = "data-ws-component" as const;
128128export const showAttribute = "data-ws-show" as const ;
129129export const collapsedAttribute = "data-ws-collapsed" as const ;
130130export const textContentAttribute = "data-ws-text-content" as const ;
131- export const animationCanPlayOnCanvasAttribute =
132- "data-ws-animation-can-play-on-canvas" ;
133131
134132/**
135133 * Copyright (c) Meta Platforms, Inc. and affiliates.
Original file line number Diff line number Diff line change 1- import {
2- animationCanPlayOnCanvasAttribute ,
3- type Hook ,
4- } from "@webstudio-is/react-sdk" ;
5- import type { AnimationAction } from "@webstudio-is/sdk" ;
61import { forwardRef , type ElementRef } from "react" ;
2+ import type { Hook } from "@webstudio-is/react-sdk" ;
3+ import type { AnimationAction } from "@webstudio-is/sdk" ;
4+ import { animationCanPlayOnCanvasProperty } from "@webstudio-is/sdk/runtime" ;
75
86type ScrollProps = {
97 debug ?: boolean ;
@@ -30,7 +28,7 @@ export const hooksAnimateChildren: Hook = {
3028 ) {
3129 context . setMemoryProp (
3230 event . instancePath [ 0 ] ,
33- animationCanPlayOnCanvasAttribute ,
31+ animationCanPlayOnCanvasProperty ,
3432 undefined
3533 ) ;
3634 }
@@ -42,7 +40,7 @@ export const hooksAnimateChildren: Hook = {
4240 ) {
4341 context . setMemoryProp (
4442 event . instancePath [ 0 ] ,
45- animationCanPlayOnCanvasAttribute ,
43+ animationCanPlayOnCanvasProperty ,
4644 true
4745 ) ;
4846 }
Original file line number Diff line number Diff line change @@ -10,10 +10,13 @@ export const getTagFromProps = (
1010 return props [ tagProperty ] as string | undefined ;
1111} ;
1212
13- export const indexProperty = "data-ws-index" as const ;
13+ export const indexProperty = "data-ws-index" ;
1414
1515export const getIndexWithinAncestorFromProps = (
1616 props : Record < string , unknown >
1717) => {
1818 return props [ indexProperty ] as string | undefined ;
1919} ;
20+
21+ export const animationCanPlayOnCanvasProperty =
22+ "data-ws-animation-can-play-on-canvas" ;
You can’t perform that action at this time.
0 commit comments