@visactor/vrender-core 1.1.0-alpha.1 → 1.1.0-alpha.11

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.
Files changed (104) hide show
  1. package/cjs/canvas/constants.js +1 -2
  2. package/cjs/canvas/empty-context.js +2 -1
  3. package/cjs/common/canvas-utils.js +0 -1
  4. package/cjs/common/diff.js +2 -1
  5. package/cjs/common/explicit-binding.js +1 -1
  6. package/cjs/common/generator.js +1 -1
  7. package/cjs/common/matrix.js +1 -1
  8. package/cjs/common/morphing-utils.js +1 -1
  9. package/cjs/common/path-svg.js +1 -1
  10. package/cjs/common/performance-raf.js +1 -1
  11. package/cjs/common/polygon.js +2 -2
  12. package/cjs/common/rect-utils.js +1 -1
  13. package/cjs/common/render-area.js +1 -1
  14. package/cjs/common/render-command-list.js +1 -1
  15. package/cjs/common/render-curve.js +1 -1
  16. package/cjs/common/render-utils.js +1 -1
  17. package/cjs/common/seg-context.js +2 -1
  18. package/cjs/common/simplify.js +1 -1
  19. package/cjs/common/sort.js +1 -1
  20. package/cjs/common/split-path.js +1 -1
  21. package/cjs/common/store.js +1 -1
  22. package/cjs/common/text.js +1 -1
  23. package/cjs/common/utils.js +1 -1
  24. package/cjs/core/application.js +1 -1
  25. package/cjs/core/camera.js +1 -1
  26. package/cjs/core/constants.js +1 -1
  27. package/cjs/core/core-modules.js +1 -1
  28. package/cjs/core/global-module.js +0 -2
  29. package/cjs/core/global.js +1 -1
  30. package/cjs/core/graphic-utils.js +1 -1
  31. package/cjs/core/index.js +1 -1
  32. package/cjs/core/layer-service.js +1 -2
  33. package/cjs/core/layer.js +1 -1
  34. package/cjs/core/light.js +1 -1
  35. package/cjs/core/stage.js +1 -1
  36. package/cjs/core/window.js +1 -1
  37. package/cjs/entries/browser.js +1 -1
  38. package/cjs/entries/index.js +1 -1
  39. package/cjs/entries/miniapp.js +1 -1
  40. package/cjs/entries/node.js +1 -1
  41. package/cjs/entries/runtime-installer.js +1 -1
  42. package/cjs/entries/types.js +1 -1
  43. package/cjs/graphic/graphic.d.ts +4 -1
  44. package/cjs/graphic/graphic.js +39 -13
  45. package/cjs/graphic/graphic.js.map +1 -1
  46. package/cjs/graphic/rect.d.ts +2 -0
  47. package/cjs/graphic/rect.js +44 -0
  48. package/cjs/graphic/rect.js.map +1 -1
  49. package/cjs/graphic/state/state-transition-orchestrator.d.ts +5 -0
  50. package/cjs/graphic/state/state-transition-orchestrator.js +17 -5
  51. package/cjs/graphic/state/state-transition-orchestrator.js.map +1 -1
  52. package/dist/index.es.js +151 -20
  53. package/es/canvas/constants.js +1 -2
  54. package/es/canvas/empty-context.js +2 -1
  55. package/es/common/canvas-utils.js +1 -2
  56. package/es/common/diff.js +2 -1
  57. package/es/common/explicit-binding.js +1 -1
  58. package/es/common/generator.js +1 -1
  59. package/es/common/matrix.js +1 -1
  60. package/es/common/morphing-utils.js +1 -1
  61. package/es/common/path-svg.js +1 -1
  62. package/es/common/performance-raf.js +1 -1
  63. package/es/common/polygon.js +1 -1
  64. package/es/common/rect-utils.js +1 -1
  65. package/es/common/render-area.js +1 -1
  66. package/es/common/render-command-list.js +1 -1
  67. package/es/common/render-curve.js +1 -1
  68. package/es/common/render-utils.js +1 -1
  69. package/es/common/seg-context.js +2 -1
  70. package/es/common/simplify.js +1 -1
  71. package/es/common/sort.js +1 -1
  72. package/es/common/split-path.js +1 -1
  73. package/es/common/store.js +1 -1
  74. package/es/common/text.js +1 -1
  75. package/es/common/utils.js +1 -1
  76. package/es/core/application.js +1 -1
  77. package/es/core/camera.js +1 -1
  78. package/es/core/constants.js +1 -1
  79. package/es/core/core-modules.js +1 -1
  80. package/es/core/global-module.js +0 -2
  81. package/es/core/global.js +1 -1
  82. package/es/core/graphic-utils.js +1 -1
  83. package/es/core/index.js +1 -1
  84. package/es/core/layer-service.js +1 -2
  85. package/es/core/layer.js +1 -1
  86. package/es/core/light.js +1 -1
  87. package/es/core/stage.js +1 -1
  88. package/es/core/window.js +1 -1
  89. package/es/entries/browser.js +1 -1
  90. package/es/entries/index.js +1 -1
  91. package/es/entries/miniapp.js +1 -1
  92. package/es/entries/node.js +1 -1
  93. package/es/entries/runtime-installer.js +1 -1
  94. package/es/entries/types.js +1 -1
  95. package/es/graphic/graphic.d.ts +4 -1
  96. package/es/graphic/graphic.js +39 -13
  97. package/es/graphic/graphic.js.map +1 -1
  98. package/es/graphic/rect.d.ts +2 -0
  99. package/es/graphic/rect.js +44 -0
  100. package/es/graphic/rect.js.map +1 -1
  101. package/es/graphic/state/state-transition-orchestrator.d.ts +5 -0
  102. package/es/graphic/state/state-transition-orchestrator.js +17 -5
  103. package/es/graphic/state/state-transition-orchestrator.js.map +1 -1
  104. package/package.json +3 -3
