@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.
- package/cjs/allocator/bounds-allocate.js +1 -2
- package/cjs/animate/config.js +2 -1
- package/cjs/color-string/colorName.js +1 -1
- package/cjs/color-string/index.js +1 -1
- package/cjs/color-string/interpolate.js +1 -1
- package/cjs/color-string/store.js +1 -1
- package/cjs/common/bounds-context.js +2 -1
- package/cjs/common/contribution-store-state.js +1 -2
- package/cjs/common/performance-raf.js +2 -1
- package/cjs/common/render-command-list.js +1 -2
- package/cjs/common/simplify.js +1 -1
- package/cjs/common/sort.js +1 -1
- package/cjs/common/split-path.js +1 -1
- package/cjs/common/text.js +1 -1
- package/cjs/graphic/graphic.d.ts +1 -0
- package/cjs/graphic/graphic.js +9 -4
- package/cjs/graphic/graphic.js.map +1 -1
- package/dist/index.es.js +21 -0
- package/es/allocator/bounds-allocate.js +1 -2
- package/es/animate/config.js +2 -1
- package/es/color-string/colorName.js +1 -1
- package/es/color-string/index.js +1 -1
- package/es/color-string/interpolate.js +1 -1
- package/es/color-string/store.js +1 -1
- package/es/common/bounds-context.js +2 -1
- package/es/common/contribution-store-state.js +1 -2
- package/es/common/performance-raf.js +2 -1
- package/es/common/render-command-list.js +1 -2
- package/es/common/simplify.js +1 -1
- package/es/common/sort.js +1 -1
- package/es/common/split-path.js +1 -1
- package/es/common/text.js +1 -1
- package/es/graphic/graphic.d.ts +1 -0
- package/es/graphic/graphic.js +9 -4
- package/es/graphic/graphic.js.map +1 -1
- package/package.json +1 -1
|
@@ -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;
|
package/cjs/animate/config.js
CHANGED
|
@@ -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
|
|
@@ -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;
|
package/cjs/common/simplify.js
CHANGED
|
@@ -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
|
package/cjs/common/sort.js
CHANGED
|
@@ -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
|
package/cjs/common/split-path.js
CHANGED
package/cjs/common/text.js
CHANGED
|
@@ -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
|
package/cjs/graphic/graphic.d.ts
CHANGED
|
@@ -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;
|
package/cjs/graphic/graphic.js
CHANGED
|
@@ -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;
|