@bitbybit-dev/base 0.19.8 → 0.19.9

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 +1 -0
  2. package/babel.config.d.cts +5 -0
  3. package/index.d.ts +1 -0
  4. package/{index.ts → index.js} +1 -2
  5. package/lib/api/index.js +1 -0
  6. package/lib/api/inputs/base-inputs.d.ts +35 -0
  7. package/lib/api/inputs/base-inputs.js +1 -0
  8. package/lib/api/inputs/{color-inputs.ts → color-inputs.d.ts} +26 -48
  9. package/lib/api/inputs/color-inputs.js +164 -0
  10. package/lib/api/inputs/index.js +9 -0
  11. package/lib/api/inputs/inputs.js +9 -0
  12. package/lib/api/inputs/{lists-inputs.ts → lists-inputs.d.ts} +91 -190
  13. package/lib/api/inputs/lists-inputs.js +576 -0
  14. package/lib/api/inputs/{logic-inputs.ts → logic-inputs.d.ts} +24 -46
  15. package/lib/api/inputs/logic-inputs.js +111 -0
  16. package/lib/api/inputs/{math-inputs.ts → math-inputs.d.ts} +53 -97
  17. package/lib/api/inputs/math-inputs.js +391 -0
  18. package/lib/api/inputs/{point-inputs.ts → point-inputs.d.ts} +77 -168
  19. package/lib/api/inputs/point-inputs.js +521 -0
  20. package/lib/api/inputs/text-inputs.d.ts +83 -0
  21. package/lib/api/inputs/text-inputs.js +120 -0
  22. package/lib/api/inputs/{transforms-inputs.ts → transforms-inputs.d.ts} +35 -64
  23. package/lib/api/inputs/transforms-inputs.js +200 -0
  24. package/lib/api/inputs/{vector-inputs.ts → vector-inputs.d.ts} +48 -104
  25. package/lib/api/inputs/vector-inputs.js +304 -0
  26. package/lib/api/services/color.d.ts +114 -0
  27. package/lib/api/services/{color.ts → color.js} +15 -34
  28. package/lib/api/services/geometry-helper.d.ts +15 -0
  29. package/lib/api/services/{geometry-helper.ts → geometry-helper.js} +31 -43
  30. package/lib/api/services/{index.ts → index.d.ts} +1 -1
  31. package/lib/api/services/index.js +9 -0
  32. package/lib/api/services/lists.d.ts +287 -0
  33. package/lib/api/services/{lists.ts → lists.js} +59 -83
  34. package/lib/api/services/logic.d.ts +99 -0
  35. package/lib/api/services/{logic.ts → logic.js} +24 -32
  36. package/lib/api/services/math.d.ts +349 -0
  37. package/lib/api/services/{math.ts → math.js} +71 -136
  38. package/lib/api/services/point.d.ts +222 -0
  39. package/lib/api/services/{point.ts → point.js} +32 -67
  40. package/lib/api/services/text.d.ts +69 -0
  41. package/lib/api/services/{text.ts → text.js} +7 -17
  42. package/lib/api/services/transforms.d.ts +122 -0
  43. package/lib/api/services/{transforms.ts → transforms.js} +37 -83
  44. package/lib/api/services/vector.d.ts +320 -0
  45. package/lib/api/services/{vector.ts → vector.js} +42 -80
  46. package/lib/{index.ts → index.d.ts} +0 -1
  47. package/lib/index.js +1 -0
  48. package/package.json +1 -1
  49. package/lib/api/inputs/base-inputs.ts +0 -18
  50. package/lib/api/inputs/text-inputs.ts +0 -108
  51. package/lib/api/services/color.test.ts +0 -86
  52. package/lib/api/services/lists.test.ts +0 -612
  53. package/lib/api/services/logic.test.ts +0 -187
  54. package/lib/api/services/math.test.ts +0 -622
  55. package/lib/api/services/text.test.ts +0 -55
  56. package/lib/api/services/vector.test.ts +0 -360
  57. package/tsconfig.bitbybit.json +0 -26
  58. package/tsconfig.json +0 -24
  59. /package/lib/api/{index.ts → index.d.ts} +0 -0
  60. /package/lib/api/inputs/{index.ts → index.d.ts} +0 -0
  61. /package/lib/api/inputs/{inputs.ts → inputs.d.ts} +0 -0
