targetj 1.0.239 → 1.0.241

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/build/Viewport.js CHANGED
@@ -1,20 +1,15 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.Viewport = void 0;
7
- var _TModelUtil = require("./TModelUtil.js");
8
1
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
9
2
  function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
10
3
  function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
11
4
  function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
12
5
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
13
6
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
+ import { TModelUtil } from "./TModelUtil.js";
8
+
14
9
  /**
15
10
  * It calculates the locations and visibility of objects
16
11
  */
17
- var Viewport = exports.Viewport = /*#__PURE__*/function () {
12
+ var Viewport = /*#__PURE__*/function () {
18
13
  function Viewport() {
19
14
  _classCallCheck(this, Viewport);
20
15
  this.xNext = 0;
@@ -131,7 +126,7 @@ var Viewport = exports.Viewport = /*#__PURE__*/function () {
131
126
  var scale = child.getMeasuringScale();
132
127
  var topBaseHeight = child.getTopBaseHeight() * scale;
133
128
  var maxHeight = child.getHeight() * scale + this.currentChild.getTopMargin() + this.currentChild.getBottomMargin();
134
- var maxWidth = child.getItemOverflowMode() === 'always' && _TModelUtil.TModelUtil.isWidthDefined(this.container) ? this.container.getWidth() : child.getBaseWidth() * scale + this.currentChild.getLeftMargin() + this.currentChild.getRightMargin();
129
+ var maxWidth = child.getItemOverflowMode() === 'always' && TModelUtil.isWidthDefined(this.container) ? this.container.getWidth() : child.getBaseWidth() * scale + this.currentChild.getLeftMargin() + this.currentChild.getRightMargin();
135
130
  if (child.type !== 'BI' && this.container.type === 'BI') {
136
131
  var layout = this.computeBoundary(child, 'layout');
137
132
  var animated = this.computeBoundary(child, 'animated');
@@ -162,4 +157,5 @@ var Viewport = exports.Viewport = /*#__PURE__*/function () {
162
157
  }
163
158
  }
164
159
  }]);
165
- }();
160
+ }();
161
+ export { Viewport };
@@ -1,22 +1,17 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.VisibilityUtil = void 0;
7
- var _App = require("./App.js");
8
- var _TUtil = require("./TUtil.js");
9
1
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
10
2
  function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
11
3
  function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
12
4
  function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
13
5
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
14
6
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
+ import { tRoot, getScreenHeight, getScreenWidth } from "./App.js";
8
+ import { TUtil } from "./TUtil.js";
9
+
15
10
  /**
16
11
  *
17
12
  * It provides a variety of helping functions for calculating visibility
18
13
  */