package/es/common/sort.js CHANGED
@@ -94,4 +94,4 @@ export function findNextGraphic(graphic, id, defaultZIndex, reverse = !1) {
94
94
  !1)), reverse);
95
95
  return result;
96
96
  }
97
- //# sourceMappingURL=sort.js.map
97
+ //# sourceMappingURL=sort.js.map
@@ -248,4 +248,4 @@ export const splitPath = (path, count) => {
248
248
  }
249
249
  return res;
250
250
  };
251
- //# sourceMappingURL=split-path.js.map
251
+ //# sourceMappingURL=split-path.js.map
@@ -1,2 +1,2 @@
1
1
  class StageStore {}
2
- //# sourceMappingURL=store.js.map
2
+ //# sourceMappingURL=store.js.map
package/es/common/text.js CHANGED
@@ -24,4 +24,4 @@ export function textAttributesToStyle(attrs) {
24
24
  attrs.underline ? style["text-decoration"] = "underline" : attrs.lineThrough && (style["text-decoration"] = "line-through"),
25
25
  attrs.fill && isString(attrs.fill) && (style.color = attrs.fill), style;
26
26
  }
27
- //# sourceMappingURL=text.js.map
27
+ //# sourceMappingURL=text.js.map
@@ -148,4 +148,4 @@ export const calculateLineHeight = (lineHeight, fontSize) => {
148
148
  const _lh = _calculateLineHeight(lineHeight, fontSize);
149
149
  return isNaN(_lh) ? _lh : Math.max(fontSize, _lh);
150
150
  };
151
- //# sourceMappingURL=utils.js.map
151
+ //# sourceMappingURL=utils.js.map
@@ -1,2 +1,2 @@
1
1
  export const ApplicationContribution = Symbol("ApplicationContribution");
