@visactor/vrender-kits 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.
@@ -16,4 +16,4 @@ function createModule(CanvasConstructor, ContextConstructor) {
16
16
  }
17
17
 
18
18
  exports.createModule = createModule;
19
- //# sourceMappingURL=create-canvas-module.js.map
19
+ //# sourceMappingURL=create-canvas-module.js.map
@@ -45,4 +45,4 @@ exports.loadAllCavnvas = loadAllCavnvas, exports.loadBrowserCanvas = loadBrowser
45
45
  exports.loadFeishuCanvas = loadFeishuCanvas, exports.loadLynxCanvas = loadLynxCanvas,
46
46
  exports.loadNodeCanvas = loadNodeCanvas, exports.loadTaroCanvas = loadTaroCanvas,
47
47
  exports.loadTTCanvas = loadTTCanvas, exports.loadWxCanvas = loadWxCanvas;
48
- //# sourceMappingURL=modules.js.map
48
+ //# sourceMappingURL=modules.js.map
@@ -79,4 +79,4 @@ class CanvasWrapEnableWH {
79
79
  }
80
80
 
81
81
  exports.CanvasWrapEnableWH = CanvasWrapEnableWH;
82
- //# sourceMappingURL=canvas-wrap.js.map
82
+ //# sourceMappingURL=canvas-wrap.js.map
@@ -101,4 +101,4 @@ class FeishuEnvContribution extends vrender_core_1.BaseEnvContribution {
101
101
  }
102
102
 
103
103
  exports.FeishuEnvContribution = FeishuEnvContribution;
104
- //# sourceMappingURL=feishu-contribution.js.map
104
+ //# sourceMappingURL=feishu-contribution.js.map
@@ -58,4 +58,5 @@ function createLottie(attributes) {
58
58
  }
59
59
 
60
60
  exports.Lottie = Lottie, Lottie.NOWORK_ANIMATE_ATTR = vrender_core_1.NOWORK_ANIMATE_ATTR,
61
- exports.createLottie = createLottie;
61
+ exports.createLottie = createLottie;
62
+ //# sourceMappingURL=Lottie.js.map
@@ -212,5 +212,4 @@ exports.installTaroEnvToApp = installTaroEnvToApp, exports.installFeishuEnvToApp
212
212
  exports.installTTEnvToApp = installTTEnvToApp, exports.installWxEnvToApp = installWxEnvToApp,
213
213
  exports.installLynxEnvToApp = installLynxEnvToApp, exports.installHarmonyEnvToApp = installHarmonyEnvToApp,
214
214
  exports.installDefaultGraphicsToApp = installDefaultGraphicsToApp, exports.installBrowserPickersToApp = installBrowserPickersToApp,
215
- exports.installNodePickersToApp = installNodePickersToApp, exports.installMathPickersToApp = installMathPickersToApp;
216
- //# sourceMappingURL=app.js.map
215
+ exports.installNodePickersToApp = installNodePickersToApp, exports.installMathPickersToApp = installMathPickersToApp;
@@ -6,4 +6,5 @@ Object.defineProperty(exports, "__esModule", {
6
6
 
7
7
  const env_1 = require("@visactor/vrender-core/env");
8
8
 
9
- exports.browser = (0, env_1.isBrowserEnv)();
9
+ exports.browser = (0, env_1.isBrowserEnv)();
10
+ //# sourceMappingURL=env.js.map
@@ -16,5 +16,4 @@ function _registerCircle() {
16
16
  circle_module_2.bindCircleMathPickerContribution)(legacyContext);
17
17
  }
18
18
 
19
- _registerCircle.__loaded = !1, exports.registerCircle = _registerCircle;
20
- //# sourceMappingURL=register-circle.js.map
19
+ _registerCircle.__loaded = !1, exports.registerCircle = _registerCircle;
@@ -10,4 +10,5 @@ function _registerShadowRoot() {
10
10
  _registerShadowRoot.__loaded || (_registerShadowRoot.__loaded = !0, (0, graphic_1.registerShadowRootGraphic)());
11
11
  }
12
12
 
13
- _registerShadowRoot.__loaded = !1, exports.registerShadowRoot = _registerShadowRoot;
13
+ _registerShadowRoot.__loaded = !1, exports.registerShadowRoot = _registerShadowRoot;
14
+ //# sourceMappingURL=register-shadowRoot.js.map
@@ -10,5 +10,4 @@ function _registerWrapText() {
10
10
  _registerWrapText.__loaded || (_registerWrapText.__loaded = !0, (0, graphic_1.registerWrapTextGraphic)());
11
11
  }
12
12
 
13
- _registerWrapText.__loaded = !1, exports.registerWrapText = _registerWrapText;
14
- //# sourceMappingURL=register-wraptext.js.map
13
+ _registerWrapText.__loaded = !1, exports.registerWrapText = _registerWrapText;
package/dist/index.es.js CHANGED
@@ -9465,6 +9465,11 @@ class GraphicImpl extends Node {
9465
9465
  }
9466
9466
  return !0;
9467
9467
  }