19
- var VisibilityUtil = exports.VisibilityUtil = /*#__PURE__*/function () {
14
+ var VisibilityUtil = /*#__PURE__*/function () {
20
15
  function VisibilityUtil() {
21
16
  _classCallCheck(this, VisibilityUtil);
22
17
  }
@@ -33,8 +28,8 @@ var VisibilityUtil = exports.VisibilityUtil = /*#__PURE__*/function () {
33
28
  var scale = (domParent.getMeasuringScale() || 1) * child.getMeasuringScale();
34
29
  var x = child.absX;
35
30
  var y = child.absY;
36
- var width = _TUtil.TUtil.isDefined(child.getWidth()) ? scale * child.getWidth() : 0;
37
- var height = _TUtil.TUtil.isDefined(child.getHeight()) ? scale * child.getHeight() : 0;
31
+ var width = TUtil.isDefined(child.getWidth()) ? scale * child.getWidth() : 0;
32
+ var height = TUtil.isDefined(child.getHeight()) ? scale * child.getHeight() : 0;
38
33
  var visibilityMargin = 20;
39
34
  if (!child.visibilityStatus) {
40
35
  child.visibilityStatus = {};
@@ -75,7 +70,7 @@ var VisibilityUtil = exports.VisibilityUtil = /*#__PURE__*/function () {
75
70
  key: "getVisibilityClipRect",
76
71
  value: function getVisibilityClipRect(container) {
77
72
  var rect = VisibilityUtil.getScreenViewportRect();
78
- while (container && container !== (0, _App.tRoot)()) {
73
+ while (container && container !== tRoot()) {
79
74
  if (VisibilityUtil.shouldClipByAncestor(container)) {
80
75
  var ancestorRect = VisibilityUtil.getAncestorViewportRect(container);
81
76
  rect = rect && !container.allTargetMap['onWindowScroll'] ? VisibilityUtil.intersectVisibilityRects(rect, ancestorRect) : ancestorRect;
@@ -93,8 +88,8 @@ var VisibilityUtil = exports.VisibilityUtil = /*#__PURE__*/function () {
93
88
  return {
94
89
  x: 0,
95
90
  y: 0,
96
- r: (0, _App.getScreenWidth)(),
97
- b: (0, _App.getScreenHeight)(),
91
+ r: getScreenWidth(),
92
+ b: getScreenHeight(),
98
93
  source: "screen"
99
94
  };
100
95
  }
@@ -129,4 +124,5 @@ var VisibilityUtil = exports.VisibilityUtil = /*#__PURE__*/function () {
129
124
  };
130
125
  }
131
126
  }]);
132
- }();
127
+ }();
128
+ export { VisibilityUtil };
package/build/index.js CHANGED
@@ -1,225 +1,20 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- var _App = require("./App.js");
7
- Object.keys(_App).forEach(function (key) {
8
- if (key === "default" || key === "__esModule") return;
9
- if (key in exports && exports[key] === _App[key]) return;
10
- Object.defineProperty(exports, key, {
11
- enumerable: true,
12
- get: function get() {
13
- return _App[key];
14
- }
15
- });
16
- });
17
- var _TModel = require("./TModel.js");
18
- Object.keys(_TModel).forEach(function (key) {
19
- if (key === "default" || key === "__esModule") return;
20
- if (key in exports && exports[key] === _TModel[key]) return;
21
- Object.defineProperty(exports, key, {
22
- enumerable: true,
23
- get: function get() {
24
- return _TModel[key];
25
- }
26
- });
27
- });
28
- var _Moves = require("./Moves.js");
29
- Object.keys(_Moves).forEach(function (key) {
30
- if (key === "default" || key === "__esModule") return;
31
- if (key in exports && exports[key] === _Moves[key]) return;
32
- Object.defineProperty(exports, key, {
33
- enumerable: true,
34
- get: function get() {
35
- return _Moves[key];
36
- }
37
- });
38
- });
39
- var _SearchUtil = require("./SearchUtil.js");
40
- Object.keys(_SearchUtil).forEach(function (key) {
41
- if (key === "default" || key === "__esModule") return;
42
- if (key in exports && exports[key] === _SearchUtil[key]) return;
43
- Object.defineProperty(exports, key, {
44
- enumerable: true,
45
- get: function get() {
46
- return _SearchUtil[key];
47
- }
48
- });
49
- });
50
- var _TargetData = require("./TargetData.js");
51
- Object.keys(_TargetData).forEach(function (key) {
52
- if (key === "default" || key === "__esModule") return;
53
- if (key in exports && exports[key] === _TargetData[key]) return;
54
- Object.defineProperty(exports, key, {
55
- enumerable: true,
56
- get: function get() {
57
- return _TargetData[key];
58
- }
59
- });
60
- });
61
- var _TargetUtil = require("./TargetUtil.js");
62
- Object.keys(_TargetUtil).forEach(function (key) {
63
- if (key === "default" || key === "__esModule") return;
64
- if (key in exports && exports[key] === _TargetUtil[key]) return;
65
- Object.defineProperty(exports, key, {
66
- enumerable: true,
67
- get: function get() {
68
- return _TargetUtil[key];
69
- }
70
- });
71
- });
72
- var _TargetParser = require("./TargetParser.js");
73
- Object.keys(_TargetParser).forEach(function (key) {
74
- if (key === "default" || key === "__esModule") return;
75
- if (key in exports && exports[key] === _TargetParser[key]) return;
76
- Object.defineProperty(exports, key, {
77
- enumerable: true,
78
- get: function get() {
79
- return _TargetParser[key];
80
- }
81
- });
82
- });
83
- var _TModelUtil = require("./TModelUtil.js");
84
- Object.keys(_TModelUtil).forEach(function (key) {
85
- if (key === "default" || key === "__esModule") return;
86
- if (key in exports && exports[key] === _TModelUtil[key]) return;
87
- Object.defineProperty(exports, key, {
88
- enumerable: true,
89
- get: function get() {
90
- return _TModelUtil[key];
91
- }
92
- });
93
- });
94
- var _TUtil = require("./TUtil.js");
95
- Object.keys(_TUtil).forEach(function (key) {
96
- if (key === "default" || key === "__esModule") return;
97
- if (key in exports && exports[key] === _TUtil[key]) return;
98
- Object.defineProperty(exports, key, {
99
- enumerable: true,
100
- get: function get() {
101
- return _TUtil[key];
102
- }
103
- });
104
- });
105
- var _DomInit = require("./DomInit.js");
106
- Object.keys(_DomInit).forEach(function (key) {
107
- if (key === "default" || key === "__esModule") return;
108
- if (key in exports && exports[key] === _DomInit[key]) return;
109
- Object.defineProperty(exports, key, {
110
- enumerable: true,
111
- get: function get() {
112
- return _DomInit[key];
113
- }
114
- });
115
- });
116
- var _$Dom = require("./$Dom.js");
117
- Object.keys(_$Dom).forEach(function (key) {
118
- if (key === "default" || key === "__esModule") return;
119
- if (key in exports && exports[key] === _$Dom[key]) return;
120
- Object.defineProperty(exports, key, {
121
- enumerable: true,
122
- get: function get() {
123
- return _$Dom[key];
124
- }
125
- });
126
- });
127
- var _Bracket = require("./Bracket.js");
128
- Object.keys(_Bracket).forEach(function (key) {
129
- if (key === "default" || key === "__esModule") return;
130
- if (key in exports && exports[key] === _Bracket[key]) return;
131
- Object.defineProperty(exports, key, {
132
- enumerable: true,
133
- get: function get() {
134
- return _Bracket[key];
135
- }
136
- });
137
- });
138
- var _BracketGenerator = require("./BracketGenerator.js");
139
- Object.keys(_BracketGenerator).forEach(function (key) {
140
- if (key === "default" || key === "__esModule") return;
141
- if (key in exports && exports[key] === _BracketGenerator[key]) return;
142
- Object.defineProperty(exports, key, {
143
- enumerable: true,
144
- get: function get() {
145
- return _BracketGenerator[key];
146
- }
147
- });
148
- });
149
- var _ColorUtil = require("./ColorUtil.js");
150
- Object.keys(_ColorUtil).forEach(function (key) {
151
- if (key === "default" || key === "__esModule") return;
152
- if (key in exports && exports[key] === _ColorUtil[key]) return;
153
- Object.defineProperty(exports, key, {
154
- enumerable: true,
155
- get: function get() {
156
- return _ColorUtil[key];
157
- }
158
- });
159
- });
160
- var _Easing = require("./Easing.js");
161
- Object.keys(_Easing).forEach(function (key) {
162
- if (key === "default" || key === "__esModule") return;
163
- if (key in exports && exports[key] === _Easing[key]) return;
164
- Object.defineProperty(exports, key, {
165
- enumerable: true,
166
- get: function get() {
167
- return _Easing[key];
168
- }
169
- });
170
- });
171
- var _TargetExecutor = require("./TargetExecutor.js");
172
- Object.keys(_TargetExecutor).forEach(function (key) {
173
- if (key === "default" || key === "__esModule") return;
174
- if (key in exports && exports[key] === _TargetExecutor[key]) return;
175
- Object.defineProperty(exports, key, {
176
- enumerable: true,
177
- get: function get() {
178
- return _TargetExecutor[key];
179
- }
180
- });
181
- });
182
- var _AnimationManager = require("./AnimationManager.js");
183
- Object.keys(_AnimationManager).forEach(function (key) {
184
- if (key === "default" || key === "__esModule") return;
185
- if (key in exports && exports[key] === _AnimationManager[key]) return;
186
- Object.defineProperty(exports, key, {
187
- enumerable: true,
188
- get: function get() {
189
- return _AnimationManager[key];
190
- }
191
- });
192
- });
193
- var _AnimationUtil = require("./AnimationUtil.js");
194
- Object.keys(_AnimationUtil).forEach(function (key) {
195
- if (key === "default" || key === "__esModule") return;
196
- if (key in exports && exports[key] === _AnimationUtil[key]) return;
197
- Object.defineProperty(exports, key, {
198
- enumerable: true,
199
- get: function get() {
200
- return _AnimationUtil[key];
201
- }
202
- });
203
- });
204
- var _VisibilityUtil = require("./VisibilityUtil.js");
205
- Object.keys(_VisibilityUtil).forEach(function (key) {
206
- if (key === "default" || key === "__esModule") return;
207
- if (key in exports && exports[key] === _VisibilityUtil[key]) return;
208
- Object.defineProperty(exports, key, {
209
- enumerable: true,
210
- get: function get() {
211
- return _VisibilityUtil[key];
212
- }
213
- });
214
- });
215
- var _ScheduleUtil = require("./ScheduleUtil.js");
216
- Object.keys(_ScheduleUtil).forEach(function (key) {
217
- if (key === "default" || key === "__esModule") return;
218
- if (key in exports && exports[key] === _ScheduleUtil[key]) return;
219
- Object.defineProperty(exports, key, {
220
- enumerable: true,
221
- get: function get() {
222
- return _ScheduleUtil[key];
223
- }
224
- });
225
- });
1
+ export * from "./App.js";
2
+ export * from "./TModel.js";
3
+ export * from "./Moves.js";
4
+ export * from "./SearchUtil.js";
5
+ export * from "./TargetData.js";
6
+ export * from "./TargetUtil.js";
7
+ export * from "./TargetParser.js";
8
+ export * from "./TModelUtil.js";
9
+ export * from "./TUtil.js";
10
+ export * from "./DomInit.js";
11
+ export * from "./$Dom.js";
12
+ export * from "./Bracket.js";
13
+ export * from "./BracketGenerator.js";
14
+ export * from "./ColorUtil.js";
15
+ export * from "./Easing.js";
16
+ export * from "./TargetExecutor.js";
17
+ export * from "./AnimationManager.js";
18
+ export * from "./AnimationUtil.js";
19
+ export * from "./VisibilityUtil.js";
20
+ export * from "./ScheduleUtil.js";