@@ -1,14 +1,7 @@
1
- /* eslint-disable @typescript-eslint/no-namespace */
2
1
  import { Base } from "./base-inputs";
3
-
4
- export namespace Transforms {
5
-
6
- export class RotationCenterAxisDto {
7
- constructor(angle?: number, axis?: Base.Vector3, center?: Base.Point3) {
8
- if (angle !== undefined) { this.angle = angle; }
9
- if (axis !== undefined) { this.axis = axis; }
10
- if (center !== undefined) { this.center = center; }
11
- }
2
+ export declare namespace Transforms {
3
+ class RotationCenterAxisDto {
4
+ constructor(angle?: number, axis?: Base.Vector3, center?: Base.Point3);
12
5
  /**
13
6
  * Angle of rotation in degrees
14
7
  * @default 90
@@ -16,23 +9,20 @@ export namespace Transforms {
16
9
  * @maximum Infinity
17
10
  * @step 1
18
11
  */
19
- angle = 90;
12
+ angle: number;
20
13
  /**
21
14
  * Axis vector for rotation
22
15
  * @default [0, 1, 0]
23
16
  */
24
- axis: Base.Vector3 = [0, 1, 0];
17
+ axis: Base.Vector3;
25
18
  /**
26
19
  * The center from which the axis is pointing
27
20
  * @default [0, 0, 0]
28
21
  */
29
- center: Base.Point3 = [0, 0, 0];
22
+ center: Base.Point3;
30
23
  }
31
- export class RotationCenterDto {
32
- constructor(angle?: number, center?: Base.Point3) {
33
- if (angle !== undefined) { this.angle = angle; }
34
- if (center !== undefined) { this.center = center; }
35
- }
24
+ class RotationCenterDto {
25
+ constructor(angle?: number, center?: Base.Point3);
36
26
  /**
37
27
  * Angle of rotation in degrees
38
28
  * @default 90
@@ -40,20 +30,15 @@ export namespace Transforms {
40
30
  * @maximum Infinity
41
31
  * @step 1
42
32
  */
43
- angle = 90;
33
+ angle: number;
44
34
  /**
45
35
  * The center from which the axis is pointing
46
36
  * @default [0, 0, 0]
47
37
  */
48
- center: Base.Point3 = [0, 0, 0];
38
+ center: Base.Point3;
49
39
  }
50
- export class RotationCenterYawPitchRollDto {
51
- constructor(yaw?: number, pitch?: number, roll?: number, center?: Base.Point3) {
52
- if (yaw !== undefined) { this.yaw = yaw; }
53
- if (pitch !== undefined) { this.pitch = pitch; }
54
- if (roll !== undefined) { this.roll = roll; }
55
- if (center !== undefined) { this.center = center; }
56
- }
40
+ class RotationCenterYawPitchRollDto {
41
+ constructor(yaw?: number, pitch?: number, roll?: number, center?: Base.Point3);
57
42
  /**
58
43
  * Yaw angle (Rotation around X) in degrees
59
44
  * @default 0
@@ -61,7 +46,7 @@ export namespace Transforms {
61
46
  * @maximum Infinity
62
47
  * @step 1
63
48
  */
64
- yaw = 0;
49
+ yaw: number;
65
50
  /**
66
51
  * Pitch angle (Rotation around Y) in degrees
67
52
  * @default 0
@@ -69,7 +54,7 @@ export namespace Transforms {
69
54
  * @maximum Infinity
70
55
  * @step 1
71
56
  */
72
- pitch = 0;
57
+ pitch: number;
73
58
  /**
74
59
  * Roll angle (Rotation around Z) in degrees
75
60
  * @default 0
@@ -77,43 +62,36 @@ export namespace Transforms {
77
62
  * @maximum Infinity
78
63
  * @step 1
79
64
  */
80
- roll = 0;
65
+ roll: number;
81
66
  /**
82
67
  * The center from which the rotations are applied
83
68
  * @default [0, 0, 0]
84
69
  */
85
- center: Base.Point3 = [0, 0, 0];
70
+ center: Base.Point3;
86
71
  }
87
- export class ScaleXYZDto {
88
- constructor(scaleXyz?: Base.Vector3) {
89
- if (scaleXyz !== undefined) { this.scaleXyz = scaleXyz; }
90
- }
72
+ class ScaleXYZDto {
73
+ constructor(scaleXyz?: Base.Vector3);
91
74
  /**
92
75
  * Scaling factors for each axis [1, 2, 1] means that Y axis will be scaled 200% and both x and z axis will remain on 100%
93
76
  * @default [1, 1, 1]
94
77
  */
95
- scaleXyz: Base.Vector3 = [1, 1, 1];
78
+ scaleXyz: Base.Vector3;
96
79
  }
97
- export class ScaleCenterXYZDto {
98
- constructor(center?: Base.Point3, scaleXyz?: Base.Vector3) {
99
- if (center !== undefined) { this.center = center; }
100
- if (scaleXyz !== undefined) { this.scaleXyz = scaleXyz; }
101
- }
80
+ class ScaleCenterXYZDto {
81
+ constructor(center?: Base.Point3, scaleXyz?: Base.Vector3);
102
82
  /**
103
83
  * The center from which the scaling is applied
104
84
  * @default [0, 0, 0]
105
85
  */
106
- center: Base.Point3 = [0, 0, 0];
86
+ center: Base.Point3;
107
87
  /**
108
88
  * Scaling factors for each axis [1, 2, 1] means that Y axis will be scaled 200% and both x and z axis will remain on 100%
109
89
  * @default [1, 1, 1]
110
90
  */
111
- scaleXyz: Base.Vector3 = [1, 1, 1];
91
+ scaleXyz: Base.Vector3;
112
92
  }
113
- export class UniformScaleDto {
114
- constructor(scale?: number) {
115
- if (scale !== undefined) { this.scale = scale; }
116
- }
93
+ class UniformScaleDto {
94
+ constructor(scale?: number);
117
95
  /**
118
96
  * Uniform scale factor for all x, y, z directions. 1 will keep everything on original size, 2 will scale 200%;
119
97
  * @default 1
@@ -121,13 +99,10 @@ export namespace Transforms {
121
99
  * @maximum Infinity
122
100
  * @step 0.1
123
101
  */
124
- scale = 1;
102
+ scale: number;
125
103
  }
126
- export class UniformScaleFromCenterDto {
127
- constructor(scale?: number, center?: Base.Point3) {
128
- if (scale !== undefined) { this.scale = scale; }
129
- if (center !== undefined) { this.center = center; }
130
- }
104
+ class UniformScaleFromCenterDto {
105
+ constructor(scale?: number, center?: Base.Point3);
131
106
  /**
132
107
  * Scale factor for all x, y, z directions. 1 will keep everything on original size, 2 will scale 200%;
133
108
  * @default 1
@@ -135,27 +110,23 @@ export namespace Transforms {
135
110
  * @maximum Infinity
136
111
  * @step 0.1
137
112
  */
138
- scale = 1;
113
+ scale: number;
139
114
  /**
140
115
  * Center position of the scaling
141
116
  * @default [0, 0, 0]
142
117
  */
143
- center: Base.Point3 = [0, 0, 0];
118
+ center: Base.Point3;
144
119
  }
145
- export class TranslationXYZDto {
146
- constructor(translation?: Base.Vector3) {
147
- if (translation !== undefined) { this.translation = translation; }
148
- }
120
+ class TranslationXYZDto {
121
+ constructor(translation?: Base.Vector3);
149
122
  /**
150
123
  * Translation vector with [x, y, z] distances
151
124
  * @default [0, 0, 0]
152
125
  */
153
- translation: Base.Vector3 = [0, 0, 0];
126
+ translation: Base.Vector3;
154
127
  }
155
- export class TranslationsXYZDto {
156
- constructor(translations?: Base.Vector3[]) {
157
- if (translations !== undefined) { this.translations = translations; }
158
- }
128
+ class TranslationsXYZDto {
129
+ constructor(translations?: Base.Vector3[]);
159
130
  /**
160
131
  * Translation vectors with [x, y, z] distances
161
132
  * @default undefined
@@ -0,0 +1,200 @@
1
+ export var Transforms;
2
+ (function (Transforms) {
3
+ class RotationCenterAxisDto {
4
+ constructor(angle, axis, center) {
5
+ /**
6
+ * Angle of rotation in degrees
7
+ * @default 90
8
+ * @minimum -Infinity
9
+ * @maximum Infinity
10
+ * @step 1
11
+ */
12
+ this.angle = 90;
13
+ /**
14
+ * Axis vector for rotation
15
+ * @default [0, 1, 0]
16
+ */
17
+ this.axis = [0, 1, 0];
18
+ /**
19
+ * The center from which the axis is pointing
20
+ * @default [0, 0, 0]
21
+ */
22
+ this.center = [0, 0, 0];
23
+ if (angle !== undefined) {
24
+ this.angle = angle;
25
+ }
26
+ if (axis !== undefined) {
27
+ this.axis = axis;
28
+ }
29
+ if (center !== undefined) {
30
+ this.center = center;
31
+ }
32
+ }
33
+ }
34
+ Transforms.RotationCenterAxisDto = RotationCenterAxisDto;
35
+ class RotationCenterDto {
36
+ constructor(angle, center) {
37
+ /**
38
+ * Angle of rotation in degrees
39
+ * @default 90
40
+ * @minimum -Infinity
41
+ * @maximum Infinity
42
+ * @step 1
43
+ */
44
+ this.angle = 90;
45
+ /**
46
+ * The center from which the axis is pointing
47
+ * @default [0, 0, 0]
48
+ */
49
+ this.center = [0, 0, 0];
50
+ if (angle !== undefined) {
51
+ this.angle = angle;
52
+ }
53
+ if (center !== undefined) {
54
+ this.center = center;
55
+ }
56
+ }
57
+ }
58
+ Transforms.RotationCenterDto = RotationCenterDto;
59
+ class RotationCenterYawPitchRollDto {
60
+ constructor(yaw, pitch, roll, center) {
61
+ /**
62
+ * Yaw angle (Rotation around X) in degrees
63
+ * @default 0
64
+ * @minimum -Infinity
65
+ * @maximum Infinity
66
+ * @step 1
67
+ */
68
+ this.yaw = 0;
69
+ /**
70
+ * Pitch angle (Rotation around Y) in degrees
71
+ * @default 0
72
+ * @minimum -Infinity
73
+ * @maximum Infinity
74
+ * @step 1
75
+ */
76
+ this.pitch = 0;
77
+ /**
78
+ * Roll angle (Rotation around Z) in degrees
79
+ * @default 0
80
+ * @minimum -Infinity
81
+ * @maximum Infinity
82
+ * @step 1
83
+ */
84
+ this.roll = 0;
85
+ /**
86
+ * The center from which the rotations are applied
87
+ * @default [0, 0, 0]
88
+ */
89
+ this.center = [0, 0, 0];
90
+ if (yaw !== undefined) {
91
+ this.yaw = yaw;
92
+ }
93
+ if (pitch !== undefined) {
94
+ this.pitch = pitch;
95
+ }
96
+ if (roll !== undefined) {
97
+ this.roll = roll;
98
+ }
99
+ if (center !== undefined) {
100
+ this.center = center;
101
+ }
102
+ }
103
+ }
104
+ Transforms.RotationCenterYawPitchRollDto = RotationCenterYawPitchRollDto;
105
+ class ScaleXYZDto {
106
+ constructor(scaleXyz) {
107
+ /**
108
+ * Scaling factors for each axis [1, 2, 1] means that Y axis will be scaled 200% and both x and z axis will remain on 100%
109
+ * @default [1, 1, 1]
110
+ */
111
+ this.scaleXyz = [1, 1, 1];
112
+ if (scaleXyz !== undefined) {
113
+ this.scaleXyz = scaleXyz;
114
+ }
115
+ }
116
+ }
117
+ Transforms.ScaleXYZDto = ScaleXYZDto;
118
+ class ScaleCenterXYZDto {
119
+ constructor(center, scaleXyz) {
120
+ /**
121
+ * The center from which the scaling is applied
122
+ * @default [0, 0, 0]
123
+ */
124
+ this.center = [0, 0, 0];
125
+ /**
126
+ * Scaling factors for each axis [1, 2, 1] means that Y axis will be scaled 200% and both x and z axis will remain on 100%
127
+ * @default [1, 1, 1]
128
+ */
129
+ this.scaleXyz = [1, 1, 1];
130
+ if (center !== undefined) {
131
+ this.center = center;
132
+ }
133
+ if (scaleXyz !== undefined) {
134
+ this.scaleXyz = scaleXyz;
135
+ }
136
+ }
137
+ }
138
+ Transforms.ScaleCenterXYZDto = ScaleCenterXYZDto;
139
+ class UniformScaleDto {
140
+ constructor(scale) {
141
+ /**
142
+ * Uniform scale factor for all x, y, z directions. 1 will keep everything on original size, 2 will scale 200%;
143
+ * @default 1
144
+ * @minimum -Infinity
145
+ * @maximum Infinity
146
+ * @step 0.1
147
+ */
148
+ this.scale = 1;
149
+ if (scale !== undefined) {
150
+ this.scale = scale;
151
+ }
152
+ }
153
+ }
154
+ Transforms.UniformScaleDto = UniformScaleDto;
155
+ class UniformScaleFromCenterDto {
156
+ constructor(scale, center) {
157
+ /**
158
+ * Scale factor for all x, y, z directions. 1 will keep everything on original size, 2 will scale 200%;
159
+ * @default 1
160
+ * @minimum -Infinity
161
+ * @maximum Infinity
162
+ * @step 0.1
163
+ */
164
+ this.scale = 1;
165
+ /**
166
+ * Center position of the scaling
167
+ * @default [0, 0, 0]
168
+ */
169
+ this.center = [0, 0, 0];
170
+ if (scale !== undefined) {
171
+ this.scale = scale;
172
+ }
173
+ if (center !== undefined) {
174
+ this.center = center;
175
+ }
176
+ }
177
+ }
178
+ Transforms.UniformScaleFromCenterDto = UniformScaleFromCenterDto;
179
+ class TranslationXYZDto {
180
+ constructor(translation) {
181
+ /**
182
+ * Translation vector with [x, y, z] distances
183
+ * @default [0, 0, 0]
184
+ */
185
+ this.translation = [0, 0, 0];
186
+ if (translation !== undefined) {
187
+ this.translation = translation;
188
+ }
189
+ }
190
+ }
191
+ Transforms.TranslationXYZDto = TranslationXYZDto;
192
+ class TranslationsXYZDto {
193
+ constructor(translations) {
194
+ if (translations !== undefined) {
195
+ this.translations = translations;
196
+ }
197
+ }
198
+ }
199
+ Transforms.TranslationsXYZDto = TranslationsXYZDto;
200
+ })(Transforms || (Transforms = {}));