@lynx-js/react 0.116.5 → 0.117.0

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.
@@ -225,6 +225,44 @@ const initElementTree = ()=>{
225
225
  __GetAttributeByName(ele, name) {
226
226
  return ele.getAttribute(name);
227
227
  }
228
+ __ElementAnimate(element, args) {
229
+ const [operation, name] = args;
230
+ switch(operation){
231
+ case 0:
232
+ {
233
+ const keyframes = args[2];
234
+ const options = args[3];
235
+ this.animationMap.set(name, {
236
+ element,
237
+ state: 'running',
238
+ keyframes,
239
+ options
240
+ });
241
+ break;
242
+ }
243
+ case 1:
244
+ {
245
+ const anim = this.animationMap.get(name);
246
+ if (anim) anim.state = 'running';
247
+ break;
248
+ }
249
+ case 2:
250
+ {
251
+ const anim = this.animationMap.get(name);
252
+ if (anim) anim.state = 'paused';
253
+ break;
254
+ }
255
+ case 3:
256
+ this.animationMap.delete(name);
257
+ break;
258
+ case 4:
259
+ {
260
+ const anim = this.animationMap.get(name);
261
+ if (anim) anim.state = 'finished';
262
+ break;
263
+ }
264
+ }
265
+ }
228
266
  clear() {
229
267
  this.root = void 0;
230
268
  }
@@ -248,6 +286,7 @@ const initElementTree = ()=>{
248
286
  constructor(){
249
287
  _define_property(this, "uniqueId2Element", new Map());
250
288
  _define_property(this, "root", void 0);
289
+ _define_property(this, "animationMap", new Map());
251
290
  }
252
291
  }();
253
292
  };
@@ -785,6 +785,14 @@ declare const initElementTree: () => {
785
785
  __CreateList(parentComponentUniqueId: number, componentAtIndex: any, enqueueComponent: any): LynxElement;
786
786
  __GetTag(ele: LynxElement): string;
787
787
  __GetAttributeByName(ele: LynxElement, name: string): string | null;
788
+ /** @internal */
789
+ animationMap: Map<string, {
790
+ element: LynxElement;
791
+ state: string;
792
+ keyframes?: any[];
793
+ options?: any;
794
+ }>;
795
+ __ElementAnimate(element: LynxElement, args: [number, string, ...any[]]): void;
788
796
  clear(): void;
789
797
  toTree(): LynxElement | undefined;
790
798
  /**