@bitbybit-dev/base 0.19.7 → 0.19.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.
Files changed (61) hide show
  1. package/babel.config.cjs +0 -1
  2. package/{index.js → index.ts} +2 -1
  3. package/lib/api/inputs/base-inputs.ts +18 -0
  4. package/lib/api/inputs/{color-inputs.d.ts → color-inputs.ts} +48 -26
  5. package/lib/api/inputs/{lists-inputs.d.ts → lists-inputs.ts} +190 -91
  6. package/lib/api/inputs/{logic-inputs.d.ts → logic-inputs.ts} +46 -24
  7. package/lib/api/inputs/{math-inputs.d.ts → math-inputs.ts} +97 -53
  8. package/lib/api/inputs/{point-inputs.d.ts → point-inputs.ts} +168 -77
  9. package/lib/api/inputs/text-inputs.ts +108 -0
  10. package/lib/api/inputs/{transforms-inputs.d.ts → transforms-inputs.ts} +64 -35
  11. package/lib/api/inputs/{vector-inputs.d.ts → vector-inputs.ts} +104 -48
  12. package/lib/api/services/color.test.ts +86 -0
  13. package/lib/api/services/{color.js → color.ts} +34 -15
  14. package/lib/api/services/{geometry-helper.js → geometry-helper.ts} +43 -31
  15. package/lib/api/services/{index.d.ts → index.ts} +1 -1
  16. package/lib/api/services/lists.test.ts +612 -0
  17. package/lib/api/services/{lists.js → lists.ts} +83 -59
  18. package/lib/api/services/logic.test.ts +187 -0
  19. package/lib/api/services/{logic.js → logic.ts} +32 -24
  20. package/lib/api/services/math.test.ts +622 -0
  21. package/lib/api/services/{math.js → math.ts} +136 -71
  22. package/lib/api/services/{point.js → point.ts} +67 -32
  23. package/lib/api/services/text.test.ts +55 -0
  24. package/lib/api/services/{text.js → text.ts} +17 -7
  25. package/lib/api/services/{transforms.js → transforms.ts} +83 -37
  26. package/lib/api/services/vector.test.ts +360 -0
  27. package/lib/api/services/{vector.js → vector.ts} +80 -42
  28. package/lib/{index.d.ts → index.ts} +1 -0
  29. package/package.json +1 -1
  30. package/tsconfig.bitbybit.json +26 -0
  31. package/tsconfig.json +24 -0
  32. package/babel.config.d.cts +0 -5
  33. package/index.d.ts +0 -1
  34. package/lib/api/index.js +0 -1
  35. package/lib/api/inputs/base-inputs.d.ts +0 -35
  36. package/lib/api/inputs/base-inputs.js +0 -1
  37. package/lib/api/inputs/color-inputs.js +0 -164
  38. package/lib/api/inputs/index.js +0 -9
  39. package/lib/api/inputs/inputs.js +0 -9
  40. package/lib/api/inputs/lists-inputs.js +0 -576
  41. package/lib/api/inputs/logic-inputs.js +0 -111
  42. package/lib/api/inputs/math-inputs.js +0 -391
  43. package/lib/api/inputs/point-inputs.js +0 -521
  44. package/lib/api/inputs/text-inputs.d.ts +0 -83
  45. package/lib/api/inputs/text-inputs.js +0 -120
  46. package/lib/api/inputs/transforms-inputs.js +0 -200
  47. package/lib/api/inputs/vector-inputs.js +0 -304
  48. package/lib/api/services/color.d.ts +0 -114
  49. package/lib/api/services/geometry-helper.d.ts +0 -15
  50. package/lib/api/services/index.js +0 -9
  51. package/lib/api/services/lists.d.ts +0 -287
  52. package/lib/api/services/logic.d.ts +0 -99
  53. package/lib/api/services/math.d.ts +0 -349
  54. package/lib/api/services/point.d.ts +0 -222
  55. package/lib/api/services/text.d.ts +0 -69
  56. package/lib/api/services/transforms.d.ts +0 -122
  57. package/lib/api/services/vector.d.ts +0 -320
  58. package/lib/index.js +0 -1
  59. /package/lib/api/{index.d.ts → index.ts} +0 -0
  60. /package/lib/api/inputs/{index.d.ts → index.ts} +0 -0
  61. /package/lib/api/inputs/{inputs.d.ts → inputs.ts} +0 -0
