11import type { LightningElementStyle , Rect } from '@plextv/react-lightning' ;
22import { EventEmitter } from 'tseep' ;
3- import { type Config , loadYoga , type Node , type Yoga } from 'yoga-layout/load' ;
3+ import { type Config , loadYoga , type Yoga } from 'yoga-layout/load' ;
4+ import type { ManagerNode } from './types/ManagerNode' ;
45import type { YogaOptions } from './types/YogaOptions' ;
56import applyReactPropsToYoga , {
67 applyFlexPropToYoga ,
@@ -9,13 +10,6 @@ import { SimpleDataView } from './util/SimpleDataView';
910
1011export type BatchedUpdate = Record < number , Partial < Rect > > ;
1112
12- type ManagerNode = {
13- id : number ;
14- parent ?: ManagerNode ;
15- node : Node ;
16- children : ManagerNode [ ] ;
17- } ;
18-
1913export type YogaManagerEvents = {
2014 // Updates are sent in an array. This is because when working with web
2115 // workers, it's more efficient to transfer an array instead of serializing
@@ -234,7 +228,7 @@ export class YogaManager {
234228 return ;
235229 }
236230
237- applyReactPropsToYoga ( this . _yoga , this . _yogaOptions , yogaNode . node , style ) ;
231+ applyReactPropsToYoga ( this . _yoga , this . _yogaOptions , yogaNode , style ) ;
238232
239233 if ( style . transform ) {
240234 const { x, y, transform } = style ;
@@ -337,6 +331,7 @@ export class YogaManager {
337331 id : elementId ,
338332 node,
339333 children : [ ] ,
334+ props : { } ,
340335 } ;
341336
342337 this . _elementMap . set ( elementId , yogaNode ) ;
0 commit comments