@visactor/vrender 1.1.0-alpha.6 → 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.6";
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.6", __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.6\";\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,13 +9043,22 @@ 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
  }
9032
- buildStateAnimationTargetAttrs(resolvedStateAttrs, previousResolvedStatePatch) {
9033
- const targetAttrs = cloneAttributeValue(resolvedStateAttrs);
9034
- if (!previousResolvedStatePatch) return targetAttrs;
9035
- const snapshot = this.buildStaticAttributeSnapshot();
9046
+ buildRemovedStateAnimationAttrs(targetStateAttrs, previousResolvedStatePatch) {
9047
+ const extraAttrs = {};
9048
+ if (!previousResolvedStatePatch) return extraAttrs;
9049
+ const snapshot = this.buildStaticAttributeSnapshot(),
9050
+ staticTargetAttrs = snapshot;
9036
9051
  return Object.keys(previousResolvedStatePatch).forEach(key => {
9037
- Object.prototype.hasOwnProperty.call(targetAttrs, key) || (targetAttrs[key] = Object.prototype.hasOwnProperty.call(snapshot, key) ? cloneAttributeValue(snapshot[key]) : this.getDefaultAttribute(key));
9038
- }), targetAttrs;
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;
9039
9062
  }
9040
9063
  syncObjectToSnapshot(target, snapshot) {
9041
9064
  const delta = new Map();
@@ -9458,21 +9481,31 @@ class Graphic extends Node {
9458
9481
  var _a, _b, _c;
9459
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;
9460
9483
  }
9461
- applyStateAttrs(attrs, stateNames, hasAnimation, isClear, animateConfig) {
9484
+ applyStateAttrs(attrs, stateNames, hasAnimation, isClear, animateConfig, extraAnimateAttrs) {
9462
9485
  const resolvedAnimateConfig = hasAnimation ? this.resolveStateAnimateConfig(animateConfig) : void 0,
9463
9486
  transitionOptions = resolvedAnimateConfig ? {
9464
- animateConfig: resolvedAnimateConfig
9487
+ animateConfig: resolvedAnimateConfig,
9488
+ extraAnimateAttrs: extraAnimateAttrs,
9489
+ shouldSkipDefaultAttribute: this.shouldSkipStateTransitionDefaultAttribute.bind(this)
9465
9490
  } : void 0;
9466
9491
  if (isClear) return void this.getStateTransitionOrchestrator().applyClearTransition(this, attrs, hasAnimation, stateNames, transitionOptions);
9467
9492
  const plan = this.getStateTransitionOrchestrator().analyzeTransition({}, attrs, stateNames, hasAnimation, {
9468
9493
  noWorkAnimateAttr: this.getNoWorkAnimateAttr(),
9469
- animateConfig: resolvedAnimateConfig
9494
+ animateConfig: resolvedAnimateConfig,
9495
+ extraAnimateAttrs: extraAnimateAttrs,
9496
+ shouldSkipDefaultAttribute: this.shouldSkipStateTransitionDefaultAttribute.bind(this)
9470
9497
  });
9471
9498
  this.getStateTransitionOrchestrator().applyTransition(this, plan, hasAnimation, transitionOptions);
9472
9499
  }
9473
9500
  updateNormalAttrs(stateAttrs) {
9474
9501
  this._deprecatedNormalAttrsView = cloneAttributeValue(this.baseAttributes);
9475
9502
  }
9503
+ getStateTransitionDefaultAttribute(key, targetAttrs) {
9504
+ return this.getDefaultAttribute(key);
9505
+ }
9506
+ shouldSkipStateTransitionDefaultAttribute(_key, _targetAttrs) {
9507
+ return !1;
9508
+ }
9476
9509
  stopStateAnimates(type = "end") {
9477
9510
  const stopAnimationState = this.stopAnimationState;
9478
9511
  if ("function" == typeof stopAnimationState) return void stopAnimationState.call(this, "state", type);
@@ -9489,13 +9522,14 @@ class Graphic extends Node {
9489
9522
  clearStates(hasAnimation) {
9490
9523
  var _a, _b, _c;
9491
9524
  const previousStates = this.currentStates ? this.currentStates.slice() : [],
9525
+ previousResolvedStatePatch = this.resolvedStatePatch ? cloneAttributeValue(this.resolvedStatePatch) : void 0,
9492
9526
  transition = this.createStateModel().clearStates();
9493
9527
  if (!transition.changed && 0 === previousStates.length) return this.currentStates = [], this.effectiveStates = [], this.resolvedStatePatch = void 0, this.sharedStateDirty = !1, void this.clearSharedStateActiveRegistrations();
9494
9528
  const resolvedStateAttrs = cloneAttributeValue(null !== (_a = this.baseAttributes) && void 0 !== _a ? _a : {});
9495
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", {
9496
9530
  graphicId: this._uid,
9497
9531
  targetStates: []
9498
- }), 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({
9499
9533
  type: AttributeUpdateType.STATE
9500
9534
  }), this._emitCustomEvent("afterStateUpdate", {
9501
9535
  type: AttributeUpdateType.STATE
@@ -9528,7 +9562,7 @@ class Graphic extends Node {
9528
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", {
9529
9563
  graphicId: this._uid,
9530
9564
  targetStates: [...transition.states]
9531
- }), hasAnimation ? (this._syncFinalAttributeFromStaticTruth(), this.applyStateAttrs(this.buildStateAnimationTargetAttrs(resolvedStateAttrs, previousResolvedStatePatch), 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({
9532
9566
  type: AttributeUpdateType.STATE
9533
9567
  }), this._emitCustomEvent("afterStateUpdate", {
9534
9568
  type: AttributeUpdateType.STATE
@@ -10960,6 +10994,52 @@ class Rect extends Graphic {
10960
10994
  needUpdateTag(key) {
10961
10995
  return super.needUpdateTag(key, RECT_UPDATE_TAG_KEY);
10962
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
+ }
10963
11043
  toCustomPath() {
10964
11044
  let path = super.toCustomPath();
10965
11045
  if (path) return path;
@@ -32835,7 +32915,7 @@ class Animate {
32835
32915
  if (nextTime >= this._startTime + this._totalDuration) {
32836
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;
32837
32917
  const trackerTarget = this.target;
32838
- 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);
32839
32919
  }
32840
32920
  this.status = AnimateStatus.RUNNING, this.currentTime <= this._startTime && this.onStart(), this.currentTime = nextTime;
32841
32921
  let cycleTime = nextTime - this._startTime,
@@ -54328,6 +54408,6 @@ function createStage(params) {
54328
54408
  return resolveLegacyApp().createStage(params);
54329
54409
  }
54330
54410
 
54331
- const version = "1.1.0-alpha.6";
54411
+ const version = "1.1.0-alpha.7";
54332
54412
 
54333
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,13 +9049,22 @@
9035
9049
  "deep" === this.stateMergeMode && isPlainObjectValue(previousValue) && isPlainObjectValue(nextValue) ? snapshot[key] = deepMergeAttributeValue(previousValue, nextValue) : snapshot[key] = cloneAttributeValue(nextValue);
9036
9050
  }), snapshot) : snapshot;
9037
9051
  }
9038
- buildStateAnimationTargetAttrs(resolvedStateAttrs, previousResolvedStatePatch) {
9039
- const targetAttrs = cloneAttributeValue(resolvedStateAttrs);
9040
- if (!previousResolvedStatePatch) return targetAttrs;
9041
- const snapshot = this.buildStaticAttributeSnapshot();
9052
+ buildRemovedStateAnimationAttrs(targetStateAttrs, previousResolvedStatePatch) {
9053
+ const extraAttrs = {};
9054
+ if (!previousResolvedStatePatch) return extraAttrs;
9055
+ const snapshot = this.buildStaticAttributeSnapshot(),
9056
+ staticTargetAttrs = snapshot;
9042
9057
  return Object.keys(previousResolvedStatePatch).forEach(key => {
9043
- Object.prototype.hasOwnProperty.call(targetAttrs, key) || (targetAttrs[key] = Object.prototype.hasOwnProperty.call(snapshot, key) ? cloneAttributeValue(snapshot[key]) : this.getDefaultAttribute(key));
9044
- }), targetAttrs;
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;
9045
9068
  }
9046
9069
  syncObjectToSnapshot(target, snapshot) {
9047
9070
  const delta = new Map();
@@ -9464,21 +9487,31 @@
9464
9487
  var _a, _b, _c;
9465
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;
9466
9489
  }
9467
- applyStateAttrs(attrs, stateNames, hasAnimation, isClear, animateConfig) {
9490
+ applyStateAttrs(attrs, stateNames, hasAnimation, isClear, animateConfig, extraAnimateAttrs) {
9468
9491
  const resolvedAnimateConfig = hasAnimation ? this.resolveStateAnimateConfig(animateConfig) : void 0,
9469
9492
  transitionOptions = resolvedAnimateConfig ? {
9470
- animateConfig: resolvedAnimateConfig
9493
+ animateConfig: resolvedAnimateConfig,
9494
+ extraAnimateAttrs: extraAnimateAttrs,
9495
+ shouldSkipDefaultAttribute: this.shouldSkipStateTransitionDefaultAttribute.bind(this)
9471
9496
  } : void 0;
9472
9497
  if (isClear) return void this.getStateTransitionOrchestrator().applyClearTransition(this, attrs, hasAnimation, stateNames, transitionOptions);
9473
9498
  const plan = this.getStateTransitionOrchestrator().analyzeTransition({}, attrs, stateNames, hasAnimation, {
9474
9499
  noWorkAnimateAttr: this.getNoWorkAnimateAttr(),
9475
- animateConfig: resolvedAnimateConfig
9500
+ animateConfig: resolvedAnimateConfig,
9501
+ extraAnimateAttrs: extraAnimateAttrs,
9502
+ shouldSkipDefaultAttribute: this.shouldSkipStateTransitionDefaultAttribute.bind(this)
9476
9503
  });
9477
9504
  this.getStateTransitionOrchestrator().applyTransition(this, plan, hasAnimation, transitionOptions);
9478
9505
  }
9479
9506
  updateNormalAttrs(stateAttrs) {
9480
9507
  this._deprecatedNormalAttrsView = cloneAttributeValue(this.baseAttributes);
9481
9508
  }
9509
+ getStateTransitionDefaultAttribute(key, targetAttrs) {
9510
+ return this.getDefaultAttribute(key);
9511
+ }
9512
+ shouldSkipStateTransitionDefaultAttribute(_key, _targetAttrs) {
9513
+ return !1;
9514
+ }
9482
9515
  stopStateAnimates(type = "end") {
9483
9516
  const stopAnimationState = this.stopAnimationState;
9484
9517
  if ("function" == typeof stopAnimationState) return void stopAnimationState.call(this, "state", type);
@@ -9495,13 +9528,14 @@
9495
9528
  clearStates(hasAnimation) {
9496
9529
  var _a, _b, _c;
9497
9530
  const previousStates = this.currentStates ? this.currentStates.slice() : [],
9531
+ previousResolvedStatePatch = this.resolvedStatePatch ? cloneAttributeValue(this.resolvedStatePatch) : void 0,
9498
9532
  transition = this.createStateModel().clearStates();
9499
9533
  if (!transition.changed && 0 === previousStates.length) return this.currentStates = [], this.effectiveStates = [], this.resolvedStatePatch = void 0, this.sharedStateDirty = !1, void this.clearSharedStateActiveRegistrations();
9500
9534
  const resolvedStateAttrs = cloneAttributeValue(null !== (_a = this.baseAttributes) && void 0 !== _a ? _a : {});
9501
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", {
9502
9536
  graphicId: this._uid,
9503
9537
  targetStates: []
9504
- }), 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({
9505
9539
  type: exports.AttributeUpdateType.STATE
9506
9540
  }), this._emitCustomEvent("afterStateUpdate", {
9507
9541
  type: exports.AttributeUpdateType.STATE
@@ -9534,7 +9568,7 @@
9534
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", {
9535
9569
  graphicId: this._uid,
9536
9570
  targetStates: [...transition.states]
9537
- }), hasAnimation ? (this._syncFinalAttributeFromStaticTruth(), this.applyStateAttrs(this.buildStateAnimationTargetAttrs(resolvedStateAttrs, previousResolvedStatePatch), 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({
9538
9572
  type: exports.AttributeUpdateType.STATE
9539
9573
  }), this._emitCustomEvent("afterStateUpdate", {
9540
9574
  type: exports.AttributeUpdateType.STATE
@@ -10966,6 +11000,52 @@
10966
11000
  needUpdateTag(key) {
10967
11001
  return super.needUpdateTag(key, RECT_UPDATE_TAG_KEY);
10968
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
+ }
10969
11049
  toCustomPath() {
10970
11050
  let path = super.toCustomPath();
10971
11051
  if (path) return path;
@@ -32841,7 +32921,7 @@
32841
32921
  if (nextTime >= this._startTime + this._totalDuration) {
32842
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;
32843
32923
  const trackerTarget = this.target;
32844
- 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);
32845
32925
  }
32846
32926
  this.status = exports.AnimateStatus.RUNNING, this.currentTime <= this._startTime && this.onStart(), this.currentTime = nextTime;
32847
32927
  let cycleTime = nextTime - this._startTime,
@@ -54334,7 +54414,7 @@
54334
54414
  return resolveLegacyApp().createStage(params);
54335
54415
  }
54336
54416
 
54337
- const version = "1.1.0-alpha.6";
54417
+ const version = "1.1.0-alpha.7";
54338
54418
 
54339
54419
  exports.AComponentAnimate = AComponentAnimate;
54340
54420
  exports.ACustomAnimate = ACustomAnimate;