@@ -1,391 +0,0 @@
1
- /* eslint-disable @typescript-eslint/no-namespace */
2
- // tslint:disable-next-line: no-namespace
3
- export var Math;
4
- (function (Math) {
5
- let mathTwoNrOperatorEnum;
6
- (function (mathTwoNrOperatorEnum) {
7
- mathTwoNrOperatorEnum["add"] = "add";
8
- mathTwoNrOperatorEnum["subtract"] = "subtract";
9
- mathTwoNrOperatorEnum["multiply"] = "multiply";
10
- mathTwoNrOperatorEnum["divide"] = "divide";
11
- mathTwoNrOperatorEnum["power"] = "power";
12
- mathTwoNrOperatorEnum["modulus"] = "modulus";
13
- })(mathTwoNrOperatorEnum = Math.mathTwoNrOperatorEnum || (Math.mathTwoNrOperatorEnum = {}));
14
- let mathOneNrOperatorEnum;
15
- (function (mathOneNrOperatorEnum) {
16
- mathOneNrOperatorEnum["absolute"] = "absolute";
17
- mathOneNrOperatorEnum["negate"] = "negate";
18
- mathOneNrOperatorEnum["ln"] = "ln";
19
- mathOneNrOperatorEnum["log10"] = "log10";
20
- mathOneNrOperatorEnum["tenPow"] = "tenPow";
21
- mathOneNrOperatorEnum["round"] = "round";
22
- mathOneNrOperatorEnum["floor"] = "floor";
23
- mathOneNrOperatorEnum["ceil"] = "ceil";
24
- mathOneNrOperatorEnum["sqrt"] = "sqrt";
25
- mathOneNrOperatorEnum["sin"] = "sin";
26
- mathOneNrOperatorEnum["cos"] = "cos";
27
- mathOneNrOperatorEnum["tan"] = "tan";
28
- mathOneNrOperatorEnum["asin"] = "asin";
29
- mathOneNrOperatorEnum["acos"] = "acos";
30
- mathOneNrOperatorEnum["atan"] = "atan";
31
- mathOneNrOperatorEnum["log"] = "log";
32
- mathOneNrOperatorEnum["exp"] = "exp";
33
- mathOneNrOperatorEnum["radToDeg"] = "radToDeg";
34
- mathOneNrOperatorEnum["degToRad"] = "degToRad";
35
- })(mathOneNrOperatorEnum = Math.mathOneNrOperatorEnum || (Math.mathOneNrOperatorEnum = {}));
36
- let easeEnum;
37
- (function (easeEnum) {
38
- easeEnum["easeInSine"] = "easeInSine";
39
- easeEnum["easeOutSine"] = "easeOutSine";
40
- easeEnum["easeInOutSine"] = "easeInOutSine";
41
- easeEnum["easeInQuad"] = "easeInQuad";
42
- easeEnum["easeOutQuad"] = "easeOutQuad";
43
- easeEnum["easeInOutQuad"] = "easeInOutQuad";
44
- easeEnum["easeInCubic"] = "easeInCubic";
45
- easeEnum["easeOutCubic"] = "easeOutCubic";
46
- easeEnum["easeInOutCubic"] = "easeInOutCubic";
47
- easeEnum["easeInQuart"] = "easeInQuart";
48
- easeEnum["easeOutQuart"] = "easeOutQuart";
49
- easeEnum["easeInOutQuart"] = "easeInOutQuart";
50
- easeEnum["easeInQuint"] = "easeInQuint";
51
- easeEnum["easeOutQuint"] = "easeOutQuint";
52
- easeEnum["easeInOutQuint"] = "easeInOutQuint";
53
- easeEnum["easeInExpo"] = "easeInExpo";
54
- easeEnum["easeOutExpo"] = "easeOutExpo";
55
- easeEnum["easeInOutExpo"] = "easeInOutExpo";
56
- easeEnum["easeInCirc"] = "easeInCirc";
57
- easeEnum["easeOutCirc"] = "easeOutCirc";
58
- easeEnum["easeInOutCirc"] = "easeInOutCirc";
59
- easeEnum["easeInElastic"] = "easeInElastic";
60
- easeEnum["easeOutElastic"] = "easeOutElastic";
61
- easeEnum["easeInOutElastic"] = "easeInOutElastic";
62
- easeEnum["easeInBack"] = "easeInBack";
63
- easeEnum["easeOutBack"] = "easeOutBack";
64
- easeEnum["easeInOutBack"] = "easeInOutBack";
65
- easeEnum["easeInBounce"] = "easeInBounce";
66
- easeEnum["easeOutBounce"] = "easeOutBounce";
67
- easeEnum["easeInOutBounce"] = "easeInOutBounce";
68
- })(easeEnum = Math.easeEnum || (Math.easeEnum = {}));
69
- class ModulusDto {
70
- constructor(number, modulus) {
71
- /**
72
- * Number
73
- * @default 1
74
- * @minimum -Infinity
75
- * @maximum Infinity
76
- * @step 0.1
77
- */
78
- this.number = 1;
79
- /**
80
- * Modulus
81
- * @default 1
82
- * @minimum -Infinity
83
- * @maximum Infinity
84
- * @step 0.1
85
- */
86
- this.modulus = 2;
87
- if (number !== undefined) {
88
- this.number = number;
89
- }
90
- if (modulus !== undefined) {
91
- this.modulus = modulus;
92
- }
93
- }
94
- }
95
- Math.ModulusDto = ModulusDto;
96
- class NumberDto {
97
- constructor(number) {
98
- /**
99
- * Number
100
- * @default 1
101
- * @minimum -Infinity
102
- * @maximum Infinity
103
- * @step 0.1
104
- */
105
- this.number = 1;
106
- if (number !== undefined) {
107
- this.number = number;
108
- }
109
- }
110
- }
111
- Math.NumberDto = NumberDto;
112
- class EaseDto {
113
- constructor(x) {
114
- /**
115
- * X value param between 0-1
116
- * @default 0.5
117
- * @minimum 0
118
- * @maximum 1
119
- * @step 0.1
120
- */
121
- this.x = 0.5;
122
- /**
123
- * Minimum value
124
- * @default 0
125
- * @minimum -Infinity
126
- * @maximum Infinity
127
- * @step 0.1
128
- */
129
- this.min = 0;
130
- /**
131
- * Maximum value
132
- * @default 1
133
- * @minimum -Infinity
134
- * @maximum Infinity
135
- * @step 0.1
136
- */
137
- this.max = 1;
138
- if (x !== undefined) {
139
- this.x = x;
140
- }
141
- }
142
- }
143
- Math.EaseDto = EaseDto;
144
- class RoundToDecimalsDto {
145
- constructor(number, decimalPlaces) {
146
- /**
147
- * Number to round
148
- * @default 1.123456
149
- * @minimum -Infinity
150
- * @maximum Infinity
151
- * @step 0.1
152
- */
153
- this.number = 1.123456;
154
- /**
155
- * Number of decimal places
156
- * @default 2
157
- * @minimum -Infinity
158
- * @maximum Infinity
159
- * @step 1
160
- */
161
- this.decimalPlaces = 2;
162
- if (number !== undefined) {
163
- this.number = number;
164
- }
165
- if (decimalPlaces !== undefined) {
166
- this.decimalPlaces = decimalPlaces;
167
- }
168
- }
169
- }
170
- Math.RoundToDecimalsDto = RoundToDecimalsDto;
171
- class ActionOnTwoNumbersDto {
172
- constructor(first, second, operation) {
173
- /**
174
- * First number
175
- * @default 1
176
- * @minimum -Infinity
177
- * @maximum Infinity
178
- * @step 0.1
179
- */
180
- this.first = 1;
181
- /**
182
- * Second number
183
- * @default 1
184
- * @minimum -Infinity
185
- * @maximum Infinity
186
- * @step 0.1
187
- */
188
- this.second = 1;
189
- if (first !== undefined) {
190
- this.first = first;
191
- }
192
- if (second !== undefined) {
193
- this.second = second;
194
- }
195
- if (operation !== undefined) {
196
- this.operation = operation;
197
- }
198
- }
199
- }
200
- Math.ActionOnTwoNumbersDto = ActionOnTwoNumbersDto;
201
- class TwoNumbersDto {
202
- constructor(first, second) {
203
- /**
204
- * First number
205
- * @default 1
206
- * @minimum -Infinity
207
- * @maximum Infinity
208
- * @step 0.1
209
- */
210
- this.first = 1;
211
- /**
212
- * Second number
213
- * @default 2
214
- * @minimum -Infinity
215
- * @maximum Infinity
216
- * @step 0.1
217
- */
218
- this.second = 2;
219
- if (first !== undefined) {
220
- this.first = first;
221
- }
222
- if (second !== undefined) {
223
- this.second = second;
224
- }
225
- }
226
- }
227
- Math.TwoNumbersDto = TwoNumbersDto;
228
- class ActionOnOneNumberDto {
229
- constructor(number, operation) {
230
- /**
231
- * First number
232
- * @default 1
233
- * @minimum -Infinity
234
- * @maximum Infinity
235
- * @step 0.1
236
- */
237
- this.number = 1;
238
- if (number !== undefined) {
239
- this.number = number;
240
- }
241
- if (operation !== undefined) {
242
- this.operation = operation;
243
- }
244
- }
245
- }
246
- Math.ActionOnOneNumberDto = ActionOnOneNumberDto;
247
- class RemapNumberDto {
248
- constructor(number, fromLow, fromHigh, toLow, toHigh) {
249
- /**
250
- * Number to remap
251
- * @default 0.5
252
- * @minimum -Infinity
253
- * @maximum Infinity
254
- * @step 0.1
255
- */
256
- this.number = 0.5;
257
- /**
258
- * First number range min
259
- * @default 0
260
- * @minimum -Infinity
261
- * @maximum Infinity
262
- * @step 0.1
263
- */
264
- this.fromLow = 0;
265
- /**
266
- * Map to range min
267
- * @default 1
268
- * @minimum -Infinity
269
- * @maximum Infinity
270
- * @step 0.1
271
- */
272
- this.fromHigh = 1;
273
- /**
274
- * First number range max
275
- * @default 1
276
- * @minimum -Infinity
277
- * @maximum Infinity
278
- * @step 0.1
279
- */
280
- this.toLow = 1;
281
- /**
282
- * Map to range max
283
- * @default 2
284
- * @minimum -Infinity
285
- * @maximum Infinity
286
- * @step 0.1
287
- */
288
- this.toHigh = 2;
289
- if (number !== undefined) {
290
- this.number = number;
291
- }
292
- if (fromLow !== undefined) {
293
- this.fromLow = fromLow;
294
- }
295
- if (fromHigh !== undefined) {
296
- this.fromHigh = fromHigh;
297
- }
298
- if (toLow !== undefined) {
299
- this.toLow = toLow;
300
- }
301
- if (toHigh !== undefined) {
302
- this.toHigh = toHigh;
303
- }
304
- }
305
- }
306
- Math.RemapNumberDto = RemapNumberDto;
307
- class RandomNumberDto {
308
- constructor(low, high) {
309
- /**
310
- * Low range of random value
311
- * @default 0
312
- * @minimum -Infinity
313
- * @maximum Infinity
314
- * @step 0.1
315
- */
316
- this.low = 0;
317
- /**
318
- * High range of random value
319
- * @default 1
320
- * @minimum -Infinity
321
- * @maximum Infinity
322
- * @step 0.1
323
- */
324
- this.high = 1;
325
- if (low !== undefined) {
326
- this.low = low;
327
- }
328
- if (high !== undefined) {
329
- this.high = high;
330
- }
331
- }
332
- }
333
- Math.RandomNumberDto = RandomNumberDto;
334
- class RandomNumbersDto {
335
- constructor(low, high, count) {
336
- /**
337
- * Low range of random value
338
- * @default 0
339
- * @minimum -Infinity
340
- * @maximum Infinity
341
- * @step 0.1
342
- */
343
- this.low = 0;
344
- /**
345
- * High range of random value
346
- * @default 1
347
- * @minimum -Infinity
348
- * @maximum Infinity
349
- * @step 0.1
350
- */
351
- this.high = 1;
352
- /**
353
- * Number of produced random values
354
- * @default 10
355
- * @minimum -Infinity
356
- * @maximum Infinity
357
- * @step 1
358
- */
359
- this.count = 10;
360
- if (low !== undefined) {
361
- this.low = low;
362
- }
363
- if (high !== undefined) {
364
- this.high = high;
365
- }
366
- if (count !== undefined) {
367
- this.count = count;
368
- }
369
- }
370
- }
371
- Math.RandomNumbersDto = RandomNumbersDto;
372
- class ToFixedDto {
373
- constructor(number, decimalPlaces) {
374
- /**
375
- * Number of decimal places
376
- * @default 2
377
- * @minimum -Infinity
378
- * @maximum Infinity
379
- * @step 1
380
- */
381
- this.decimalPlaces = 2;
382
- if (number !== undefined) {
383
- this.number = number;
384
- }
385
- if (decimalPlaces !== undefined) {
386
- this.decimalPlaces = decimalPlaces;
387
- }
388
- }
389
- }
390
- Math.ToFixedDto = ToFixedDto;
391
- })(Math || (Math = {}));