@visactor/vrender-animate 1.0.43 → 1.0.45

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.
@@ -72,4 +72,5 @@ class AStageAnimate extends ACustomAnimate {
72
72
  }
73
73
  }
74
74
 
75
- exports.AStageAnimate = AStageAnimate;
75
+ exports.AStageAnimate = AStageAnimate;
76
+ //# sourceMappingURL=custom-animate.js.map
@@ -22,5 +22,4 @@ class GroupFadeOut extends common_1.CommonOut {
22
22
  }
23
23
  }
24
24
 
25
- exports.GroupFadeOut = GroupFadeOut;
26
- //# sourceMappingURL=groupFade.js.map
25
+ exports.GroupFadeOut = GroupFadeOut;
@@ -105,4 +105,5 @@ class PoptipDisappear extends custom_animate_1.AComponentAnimate {
105
105
  }
106
106
  }
107
107
 
108
- exports.PoptipDisappear = PoptipDisappear;
108
+ exports.PoptipDisappear = PoptipDisappear;
109
+ //# sourceMappingURL=poptip-animate.js.map
@@ -118,5 +118,4 @@ class ScaleOut extends custom_animate_1.ACustomAnimate {
118
118
  }
119
119
  }
120
120
 
121
- exports.ScaleOut = ScaleOut;
122
- //# sourceMappingURL=scale.js.map
121
+ exports.ScaleOut = ScaleOut;
@@ -14,6 +14,7 @@ function getCustomType(custom) {
14
14
  if (custom.prototype.constructor === custom) {
15
15
  const descriptor = Object.getOwnPropertyDescriptor(custom, "prototype");
16
16
  if (descriptor && !descriptor.writable) return 1;
17
+ if (Object.getOwnPropertyNames(custom.prototype).length > 1) return 1;
17
18
  }
18
19
  return 2;
19
20
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/executor/utils.ts"],"names":[],"mappings":";;;AAAA,6CAA8C;AAO9C,SAAgB,aAAa,CAAC,MAAW;IACvC,IAAI,CAAC,MAAM,IAAI,CAAC,IAAA,mBAAU,EAAC,MAAM,CAAC,EAAE;QAClC,OAAO,CAAC,CAAC;KACV;IAED,MAAM,WAAW,GAAG,QAAQ,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC7D,IAAI,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE;QAChC,OAAO,CAAC,CAAC;KACV;IAED,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE;QACrB,OAAO,CAAC,CAAC;KACV;IAED,IAAI,MAAM,CAAC,SAAS,CAAC,WAAW,KAAK,MAAM,EAAE;QAE3C,MAAM,UAAU,GAAG,MAAM,CAAC,wBAAwB,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;QACxE,IAAI,UAAU,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE;YACtC,OAAO,CAAC,CAAC;SACV;KACF;IACD,OAAO,CAAC,CAAC;AACX,CAAC;AAtBD,sCAsBC","file":"utils.js","sourcesContent":["import { isFunction } from '@visactor/vutils';\n\n/**\n * 获取自定义类型\n * @param custom 自定义动画对象\n * @returns 0: 不是函数/类, 1: 是类, 2: 是函数\n */\nexport function getCustomType(custom: any): number {\n if (!custom || !isFunction(custom)) {\n return 0;\n }\n // 正则表达式检查是最快的,优先使用\n const functionStr = Function.prototype.toString.call(custom);\n if (/^class\\s/.test(functionStr)) {\n return 1;\n }\n // 检查箭头函数(没有prototype)\n if (!custom.prototype) {\n return 2;\n }\n // 检查构造函数是否是它自己(ES5类)\n if (custom.prototype.constructor === custom) {\n // 检查prototype是否可写,类的prototype是不可写的\n const descriptor = Object.getOwnPropertyDescriptor(custom, 'prototype');\n if (descriptor && !descriptor.writable) {\n return 1;\n }\n }\n return 2;\n}\n"]}
1
+ {"version":3,"sources":["../src/executor/utils.ts"],"names":[],"mappings":";;;AAAA,6CAA8C;AAO9C,SAAgB,aAAa,CAAC,MAAW;IACvC,IAAI,CAAC,MAAM,IAAI,CAAC,IAAA,mBAAU,EAAC,MAAM,CAAC,EAAE;QAClC,OAAO,CAAC,CAAC;KACV;IAED,MAAM,WAAW,GAAG,QAAQ,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC7D,IAAI,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE;QAChC,OAAO,CAAC,CAAC;KACV;IAED,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE;QACrB,OAAO,CAAC,CAAC;KACV;IAED,IAAI,MAAM,CAAC,SAAS,CAAC,WAAW,KAAK,MAAM,EAAE;QAE3C,MAAM,UAAU,GAAG,MAAM,CAAC,wBAAwB,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;QACxE,IAAI,UAAU,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE;YACtC,OAAO,CAAC,CAAC;SACV;QAGD,MAAM,SAAS,GAAG,MAAM,CAAC,mBAAmB,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;QAC/D,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE;YACxB,OAAO,CAAC,CAAC;SACV;KACF;IACD,OAAO,CAAC,CAAC;AACX,CAAC;AA5BD,sCA4BC","file":"utils.js","sourcesContent":["import { isFunction } from '@visactor/vutils';\n\n/**\n * 获取自定义类型\n * @param custom 自定义动画对象\n * @returns 0: 不是函数/类, 1: 是类, 2: 是函数\n */\nexport function getCustomType(custom: any): number {\n if (!custom || !isFunction(custom)) {\n return 0;\n }\n // 正则表达式检查是最快的,优先使用\n const functionStr = Function.prototype.toString.call(custom);\n if (/^class\\s/.test(functionStr)) {\n return 1;\n }\n // 检查箭头函数(没有prototype)\n if (!custom.prototype) {\n return 2;\n }\n // 检查构造函数是否是它自己\n if (custom.prototype.constructor === custom) {\n // 检查prototype是否可写,原生class的prototype是不可写的\n const descriptor = Object.getOwnPropertyDescriptor(custom, 'prototype');\n if (descriptor && !descriptor.writable) {\n return 1;\n }\n // Babel/TypeScript 转译后的类,prototype 可写但仍有方法在 prototype 上\n // 通过检查 prototype 上是否有除 constructor 之外的自有属性来判断\n const protoKeys = Object.getOwnPropertyNames(custom.prototype);\n if (protoKeys.length > 1) {\n return 1;\n }\n }\n return 2;\n}\n"]}
package/dist/index.es.js CHANGED
@@ -1578,6 +1578,10 @@ function getCustomType(custom) {
1578
1578
  if (descriptor && !descriptor.writable) {
1579
1579
  return 1;
1580
1580
  }
1581
+ const protoKeys = Object.getOwnPropertyNames(custom.prototype);
1582
+ if (protoKeys.length > 1) {
1583
+ return 1;
1584
+ }
1581
1585
  }
1582
1586
  return 2;
1583
1587
  }
@@ -62,4 +62,5 @@ export class AStageAnimate extends ACustomAnimate {
62
62
  return !!ctx && (ctx.clearRect(0, 0, stageCanvas.width, stageCanvas.height), ctx.drawImage(canvas, 0, 0),
63
63
  stageCanvas);
64
64
  }
65
- }
65
+ }
66
+ //# sourceMappingURL=custom-animate.js.map
@@ -12,5 +12,4 @@ export class GroupFadeOut extends CommonOut {
12
12
  constructor(from, to, duration, easing, params) {
13
13
  super(from, to, duration, easing, params), this.keys = [ "baseOpacity" ];
14
14
  }
15
- }
16
- //# sourceMappingURL=groupFade.js.map
15
+ }
@@ -99,4 +99,5 @@ export class PoptipDisappear extends AComponentAnimate {
99
99
  easing: easing
100
100
  }), this.completeBind(animator);