9468
+ hasStatePatch(patch) {
9469
+ if (!patch) return !1;
9470
+ for (const key in patch) if (Object.prototype.hasOwnProperty.call(patch, key)) return !0;
9471
+ return !1;
9472
+ }
9468
9473
  commitSameStatePatchRefresh(states, hasAnimation, animateSameStatePatchChange = !1) {
9469
9474
  var _a;
9470
9475
  const previousStates = null !== (_a = this.currentStates) && void 0 !== _a ? _a : EMPTY_STATE_NAMES,
@@ -9532,15 +9537,17 @@ class GraphicImpl extends Node {
9532
9537
  transition = this.resolveClearStatesTransition();
9533
9538
  if (!transition.changed && 0 === previousStates.length) return this.currentStates = [], this.effectiveStates = [], this.resolvedStatePatch = void 0, this.sharedStateDirty = !1, void this.clearSharedStateActiveRegistrations();
9534
9539
  const resolvedStateAttrs = hasAnimation || this.hasCustomEvent("beforeStateUpdate") ? cloneAttributeValue(null !== (_b = this.baseAttributes) && void 0 !== _b ? _b : {}) : null !== (_c = this.baseAttributes) && void 0 !== _c ? _c : {};
9535
- if (!transition.changed || this.beforeStateUpdate(resolvedStateAttrs, previousStates, transition.states, hasAnimation, !0)) if (this.currentStates = transition.states, this.effectiveStates = [], this.resolvedStatePatch = void 0, this.sharedStateDirty = !1, this.clearSharedStateActiveRegistrations(), hasAnimation) {
9536
- this._syncFinalAttributeFromStaticTruth();
9537
- const removedStateAnimationAttrs = this.buildRemovedStateAnimationAttrs(resolvedStateAttrs, previousResolvedStatePatch);
9538
- this.applyStateAttrs(resolvedStateAttrs, transition.states, hasAnimation, !0, void 0, null == removedStateAnimationAttrs ? void 0 : removedStateAnimationAttrs.extraAttrs, null == removedStateAnimationAttrs ? void 0 : removedStateAnimationAttrs.stateTransitionTargetAttrs);
9539
- } else this.stopStateAnimates(), this.attributeMayContainTransientAttrs ? this._restoreAttributeFromStaticTruth({
9540
- type: AttributeUpdateType.STATE
9541
- }) : this.restoreAttributeFromStatePatchDelta(previousResolvedStatePatch, void 0, {
9542
- type: AttributeUpdateType.STATE
9543
- }), this.emitStateUpdateEvent();
9540
+ if (!transition.changed || this.beforeStateUpdate(resolvedStateAttrs, previousStates, transition.states, hasAnimation, !0)) if (this.currentStates = transition.states, this.effectiveStates = [], this.resolvedStatePatch = void 0, this.sharedStateDirty = !1, this.clearSharedStateActiveRegistrations(), this.attributeMayContainTransientAttrs || this.hasStatePatch(previousResolvedStatePatch)) {
9541
+ if (hasAnimation) {
9542
+ this._syncFinalAttributeFromStaticTruth();
9543
+ const removedStateAnimationAttrs = this.buildRemovedStateAnimationAttrs(resolvedStateAttrs, previousResolvedStatePatch);
9544
+ this.applyStateAttrs(resolvedStateAttrs, transition.states, hasAnimation, !0, void 0, null == removedStateAnimationAttrs ? void 0 : removedStateAnimationAttrs.extraAttrs, null == removedStateAnimationAttrs ? void 0 : removedStateAnimationAttrs.stateTransitionTargetAttrs);
9545
+ } else this.stopStateAnimates(), this.attributeMayContainTransientAttrs ? this._restoreAttributeFromStaticTruth({
9546
+ type: AttributeUpdateType.STATE
9547
+ }) : this.restoreAttributeFromStatePatchDelta(previousResolvedStatePatch, void 0, {
9548
+ type: AttributeUpdateType.STATE
9549
+ }), this.emitStateUpdateEvent();
9550
+ } else this.emitStateUpdateEvent();
9544
9551
  }
9545
9552
  removeState(stateName, hasAnimation) {
9546
9553
  const transition = this.resolveRemoveStateTransition(stateName);
@@ -9581,15 +9588,17 @@ class GraphicImpl extends Node {
9581
9588
  effectiveStates: effectiveStates,
9582
9589
  resolvedStateAttrs: resolvedStateAttrs
9583
9590
  } = this.resolveGraphicStateTransition(states);
9584
- if ((transition.changed || !this.sameStateNames(previousStates, transition.states)) && this.beforeStateUpdate(resolvedStateAttrs, previousStates, transition.states, hasAnimation, !1)) if (this.currentStates = transition.states, this.effectiveStates = [...effectiveStates], this.resolvedStatePatch = resolvedStateAttrs, this.sharedStateDirty = !1, this.syncSharedStateActiveRegistrations(), hasAnimation) {
9585
- this._syncFinalAttributeFromStaticTruth();
9586
- const removedStateAnimationAttrs = this.buildRemovedStateAnimationAttrs(resolvedStateAttrs, previousResolvedStatePatch);
9587
- this.applyStateAttrs(resolvedStateAttrs, transition.states, hasAnimation, !1, void 0, null == removedStateAnimationAttrs ? void 0 : removedStateAnimationAttrs.extraAttrs, null == removedStateAnimationAttrs ? void 0 : removedStateAnimationAttrs.stateTransitionTargetAttrs);
9588
- } else this.stopStateAnimates(), this.attributeMayContainTransientAttrs ? this._restoreAttributeFromStaticTruth({
9589
- type: AttributeUpdateType.STATE
9590
- }) : this.restoreAttributeFromStatePatchDelta(previousResolvedStatePatch, this.resolvedStatePatch, {
9591
- type: AttributeUpdateType.STATE
9592
- }), this.emitStateUpdateEvent();
9591
+ if ((transition.changed || !this.sameStateNames(previousStates, transition.states)) && this.beforeStateUpdate(resolvedStateAttrs, previousStates, transition.states, hasAnimation, !1)) if (this.currentStates = transition.states, this.effectiveStates = [...effectiveStates], this.resolvedStatePatch = resolvedStateAttrs, this.sharedStateDirty = !1, this.syncSharedStateActiveRegistrations(), this.attributeMayContainTransientAttrs || this.hasStatePatch(previousResolvedStatePatch) || this.hasStatePatch(resolvedStateAttrs)) {
9592
+ if (hasAnimation) {
9593
+ this._syncFinalAttributeFromStaticTruth();
9594
+ const removedStateAnimationAttrs = this.buildRemovedStateAnimationAttrs(resolvedStateAttrs, previousResolvedStatePatch);
9595
+ this.applyStateAttrs(resolvedStateAttrs, transition.states, hasAnimation, !1, void 0, null == removedStateAnimationAttrs ? void 0 : removedStateAnimationAttrs.extraAttrs, null == removedStateAnimationAttrs ? void 0 : removedStateAnimationAttrs.stateTransitionTargetAttrs);
9596
+ } else this.stopStateAnimates(), this.attributeMayContainTransientAttrs ? this._restoreAttributeFromStaticTruth({
9597
+ type: AttributeUpdateType.STATE
9598
+ }) : this.restoreAttributeFromStatePatchDelta(previousResolvedStatePatch, this.resolvedStatePatch, {
9599
+ type: AttributeUpdateType.STATE
9600
+ }), this.emitStateUpdateEvent();
9601
+ } else this.emitStateUpdateEvent();
9593
9602
  }
9594
9603
  invalidateResolver() {
9595
9604
  var _a, _b;
@@ -8,4 +8,4 @@ export function createModule(CanvasConstructor, ContextConstructor) {
8
8
  hasContextFactory || bindingContainer.bind(Context2dFactory).toDynamicValue((() => (params, dpr) => new ContextConstructor(params, dpr))).whenTargetNamed(ContextConstructor.env);
9
9
  };
10
10
  }
11
- //# sourceMappingURL=create-canvas-module.js.map
11
+ //# sourceMappingURL=create-canvas-module.js.map
@@ -45,4 +45,4 @@ export function loadTTCanvas(container) {
45
45
  export function loadWxCanvas(container) {
46
46
  bindWxCanvasModules(container);
47
47
  }
48
- //# sourceMappingURL=modules.js.map
48
+ //# sourceMappingURL=modules.js.map
@@ -69,4 +69,4 @@ export class CanvasWrapEnableWH {
69
69
  };
70
70
  }
71
71
  }
