@visactor/vrender 1.1.0-alpha.5 → 1.1.0-alpha.7

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.
package/cjs/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Direction } from '@visactor/vrender-core';
2
- export declare const version = "1.1.0-alpha.5";
2
+ export declare const version = "1.1.0-alpha.7";
3
3
  export * from '@visactor/vrender-core';
4
4
  export * from '@visactor/vrender-kits';
5
5
  export * from '@visactor/vrender-animate';
package/cjs/index.js CHANGED
@@ -26,7 +26,7 @@ Object.defineProperty(exports, "Direction", {
26
26
  get: function() {
27
27
  return vrender_core_1.Direction;
28
28
  }
29
- }), exports.version = "1.1.0-alpha.5", __exportStar(require("@visactor/vrender-core"), exports),
29
+ }), exports.version = "1.1.0-alpha.7", __exportStar(require("@visactor/vrender-core"), exports),
30
30
  __exportStar(require("@visactor/vrender-kits"), exports), __exportStar(require("@visactor/vrender-animate"), exports),
31
31
  __exportStar(require("@visactor/vrender-components"), exports), __exportStar(require("./entries"), exports);
32
32
 
package/cjs/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,yDAAmD;AAa1C,0FAbA,wBAAS,OAaA;AAXL,QAAA,OAAO,GAAG,eAAe,CAAC;AAEvC,yDAAuC;AACvC,yDAAuC;AACvC,4DAA0C;AAC1C,+DAA6C;AAC7C,4CAA0B;AAC1B,mCAAuC;AAA9B,qGAAA,WAAW,OAAA;AAGpB,6DAAkD;AAAzC,wGAAA,KAAK,OAAA","file":"index.js","sourcesContent":["import { Direction } from '@visactor/vrender-core';\n// 导出版本号\nexport const version = \"1.1.0-alpha.5\";\n\nexport * from '@visactor/vrender-core';\nexport * from '@visactor/vrender-kits';\nexport * from '@visactor/vrender-animate';\nexport * from '@visactor/vrender-components';\nexport * from './entries';\nexport { createStage } from './legacy';\n\n// avoid naming conflicts with 'State' & 'Direction' in '@visactor/vrender-components'\nexport { State } from '@visactor/vrender-animate';\nexport { Direction };\n"]}
1
+ {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,yDAAmD;AAa1C,0FAbA,wBAAS,OAaA;AAXL,QAAA,OAAO,GAAG,eAAe,CAAC;AAEvC,yDAAuC;AACvC,yDAAuC;AACvC,4DAA0C;AAC1C,+DAA6C;AAC7C,4CAA0B;AAC1B,mCAAuC;AAA9B,qGAAA,WAAW,OAAA;AAGpB,6DAAkD;AAAzC,wGAAA,KAAK,OAAA","file":"index.js","sourcesContent":["import { Direction } from '@visactor/vrender-core';\n// 导出版本号\nexport const version = \"1.1.0-alpha.7\";\n\nexport * from '@visactor/vrender-core';\nexport * from '@visactor/vrender-kits';\nexport * from '@visactor/vrender-animate';\nexport * from '@visactor/vrender-components';\nexport * from './entries';\nexport { createStage } from './legacy';\n\n// avoid naming conflicts with 'State' & 'Direction' in '@visactor/vrender-components'\nexport { State } from '@visactor/vrender-animate';\nexport { Direction };\n"]}
package/dist/index.es.js CHANGED
@@ -8645,11 +8645,23 @@ class StateTransitionOrchestrator {
8645
8645
  if (!hasAnimation) return plan;
8646
8646
  const noWorkAnimateAttr = Object.assign(Object.assign({}, null !== (_a = options.noWorkAnimateAttr) && void 0 !== _a ? _a : {}), normalizeNoAnimateAttrConfig(null === (_b = options.animateConfig) || void 0 === _b ? void 0 : _b.noAnimateAttrs)),
8647
8647
  isClear = !0 === options.isClear,
8648
- getDefaultAttribute = options.getDefaultAttribute;
8648
+ getDefaultAttribute = options.getDefaultAttribute,
8649
+ shouldSkipDefaultAttribute = options.shouldSkipDefaultAttribute,
8650
+ assignTransitionAttr = (key, value) => {
8651
+ if (noWorkAnimateAttr[key]) return plan.jumpAttrs[key] = value, void (plan.noAnimateAttrs[key] = value);
8652
+ if (isClear && void 0 === value) {
8653
+ if (null == shouldSkipDefaultAttribute ? void 0 : shouldSkipDefaultAttribute(key, targetAttrs)) return;
8654
+ plan.animateAttrs[key] = getDefaultAttribute ? getDefaultAttribute(key) : value;
8655
+ } else plan.animateAttrs[key] = value;
8656
+ };
8649
8657
  for (const key in targetAttrs) {
8650
8658
  if (!Object.prototype.hasOwnProperty.call(targetAttrs, key)) continue;
8651
- const value = targetAttrs[key];
8652
- noWorkAnimateAttr[key] ? (plan.jumpAttrs[key] = value, plan.noAnimateAttrs[key] = value) : plan.animateAttrs[key] = isClear && void 0 === value && getDefaultAttribute ? getDefaultAttribute(key) : value;
8659
+ assignTransitionAttr(key, targetAttrs[key]);
8660
+ }
8661
+ const extraAnimateAttrs = options.extraAnimateAttrs;
8662
+ if (extraAnimateAttrs) for (const key in extraAnimateAttrs) {
8663
+ const hasTargetAttr = Object.prototype.hasOwnProperty.call(targetAttrs, key);
8664
+ !Object.prototype.hasOwnProperty.call(extraAnimateAttrs, key) || hasTargetAttr && void 0 !== targetAttrs[key] || assignTransitionAttr(key, extraAnimateAttrs[key]);
8653
8665
  }
8654
8666
  return plan;
8655
8667
  }
@@ -8676,12 +8688,14 @@ class StateTransitionOrchestrator {
8676
8688
  }), plan;
8677
8689
  }
8678
8690
  applyClearTransition(graphic, targetAttrs, hasAnimation, stateNames, options = {}) {
8679
- var _a, _b;
8691
+ var _a, _b, _c, _d;
8680
8692
  const plan = this.analyzeTransition({}, targetAttrs, stateNames, hasAnimation, {
8681
8693
  noWorkAnimateAttr: null === (_a = graphic.getNoWorkAnimateAttr) || void 0 === _a ? void 0 : _a.call(graphic),
8682
8694
  isClear: !0,
8683
8695
  getDefaultAttribute: null === (_b = graphic.getDefaultAttribute) || void 0 === _b ? void 0 : _b.bind(graphic),
8684
- animateConfig: options.animateConfig
8696
+ shouldSkipDefaultAttribute: null !== (_c = options.shouldSkipDefaultAttribute) && void 0 !== _c ? _c : null === (_d = graphic.shouldSkipStateTransitionDefaultAttribute) || void 0 === _d ? void 0 : _d.bind(graphic),
8697
+ animateConfig: options.animateConfig,
8698
+ extraAnimateAttrs: options.extraAnimateAttrs
8685
8699
  });
8686
8700
  return this.applyTransition(graphic, plan, hasAnimation, options);
8687
8701
  }
@@ -9029,6 +9043,23 @@ class Graphic extends Node {
9029
9043
  "deep" === this.stateMergeMode && isPlainObjectValue(previousValue) && isPlainObjectValue(nextValue) ? snapshot[key] = deepMergeAttributeValue(previousValue, nextValue) : snapshot[key] = cloneAttributeValue(nextValue);
9030
9044
  }), snapshot) : snapshot;
9031
9045
  }