2
- //# sourceMappingURL=application.js.map
2
+ //# sourceMappingURL=application.js.map
package/es/core/camera.js CHANGED
@@ -66,4 +66,4 @@ export class OrthoCamera {
66
66
  export const registerOrthoCamera = () => {
67
67
  Factory.registerPlugin("OrthoCamera", OrthoCamera);
68
68
  };
69
- //# sourceMappingURL=camera.js.map
69
+ //# sourceMappingURL=camera.js.map
@@ -9,4 +9,4 @@ export const StaticLayerHandlerContribution = Symbol.for("StaticLayerHandlerCont
9
9
  export const DynamicLayerHandlerContribution = Symbol.for("DynamicLayerHandlerContribution");
10
10
 
11
11
  export const VirtualLayerHandlerContribution = Symbol.for("VirtualLayerHandlerContribution");
12
- //# sourceMappingURL=constants.js.map
12
+ //# sourceMappingURL=constants.js.map
@@ -21,4 +21,4 @@ export function bindCoreModules({bind: bind}) {
21
21
  }
22
22
 
23
23
  export default bindCoreModules;
24
- //# sourceMappingURL=core-modules.js.map
24
+ //# sourceMappingURL=core-modules.js.map
@@ -1,3 +1 @@
1
-
2
-
3
1
  //# sourceMappingURL=global-module.js.map
package/es/core/global.js CHANGED
@@ -222,4 +222,4 @@ export class DefaultGlobal extends EventListenerManager {
222
222
  return this._env || this.setEnv("browser"), this.envContribution.copyToClipBoard(text);
223
223
  }
224
224
  }
225
- //# sourceMappingURL=global.js.map
225
+ //# sourceMappingURL=global.js.map
@@ -162,4 +162,4 @@ export class DefaultTransformUtil {
162
162
  return this;
163
163
  }
164
164
  }
165
- //# sourceMappingURL=graphic-utils.js.map
165
+ //# sourceMappingURL=graphic-utils.js.map
package/es/core/index.js CHANGED
@@ -15,4 +15,4 @@ export * from "./layer-service";
15
15
  export * from "./constants";
16
16
 
17
17
  export * from "../interface/core";
18
- //# sourceMappingURL=index.js.map
18
+ //# sourceMappingURL=index.js.map
@@ -75,5 +75,4 @@ export class DefaultLayerService {
75
75
  }
76
76
  }
77
77
 
78
- DefaultLayerService.idprefix = "visactor_layer", DefaultLayerService.prefix_count = 0;
79
- //# sourceMappingURL=layer-service.js.map
78
+ DefaultLayerService.idprefix = "visactor_layer", DefaultLayerService.prefix_count = 0;
package/es/core/layer.js CHANGED
@@ -112,4 +112,4 @@ export class Layer extends Group {
112
112
  }, params)), this.afterDrawCbs.forEach((c => c(this)));
113
113
  }
114
114
  }
115
- //# sourceMappingURL=layer.js.map
115
+ //# sourceMappingURL=layer.js.map
package/es/core/light.js CHANGED
@@ -23,4 +23,4 @@ export class DirectionalLight {
23
23
  export const registerDirectionalLight = () => {
24
24
  Factory.registerPlugin("DirectionalLight", DirectionalLight);
25
25
  };
26
- //# sourceMappingURL=light.js.map
26
+ //# sourceMappingURL=light.js.map
package/es/core/stage.js CHANGED
@@ -605,4 +605,4 @@ export class Stage extends Group {
605
605
  this.renderService.reInit(), this.pickerService.reInit();
606
606
  }
607
607
  }
608
- //# sourceMappingURL=stage.js.map
608
+ //# sourceMappingURL=stage.js.map
package/es/core/window.js CHANGED
@@ -150,4 +150,4 @@ export class DefaultWindow extends EventListenerManager {
150
150
  return this._handler.getTopLeft(baseWindow);
151
151
  }
152
152
  }
