@eva/plugin-renderer-spine 1.2.7-editor.7 → 1.2.8-fix.1

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.
@@ -7,50 +7,22 @@ window.EVA.plugin.renderer = window.EVA.plugin.renderer || {};
7
7
  var _EVA_IIFE_spine = function (exports, eva_js, pluginRenderer, pixi_js) {
8
8
  'use strict';
9
9
 
10
- var _extendStatics$ = function extendStatics$2(d, b) {
10
+ var _extendStatics$ = function extendStatics$1(d, b) {
11
11
  _extendStatics$ = Object.setPrototypeOf || {
12
12
  __proto__: []
13
13
  } instanceof Array && function (d, b) {
14
14
  d.__proto__ = b;
15
15
  } || function (d, b) {
16
16
  for (var p in b) {
17
- if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
17
+ if (b.hasOwnProperty(p)) d[p] = b[p];
18
18
  }
19
19
  };
20
20
 
21
21
  return _extendStatics$(d, b);
22
22
  };
23
23
 
24
- function __extends$3(d, b) {
25
- if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
26
-
27
- _extendStatics$(d, b);
28
-
29
- function __() {
30
- this.constructor = d;
31
- }
32
-
33
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
34
- }
35
-
36
- var _extendStatics$2 = function extendStatics$1(d, b) {
37
- _extendStatics$2 = Object.setPrototypeOf || {
38
- __proto__: []
39
- } instanceof Array && function (d, b) {
40
- d.__proto__ = b;
41
- } || function (d, b) {
42
- for (var p in b) {
43
- if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
44
- }
45
- };
46
-
47
- return _extendStatics$2(d, b);
48
- };
49
-
50
24
  function __extends$2(d, b) {
51
- if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
52
-
53
- _extendStatics$2(d, b);
25
+ _extendStatics$(d, b);
54
26
 
55
27
  function __() {
56
28
  this.constructor = d;
@@ -59,133 +31,27 @@ var _EVA_IIFE_spine = function (exports, eva_js, pluginRenderer, pixi_js) {
59
31
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
60
32
  }
61
33
 
62
- var _assign = function __assign() {
63
- _assign = Object.assign || function __assign(t) {
64
- for (var s, i = 1, n = arguments.length; i < n; i++) {
65
- s = arguments[i];
66
-
67
- for (var p in s) {
68
- if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
69
- }
70
- }
71
-
72
- return t;
73
- };
74
-
75
- return _assign.apply(this, arguments);
76
- };
77
-
78
- var SymbolKeysNotSupportedError = function (_super) {
79
- __extends$2(SymbolKeysNotSupportedError, _super);
80
-
81
- function SymbolKeysNotSupportedError() {
82
- var _newTarget = this.constructor;
83
-
84
- var _this = _super.call(this, 'Symbol keys are not supported yet!') || this;
85
-
86
- Object.setPrototypeOf(_this, _newTarget.prototype);
87
- return _this;
88
- }
89
-
90
- return SymbolKeysNotSupportedError;
91
- }(Error);
92
-
93
- (function (_super) {
94
- __extends$2(StaticGetPropertiesIsNotAFunctionError, _super);
95
-
96
- function StaticGetPropertiesIsNotAFunctionError() {
97
- var _newTarget = this.constructor;
98
-
99
- var _this = _super.call(this, 'getProperties is not a function!') || this;
100
-
101
- Object.setPrototypeOf(_this, _newTarget.prototype);
102
- return _this;
103
- }
104
-
105
- return StaticGetPropertiesIsNotAFunctionError;
106
- })(Error);
107
-
108
- var IDE_PROPERTY_METADATA = 'IDE_PROPERTY_METADATA';
109
-
110
- function transformBasicType(type) {
111
- if (type === String) {
112
- return 'string';
113
- }
114
-
115
- if (type === Number) {
116
- return 'number';
117
- }
118
-
119
- if (type === Boolean) {
120
- return 'boolean';
121
- }
122
-
123
- return 'unknown';
124
- }
125
-
126
- function defineTypes(target, key, options, returnTypeFunction) {
127
- var type = Reflect.getMetadata('design:type', target, key);
128
- var isArray = type === Array;
129
- var str = transformBasicType(type);
130
-
131
- if (str !== 'unknown') {
132
- type = str;
133
- }
134
-
135
- if (returnTypeFunction) {
136
- var returnType = returnTypeFunction();
137
-
138
- if (Array.isArray(returnType)) {
139
- isArray = true;
140
- type = returnType[0];
141
- } else {
142
- type = returnType;
143
- }
34
+ function getIDEPropsPropertyObj(target, propertyKey) {
35
+ if (!target.constructor.IDEProps) {
36
+ target.constructor.IDEProps = {};
144
37
  }
145
38
 
146
- var properties = Reflect.getMetadata(IDE_PROPERTY_METADATA, target.constructor) || {};
147
- properties[key] = _assign({
148
- type: type,
149
- isArray: isArray
150
- }, options);
151
- Reflect.defineMetadata(IDE_PROPERTY_METADATA, properties, target.constructor);
152
- }
153
-
154
- function getTypeDecoratorParams(returnTypeFuncOrOptions, maybeOptions) {
155
- if (typeof returnTypeFuncOrOptions === 'function') {
156
- return {
157
- returnTypeFunc: returnTypeFuncOrOptions,
158
- options: maybeOptions || {}
159
- };
39
+ if (!target.constructor.IDEProps[propertyKey]) {
40
+ target.constructor.IDEProps[propertyKey] = {};
160
41
  }
161
42
 
162
- return {
163
- options: returnTypeFuncOrOptions || {}
164
- };
43
+ var propertyObj = target.constructor.IDEProps[propertyKey];
44
+ return propertyObj;
165
45
  }
166
46
 
167
- function Field(returnTypeFunction, maybeOptions) {
47
+ function type(type) {
168
48
  return function (target, propertyKey) {
169
- if (typeof propertyKey === 'symbol') {
170
- throw new SymbolKeysNotSupportedError();
171
- }
172
-
173
- var _a = getTypeDecoratorParams(returnTypeFunction, maybeOptions),
174
- options = _a.options,
175
- returnTypeFunc = _a.returnTypeFunc;
176
-
177
- defineTypes(target, propertyKey, options, returnTypeFunc);
49
+ var prop = getIDEPropsPropertyObj(target, propertyKey);
50
+ prop.key = propertyKey;
51
+ prop.type = type;
178
52
  };
179
53
  }
180
54
 
181
- var ExecuteMode;
182
-
183
- (function (ExecuteMode) {
184
- ExecuteMode[ExecuteMode["Edit"] = 2] = "Edit";
185
- ExecuteMode[ExecuteMode["Game"] = 4] = "Game";
186
- ExecuteMode[ExecuteMode["All"] = 6] = "All";
187
- })(ExecuteMode || (ExecuteMode = {}));
188
-
189
55
  var _extendStatics = function extendStatics(d, b) {
190
56
  _extendStatics = Object.setPrototypeOf || {
191
57
  __proto__: []
@@ -220,10 +86,6 @@ var _EVA_IIFE_spine = function (exports, eva_js, pluginRenderer, pixi_js) {
220
86
  return c > 3 && r && Object.defineProperty(target, key, r), r;
221
87
  }
222
88
 
223
- function __metadata(metadataKey, metadataValue) {
224
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
225
- }
226
-
227
89
  function __awaiter(thisArg, _arguments, P, generator) {
228
90
  return new (P || (P = Promise))(function (resolve, reject) {
229
91
  function fulfilled(value) {
@@ -543,13 +405,11 @@ var _EVA_IIFE_spine = function (exports, eva_js, pluginRenderer, pixi_js) {
543
405
 
544
406
  Spine.componentName = 'Spine';
545
407
 
546
- __decorate([Field({
547
- type: 'resource'
548
- }), __metadata("design:type", String)], Spine.prototype, "resource", void 0);
408
+ __decorate([type('string')], Spine.prototype, "resource", void 0);
549
409
 
550
- __decorate([Field(), __metadata("design:type", String)], Spine.prototype, "animationName", void 0);
410
+ __decorate([type('string')], Spine.prototype, "animationName", void 0);
551
411
 
552
- __decorate([Field(), __metadata("design:type", Boolean)], Spine.prototype, "autoPlay", void 0);
412
+ __decorate([type('boolean')], Spine.prototype, "autoPlay", void 0);
553
413
 
554
414
  return Spine;
555
415
  }(eva_js.Component);
@@ -9769,7 +9629,7 @@ var _EVA_IIFE_spine = function (exports, eva_js, pluginRenderer, pixi_js) {
9769
9629
  var pixiSpine = pixi_spine;
9770
9630
 
9771
9631
  var SpineSystem = function (_super) {
9772
- __extends$3(SpineSystem, _super);
9632
+ __extends$2(SpineSystem, _super);
9773
9633
 
9774
9634
  function SpineSystem() {
9775
9635
  return _super !== null && _super.apply(this, arguments) || this;
@@ -9787,7 +9647,7 @@ var _EVA_IIFE_spine = function (exports, eva_js, pluginRenderer, pixi_js) {
9787
9647
  var SpineSystem$1 = SpineSystem;
9788
9648
 
9789
9649
  var Spine = function (_super) {
9790
- __extends$3(Spine, _super);
9650
+ __extends$2(Spine, _super);
9791
9651
 
9792
9652
  function Spine() {
9793
9653
  return _super !== null && _super.apply(this, arguments) || this;