72
- //# sourceMappingURL=canvas-wrap.js.map
72
+ //# sourceMappingURL=canvas-wrap.js.map
@@ -96,4 +96,4 @@ export class FeishuEnvContribution extends BaseEnvContribution {
96
96
  event;
97
97
  }
98
98
  }
99
- //# sourceMappingURL=feishu-contribution.js.map
99
+ //# sourceMappingURL=feishu-contribution.js.map
@@ -49,4 +49,5 @@ Lottie.NOWORK_ANIMATE_ATTR = NOWORK_ANIMATE_ATTR;
49
49
 
50
50
  export function createLottie(attributes) {
51
51
  return new Lottie(attributes);
52
- }
52
+ }
53
+ //# sourceMappingURL=Lottie.js.map
@@ -302,5 +302,4 @@ export function installNodePickersToApp(app) {
302
302
 
303
303
  export function installMathPickersToApp(app) {
304
304
  installNodePickersToApp(app);
305
- }
306
- //# sourceMappingURL=app.js.map
305
+ }
@@ -1,3 +1,4 @@
1
1
  import { isBrowserEnv } from "@visactor/vrender-core/env";
2
2
 
3
- export const browser = isBrowserEnv();
3
+ export const browser = isBrowserEnv();
4
+ //# sourceMappingURL=env.js.map
@@ -21,5 +21,4 @@ function _registerCircle() {
21
21
 
22
22
  _registerCircle.__loaded = !1;
23
23
 
24
- export const registerCircle = _registerCircle;
25
- //# sourceMappingURL=register-circle.js.map
24
+ export const registerCircle = _registerCircle;
@@ -6,4 +6,5 @@ function _registerShadowRoot() {
6
6
 
7
7
  _registerShadowRoot.__loaded = !1;
8
8
 
9
- export const registerShadowRoot = _registerShadowRoot;
9
+ export const registerShadowRoot = _registerShadowRoot;
10
+ //# sourceMappingURL=register-shadowRoot.js.map
@@ -6,5 +6,4 @@ function _registerWrapText() {
6
6
 
7
7
  _registerWrapText.__loaded = !1;
8
8
 
9
- export const registerWrapText = _registerWrapText;
10
- //# sourceMappingURL=register-wraptext.js.map
9
+ export const registerWrapText = _registerWrapText;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visactor/vrender-kits",
3
- "version": "1.1.8-alpha.1",
3
+ "version": "1.1.8",
4
4
  "description": "",
5
5
  "sideEffects": false,
6
6
  "main": "cjs/index-node.js",
@@ -44,7 +44,7 @@
44
44
  ],
45
45
  "dependencies": {
46
46
  "@visactor/vutils": "~1.0.12",
47
- "@visactor/vrender-core": "1.1.8-alpha.1",
47
+ "@visactor/vrender-core": "1.1.8",
48
48
  "@resvg/resvg-js": "2.4.1",
49
49
  "roughjs": "4.6.6",
50
50
  "gifuct-js": "2.1.2",
@@ -69,8 +69,8 @@
69
69
  "vite": "3.2.6",
70
70
  "typescript": "4.9.5",
71
71
  "cross-env": "^7.0.3",
72
- "@internal/bundler": "0.0.1",
73
72
  "@internal/eslint-config": "0.0.1",
73
+ "@internal/bundler": "0.0.1",
74
74
  "@internal/ts-config": "0.0.1"
75
75
  },
76
76
  "keywords": [