@visactor/vrender-core 1.1.8-alpha.1 → 1.1.8

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.
@@ -34,5 +34,4 @@ class DefaultBoundsAllocate {
34
34
  }
35
35
  }
36
36
 
37
- exports.DefaultBoundsAllocate = DefaultBoundsAllocate, exports.boundsAllocate = new DefaultBoundsAllocate;
38
- //# sourceMappingURL=bounds-allocate.js.map
37
+ exports.DefaultBoundsAllocate = DefaultBoundsAllocate, exports.boundsAllocate = new DefaultBoundsAllocate;
@@ -5,4 +5,5 @@ Object.defineProperty(exports, "__esModule", {
5
5
  }), exports.DefaultStateAnimateConfig = void 0, exports.DefaultStateAnimateConfig = {
6
6
  duration: 200,
7
7
  easing: "cubicOut"
8
- };
8
+ };
9
+ //# sourceMappingURL=config.js.map
@@ -10,4 +10,4 @@ Object.keys(vutils_1.DEFAULT_COLORS).forEach((k => {
10
10
  const c = vutils_1.DEFAULT_COLORS[k];
11
11
  parsedColors[k] = [ c >> 16 & 255, c >> 8 & 255, 255 & c ];
12
12
  })), exports.default = parsedColors;
13
- //# sourceMappingURL=colorName.js.map
13
+ //# sourceMappingURL=colorName.js.map
@@ -19,4 +19,4 @@ Object.defineProperty(exports, "__esModule", {
19
19
  value: !0
20
20
  }), __exportStar(require("./interpolate"), exports), __exportStar(require("./store"), exports),
21
21
  __exportStar(require("./colorName"), exports);
22
- //# sourceMappingURL=index.js.map
22
+ //# sourceMappingURL=index.js.map
@@ -117,4 +117,4 @@ function colorStringInterpolationToStr(fromColor, toColor, ratio) {
117
117
  }
118
118
 
119
119
  exports.colorStringInterpolationToStr = colorStringInterpolationToStr;
120
- //# sourceMappingURL=interpolate.js.map
120
+ //# sourceMappingURL=interpolate.js.map
@@ -51,4 +51,4 @@ class ColorStore {
51
51
  }
52
52
 
53
53
  exports.ColorStore = ColorStore, ColorStore.store255 = {}, ColorStore.store1 = {};
54
- //# sourceMappingURL=store.js.map
54
+ //# sourceMappingURL=store.js.map
@@ -56,4 +56,5 @@ class BoundsContext {
56
56
  release(...params) {}
57
57
  }
58
58
 
59
- exports.BoundsContext = BoundsContext;
59
+ exports.BoundsContext = BoundsContext;
60
+ //# sourceMappingURL=bounds-context.js.map
@@ -16,5 +16,4 @@ Object.defineProperty(exports, "__esModule", {
16
16
  value: !0
17
17
  }), exports.getContributionStoreState = exports.CONTRIBUTION_STORE_STATE_SYMBOL = void 0,
18
18
  exports.CONTRIBUTION_STORE_STATE_SYMBOL = Symbol.for("@visactor/vrender-core/contribution-store-state"),
19
- exports.getContributionStoreState = getContributionStoreState;
20
- //# sourceMappingURL=contribution-store-state.js.map
19
+ exports.getContributionStoreState = getContributionStoreState;
@@ -33,4 +33,5 @@ class PerformanceRAF {
33
33
  }
34
34
  }
35
35
 
36
- exports.PerformanceRAF = PerformanceRAF;
36
+ exports.PerformanceRAF = PerformanceRAF;
37
+ //# sourceMappingURL=performance-raf.js.map
@@ -13,5 +13,4 @@ function renderCommandList(commandList, context, x = 0, y = 0, sx = 1, sy = 1, z
13
13
  }
14
14
  }
15
15
 