153
- //# sourceMappingURL=window.js.map
153
+ //# sourceMappingURL=window.js.map
@@ -33,4 +33,4 @@ export class BrowserEntry {
33
33
  export function createBrowserApp(options = {}) {
34
34
  return new BrowserEntry(options);
35
35
  }
36
- //# sourceMappingURL=browser.js.map
36
+ //# sourceMappingURL=browser.js.map
@@ -11,4 +11,4 @@ export * from "./miniapp";
11
11
  export * from "./runtime-installer";
12
12
 
13
13
  export { createBrowserApp as createApp } from "./browser";
14
- //# sourceMappingURL=index.js.map
14
+ //# sourceMappingURL=index.js.map
@@ -9,4 +9,4 @@ export class MiniappEntry extends BrowserEntry {
9
9
  export function createMiniappApp(options = {}) {
10
10
  return new MiniappEntry(options);
11
11
  }
12
- //# sourceMappingURL=miniapp.js.map
12
+ //# sourceMappingURL=miniapp.js.map
@@ -9,4 +9,4 @@ export class NodeEntry extends BrowserEntry {
9
9
  export function createNodeApp(options = {}) {
10
10
  return new NodeEntry(options);
11
11
  }
12
- //# sourceMappingURL=node.js.map
12
+ //# sourceMappingURL=node.js.map
@@ -127,4 +127,4 @@ export function installRuntimePickersToApp(app, serviceIdentifier) {
127
127
  const pickers = bindingContext.getAll(serviceIdentifier);
128
128
  app.registry.picker.clear(), registerRuntimeEntries(((key, picker) => app.registry.picker.register(key, picker)), pickers, "runtime-picker");
129
129
  }
130
- //# sourceMappingURL=runtime-installer.js.map
130
+ //# sourceMappingURL=runtime-installer.js.map
@@ -1,2 +1,2 @@
1
1
  export { };
2
- //# sourceMappingURL=types.js.map
2
+ //# sourceMappingURL=types.js.map
@@ -149,6 +149,7 @@ export declare abstract class Graphic<T extends Partial<IGraphicAttribute> = Par
149
149
  };
150
150
  protected recomputeCurrentStatePatch(): void;
151
151
  protected buildStaticAttributeSnapshot(): Partial<T>;
152
+ protected buildRemovedStateAnimationAttrs(targetStateAttrs: Partial<T>, previousResolvedStatePatch?: Partial<T>): Partial<T>;
152
153
  protected syncObjectToSnapshot(target: Record<string, any>, snapshot: Record<string, any>): AttributeDelta;
153
154
  protected _syncAttribute(): AttributeDelta;
154
155
  protected _syncFinalAttributeFromStaticTruth(): void;
@@ -210,8 +211,10 @@ export declare abstract class Graphic<T extends Partial<IGraphicAttribute> = Par
210
211
  getState(stateName: string): Partial<T> | StateDefinition<T> | undefined;
211
212
  protected createStateModel(): StateModel<T>;
212
213
  protected resolveStateAnimateConfig(animateConfig?: IAnimateConfig): any;
213
- applyStateAttrs(attrs: Partial<T>, stateNames: string[], hasAnimation?: boolean, isClear?: boolean, animateConfig?: IAnimateConfig): void;
214
+ applyStateAttrs(attrs: Partial<T>, stateNames: string[], hasAnimation?: boolean, isClear?: boolean, animateConfig?: IAnimateConfig, extraAnimateAttrs?: Partial<T>): void;
214
215
  updateNormalAttrs(stateAttrs: Partial<T>): void;
216
+ protected getStateTransitionDefaultAttribute(key: string, targetAttrs?: Partial<T>): any;
217
+ protected shouldSkipStateTransitionDefaultAttribute(_key: string, _targetAttrs?: Partial<T>): boolean;
215
218
  protected stopStateAnimates(type?: 'start' | 'end'): void;
216
219
  private getNormalAttribute;
217
220
  clearStates(hasAnimation?: boolean): void;
@@ -255,11 +255,11 @@ export class Graphic extends Node {
255
255
  stateProxyModeKey: this.stateProxy ? "legacy-all" : "none"
256
256
  };
257
257
  }
258
- const sharedCompiledDefinitions = boundScope.effectiveCompiledDefinitions;
258
+ const sharedCompiledDefinitions = boundScope.effectiveCompiledDefinitions, sharedStateProxyModeKey = this.stateProxy ? "shared-missing-only" : "none", sharedStateProxyEligibility = this.stateProxy ? stateName => !sharedCompiledDefinitions.has(stateName) : void 0;
259
259
  if (!hasStates) return this.localFallbackCompiledDefinitions = void 0, {
260
260
  compiledDefinitions: sharedCompiledDefinitions,
261
- stateProxyModeKey: this.stateProxy ? "shared-disabled" : "none",
262
- stateProxyEligibility: this.stateProxy ? () => !1 : void 0
261
+ stateProxyModeKey: sharedStateProxyModeKey,
262
+ stateProxyEligibility: sharedStateProxyEligibility
263
263
  };
264
264
  const localStates = this.states, missingLocalStateDefinitions = {}, missingStateNames = [];
265
265
  if (Object.keys(localStates).forEach((stateName => {
@@ -268,15 +268,15 @@ export class Graphic extends Node {
268
268
  })), !missingStateNames.length) return this.localFallbackCompiledDefinitions = void 0,
269
269
  {
270
270
  compiledDefinitions: sharedCompiledDefinitions,
271
- stateProxyModeKey: this.stateProxy ? "shared-disabled" : "none",
272
- stateProxyEligibility: this.stateProxy ? () => !1 : void 0
271
+ stateProxyModeKey: sharedStateProxyModeKey,
272
+ stateProxyEligibility: sharedStateProxyEligibility
273
273
  };
274
274
  const localStatesVersion = this.getLocalStatesVersion(), stateProxyModeKey = this.stateProxy ? `missing:${missingStateNames.sort().join("|")}` : "none", cacheKey = `shared:${boundScope.revision}:fallback:${localStatesVersion}:${stateProxyModeKey}`;
275
275
  return this.localFallbackCompiledDefinitions && this.compiledStateDefinitionsCacheKey === cacheKey || (this.localFallbackCompiledDefinitions = (new StateDefinitionCompiler).compile(Object.assign(Object.assign({}, boundScope.effectiveSourceDefinitions), missingLocalStateDefinitions)),
276
276
  this.compiledStateDefinitionsCacheKey = cacheKey), {
277
277
  compiledDefinitions: this.localFallbackCompiledDefinitions,
278
278
  stateProxyModeKey: stateProxyModeKey,
279
- stateProxyEligibility: this.stateProxy ? stateName => !sharedCompiledDefinitions.has(stateName) : void 0
279
+ stateProxyEligibility: sharedStateProxyEligibility
280
280
  };
281
281
  }
282
282
  recomputeCurrentStatePatch() {
@@ -297,6 +297,22 @@ export class Graphic extends Node {
297
297
  "deep" === this.stateMergeMode && isPlainObjectValue(previousValue) && isPlainObjectValue(nextValue) ? snapshot[key] = deepMergeAttributeValue(previousValue, nextValue) : snapshot[key] = cloneAttributeValue(nextValue);
298
298
  })), snapshot) : snapshot;
