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

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.6";
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.6", __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.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"]}
package/dist/index.es.js CHANGED
@@ -9029,6 +9029,14 @@ class Graphic extends Node {
9029
9029
  "deep" === this.stateMergeMode && isPlainObjectValue(previousValue) && isPlainObjectValue(nextValue) ? snapshot[key] = deepMergeAttributeValue(previousValue, nextValue) : snapshot[key] = cloneAttributeValue(nextValue);
9030
9030
  }), snapshot) : snapshot;
9031
9031
  }
9032
+ buildStateAnimationTargetAttrs(resolvedStateAttrs, previousResolvedStatePatch) {
9033
+ const targetAttrs = cloneAttributeValue(resolvedStateAttrs);
9034
+ if (!previousResolvedStatePatch) return targetAttrs;
9035
+ const snapshot = this.buildStaticAttributeSnapshot();
9036
+ 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;
9039
+ }
9032
9040
  syncObjectToSnapshot(target, snapshot) {
9033
9041
  const delta = new Map();
9034
9042
  return new Set([...Object.keys(target), ...Object.keys(snapshot)]).forEach(key => {
@@ -9509,6 +9517,7 @@ class Graphic extends Node {
9509
9517
  var _a, _b, _c, _d, _e;
9510
9518
  if (!states.length) return void this.clearStates(hasAnimation);
9511
9519
  const previousStates = this.currentStates ? this.currentStates.slice() : [],
9520
+ previousResolvedStatePatch = this.resolvedStatePatch ? cloneAttributeValue(this.resolvedStatePatch) : void 0,
9512
9521
  stateResolveBaseAttrs = null !== (_a = this.baseAttributes) && void 0 !== _a ? _a : this.attribute,
9513
9522
  stateModel = this.createStateModel();
9514
9523
  null === (_b = this.stateEngine) || void 0 === _b || _b.setResolveContext(this, stateResolveBaseAttrs);
@@ -9519,7 +9528,7 @@ class Graphic extends Node {
9519
9528
  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
9529
  graphicId: this._uid,
9521
9530
  targetStates: [...transition.states]
9522
- }), hasAnimation ? (this._syncFinalAttributeFromStaticTruth(), this.applyStateAttrs(resolvedStateAttrs, transition.states, hasAnimation)) : (this.stopStateAnimates(), this._restoreAttributeFromStaticTruth({
9531
+ }), hasAnimation ? (this._syncFinalAttributeFromStaticTruth(), this.applyStateAttrs(this.buildStateAnimationTargetAttrs(resolvedStateAttrs, previousResolvedStatePatch), transition.states, hasAnimation)) : (this.stopStateAnimates(), this._restoreAttributeFromStaticTruth({
9523
9532
  type: AttributeUpdateType.STATE
9524
9533
  }), this._emitCustomEvent("afterStateUpdate", {
9525
9534
  type: AttributeUpdateType.STATE
@@ -32690,7 +32699,7 @@ class Animate {
32690
32699
  this.target = target;
32691
32700
  const trackerTarget = this.target;
32692
32701
  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);
32702
+ 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
32703
  }), this.target.onAnimateBind && !this.slience && this.target.onAnimateBind(this), this.target.animationAttribute || (this.target.animationAttribute = {}), this;
32695
32704
  }
32696
32705
  to(props, duration = 300, easing = "linear") {
@@ -33124,6 +33133,9 @@ class AnimationTransitionRegistry {
33124
33133
  })), this.registerTransition("state", "*", () => ({
33125
33134
  allowTransition: !0,
33126
33135
  stopOriginalTransition: !1
33136
+ })), this.registerTransition("state", "state", () => ({
33137
+ allowTransition: !0,
33138
+ stopOriginalTransition: !0
33127
33139
  })), this.registerTransition("state", "disappear", () => ({
33128
33140
  allowTransition: !0,
33129
33141
  stopOriginalTransition: !0
@@ -33429,7 +33441,7 @@ class AnimateExecutor {
33429
33441
  stop(type, callEnd = !0) {
33430
33442
  for (; this._animates.length > 0;) {
33431
33443
  const animate = this._animates.pop();
33432
- !1 === callEnd && (animate.status = AnimateStatus.END), null == animate || animate.stop(type);
33444
+ !1 === callEnd && (animate.status = AnimateStatus.END, animate.__skipRestoreStaticAttributeOnRemove = !0), null == animate || animate.stop(type);
33433
33445
  }
33434
33446
  this._animates = [], this._activeCount = 0, this._started && (this._started = !1, callEnd && this.onEnd());
33435
33447
  }
@@ -54316,6 +54328,6 @@ function createStage(params) {
54316
54328
  return resolveLegacyApp().createStage(params);
54317
54329
  }
54318
54330
 
54319
- const version = "1.1.0-alpha.5";
54331
+ const version = "1.1.0-alpha.6";
54320
54332
 
54321
54333
  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
@@ -9035,6 +9035,14 @@
9035
9035
  "deep" === this.stateMergeMode && isPlainObjectValue(previousValue) && isPlainObjectValue(nextValue) ? snapshot[key] = deepMergeAttributeValue(previousValue, nextValue) : snapshot[key] = cloneAttributeValue(nextValue);
9036
9036
  }), snapshot) : snapshot;
9037
9037
  }
9038
+ buildStateAnimationTargetAttrs(resolvedStateAttrs, previousResolvedStatePatch) {
9039
+ const targetAttrs = cloneAttributeValue(resolvedStateAttrs);
9040
+ if (!previousResolvedStatePatch) return targetAttrs;
9041
+ const snapshot = this.buildStaticAttributeSnapshot();
9042
+ 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;
9045
+ }
9038
9046
  syncObjectToSnapshot(target, snapshot) {
9039
9047
  const delta = new Map();
9040
9048
  return new Set([...Object.keys(target), ...Object.keys(snapshot)]).forEach(key => {
@@ -9515,6 +9523,7 @@
9515
9523
  var _a, _b, _c, _d, _e;
9516
9524
  if (!states.length) return void this.clearStates(hasAnimation);
9517
9525
  const previousStates = this.currentStates ? this.currentStates.slice() : [],
9526
+ previousResolvedStatePatch = this.resolvedStatePatch ? cloneAttributeValue(this.resolvedStatePatch) : void 0,
9518
9527
  stateResolveBaseAttrs = null !== (_a = this.baseAttributes) && void 0 !== _a ? _a : this.attribute,
9519
9528
  stateModel = this.createStateModel();
9520
9529
  null === (_b = this.stateEngine) || void 0 === _b || _b.setResolveContext(this, stateResolveBaseAttrs);
@@ -9525,7 +9534,7 @@
9525
9534
  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
9535
  graphicId: this._uid,
9527
9536
  targetStates: [...transition.states]
9528
- }), hasAnimation ? (this._syncFinalAttributeFromStaticTruth(), this.applyStateAttrs(resolvedStateAttrs, transition.states, hasAnimation)) : (this.stopStateAnimates(), this._restoreAttributeFromStaticTruth({
9537
+ }), hasAnimation ? (this._syncFinalAttributeFromStaticTruth(), this.applyStateAttrs(this.buildStateAnimationTargetAttrs(resolvedStateAttrs, previousResolvedStatePatch), transition.states, hasAnimation)) : (this.stopStateAnimates(), this._restoreAttributeFromStaticTruth({
9529
9538
  type: exports.AttributeUpdateType.STATE
9530
9539
  }), this._emitCustomEvent("afterStateUpdate", {
9531
9540
  type: exports.AttributeUpdateType.STATE
@@ -32696,7 +32705,7 @@
32696
32705
  this.target = target;
32697
32706
  const trackerTarget = this.target;
32698
32707
  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);
32708
+ 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
32709
  }), this.target.onAnimateBind && !this.slience && this.target.onAnimateBind(this), this.target.animationAttribute || (this.target.animationAttribute = {}), this;
32701
32710
  }
32702
32711
  to(props, duration = 300, easing = "linear") {
@@ -33130,6 +33139,9 @@
33130
33139
  })), this.registerTransition("state", "*", () => ({
33131
33140
  allowTransition: !0,
33132
33141
  stopOriginalTransition: !1
33142
+ })), this.registerTransition("state", "state", () => ({
33143
+ allowTransition: !0,
33144
+ stopOriginalTransition: !0
33133
33145
  })), this.registerTransition("state", "disappear", () => ({
33134
33146
  allowTransition: !0,
33135
33147
  stopOriginalTransition: !0
@@ -33435,7 +33447,7 @@
33435
33447
  stop(type, callEnd = !0) {
33436
33448
  for (; this._animates.length > 0;) {
33437
33449
  const animate = this._animates.pop();
33438
- !1 === callEnd && (animate.status = exports.AnimateStatus.END), null == animate || animate.stop(type);
33450
+ !1 === callEnd && (animate.status = exports.AnimateStatus.END, animate.__skipRestoreStaticAttributeOnRemove = !0), null == animate || animate.stop(type);
33439
33451
  }
33440
33452
  this._animates = [], this._activeCount = 0, this._started && (this._started = !1, callEnd && this.onEnd());
33441
33453
  }
@@ -54322,7 +54334,7 @@
54322
54334
  return resolveLegacyApp().createStage(params);
54323
54335
  }
54324
54336
 
54325
- const version = "1.1.0-alpha.5";
54337
+ const version = "1.1.0-alpha.6";
54326
54338
 
54327
54339
  exports.AComponentAnimate = AComponentAnimate;
54328
54340
  exports.ACustomAnimate = ACustomAnimate;