16
- exports.renderCommandList = renderCommandList;
17
- //# sourceMappingURL=render-command-list.js.map
16
+ exports.renderCommandList = renderCommandList;
@@ -36,4 +36,4 @@ function flatten_simplify(points, tolerance, highestQuality) {
36
36
  Object.defineProperty(exports, "__esModule", {
37
37
  value: !0
38
38
  }), exports.flatten_simplify = void 0, exports.flatten_simplify = flatten_simplify;
39
- //# sourceMappingURL=simplify.js.map
39
+ //# sourceMappingURL=simplify.js.map
@@ -101,4 +101,4 @@ Object.defineProperty(exports, "__esModule", {
101
101
  value: !0
102
102
  }), exports.findNextGraphic = exports.foreachAsync = exports.foreach = void 0, exports.foreach = foreach,
103
103
  exports.foreachAsync = foreachAsync, exports.findNextGraphic = findNextGraphic;
104
- //# sourceMappingURL=sort.js.map
104
+ //# sourceMappingURL=sort.js.map
@@ -269,4 +269,4 @@ const splitPath = (path, count) => {
269
269
  };
270
270
 
271
271
  exports.splitPath = splitPath;
272
- //# sourceMappingURL=split-path.js.map
272
+ //# sourceMappingURL=split-path.js.map
@@ -34,4 +34,4 @@ function textAttributesToStyle(attrs) {
34
34
 
35
35
  exports.textDrawOffsetY = textDrawOffsetY, exports.textDrawOffsetX = textDrawOffsetX,
36
36
  exports.textLayoutOffsetY = textLayoutOffsetY, exports.textAttributesToStyle = textAttributesToStyle;
37
- //# sourceMappingURL=text.js.map
37
+ //# sourceMappingURL=text.js.map
@@ -262,6 +262,7 @@ declare abstract class GraphicImpl<T extends Partial<IGraphicAttribute> = Partia
262
262
  shouldRefreshSameStatePatch: boolean;
263
263
  };
264
264
  protected sameStatePatches(left?: Partial<T>, right?: Partial<T>): boolean;
265
+ protected hasStatePatch(patch?: Partial<T>): boolean;
265
266
  protected commitSameStatePatchRefresh(states: string[], hasAnimation?: boolean, animateSameStatePatchChange?: boolean): void;
266
267
  protected resolveStateAnimateConfig(animateConfig?: IAnimateConfig): any;
267
268
  applyStateAttrs(attrs: Partial<T>, stateNames: string[], hasAnimation?: boolean, isClear?: boolean, animateConfig?: IAnimateConfig, extraAnimateAttrs?: Partial<T>, stateTransitionTargetAttrs?: Partial<T>): void;
@@ -963,6 +963,11 @@ class GraphicImpl extends node_tree_1.Node {
963
963
  }
964
964
  return !0;
965
965
  }