9046
+ buildRemovedStateAnimationAttrs(targetStateAttrs, previousResolvedStatePatch) {
9047
+ const extraAttrs = {};
9048
+ if (!previousResolvedStatePatch) return extraAttrs;
9049
+ const snapshot = this.buildStaticAttributeSnapshot(),
9050
+ staticTargetAttrs = snapshot;
9051
+ return Object.keys(previousResolvedStatePatch).forEach(key => {
9052
+ const hasTargetAttr = Object.prototype.hasOwnProperty.call(targetStateAttrs, key);
9053
+ if (hasTargetAttr && void 0 !== targetStateAttrs[key]) return;
9054
+ const assignFallbackAttr = value => {
9055
+ void 0 === value && this.shouldSkipStateTransitionDefaultAttribute(key, staticTargetAttrs) || (extraAttrs[key] = void 0 === value ? value : cloneAttributeValue(value));
9056
+ };
9057
+ if (hasTargetAttr) assignFallbackAttr(this.getStateTransitionDefaultAttribute(key, staticTargetAttrs));else if (Object.prototype.hasOwnProperty.call(snapshot, key)) {
9058
+ const snapshotValue = snapshot[key];
9059
+ assignFallbackAttr(void 0 === snapshotValue ? this.getStateTransitionDefaultAttribute(key, staticTargetAttrs) : snapshotValue);
9060
+ } else assignFallbackAttr(this.getStateTransitionDefaultAttribute(key, staticTargetAttrs));
9061
+ }), extraAttrs;
9062
+ }
9032
9063
  syncObjectToSnapshot(target, snapshot) {
9033
9064
  const delta = new Map();
9034
9065
  return new Set([...Object.keys(target), ...Object.keys(snapshot)]).forEach(key => {
@@ -9450,21 +9481,31 @@ class Graphic extends Node {
9450
9481
  var _a, _b, _c;
9451
9482
  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;
9452
9483
  }
9453
- applyStateAttrs(attrs, stateNames, hasAnimation, isClear, animateConfig) {
9484
+ applyStateAttrs(attrs, stateNames, hasAnimation, isClear, animateConfig, extraAnimateAttrs) {
9454
9485
  const resolvedAnimateConfig = hasAnimation ? this.resolveStateAnimateConfig(animateConfig) : void 0,
9455
9486
  transitionOptions = resolvedAnimateConfig ? {
9456
- animateConfig: resolvedAnimateConfig
9487
+ animateConfig: resolvedAnimateConfig,
9488
+ extraAnimateAttrs: extraAnimateAttrs,
9489
+ shouldSkipDefaultAttribute: this.shouldSkipStateTransitionDefaultAttribute.bind(this)
9457
9490
  } : void 0;
9458
9491
  if (isClear) return void this.getStateTransitionOrchestrator().applyClearTransition(this, attrs, hasAnimation, stateNames, transitionOptions);
9459
9492
  const plan = this.getStateTransitionOrchestrator().analyzeTransition({}, attrs, stateNames, hasAnimation, {
9460
9493
  noWorkAnimateAttr: this.getNoWorkAnimateAttr(),
9461
- animateConfig: resolvedAnimateConfig
9494
+ animateConfig: resolvedAnimateConfig,
9495
+ extraAnimateAttrs: extraAnimateAttrs,
9496
+ shouldSkipDefaultAttribute: this.shouldSkipStateTransitionDefaultAttribute.bind(this)
9462
9497
  });
9463
9498
  this.getStateTransitionOrchestrator().applyTransition(this, plan, hasAnimation, transitionOptions);
9464
9499
  }
9465
9500
  updateNormalAttrs(stateAttrs) {
9466
9501
  this._deprecatedNormalAttrsView = cloneAttributeValue(this.baseAttributes);
9467
9502
  }
9503
+ getStateTransitionDefaultAttribute(key, targetAttrs) {
9504
+ return this.getDefaultAttribute(key);
9505
+ }
9506
+ shouldSkipStateTransitionDefaultAttribute(_key, _targetAttrs) {
9507
+ return !1;
9508
+ }
9468
9509
  stopStateAnimates(type = "end") {
9469
9510
  const stopAnimationState = this.stopAnimationState;
9470
9511
  if ("function" == typeof stopAnimationState) return void stopAnimationState.call(this, "state", type);
@@ -9481,13 +9522,14 @@ class Graphic extends Node {
9481
9522
  clearStates(hasAnimation) {
9482
9523
  var _a, _b, _c;
9483
9524
  const previousStates = this.currentStates ? this.currentStates.slice() : [],
9525
+ previousResolvedStatePatch = this.resolvedStatePatch ? cloneAttributeValue(this.resolvedStatePatch) : void 0,
9484
9526
  transition = this.createStateModel().clearStates();
9485
9527
  if (!transition.changed && 0 === previousStates.length) return this.currentStates = [], this.effectiveStates = [], this.resolvedStatePatch = void 0, this.sharedStateDirty = !1, void this.clearSharedStateActiveRegistrations();
9486
9528
  const resolvedStateAttrs = cloneAttributeValue(null !== (_a = this.baseAttributes) && void 0 !== _a ? _a : {});
9487
9529
  transition.changed && !this.beforeStateUpdate(resolvedStateAttrs, previousStates, transition.states, hasAnimation, !0) || (this.currentStates = transition.states, this.effectiveStates = [], this.resolvedStatePatch = void 0, this.sharedStateDirty = !1, this.clearSharedStateActiveRegistrations(), null === (_b = getStageStatePerfMonitor(this.stage)) || void 0 === _b || _b.incrementCounter("stateCommits"), null === (_c = getStageStatePerfMonitor(this.stage)) || void 0 === _c || _c.recordEvent("state-commit", {
9488
9530
  graphicId: this._uid,
9489
9531
  targetStates: []
9490
- }), hasAnimation ? (this._syncFinalAttributeFromStaticTruth(), this.applyStateAttrs(resolvedStateAttrs, transition.states, hasAnimation, !0)) : (this.stopStateAnimates(), this._restoreAttributeFromStaticTruth({
9532
+ }), hasAnimation ? (this._syncFinalAttributeFromStaticTruth(), this.applyStateAttrs(resolvedStateAttrs, transition.states, hasAnimation, !0, void 0, this.buildRemovedStateAnimationAttrs(resolvedStateAttrs, previousResolvedStatePatch))) : (this.stopStateAnimates(), this._restoreAttributeFromStaticTruth({
9491
9533
  type: AttributeUpdateType.STATE
9492
9534
  }), this._emitCustomEvent("afterStateUpdate", {
9493
9535
  type: AttributeUpdateType.STATE
@@ -9509,6 +9551,7 @@ class Graphic extends Node {
9509
9551
  var _a, _b, _c, _d, _e;
9510
9552
  if (!states.length) return void this.clearStates(hasAnimation);
9511
9553
  const previousStates = this.currentStates ? this.currentStates.slice() : [],
9554
+ previousResolvedStatePatch = this.resolvedStatePatch ? cloneAttributeValue(this.resolvedStatePatch) : void 0,
9512
9555
  stateResolveBaseAttrs = null !== (_a = this.baseAttributes) && void 0 !== _a ? _a : this.attribute,
9513
9556
  stateModel = this.createStateModel();
9514
9557
  null === (_b = this.stateEngine) || void 0 === _b || _b.setResolveContext(this, stateResolveBaseAttrs);
@@ -9519,7 +9562,7 @@ class Graphic extends Node {
9519
9562
  this.beforeStateUpdate(resolvedStateAttrs, previousStates, transition.states, hasAnimation, !1) && (this.currentStates = transition.states, this.effectiveStates = [...effectiveStates], this.resolvedStatePatch = Object.assign({}, resolvedStateAttrs), this.sharedStateDirty = !1, this.syncSharedStateActiveRegistrations(), null === (_d = getStageStatePerfMonitor(this.stage)) || void 0 === _d || _d.incrementCounter("stateCommits"), null === (_e = getStageStatePerfMonitor(this.stage)) || void 0 === _e || _e.recordEvent("state-commit", {
9520
9563
  graphicId: this._uid,
9521
9564
  targetStates: [...transition.states]
9522
- }), hasAnimation ? (this._syncFinalAttributeFromStaticTruth(), this.applyStateAttrs(resolvedStateAttrs, transition.states, hasAnimation)) : (this.stopStateAnimates(), this._restoreAttributeFromStaticTruth({
9565
+ }), hasAnimation ? (this._syncFinalAttributeFromStaticTruth(), this.applyStateAttrs(resolvedStateAttrs, transition.states, hasAnimation, !1, void 0, this.buildRemovedStateAnimationAttrs(resolvedStateAttrs, previousResolvedStatePatch))) : (this.stopStateAnimates(), this._restoreAttributeFromStaticTruth({
9523
9566
  type: AttributeUpdateType.STATE
9524
9567
  }), this._emitCustomEvent("afterStateUpdate", {
9525
9568
  type: AttributeUpdateType.STATE
@@ -10951,6 +10994,52 @@ class Rect extends Graphic {
10951
10994
  needUpdateTag(key) {
10952
10995
  return super.needUpdateTag(key, RECT_UPDATE_TAG_KEY);
10953
10996
  }
10997
+ shouldSkipStateTransitionDefaultAttribute(key, targetAttrs) {
10998
+ var _a;
10999
+ const attrs = null !== (_a = null != targetAttrs ? targetAttrs : this.baseAttributes) && void 0 !== _a ? _a : this.attribute,
11000
+ hasValue = attrKey => null != attrs[attrKey],
11001
+ isNilValue = attrKey => null == attrs[attrKey];
11002
+ switch (key) {
11003
+ case "width":
11004
+ return isNilValue("width") && hasValue("x") && hasValue("x1");
11005
+ case "height":
11006
+ return isNilValue("height") && hasValue("y") && hasValue("y1");
11007
+ case "x1":
11008
+ return isNilValue("x1") && hasValue("x") && hasValue("width");
11009
+ case "y1":
11010
+ return isNilValue("y1") && hasValue("y") && hasValue("height");
11011
+ default:
11012
+ return !1;
11013
+ }
11014
+ }
11015
+ getStateTransitionDefaultAttribute(key, targetAttrs) {
11016
+ var _a;
11017
+ const attrs = null !== (_a = null != targetAttrs ? targetAttrs : this.baseAttributes) && void 0 !== _a ? _a : this.attribute,
11018
+ getNumber = attrKey => {
11019
+ const value = attrs[attrKey];
11020
+ return "number" == typeof value && Number.isFinite(value) ? value : void 0;
11021
+ },
11022
+ x = getNumber("x"),
11023
+ y = getNumber("y"),
11024
+ x1 = getNumber("x1"),
11025
+ y1 = getNumber("y1"),
11026
+ width = getNumber("width"),
11027
+ height = getNumber("height");
11028
+ switch (key) {
11029
+ case "width":
11030
+ if (null == width && null != x && null != x1) return x1 - x;
11031
+ break;
11032
+ case "height":
11033
+ if (null == height && null != y && null != y1) return y1 - y;
11034
+ break;
11035
+ case "x1":
11036
+ if (null == x1 && null != x && null != width) return x + width;
11037
+ break;
11038
+ case "y1":
11039
+ if (null == y1 && null != y && null != height) return y + height;
11040
+ }
11041
+ return super.getStateTransitionDefaultAttribute(key, targetAttrs);
11042
+ }
10954
11043
  toCustomPath() {
10955
11044
  let path = super.toCustomPath();
10956
11045
  if (path) return path;
@@ -32690,7 +32779,7 @@ class Animate {
32690
32779
  this.target = target;
32691
32780
  const trackerTarget = this.target;
32692
32781
  return "function" == typeof trackerTarget.trackAnimate ? trackerTarget.trackAnimate(this) : (this.target.animates || (this.target.animates = new Map()), this.target.animates.set(this.id, this)), this.onRemove(() => {
32693
- this.stop(), "function" == typeof trackerTarget.restoreStaticAttribute && trackerTarget.restoreStaticAttribute(), "function" == typeof trackerTarget.untrackAnimate ? trackerTarget.untrackAnimate(this.id) : this.target.animates.delete(this.id);
32782
+ this.stop(), this.__skipRestoreStaticAttributeOnRemove || "function" != typeof trackerTarget.restoreStaticAttribute || trackerTarget.restoreStaticAttribute(), "function" == typeof trackerTarget.untrackAnimate ? trackerTarget.untrackAnimate(this.id) : this.target.animates.delete(this.id);
32694
32783
  }), this.target.onAnimateBind && !this.slience && this.target.onAnimateBind(this), this.target.animationAttribute || (this.target.animationAttribute = {}), this;
32695
32784
  }
32696
32785
  to(props, duration = 300, easing = "linear") {
@@ -32826,7 +32915,7 @@ class Animate {
32826
32915
  if (nextTime >= this._startTime + this._totalDuration) {
32827
32916
  null === (_a = this._lastStep) || void 0 === _a || _a.onUpdate(!0, 1, {}), null === (_b = this._lastStep) || void 0 === _b || _b.onEnd(), this.onEnd(), this.status = AnimateStatus.END;
32828
32917
  const trackerTarget = this.target;
32829
- return void ("function" == typeof (null == trackerTarget ? void 0 : trackerTarget.restoreStaticAttribute) && trackerTarget.restoreStaticAttribute());
32918
+ return "function" == typeof (null == trackerTarget ? void 0 : trackerTarget.restoreStaticAttribute) && trackerTarget.restoreStaticAttribute(), void (this.__skipRestoreStaticAttributeOnRemove = !0);
32830
32919
  }
32831
32920
  this.status = AnimateStatus.RUNNING, this.currentTime <= this._startTime && this.onStart(), this.currentTime = nextTime;
32832
32921
  let cycleTime = nextTime - this._startTime,
@@ -33124,6 +33213,9 @@ class AnimationTransitionRegistry {
33124
33213
  })), this.registerTransition("state", "*", () => ({
33125
33214
  allowTransition: !0,
33126
33215
  stopOriginalTransition: !1
33216
+ })), this.registerTransition("state", "state", () => ({
33217
+ allowTransition: !0,
33218
+ stopOriginalTransition: !0
33127
33219
  })), this.registerTransition("state", "disappear", () => ({
33128
33220
  allowTransition: !0,
33129
33221
  stopOriginalTransition: !0
@@ -33429,7 +33521,7 @@ class AnimateExecutor {
33429
33521
  stop(type, callEnd = !0) {
33430
33522
  for (; this._animates.length > 0;) {
33431
33523
  const animate = this._animates.pop();
33432
- !1 === callEnd && (animate.status = AnimateStatus.END), null == animate || animate.stop(type);
33524
+ !1 === callEnd && (animate.status = AnimateStatus.END, animate.__skipRestoreStaticAttributeOnRemove = !0), null == animate || animate.stop(type);
33433
33525
  }
33434
33526
  this._animates = [], this._activeCount = 0, this._started && (this._started = !1, callEnd && this.onEnd());
33435
33527
  }
@@ -54316,6 +54408,6 @@ function createStage(params) {
54316
54408
  return resolveLegacyApp().createStage(params);
54317
54409
  }
54318
54410
 
54319
- const version = "1.1.0-alpha.5";
54411
+ const version = "1.1.0-alpha.7";
54320
54412
 
54321
54413
  export { AComponentAnimate, ACustomAnimate, ARC3D_NUMBER_TYPE, ARC_NUMBER_TYPE, AREA_NUMBER_TYPE, AStageAnimate, AXIS_ELEMENT_NAME, AbstractComponent, AbstractGraphicRender, Animate, AnimateExecutor, AnimateMode, AnimateStatus, Step as AnimateStep, AnimateStepType, AnimationStateManager, AnimationStateStore, AnimationStates, AnimationTransitionRegistry, AppContext, Application, Arc, Arc3d, Arc3dRender, ArcInfo, ArcLabel, ArcRender, ArcRenderContribution, ArcSegment, Area, AreaRender, AreaRenderContribution, AttributeUpdateType, AutoEnablePlugins, AxisStateValue, BaseCanvas, BaseEnvContribution, BasePlayer, BaseRender, BaseRenderContributionTime, BaseWindowHandlerContribution, Basis, BeforeRenderConstribution, BoundsContext, BoundsPicker, BrowserEntry, BrowserEnvContribution, Brush, CIRCLE_NUMBER_TYPE, Canvas3DDrawItemInterceptor, Canvas3DPickItemInterceptor, CanvasArc3dPicker, CanvasArcPicker, CanvasAreaPicker, CanvasCirclePicker, CanvasFactory, CanvasGifImagePicker, CanvasGlyphPicker, CanvasGroupPicker, CanvasImagePicker, CanvasLinePicker, CanvasLottiePicker, CanvasPathPicker, CanvasPickerContribution, CanvasPolygonPicker, CanvasPyramid3dPicker, CanvasRect3dPicker, CanvasRectPicker, CanvasRichTextPicker, CanvasStarPicker, CanvasSymbolPicker, CanvasTextLayout, CanvasTextPicker, CheckBox, Circle, CircleAxis, CircleAxisGrid, CircleCrosshair, CircleRender, CircleRenderContribution, ClipAngleAnimate, ClipDirectionAnimate, ClipGraphicAnimate, ClipIn, ClipOut, ClipRadiusAnimate, ColorContinuousLegend, ColorInterpolate, ColorStore, ColorType, CommonDrawItemInterceptorContribution, CommonRenderContribution, ComponentAnimator, Context2dFactory, ContinuousPlayer, ContributionProvider, ContributionRegistry, ContributionStore, CubicBezierCurve, CurveContext, CurveTypeEnum, CustomEvent, CustomPath2D, CustomSymbolClass, DEFAULT_ITEM_SPACE_COL, DEFAULT_ITEM_SPACE_ROW, DEFAULT_LABEL_SPACE, DEFAULT_PAGER_SPACE, DEFAULT_SHAPE_SIZE, DEFAULT_SHAPE_SPACE, DEFAULT_STATES$1 as DEFAULT_STATES, DEFAULT_TEXT_FONT_FAMILY$1 as DEFAULT_TEXT_FONT_FAMILY, DEFAULT_TITLE_SPACE, DEFAULT_VALUE_SPACE, DataLabel, DataZoom, DataZoomActiveTag, DebugDrawItemInterceptorContribution, DefaultArcAllocate, DefaultArcAttribute, DefaultArcRenderContribution, DefaultAreaAllocate, DefaultAreaAttribute, DefaultAreaTextureRenderContribution, DefaultAttribute, DefaultBaseBackgroundRenderContribution, DefaultBaseClipRenderAfterContribution, DefaultBaseClipRenderBeforeContribution, DefaultBaseInteractiveRenderContribution, DefaultBaseTextureRenderContribution, DefaultCanvasAllocate, DefaultCanvasArcRender, DefaultCanvasAreaRender, DefaultCanvasCircleRender, DefaultCanvasGroupRender, DefaultCanvasImageRender, DefaultCanvasLineRender, DefaultCanvasPathRender, DefaultCanvasPolygonRender, DefaultCanvasRectRender, DefaultCanvasSymbolRender, DefaultCanvasTextRender, DefaultCircleAllocate, DefaultCircleAttribute, DefaultCircleRenderContribution, DefaultConnectAttribute, DefaultDebugAttribute, DefaultFillStyle, DefaultGlobal, DefaultGlobalPickerService, DefaultGlyphAttribute, DefaultGraphicAllocate, DefaultGraphicMemoryManager, DefaultGraphicService, DefaultGraphicUtil, DefaultGroupAttribute, DefaultGroupBackgroundRenderContribution, DefaultImageAttribute, DefaultImageRenderContribution, DefaultLayerService, DefaultLayout, DefaultLineAllocate, DefaultLineAttribute, DefaultMat4Allocate, DefaultMatrixAllocate, DefaultPathAllocate, DefaultPathAttribute, DefaultPickService, DefaultPickStyle, DefaultPolygonAttribute, DefaultRect3dAttribute, DefaultRectAllocate, DefaultRectAttribute, DefaultRectRenderContribution, DefaultRenderService, DefaultRichTextAttribute, DefaultRichTextIconAttribute, DefaultStarAttribute, DefaultStrokeStyle, DefaultStyle, DefaultSymbolAllocate, DefaultSymbolAttribute, DefaultSymbolClipRangeStrokeRenderContribution, DefaultSymbolRenderContribution, DefaultTextAllocate, DefaultTextAttribute, DefaultTextMeasureContribution, DefaultTextStyle, DefaultTicker, DefaultTimeline, DefaultTransform, DefaultTransformUtil, DefaultWindow, Direction, DirectionEnum, DirectionalLight, DiscreteLegend, DiscretePlayer, Dissolve, Distortion, DragNDrop, DrawContribution, DrawItemInterceptor, DynamicLayerHandlerContribution, Easing, Edge, EditModule, EmptyContext2d, EmptyTip, EnvContribution, EventManager, EventSystem, EventTarget, FORMAT_ALL_TEXT_COMMAND, FORMAT_ELEMENT_COMMAND, FORMAT_TEXT_COMMAND, Factory, FadeIn, FadeOut, FederatedEvent, FederatedMouseEvent, FederatedPointerEvent, FederatedWheelEvent, FlexLayoutPlugin, Fragment, FromTo, GLYPH_NUMBER_TYPE, GRAPHIC_UPDATE_TAG_KEY, GROUP_NUMBER_TYPE, GaussianBlur, Generator, Gesture, GifImage, Glitch, GlobalPickerService, Glyph, GlyphRender, GradientParser, Graphic, GraphicCreator$1 as GraphicCreator, GraphicFactory, GraphicPicker, GraphicRender, GraphicService, GraphicStateExtension, GraphicUtil, Grayscale, Group, GroupFadeIn, GroupFadeOut, GroupRender, GroupRenderContribution, GroupTransition, GroupUpdateAABBBoundsMode, GrowAngleIn, GrowAngleOut, GrowCenterIn, GrowCenterOut, GrowHeightIn, GrowHeightOut, GrowIn, GrowOut, GrowPointsIn, GrowPointsOut, GrowPointsXIn, GrowPointsXOut, GrowPointsYIn, GrowPointsYOut, GrowRadiusIn, GrowRadiusOut, GrowWidthIn, GrowWidthOut, HtmlAttributePlugin, IContainPointMode, IDataZoomEvent, IDataZoomInteractiveEvent, IMAGE_NUMBER_TYPE, IMarkAreaLabelPosition, IMarkCommonArcLabelPosition, IMarkLineLabelPosition, IMarkPointItemPosition, IOperateType, Image$1 as Image, ImageRender, ImageRenderContribution, IncreaseCount, IncrementalDrawContribution, Indicator, InputRichText, InputText, InteractiveDrawItemInterceptorContribution, InteractivePickItemInterceptorContribution, InteractiveSubRenderContribution, LEGEND_ELEMENT_NAME, LINE_NUMBER_TYPE, LabelBase, LabelItemAppear, LabelItemDisappear, Layer, LayerFactory, LayerService, LegendEvent, LegendStateValue, Line$1 as Line, LineAxis, LineAxisGrid, LineCrosshair, LineLabel, LineRender, Linear, LinearClosed, LinkPath, Lottie, ManualTicker, MarkArcArea, MarkArcLine, MarkArea, MarkLine, MarkPoint, Mat4Allocate, MathArcPicker, MathAreaPicker, MathCirclePicker, MathGlyphPicker, MathImagePicker, MathLinePicker, MathPathPicker, MathPickerContribution, MathPolygonPicker, MathRectPicker, MathRichTextPicker, MathSymbolPicker, MathTextPicker, MatrixAllocate, MeasureModeEnum, MiniappEntry, MonotoneX, MonotoneY, MorphingPath, MotionPath, MoveIn, MoveOut, MoveRotateIn, MoveRotateOut, MoveScaleIn, MoveScaleOut, MultiToOneMorphingPath, NOWORK_ANIMATE_ATTR, Node, NodeEntry, OrthoCamera, OutputRichText, PATH_NUMBER_TYPE, POLYGON_NUMBER_TYPE, PURE_STYLE_KEY, PYRAMID3D_NUMBER_TYPE, Pager, Particle, Path, PathRender, PathRenderContribution, PerformanceRAF, PickItemInterceptor, PickServiceInterceptor, PickerRegistry, PickerService, Pixelation, PlayerEventEnum, PluginRegistry, PluginService, Polygon, PolygonCrosshair, PolygonRender, PolygonRenderContribution, PolygonSectorCrosshair, PopTip, PoptipAppear, PoptipDisappear, PulseAnimate, Pyramid3d, Pyramid3dRender, REACT_TO_CANOPUS_EVENTS, REACT_TO_CANOPUS_EVENTS_LIST, RECT3D_NUMBER_TYPE, RECT_NUMBER_TYPE, RICHTEXT_NUMBER_TYPE, Radio, RafBasedSTO, ReactAttributePlugin, Rect, Rect3DRender, Rect3d, RectCrosshair, RectLabel, RectRender, RectRenderContribution, ReflectSegContext, RenderSelector, RenderService, RendererRegistry, ResourceLoader, RichText, RichTextEditPlugin, RichTextRender, RotateBySphereAnimate, RotateIn, RotateOut, SLIDER_ELEMENT_NAME, STAR_NUMBER_TYPE, STATUS$1 as STATUS, SVG_ATTRIBUTE_MAP, SVG_ATTRIBUTE_MAP_KEYS, SVG_PARSE_ATTRIBUTE_MAP, SVG_PARSE_ATTRIBUTE_MAP_KEYS, SYMBOL_NUMBER_TYPE, ScaleIn, ScaleOut, ScrollBar, SectorCrosshair, SegContext, Segment, SeriesNumberCellStateValue, SeriesNumberEvent, ShadowPickServiceInterceptorContribution, ShadowRoot, ShadowRootDrawItemInterceptorContribution, ShadowRootPickItemInterceptorContribution, SizeContinuousLegend, SlideIn, SlideOut, SlideOutRichText, SlideRichText, Slider, SpinIn, SpinOut, SplitRectAfterRenderContribution, SplitRectBeforeRenderContribution, Stage, StageFactory, Star, StarRender, StarRenderContribution, State, StateDefinitionCompiler, StateEngine, StaticLayerHandlerContribution, Step$1 as Step, StepClosed, StoryLabelItem, StreamLight, StrokeIn, StrokeOut, Switch, Symbol$1 as Symbol, SymbolLabel, SymbolRender, SymbolRenderContribution, TEXT_NUMBER_TYPE, TableSeriesNumber, Tag, TagPointsUpdate, Text, TextDirection, TextMeasureContribution, TextRender, TextRenderContribution, Theme, Timeline, Title, Tooltip, TopZIndex, TransformUtil, Update, UpdateTag, VArc, VArc3d, VArea, VCircle, VGlobal, VGlyph, VGroup, VImage, VLine, VPath, VPolygon, VPyramid3d, VRect, VRect3d, VRichText, VSymbol, VTag, VText, VWindow, ViewTransform3dPlugin, VirtualLayerHandlerContribution, WILDCARD, WeatherBox, WindowHandlerContribution, WrapText, XMLParser, _calculateLineHeight, _interpolateColor, _registerArc, addArcToBezierPath$1 as addArcToBezierPath, addAttributeToPrototype, alignBezierCurves, alignSubpath, alignTextInLine, alternatingWave, angle, angleLabelOrientAttribute, angleTo, application, applyTransformOnBezierCurves, arc3dModule, arcModule, areaModule, bezier, bezierCurversToPath, binarySplitPolygon, bindArc3dCanvasPickerContribution, bindArc3dRenderModule, bindArcCanvasPickerContribution, bindArcMathPickerContribution, bindArcRenderModule, bindAreaCanvasPickerContribution, bindAreaMathPickerContribution, bindAreaRenderModule, bindBrowserEnv, bindCircleCanvasPickerContribution, bindCircleMathPickerContribution, bindCircleRenderModule, bindContributionProvider, bindContributionProviderNoSingletonScope, bindFeishuEnv, bindGifImageCanvasPickerContribution, bindGifImageRenderContribution, bindGlyphCanvasPickerContribution, bindGlyphMathPickerContribution, bindGlyphRenderModule, bindHarmonyEnv, bindImageCanvasPickerContribution, bindImageMathPickerContribution, bindImageRenderModule, bindLineCanvasPickerContribution, bindLineMathPickerContribution, bindLineRenderModule, bindLottieCanvasPickerContribution, bindLottieRenderContribution, bindLynxEnv, bindMathPicker, bindNodeEnv, bindPathCanvasPickerContribution, bindPathMathPickerContribution, bindPathRenderModule, bindPolygonCanvasPickerContribution, bindPolygonMathPickerContribution, bindPolygonRenderModule, bindPyramid3dCanvasPickerContribution, bindPyramid3dRenderModule, bindRect3dCanvasPickerContribution, bindRect3dRenderModule, bindRectCanvasPickerContribution, bindRectMathPickerContribution, bindRectRenderModule, bindRichTextMathPickerContribution, bindRichtextCanvasPickerContribution, bindRichtextRenderModule, bindStarRenderModule, bindSymbolCanvasPickerContribution, bindSymbolMathPickerContribution, bindSymbolRenderModule, bindTTEnv, bindTaroEnv, bindTextCanvasPickerContribution, bindTextMathPickerContribution, bindTextRenderModule, bindWxEnv, bootstrapLegacyVRenderRuntime, bootstrapVRenderBrowserApp, bootstrapVRenderNodeApp, boundStroke, builtInSymbolStrMap, builtinSymbols, builtinSymbolsMap, calcLineCache, calculateArcCornerRadius, calculateLineHeight, canvasAllocate, cartesianTicks, centerToCorner, centroidOfSubpath, circleBounds, circleModule, clampRadian, clock, colorEqual, colorStringInterpolationToStr, columnCenterToEdge, columnEdgeToCenter, columnLeftToRight, columnRightToLeft, computeOffsetForlimit, configureRuntimeApplicationForApp, container, continuousTicks, contrastAccessibilityChecker, convertDomainToTickData, cornerTangents, cornerToCenter, createBrowserApp$1 as createApp, createArc, createArc3d, createArea, createBrowserApp$1 as createBrowserApp, createBrowserVRenderApp, createCanvasEventTransformer, createCircle, createColor, createComponentAnimator, createConicalGradient, createContributionProvider$1 as createContributionProvider, createEventTransformer, createGifImage, createGlyph, createGraphic$1 as createGraphic, createGroup, createImage, createImageElement$1 as createImageElement, createLine, createLottie, createMat4, createMiniappApp, createNodeApp$1 as createNodeApp, createNodeVRenderApp, createPath, createPolygon, createPyramid3d, createRect, createRect3d, createRectPath, createRichText, createShadowRoot, createStage, createStar, createSymbol, createText, createTextGraphicByType, createWrapText, cubicCalc, cubicLength, cubicPointAt, cubicSubdivide, decodeReactDom, defaultArcAllocate, defaultArcBackgroundRenderContribution, defaultArcRenderContribution, defaultArcTextureRenderContribution, defaultAreaAllocate, defaultBaseBackgroundRenderContribution, defaultBaseClipRenderAfterContribution, defaultBaseClipRenderBeforeContribution, defaultBaseTextureRenderContribution, defaultCircleAllocate, defaultCircleBackgroundRenderContribution, defaultCircleRenderContribution, defaultCircleTextureRenderContribution, defaultGraphicMemoryManager, defaultGroupBackgroundRenderContribution, defaultImageBackgroundRenderContribution, defaultImageRenderContribution, defaultLineAllocate, defaultPathAllocate, defaultRectAllocate, defaultRectBackgroundRenderContribution, defaultRectRenderContribution, defaultRectTextureRenderContribution, defaultStarBackgroundRenderContribution, defaultStarTextureRenderContribution, defaultSymbolAllocate, defaultSymbolBackgroundRenderContribution, defaultSymbolClipRangeStrokeRenderContribution, defaultSymbolRenderContribution, defaultSymbolTextureRenderContribution, defaultTextAllocate, defaultTicker, defaultTimeline, deltaXYToAngle, diagonalCenterToEdge, diagonalTopLeftToBottomRight, diff, divideCubic, drawArc, drawArcPath$1 as drawArcPath, drawAreaSegments, drawBackgroundImage, drawImageWithLayout, drawIncrementalAreaSegments, drawIncrementalSegments, drawSegments, enumCommandMap, fillVisible, findBestMorphingRotation, findConfigIndexByCursorIdx, findCursorIdxByConfigIndex, findNextGraphic, flatten_simplify, foreach, foreachAsync, fuzzyEqualNumber, genBasisSegments, genBasisTypeSegments, genLinearClosedSegments, genLinearClosedTypeSegments, genLinearSegments, genLinearTypeSegments, genMonotoneXSegments, genMonotoneXTypeSegments, genMonotoneYSegments, genMonotoneYTypeSegments, genNumberType, genStepClosedSegments, genStepSegments, genStepTypeSegments, generatorPathEasingFunc, getAttributeFromDefaultAttrList, getAxisBreakSymbolAttrs, getBackgroundImage, getCircleLabelPosition, getCirclePoints, getCircleVerticalVector, getConicGradientAt, getCurrentEnv, getDefaultCharacterConfig, getElMap, getExtraModelMatrix, getHorizontalPath, getLegacyBindingContext, getMarksByName, getModelMatrix, getNoneGroupMarksByName, getPolarAngleLabelPosition, getPolygonPath, getRichTextBounds, getRuntimeInstallerBindingContext, getRuntimeInstallerGlobal, getScaledStroke, getSizeHandlerPath, getTextAlignAttrOfVerticalDir, getTextBounds, getTextType, getTheme, getThemeFromGroup, getVerticalCoord, getVerticalPath, globalTheme, glyphModule, graphicCreator$1 as graphicCreator, graphicService, graphicUtil, hasOverlap, htmlAttributeTransform, identityMat4, imageModule, incrementalAddTo, initAllEnv, initBrowserEnv, initFeishuEnv, initHarmonyEnv, initLynxEnv, initNodeEnv, initTTEnv, initTaroEnv, initTextMeasure, initWxEnv, installBrowserEnvToApp, installBrowserPickersToApp, installDefaultGraphicsToApp, installNodeEnvToApp, installNodePickersToApp, installPoptipToApp, installRuntimeDrawContributionsToApp, installRuntimeGraphicRenderersToApp, installRuntimePickersToApp, installScrollbarToApp, interpolateColor, interpolateGradientConicalColor, interpolateGradientLinearColor, interpolateGradientRadialColor, interpolatePureColorArray, interpolatePureColorArrayToStr, intersect, isBrowserEnv, isInRange, isNoRepeatSizingMode, isNodeEnv, isPostiveXAxis, isRichText, isSvg, isVisible, isXML, jsx, labelSmartInvert, layerService, length, limitShapeInBounds, lineModule, linearDiscreteTicks, loadAllEnv, loadAllModule, loadBrowserEnv, loadFeishuEnv, loadHarmonyEnv, loadLynxEnv, loadMathPicker, loadNodeEnv, loadPoptip, loadScrollbar, loadTTEnv, loadTaroEnv, loadWxEnv, lookAt, mapToCanvasPointForCanvas, mat3Tomat4, mat4Allocate, matrixAllocate, measureTextSize, morphPath, multiToOneMorph, multiplyMat4Mat3, multiplyMat4Mat4, newThemeObj, normalize$1 as normalize, oneToMultiMorph, ortho, parsePadding, parseStroke, parseSvgPath, particleEffect, pathModule, pathToBezierCurves, point$3 as point, pointEqual, pointInterpolation, pointInterpolationHighPerformance, pointsEqual, pointsInterpolation, polarAngleAxisDiscreteTicks, polarTicks, polygonModule, preLoadAllModule, pulseWave, pyramid3dModule, quadCalc, quadLength, quadPointAt, rafBasedSto, randomOpacity, reactAttributeTransform, rect3dModule, rectFillVisible, rectModule, rectStrokeVisible, recursiveCallBinarySplit, refreshRuntimeInstallerContributions, registerAnimate, registerArc, registerArc3d, registerArc3dGraphic, registerArcDataLabel, registerArcGraphic, registerArea, registerAreaGraphic, registerCircle, registerCircleGraphic, registerCustomAnimate, registerDirectionalLight, registerFlexLayoutPlugin, registerGifGraphic, registerGifImage, registerGlobalEventTransformer, registerGlyph, registerGlyphGraphic, registerGraphic, registerGroup, registerGroupGraphic, registerHtmlAttributePlugin, registerImage, registerImageGraphic, registerLine, registerLineDataLabel, registerLineGraphic, registerMarkArcAreaAnimate, registerMarkArcLineAnimate, registerMarkAreaAnimate, registerMarkLineAnimate, registerMarkPointAnimate, registerOrthoCamera, registerPath, registerPathGraphic, registerPolygon, registerPolygonGraphic, registerPyramid3d, registerPyramid3dGraphic, registerReactAttributePlugin, registerRect, registerRect3d, registerRect3dGraphic, registerRectDataLabel, registerRectGraphic, registerRichtext, registerRichtextGraphic, registerShadowRoot, registerShadowRootGraphic, registerStar, registerStarGraphic, registerSymbol, registerSymbolDataLabel, registerSymbolGraphic, registerText, registerTextGraphic, registerViewTransform3dPlugin, registerWindowEventTransformer, registerWrapText, registerWrapTextGraphic, removeRepeatPoint, renderCommandList, resolveBackgroundDrawMode, resolveBackgroundParamsByImageSizing, resolveBackgroundPosition, resolveBackgroundSizing, resolveContainerBinding$1 as resolveContainerBinding, resolveImageMode, resolveImageRepeatMode, resolveRenderableImageSize, rewriteProto, richTextAttributeTransform, richtextModule, rippleEffect, rotateX, rotateY, rotateZ, rotationScan, roughModule, rowBottomToTop, rowCenterToEdge, rowEdgeToCenter, rowTopToBottom, runFill, runStroke, scale, scaleMat4, segments, setPoptipTheme, shouldClipImageByLayout, shouldUseMat4, shouldUseSimpleAttributeFastPath, smartInvertStrategy, snakeWave, snapLength, spiralEffect, splitArc, splitArea, splitCircle, splitLine, splitPath, splitPolygon, splitRect, splitToGrids, starModule, strCommandMap, strokeVisible, symbolModule, tan2AngleToAngle, textAttributesToStyle, textDrawOffsetX, textDrawOffsetY, textIntersect, textLayoutOffsetY, textModule, ticks, transformMat4, transformPointForCanvas, transformUtil, transitionRegistry, translate, traverseGroup, version, verticalLayout, vglobal, waitForAllSubLayers, wrapCanvas, wrapContext, xul };
package/dist/index.js CHANGED
@@ -8651,11 +8651,23 @@
8651
8651
  if (!hasAnimation) return plan;
8652
8652
  const noWorkAnimateAttr = Object.assign(Object.assign({}, null !== (_a = options.noWorkAnimateAttr) && void 0 !== _a ? _a : {}), normalizeNoAnimateAttrConfig(null === (_b = options.animateConfig) || void 0 === _b ? void 0 : _b.noAnimateAttrs)),
8653
8653
  isClear = !0 === options.isClear,
8654
- getDefaultAttribute = options.getDefaultAttribute;
8654
+ getDefaultAttribute = options.getDefaultAttribute,
8655
+ shouldSkipDefaultAttribute = options.shouldSkipDefaultAttribute,
8656
+ assignTransitionAttr = (key, value) => {
8657
+ if (noWorkAnimateAttr[key]) return plan.jumpAttrs[key] = value, void (plan.noAnimateAttrs[key] = value);
8658
+ if (isClear && void 0 === value) {
8659
+ if (null == shouldSkipDefaultAttribute ? void 0 : shouldSkipDefaultAttribute(key, targetAttrs)) return;
8660
+ plan.animateAttrs[key] = getDefaultAttribute ? getDefaultAttribute(key) : value;
8661
+ } else plan.animateAttrs[key] = value;
8662
+ };
8655
8663
  for (const key in targetAttrs) {
8656
8664
  if (!Object.prototype.hasOwnProperty.call(targetAttrs, key)) continue;
8657
- const value = targetAttrs[key];
8658
- noWorkAnimateAttr[key] ? (plan.jumpAttrs[key] = value, plan.noAnimateAttrs[key] = value) : plan.animateAttrs[key] = isClear && void 0 === value && getDefaultAttribute ? getDefaultAttribute(key) : value;
8665
+ assignTransitionAttr(key, targetAttrs[key]);
8666
+ }
8667
+ const extraAnimateAttrs = options.extraAnimateAttrs;
8668
+ if (extraAnimateAttrs) for (const key in extraAnimateAttrs) {
8669
+ const hasTargetAttr = Object.prototype.hasOwnProperty.call(targetAttrs, key);
8670
+ !Object.prototype.hasOwnProperty.call(extraAnimateAttrs, key) || hasTargetAttr && void 0 !== targetAttrs[key] || assignTransitionAttr(key, extraAnimateAttrs[key]);
8659
8671
  }
8660
8672
  return plan;
8661
8673
  }
@@ -8682,12 +8694,14 @@
8682
8694
  }), plan;
8683
8695
  }
8684
8696
  applyClearTransition(graphic, targetAttrs, hasAnimation, stateNames, options = {}) {
8685
- var _a, _b;
8697
+ var _a, _b, _c, _d;
8686
8698
  const plan = this.analyzeTransition({}, targetAttrs, stateNames, hasAnimation, {
8687
8699
  noWorkAnimateAttr: null === (_a = graphic.getNoWorkAnimateAttr) || void 0 === _a ? void 0 : _a.call(graphic),
8688
8700
  isClear: !0,
8689
8701
  getDefaultAttribute: null === (_b = graphic.getDefaultAttribute) || void 0 === _b ? void 0 : _b.bind(graphic),
8690
- animateConfig: options.animateConfig
8702
+ shouldSkipDefaultAttribute: null !== (_c = options.shouldSkipDefaultAttribute) && void 0 !== _c ? _c : null === (_d = graphic.shouldSkipStateTransitionDefaultAttribute) || void 0 === _d ? void 0 : _d.bind(graphic),
8703
+ animateConfig: options.animateConfig,
8704
+ extraAnimateAttrs: options.extraAnimateAttrs
8691
8705
  });
8692
8706
  return this.applyTransition(graphic, plan, hasAnimation, options);
8693
8707
  }
@@ -9035,6 +9049,23 @@
9035
9049
  "deep" === this.stateMergeMode && isPlainObjectValue(previousValue) && isPlainObjectValue(nextValue) ? snapshot[key] = deepMergeAttributeValue(previousValue, nextValue) : snapshot[key] = cloneAttributeValue(nextValue);
9036
9050
  }), snapshot) : snapshot;
9037
9051
  }
9052
+ buildRemovedStateAnimationAttrs(targetStateAttrs, previousResolvedStatePatch) {
9053
+ const extraAttrs = {};
9054
+ if (!previousResolvedStatePatch) return extraAttrs;
9055
+ const snapshot = this.buildStaticAttributeSnapshot(),
9056
+ staticTargetAttrs = snapshot;
9057
+ return Object.keys(previousResolvedStatePatch).forEach(key => {
9058
+ const hasTargetAttr = Object.prototype.hasOwnProperty.call(targetStateAttrs, key);
9059
+ if (hasTargetAttr && void 0 !== targetStateAttrs[key]) return;
9060
+ const assignFallbackAttr = value => {
9061
+ void 0 === value && this.shouldSkipStateTransitionDefaultAttribute(key, staticTargetAttrs) || (extraAttrs[key] = void 0 === value ? value : cloneAttributeValue(value));
9062
+ };
9063
+ if (hasTargetAttr) assignFallbackAttr(this.getStateTransitionDefaultAttribute(key, staticTargetAttrs));else if (Object.prototype.hasOwnProperty.call(snapshot, key)) {
9064
+ const snapshotValue = snapshot[key];
9065
+ assignFallbackAttr(void 0 === snapshotValue ? this.getStateTransitionDefaultAttribute(key, staticTargetAttrs) : snapshotValue);
9066
+ } else assignFallbackAttr(this.getStateTransitionDefaultAttribute(key, staticTargetAttrs));
9067
+ }), extraAttrs;
9068
+ }
9038
9069
  syncObjectToSnapshot(target, snapshot) {
9039
9070
  const delta = new Map();
9040
9071
  return new Set([...Object.keys(target), ...Object.keys(snapshot)]).forEach(key => {
@@ -9456,21 +9487,31 @@
9456
9487
  var _a, _b, _c;
9457
9488
  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;
9458
9489
  }
9459
- applyStateAttrs(attrs, stateNames, hasAnimation, isClear, animateConfig) {
9490
+ applyStateAttrs(attrs, stateNames, hasAnimation, isClear, animateConfig, extraAnimateAttrs) {
9460
9491
  const resolvedAnimateConfig = hasAnimation ? this.resolveStateAnimateConfig(animateConfig) : void 0,
9461
9492
  transitionOptions = resolvedAnimateConfig ? {
9462
- animateConfig: resolvedAnimateConfig
9493
+ animateConfig: resolvedAnimateConfig,
9494
+ extraAnimateAttrs: extraAnimateAttrs,
9495
+ shouldSkipDefaultAttribute: this.shouldSkipStateTransitionDefaultAttribute.bind(this)
9463
9496
  } : void 0;
9464
9497
  if (isClear) return void this.getStateTransitionOrchestrator().applyClearTransition(this, attrs, hasAnimation, stateNames, transitionOptions);
9465
9498
  const plan = this.getStateTransitionOrchestrator().analyzeTransition({}, attrs, stateNames, hasAnimation, {
9466
9499
  noWorkAnimateAttr: this.getNoWorkAnimateAttr(),
9467
- animateConfig: resolvedAnimateConfig
9500
+ animateConfig: resolvedAnimateConfig,
9501
+ extraAnimateAttrs: extraAnimateAttrs,
9502
+ shouldSkipDefaultAttribute: this.shouldSkipStateTransitionDefaultAttribute.bind(this)
9468
9503
  });
9469
9504
  this.getStateTransitionOrchestrator().applyTransition(this, plan, hasAnimation, transitionOptions);
9470
9505
  }
9471
9506
  updateNormalAttrs(stateAttrs) {
9472
9507
  this._deprecatedNormalAttrsView = cloneAttributeValue(this.baseAttributes);
9473
9508
  }
9509
+ getStateTransitionDefaultAttribute(key, targetAttrs) {
9510
+ return this.getDefaultAttribute(key);
9511
+ }
9512
+ shouldSkipStateTransitionDefaultAttribute(_key, _targetAttrs) {
9513
+ return !1;
9514
+ }
9474
9515
  stopStateAnimates(type = "end") {
9475
9516
  const stopAnimationState = this.stopAnimationState;
9476
9517
  if ("function" == typeof stopAnimationState) return void stopAnimationState.call(this, "state", type);
@@ -9487,13 +9528,14 @@
9487
9528
  clearStates(hasAnimation) {
9488
9529
  var _a, _b, _c;
9489
9530
  const previousStates = this.currentStates ? this.currentStates.slice() : [],
9531
+ previousResolvedStatePatch = this.resolvedStatePatch ? cloneAttributeValue(this.resolvedStatePatch) : void 0,
9490
9532
  transition = this.createStateModel().clearStates();
9491
9533
  if (!transition.changed && 0 === previousStates.length) return this.currentStates = [], this.effectiveStates = [], this.resolvedStatePatch = void 0, this.sharedStateDirty = !1, void this.clearSharedStateActiveRegistrations();
9492
9534
  const resolvedStateAttrs = cloneAttributeValue(null !== (_a = this.baseAttributes) && void 0 !== _a ? _a : {});
9493
9535
  transition.changed && !this.beforeStateUpdate(resolvedStateAttrs, previousStates, transition.states, hasAnimation, !0) || (this.currentStates = transition.states, this.effectiveStates = [], this.resolvedStatePatch = void 0, this.sharedStateDirty = !1, this.clearSharedStateActiveRegistrations(), null === (_b = getStageStatePerfMonitor(this.stage)) || void 0 === _b || _b.incrementCounter("stateCommits"), null === (_c = getStageStatePerfMonitor(this.stage)) || void 0 === _c || _c.recordEvent("state-commit", {
9494
9536
  graphicId: this._uid,
9495
9537
  targetStates: []
9496
- }), hasAnimation ? (this._syncFinalAttributeFromStaticTruth(), this.applyStateAttrs(resolvedStateAttrs, transition.states, hasAnimation, !0)) : (this.stopStateAnimates(), this._restoreAttributeFromStaticTruth({
9538
+ }), hasAnimation ? (this._syncFinalAttributeFromStaticTruth(), this.applyStateAttrs(resolvedStateAttrs, transition.states, hasAnimation, !0, void 0, this.buildRemovedStateAnimationAttrs(resolvedStateAttrs, previousResolvedStatePatch))) : (this.stopStateAnimates(), this._restoreAttributeFromStaticTruth({
9497
9539
  type: exports.AttributeUpdateType.STATE
9498
9540
  }), this._emitCustomEvent("afterStateUpdate", {
9499
9541
  type: exports.AttributeUpdateType.STATE
@@ -9515,6 +9557,7 @@
9515
9557
  var _a, _b, _c, _d, _e;
9516
9558
  if (!states.length) return void this.clearStates(hasAnimation);
9517
9559
  const previousStates = this.currentStates ? this.currentStates.slice() : [],
9560
+ previousResolvedStatePatch = this.resolvedStatePatch ? cloneAttributeValue(this.resolvedStatePatch) : void 0,
9518
9561
  stateResolveBaseAttrs = null !== (_a = this.baseAttributes) && void 0 !== _a ? _a : this.attribute,
9519
9562
  stateModel = this.createStateModel();
9520
9563
  null === (_b = this.stateEngine) || void 0 === _b || _b.setResolveContext(this, stateResolveBaseAttrs);
@@ -9525,7 +9568,7 @@
9525
9568
  this.beforeStateUpdate(resolvedStateAttrs, previousStates, transition.states, hasAnimation, !1) && (this.currentStates = transition.states, this.effectiveStates = [...effectiveStates], this.resolvedStatePatch = Object.assign({}, resolvedStateAttrs), this.sharedStateDirty = !1, this.syncSharedStateActiveRegistrations(), null === (_d = getStageStatePerfMonitor(this.stage)) || void 0 === _d || _d.incrementCounter("stateCommits"), null === (_e = getStageStatePerfMonitor(this.stage)) || void 0 === _e || _e.recordEvent("state-commit", {
9526
9569
  graphicId: this._uid,
9527
9570
  targetStates: [...transition.states]
9528
- }), hasAnimation ? (this._syncFinalAttributeFromStaticTruth(), this.applyStateAttrs(resolvedStateAttrs, transition.states, hasAnimation)) : (this.stopStateAnimates(), this._restoreAttributeFromStaticTruth({
9571
+ }), hasAnimation ? (this._syncFinalAttributeFromStaticTruth(), this.applyStateAttrs(resolvedStateAttrs, transition.states, hasAnimation, !1, void 0, this.buildRemovedStateAnimationAttrs(resolvedStateAttrs, previousResolvedStatePatch))) : (this.stopStateAnimates(), this._restoreAttributeFromStaticTruth({
9529
9572
  type: exports.AttributeUpdateType.STATE
9530
9573
  }), this._emitCustomEvent("afterStateUpdate", {
9531
9574
  type: exports.AttributeUpdateType.STATE
@@ -10957,6 +11000,52 @@
10957
11000
  needUpdateTag(key) {
10958
11001
  return super.needUpdateTag(key, RECT_UPDATE_TAG_KEY);
10959
11002
  }
11003
+ shouldSkipStateTransitionDefaultAttribute(key, targetAttrs) {
11004
+ var _a;
11005
+ const attrs = null !== (_a = null != targetAttrs ? targetAttrs : this.baseAttributes) && void 0 !== _a ? _a : this.attribute,
11006
+ hasValue = attrKey => null != attrs[attrKey],
11007
+ isNilValue = attrKey => null == attrs[attrKey];
11008
+ switch (key) {
11009
+ case "width":
11010
+ return isNilValue("width") && hasValue("x") && hasValue("x1");
11011
+ case "height":
11012
+ return isNilValue("height") && hasValue("y") && hasValue("y1");
11013
+ case "x1":
11014
+ return isNilValue("x1") && hasValue("x") && hasValue("width");
11015
+ case "y1":
11016
+ return isNilValue("y1") && hasValue("y") && hasValue("height");
11017
+ default:
11018
+ return !1;
11019
+ }
11020
+ }
11021
+ getStateTransitionDefaultAttribute(key, targetAttrs) {
11022
+ var _a;
11023
+ const attrs = null !== (_a = null != targetAttrs ? targetAttrs : this.baseAttributes) && void 0 !== _a ? _a : this.attribute,
11024
+ getNumber = attrKey => {
11025
+ const value = attrs[attrKey];
11026
+ return "number" == typeof value && Number.isFinite(value) ? value : void 0;
11027
+ },
11028
+ x = getNumber("x"),
11029
+ y = getNumber("y"),
11030
+ x1 = getNumber("x1"),
11031
+ y1 = getNumber("y1"),
11032
+ width = getNumber("width"),
11033
+ height = getNumber("height");
11034
+ switch (key) {
11035
+ case "width":
11036
+ if (null == width && null != x && null != x1) return x1 - x;
11037
+ break;
11038
+ case "height":
11039
+ if (null == height && null != y && null != y1) return y1 - y;
11040
+ break;
11041
+ case "x1":
11042
+ if (null == x1 && null != x && null != width) return x + width;
11043
+ break;
11044
+ case "y1":
11045
+ if (null == y1 && null != y && null != height) return y + height;
11046
+ }
11047
+ return super.getStateTransitionDefaultAttribute(key, targetAttrs);
11048
+ }
10960
11049
  toCustomPath() {
10961
11050
  let path = super.toCustomPath();
10962
11051
  if (path) return path;
@@ -32696,7 +32785,7 @@
32696
32785
  this.target = target;
32697
32786
  const trackerTarget = this.target;
32698
32787
  return "function" == typeof trackerTarget.trackAnimate ? trackerTarget.trackAnimate(this) : (this.target.animates || (this.target.animates = new Map()), this.target.animates.set(this.id, this)), this.onRemove(() => {
32699
- this.stop(), "function" == typeof trackerTarget.restoreStaticAttribute && trackerTarget.restoreStaticAttribute(), "function" == typeof trackerTarget.untrackAnimate ? trackerTarget.untrackAnimate(this.id) : this.target.animates.delete(this.id);
32788
+ this.stop(), this.__skipRestoreStaticAttributeOnRemove || "function" != typeof trackerTarget.restoreStaticAttribute || trackerTarget.restoreStaticAttribute(), "function" == typeof trackerTarget.untrackAnimate ? trackerTarget.untrackAnimate(this.id) : this.target.animates.delete(this.id);
32700
32789
  }), this.target.onAnimateBind && !this.slience && this.target.onAnimateBind(this), this.target.animationAttribute || (this.target.animationAttribute = {}), this;
32701
32790
  }
32702
32791
  to(props, duration = 300, easing = "linear") {
@@ -32832,7 +32921,7 @@
32832
32921
  if (nextTime >= this._startTime + this._totalDuration) {
32833
32922
  null === (_a = this._lastStep) || void 0 === _a || _a.onUpdate(!0, 1, {}), null === (_b = this._lastStep) || void 0 === _b || _b.onEnd(), this.onEnd(), this.status = exports.AnimateStatus.END;
32834
32923
  const trackerTarget = this.target;
32835
- return void ("function" == typeof (null == trackerTarget ? void 0 : trackerTarget.restoreStaticAttribute) && trackerTarget.restoreStaticAttribute());
32924
+ return "function" == typeof (null == trackerTarget ? void 0 : trackerTarget.restoreStaticAttribute) && trackerTarget.restoreStaticAttribute(), void (this.__skipRestoreStaticAttributeOnRemove = !0);
32836
32925
  }
32837
32926
  this.status = exports.AnimateStatus.RUNNING, this.currentTime <= this._startTime && this.onStart(), this.currentTime = nextTime;
32838
32927
  let cycleTime = nextTime - this._startTime,
@@ -33130,6 +33219,9 @@
33130
33219
  })), this.registerTransition("state", "*", () => ({
33131
33220
  allowTransition: !0,
33132
33221
  stopOriginalTransition: !1
33222
+ })), this.registerTransition("state", "state", () => ({
33223
+ allowTransition: !0,
33224
+ stopOriginalTransition: !0
33133
33225
  })), this.registerTransition("state", "disappear", () => ({
33134
33226
  allowTransition: !0,
33135
33227
  stopOriginalTransition: !0
@@ -33435,7 +33527,7 @@
33435
33527
  stop(type, callEnd = !0) {
33436
33528
  for (; this._animates.length > 0;) {
33437
33529
  const animate = this._animates.pop();
33438
- !1 === callEnd && (animate.status = exports.AnimateStatus.END), null == animate || animate.stop(type);
33530
+ !1 === callEnd && (animate.status = exports.AnimateStatus.END, animate.__skipRestoreStaticAttributeOnRemove = !0), null == animate || animate.stop(type);
33439
33531
  }
33440
33532
  this._animates = [], this._activeCount = 0, this._started && (this._started = !1, callEnd && this.onEnd());
33441
33533
  }
@@ -54322,7 +54414,7 @@
54322
54414
  return resolveLegacyApp().createStage(params);
54323
54415
  }
54324
54416
 
54325
- const version = "1.1.0-alpha.5";
54417
+ const version = "1.1.0-alpha.7";
54326
54418
 
54327
54419
  exports.AComponentAnimate = AComponentAnimate;
54328
54420
  exports.ACustomAnimate = ACustomAnimate;