@bitbybit-dev/base 0.19.6 → 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,164 +0,0 @@
1
- // tslint:disable-next-line: no-namespace
2
- export var Color;
3
- (function (Color) {
4
- class HexDto {
5
- constructor(color) {
6
- /**
7
- * Color hex
8
- * @default #0000ff
9
- */
10
- this.color = "#0000ff";
11
- if (color !== undefined) {
12
- this.color = color;
13
- }
14
- }
15
- }
16
- Color.HexDto = HexDto;
17
- class InvertHexDto {
18
- constructor(color) {
19
- /**
20
- * Color hex
21
- * @default #0000ff
22
- */
23
- this.color = "#0000ff";
24
- /**
25
- * Choose to invert the color to black and white (useful for text color)
26
- */
27
- this.blackAndWhite = false;
28
- if (color !== undefined) {
29
- this.color = color;
30
- }
31
- }
32
- }
33
- Color.InvertHexDto = InvertHexDto;
34
- class HexDtoMapped {
35
- constructor(color, from, to) {
36
- /**
37
- * Color hex
38
- * @default #0000ff
39
- */
40
- this.color = "#0000ff";
41
- /**
42
- * From min bound
43
- * @default 0
44
- * @minimum -Infinity
45
- * @maximum Infinity
46
- * @step 1
47
- */
48
- this.from = 0;
49
- /**
50
- * To max bound
51
- * @default 255
52
- * @minimum -Infinity
53
- * @maximum Infinity
54
- * @step 1
55
- */
56
- this.to = 255;
57
- if (color !== undefined) {
58
- this.color = color;
59
- }
60
- if (from !== undefined) {
61
- this.from = from;
62
- }
63
- if (to !== undefined) {
64
- this.to = to;
65
- }
66
- }
67
- }
68
- Color.HexDtoMapped = HexDtoMapped;
69
- class RGBObjectMaxDto {
70
- constructor(rgb, max) {
71
- /**
72
- * Min value of the range
73
- * @default 0
74
- * @minimum 0
75
- * @maximum 255
76
- * @step 0.1
77
- */
78
- this.min = 0;
79
- /**
80
- * Max value, it would automatically be remapped to whatever is needed if lower comes in
81
- * @default 255
82
- * @minimum 0
83
- * @maximum 255
84
- * @step 0.1
85
- */
86
- this.max = 255;
87
- if (rgb !== undefined) {
88
- this.rgb = rgb;
89
- }
90
- if (max !== undefined) {
91
- this.max = max;
92
- }
93
- }
94
- }
95
- Color.RGBObjectMaxDto = RGBObjectMaxDto;
96
- class RGBMinMaxDto {
97
- constructor(r, g, b, min, max) {
98
- /**
99
- * Red value component
100
- * @default 255
101
- * @minimum 0
102
- * @maximum 255
103
- * @step 1
104
- */
105
- this.r = 255;
106
- /**
107
- * Green value component
108
- * @default 255
109
- * @minimum 0
110
- * @maximum 255
111
- * @step 1
112
- */
113
- this.g = 255;
114
- /**
115
- * Blue value component
116
- * @default 255
117
- * @minimum 0
118
- * @maximum 255
119
- * @step 1
120
- */
121
- this.b = 255;
122
- /**
123
- * Min value of the range
124
- * @default 0
125
- * @minimum 0
126
- * @maximum 255
127
- * @step 0.1
128
- */
129
- this.min = 0;
130
- /**
131
- * Max value of the range
132
- * @default 255
133
- * @minimum 0
134
- * @maximum 255
135
- * @step 0.1
136
- */
137
- this.max = 255;
138
- if (r !== undefined) {
139
- this.r = r;
140
- }
141
- if (g !== undefined) {
142
- this.g = g;
143
- }
144
- if (b !== undefined) {
145
- this.b = b;
146
- }
147
- if (min !== undefined) {
148
- this.min = min;
149
- }
150
- if (max !== undefined) {
151
- this.max = max;
152
- }
153
- }
154
- }
155
- Color.RGBMinMaxDto = RGBMinMaxDto;
156
- class RGBObjectDto {
157
- constructor(rgb) {
158
- if (rgb !== undefined) {
159
- this.rgb = rgb;
160
- }
161
- }
162
- }
163
- Color.RGBObjectDto = RGBObjectDto;
164
- })(Color || (Color = {}));
@@ -1,9 +0,0 @@
1
- export * from "./color-inputs";
2
- export * from "./lists-inputs";
3
- export * from "./logic-inputs";
4
- export * from "./math-inputs";
5
- export * from "./point-inputs";
6
- export * from "./text-inputs";
7
- export * from "./vector-inputs";
8
- export * from "./transforms-inputs";
9
- export * from "./base-inputs";
@@ -1,9 +0,0 @@
1
- export * from "./color-inputs";
2
- export * from "./lists-inputs";
3
- export * from "./logic-inputs";
4
- export * from "./math-inputs";
5
- export * from "./point-inputs";
6
- export * from "./text-inputs";
7
- export * from "./text-inputs";
8
- export * from "./vector-inputs";
9
- export * from "./transforms-inputs";