966
+ hasStatePatch(patch) {
967
+ if (!patch) return !1;
968
+ for (const key in patch) if (Object.prototype.hasOwnProperty.call(patch, key)) return !0;
969
+ return !1;
970
+ }
966
971
  commitSameStatePatchRefresh(states, hasAnimation, animateSameStatePatchChange = !1) {
967
972
  var _a;
968
973
  const previousStates = null !== (_a = this.currentStates) && void 0 !== _a ? _a : EMPTY_STATE_NAMES, previousResolvedStatePatch = this.resolvedStatePatch, {transition: transition, effectiveStates: effectiveStates, resolvedStateAttrs: resolvedStateAttrs} = this.resolveGraphicStateTransition(states, !0), patchChanged = !this.sameStatePatches(previousResolvedStatePatch, resolvedStateAttrs);
@@ -1026,7 +1031,7 @@ class GraphicImpl extends node_tree_1.Node {
1026
1031
  const resolvedStateAttrs = hasAnimation || this.hasCustomEvent("beforeStateUpdate") ? cloneAttributeValue(null !== (_b = this.baseAttributes) && void 0 !== _b ? _b : {}) : null !== (_c = this.baseAttributes) && void 0 !== _c ? _c : {};
1027
1032
  if (!transition.changed || this.beforeStateUpdate(resolvedStateAttrs, previousStates, transition.states, hasAnimation, !0)) if (this.currentStates = transition.states,
1028
1033
  this.effectiveStates = [], this.resolvedStatePatch = void 0, this.sharedStateDirty = !1,
1029
- this.clearSharedStateActiveRegistrations(), hasAnimation) {
1034
+ this.clearSharedStateActiveRegistrations(), this.attributeMayContainTransientAttrs || this.hasStatePatch(previousResolvedStatePatch)) if (hasAnimation) {
1030
1035
  this._syncFinalAttributeFromStaticTruth();
1031
1036
  const removedStateAnimationAttrs = this.buildRemovedStateAnimationAttrs(resolvedStateAttrs, previousResolvedStatePatch);
1032
1037
  this.applyStateAttrs(resolvedStateAttrs, transition.states, hasAnimation, !0, void 0, null == removedStateAnimationAttrs ? void 0 : removedStateAnimationAttrs.extraAttrs, null == removedStateAnimationAttrs ? void 0 : removedStateAnimationAttrs.stateTransitionTargetAttrs);
@@ -1034,7 +1039,7 @@ class GraphicImpl extends node_tree_1.Node {
1034
1039
  type: enums_1.AttributeUpdateType.STATE
1035
1040
  }) : this.restoreAttributeFromStatePatchDelta(previousResolvedStatePatch, void 0, {
1036
1041
  type: enums_1.AttributeUpdateType.STATE
1037
- }), this.emitStateUpdateEvent();
1042
+ }), this.emitStateUpdateEvent(); else this.emitStateUpdateEvent();
1038
1043
  }
1039
1044
  removeState(stateName, hasAnimation) {
1040
1045
  const transition = this.resolveRemoveStateTransition(stateName);
@@ -1065,7 +1070,7 @@ class GraphicImpl extends node_tree_1.Node {
1065
1070
  const previousStates = null !== (_a = this.currentStates) && void 0 !== _a ? _a : EMPTY_STATE_NAMES, previousResolvedStatePatch = this.resolvedStatePatch, {transition: transition, effectiveStates: effectiveStates, resolvedStateAttrs: resolvedStateAttrs} = this.resolveGraphicStateTransition(states);
1066
1071
  if ((transition.changed || !this.sameStateNames(previousStates, transition.states)) && this.beforeStateUpdate(resolvedStateAttrs, previousStates, transition.states, hasAnimation, !1)) if (this.currentStates = transition.states,
1067
1072
  this.effectiveStates = [ ...effectiveStates ], this.resolvedStatePatch = resolvedStateAttrs,
1068
- this.sharedStateDirty = !1, this.syncSharedStateActiveRegistrations(), hasAnimation) {
1073
+ this.sharedStateDirty = !1, this.syncSharedStateActiveRegistrations(), this.attributeMayContainTransientAttrs || this.hasStatePatch(previousResolvedStatePatch) || this.hasStatePatch(resolvedStateAttrs)) if (hasAnimation) {
1069
1074
  this._syncFinalAttributeFromStaticTruth();
1070
1075
  const removedStateAnimationAttrs = this.buildRemovedStateAnimationAttrs(resolvedStateAttrs, previousResolvedStatePatch);
1071
1076
  this.applyStateAttrs(resolvedStateAttrs, transition.states, hasAnimation, !1, void 0, null == removedStateAnimationAttrs ? void 0 : removedStateAnimationAttrs.extraAttrs, null == removedStateAnimationAttrs ? void 0 : removedStateAnimationAttrs.stateTransitionTargetAttrs);
@@ -1073,7 +1078,7 @@ class GraphicImpl extends node_tree_1.Node {
1073
1078
  type: enums_1.AttributeUpdateType.STATE
1074
1079
  }) : this.restoreAttributeFromStatePatchDelta(previousResolvedStatePatch, this.resolvedStatePatch, {
1075
1080
  type: enums_1.AttributeUpdateType.STATE
1076
- }), this.emitStateUpdateEvent();
1081
+ }), this.emitStateUpdateEvent(); else this.emitStateUpdateEvent();
1077
1082
  }
1078
1083
  invalidateResolver() {
1079
1084
  var _a, _b;