299
299
  }
300
+ buildRemovedStateAnimationAttrs(targetStateAttrs, previousResolvedStatePatch) {
301
+ const extraAttrs = {};
302
+ if (!previousResolvedStatePatch) return extraAttrs;
303
+ const snapshot = this.buildStaticAttributeSnapshot(), staticTargetAttrs = snapshot;
304
+ return Object.keys(previousResolvedStatePatch).forEach((key => {
305
+ const hasTargetAttr = Object.prototype.hasOwnProperty.call(targetStateAttrs, key);
306
+ if (hasTargetAttr && void 0 !== targetStateAttrs[key]) return;
307
+ const assignFallbackAttr = value => {
308
+ void 0 === value && this.shouldSkipStateTransitionDefaultAttribute(key, staticTargetAttrs) || (extraAttrs[key] = void 0 === value ? value : cloneAttributeValue(value));
309
+ };
310
+ if (hasTargetAttr) assignFallbackAttr(this.getStateTransitionDefaultAttribute(key, staticTargetAttrs)); else if (Object.prototype.hasOwnProperty.call(snapshot, key)) {
311
+ const snapshotValue = snapshot[key];
312
+ assignFallbackAttr(void 0 === snapshotValue ? this.getStateTransitionDefaultAttribute(key, staticTargetAttrs) : snapshotValue);
313
+ } else assignFallbackAttr(this.getStateTransitionDefaultAttribute(key, staticTargetAttrs));
314
+ })), extraAttrs;
315
+ }
300
316
  syncObjectToSnapshot(target, snapshot) {
301
317
  const delta = new Map;
302
318
  return new Set([ ...Object.keys(target), ...Object.keys(snapshot) ]).forEach((key => {
@@ -716,20 +732,30 @@ export class Graphic extends Node {
716
732
  var _a, _b, _c;
717
733
  return null !== (_c = null !== (_a = null != animateConfig ? animateConfig : this.stateAnimateConfig) && void 0 !== _a ? _a : null === (_b = this.context) || void 0 === _b ? void 0 : _b.stateAnimateConfig) && void 0 !== _c ? _c : DefaultStateAnimateConfig;
718
734
  }
719
- applyStateAttrs(attrs, stateNames, hasAnimation, isClear, animateConfig) {
735
+ applyStateAttrs(attrs, stateNames, hasAnimation, isClear, animateConfig, extraAnimateAttrs) {
720
736
  const resolvedAnimateConfig = hasAnimation ? this.resolveStateAnimateConfig(animateConfig) : void 0, transitionOptions = resolvedAnimateConfig ? {
721
- animateConfig: resolvedAnimateConfig
737
+ animateConfig: resolvedAnimateConfig,
738
+ extraAnimateAttrs: extraAnimateAttrs,
739
+ shouldSkipDefaultAttribute: this.shouldSkipStateTransitionDefaultAttribute.bind(this)
722
740
  } : void 0;
723
741
  if (isClear) return void this.getStateTransitionOrchestrator().applyClearTransition(this, attrs, hasAnimation, stateNames, transitionOptions);
724
742
  const plan = this.getStateTransitionOrchestrator().analyzeTransition({}, attrs, stateNames, hasAnimation, {
725
743
  noWorkAnimateAttr: this.getNoWorkAnimateAttr(),
726
- animateConfig: resolvedAnimateConfig
744
+ animateConfig: resolvedAnimateConfig,
745
+ extraAnimateAttrs: extraAnimateAttrs,
746
+ shouldSkipDefaultAttribute: this.shouldSkipStateTransitionDefaultAttribute.bind(this)
727
747
  });
728
748
  this.getStateTransitionOrchestrator().applyTransition(this, plan, hasAnimation, transitionOptions);
729
749
  }
730
750
  updateNormalAttrs(stateAttrs) {
731
751
  this._deprecatedNormalAttrsView = cloneAttributeValue(this.baseAttributes);
732
752
  }
753
+ getStateTransitionDefaultAttribute(key, targetAttrs) {
754
+ return this.getDefaultAttribute(key);
755
+ }
756
+ shouldSkipStateTransitionDefaultAttribute(_key, _targetAttrs) {
757
+ return !1;
758
+ }
733
759
  stopStateAnimates(type = "end") {
734
760
  const stopAnimationState = this.stopAnimationState;
735
761
  if ("function" == typeof stopAnimationState) return void stopAnimationState.call(this, "state", type);
@@ -745,7 +771,7 @@ export class Graphic extends Node {
745
771
  }
746
772
  clearStates(hasAnimation) {
747
773
  var _a, _b, _c;
748
- const previousStates = this.currentStates ? this.currentStates.slice() : [], transition = this.createStateModel().clearStates();
774
+ const previousStates = this.currentStates ? this.currentStates.slice() : [], previousResolvedStatePatch = this.resolvedStatePatch ? cloneAttributeValue(this.resolvedStatePatch) : void 0, transition = this.createStateModel().clearStates();
749
775
  if (!transition.changed && 0 === previousStates.length) return this.currentStates = [],
750
776
  this.effectiveStates = [], this.resolvedStatePatch = void 0, this.sharedStateDirty = !1,
751
777
  void this.clearSharedStateActiveRegistrations();
@@ -756,7 +782,7 @@ export class Graphic extends Node {
756
782
  null === (_c = getStageStatePerfMonitor(this.stage)) || void 0 === _c || _c.recordEvent("state-commit", {
757
783
  graphicId: this._uid,
758
784
  targetStates: []
759
- }), hasAnimation ? (this._syncFinalAttributeFromStaticTruth(), this.applyStateAttrs(resolvedStateAttrs, transition.states, hasAnimation, !0)) : (this.stopStateAnimates(),
785
+ }), hasAnimation ? (this._syncFinalAttributeFromStaticTruth(), this.applyStateAttrs(resolvedStateAttrs, transition.states, hasAnimation, !0, void 0, this.buildRemovedStateAnimationAttrs(resolvedStateAttrs, previousResolvedStatePatch))) : (this.stopStateAnimates(),
760
786
  this._restoreAttributeFromStaticTruth({
761
787
  type: AttributeUpdateType.STATE
762
788
  }), this._emitCustomEvent("afterStateUpdate", {
@@ -778,7 +804,7 @@ export class Graphic extends Node {
778
804
  useStates(states, hasAnimation) {
779
805
  var _a, _b, _c, _d, _e;
780
806
  if (!states.length) return void this.clearStates(hasAnimation);
781
- const previousStates = this.currentStates ? this.currentStates.slice() : [], stateResolveBaseAttrs = null !== (_a = this.baseAttributes) && void 0 !== _a ? _a : this.attribute, stateModel = this.createStateModel();
807
+ const previousStates = this.currentStates ? this.currentStates.slice() : [], previousResolvedStatePatch = this.resolvedStatePatch ? cloneAttributeValue(this.resolvedStatePatch) : void 0, stateResolveBaseAttrs = null !== (_a = this.baseAttributes) && void 0 !== _a ? _a : this.attribute, stateModel = this.createStateModel();
782
808
  null === (_b = this.stateEngine) || void 0 === _b || _b.setResolveContext(this, stateResolveBaseAttrs);
783
809
  const transition = stateModel.useStates(states);
784
810
  if (!transition.changed && this.sameStateNames(previousStates, transition.states)) return;
@@ -789,7 +815,7 @@ export class Graphic extends Node {
789
815
  null === (_e = getStageStatePerfMonitor(this.stage)) || void 0 === _e || _e.recordEvent("state-commit", {
790
816
  graphicId: this._uid,
791
817
  targetStates: [ ...transition.states ]
792
- }), hasAnimation ? (this._syncFinalAttributeFromStaticTruth(), this.applyStateAttrs(resolvedStateAttrs, transition.states, hasAnimation)) : (this.stopStateAnimates(),
818
+ }), hasAnimation ? (this._syncFinalAttributeFromStaticTruth(), this.applyStateAttrs(resolvedStateAttrs, transition.states, hasAnimation, !1, void 0, this.buildRemovedStateAnimationAttrs(resolvedStateAttrs, previousResolvedStatePatch))) : (this.stopStateAnimates(),
793
819
  this._restoreAttributeFromStaticTruth({
794
820
  type: AttributeUpdateType.STATE
795
821
  }), this._emitCustomEvent("afterStateUpdate", {