101
101
  }
102
- }
102
+ }
103
+ //# sourceMappingURL=poptip-animate.js.map
@@ -108,5 +108,4 @@ export class ScaleOut extends ACustomAnimate {
108
108
  attribute[key] = this.from[key] + (this.to[key] - this.from[key]) * ratio;
109
109
  })), this.target.addUpdatePositionTag(), this.target.addUpdateBoundTag();
110
110
  }
111
- }
112
- //# sourceMappingURL=scale.js.map
111
+ }
@@ -8,6 +8,7 @@ export function getCustomType(custom) {
8
8
  if (custom.prototype.constructor === custom) {
9
9
  const descriptor = Object.getOwnPropertyDescriptor(custom, "prototype");
10
10
  if (descriptor && !descriptor.writable) return 1;
11
+ if (Object.getOwnPropertyNames(custom.prototype).length > 1) return 1;
11
12
  }
12
13
  return 2;
13
14
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/executor/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAO9C,MAAM,UAAU,aAAa,CAAC,MAAW;IACvC,IAAI,CAAC,MAAM,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE;QAClC,OAAO,CAAC,CAAC;KACV;IAED,MAAM,WAAW,GAAG,QAAQ,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC7D,IAAI,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE;QAChC,OAAO,CAAC,CAAC;KACV;IAED,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE;QACrB,OAAO,CAAC,CAAC;KACV;IAED,IAAI,MAAM,CAAC,SAAS,CAAC,WAAW,KAAK,MAAM,EAAE;QAE3C,MAAM,UAAU,GAAG,MAAM,CAAC,wBAAwB,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;QACxE,IAAI,UAAU,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE;YACtC,OAAO,CAAC,CAAC;SACV;KACF;IACD,OAAO,CAAC,CAAC;AACX,CAAC","file":"utils.js","sourcesContent":["import { isFunction } from '@visactor/vutils';\n\n/**\n * 获取自定义类型\n * @param custom 自定义动画对象\n * @returns 0: 不是函数/类, 1: 是类, 2: 是函数\n */\nexport function getCustomType(custom: any): number {\n if (!custom || !isFunction(custom)) {\n return 0;\n }\n // 正则表达式检查是最快的,优先使用\n const functionStr = Function.prototype.toString.call(custom);\n if (/^class\\s/.test(functionStr)) {\n return 1;\n }\n // 检查箭头函数(没有prototype)\n if (!custom.prototype) {\n return 2;\n }\n // 检查构造函数是否是它自己(ES5类)\n if (custom.prototype.constructor === custom) {\n // 检查prototype是否可写,类的prototype是不可写的\n const descriptor = Object.getOwnPropertyDescriptor(custom, 'prototype');\n if (descriptor && !descriptor.writable) {\n return 1;\n }\n }\n return 2;\n}\n"]}
1
+ {"version":3,"sources":["../src/executor/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAO9C,MAAM,UAAU,aAAa,CAAC,MAAW;IACvC,IAAI,CAAC,MAAM,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE;QAClC,OAAO,CAAC,CAAC;KACV;IAED,MAAM,WAAW,GAAG,QAAQ,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC7D,IAAI,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE;QAChC,OAAO,CAAC,CAAC;KACV;IAED,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE;QACrB,OAAO,CAAC,CAAC;KACV;IAED,IAAI,MAAM,CAAC,SAAS,CAAC,WAAW,KAAK,MAAM,EAAE;QAE3C,MAAM,UAAU,GAAG,MAAM,CAAC,wBAAwB,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;QACxE,IAAI,UAAU,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE;YACtC,OAAO,CAAC,CAAC;SACV;QAGD,MAAM,SAAS,GAAG,MAAM,CAAC,mBAAmB,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;QAC/D,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE;YACxB,OAAO,CAAC,CAAC;SACV;KACF;IACD,OAAO,CAAC,CAAC;AACX,CAAC","file":"utils.js","sourcesContent":["import { isFunction } from '@visactor/vutils';\n\n/**\n * 获取自定义类型\n * @param custom 自定义动画对象\n * @returns 0: 不是函数/类, 1: 是类, 2: 是函数\n */\nexport function getCustomType(custom: any): number {\n if (!custom || !isFunction(custom)) {\n return 0;\n }\n // 正则表达式检查是最快的,优先使用\n const functionStr = Function.prototype.toString.call(custom);\n if (/^class\\s/.test(functionStr)) {\n return 1;\n }\n // 检查箭头函数(没有prototype)\n if (!custom.prototype) {\n return 2;\n }\n // 检查构造函数是否是它自己\n if (custom.prototype.constructor === custom) {\n // 检查prototype是否可写,原生class的prototype是不可写的\n const descriptor = Object.getOwnPropertyDescriptor(custom, 'prototype');\n if (descriptor && !descriptor.writable) {\n return 1;\n }\n // Babel/TypeScript 转译后的类,prototype 可写但仍有方法在 prototype 上\n // 通过检查 prototype 上是否有除 constructor 之外的自有属性来判断\n const protoKeys = Object.getOwnPropertyNames(custom.prototype);\n if (protoKeys.length > 1) {\n return 1;\n }\n }\n return 2;\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visactor/vrender-animate",
3
- "version": "1.0.43",
3
+ "version": "1.0.45",
4
4
  "description": "",
5
5
  "sideEffects": false,
6
6
  "main": "cjs/index.js",
@@ -13,7 +13,7 @@
13
13
  ],
14
14
  "dependencies": {
15
15
  "@visactor/vutils": "~1.0.12",
16
- "@visactor/vrender-core": "1.0.43"
16
+ "@visactor/vrender-core": "1.0.45"
17
17
  },
18
18
  "devDependencies": {
19
19
  "@rushstack/eslint-patch": "~1.1.4",
@@ -29,9 +29,9 @@
29
29
  "vite": "3.2.6",
30
30
  "typescript": "4.9.5",
31
31
  "cross-env": "^7.0.3",
32
- "@internal/bundler": "0.0.1",
32
+ "@internal/eslint-config": "0.0.1",
33
33
  "@internal/ts-config": "0.0.1",
34
- "@internal/eslint-config": "0.0.1"
34
+ "@internal/bundler": "0.0.1"
35
35
  },
36
36
  "keywords": [
37
37
  "VisActor",