@bitbybit-dev/base 1.2.0-rc.2 → 1.3.0-rc.0

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 (55) hide show
  1. package/lib/api/GlobalCDNProvider.js +1 -1
  2. package/lib/api/inputs/base-inputs.d.ts +13 -12
  3. package/lib/api/inputs/color-inputs.d.ts +97 -48
  4. package/lib/api/inputs/color-inputs.js +95 -46
  5. package/lib/api/inputs/dates-inputs.d.ts +67 -26
  6. package/lib/api/inputs/dates-inputs.js +57 -16
  7. package/lib/api/inputs/io-inputs.d.ts +13 -15
  8. package/lib/api/inputs/io-inputs.js +7 -8
  9. package/lib/api/inputs/line-inputs.d.ts +88 -33
  10. package/lib/api/inputs/line-inputs.js +61 -11
  11. package/lib/api/inputs/lists-inputs.d.ts +207 -96
  12. package/lib/api/inputs/lists-inputs.js +153 -45
  13. package/lib/api/inputs/logic-inputs.d.ts +52 -22
  14. package/lib/api/inputs/logic-inputs.js +41 -12
  15. package/lib/api/inputs/math-inputs.d.ts +113 -52
  16. package/lib/api/inputs/math-inputs.js +112 -51
  17. package/lib/api/inputs/mesh-inputs.d.ts +30 -11
  18. package/lib/api/inputs/mesh-inputs.js +21 -3
  19. package/lib/api/inputs/point-inputs.d.ts +240 -107
  20. package/lib/api/inputs/point-inputs.js +199 -73
  21. package/lib/api/inputs/polyline-inputs.d.ts +68 -28
  22. package/lib/api/inputs/polyline-inputs.js +48 -13
  23. package/lib/api/inputs/text-inputs.d.ts +117 -46
  24. package/lib/api/inputs/text-inputs.js +111 -41
  25. package/lib/api/inputs/transforms-inputs.d.ts +65 -23
  26. package/lib/api/inputs/transforms-inputs.js +64 -22
  27. package/lib/api/inputs/vector-inputs.d.ts +154 -76
  28. package/lib/api/inputs/vector-inputs.js +132 -57
  29. package/lib/api/models/point/hex-grid-data.d.ts +1 -1
  30. package/lib/api/models/point/hex-grid-data.js +1 -1
  31. package/lib/api/services/color.d.ts +149 -70
  32. package/lib/api/services/color.js +149 -70
  33. package/lib/api/services/dates.d.ts +313 -150
  34. package/lib/api/services/dates.js +313 -150
  35. package/lib/api/services/line.d.ts +138 -68
  36. package/lib/api/services/line.js +138 -68
  37. package/lib/api/services/lists.d.ts +357 -177
  38. package/lib/api/services/lists.js +357 -177
  39. package/lib/api/services/logic.d.ts +98 -45
  40. package/lib/api/services/logic.js +98 -45
  41. package/lib/api/services/math.d.ts +363 -211
  42. package/lib/api/services/math.js +363 -211
  43. package/lib/api/services/mesh.d.ts +73 -31
  44. package/lib/api/services/mesh.js +73 -31
  45. package/lib/api/services/point.d.ts +367 -147
  46. package/lib/api/services/point.js +367 -147
  47. package/lib/api/services/polyline.d.ts +146 -71
  48. package/lib/api/services/polyline.js +146 -71
  49. package/lib/api/services/text.d.ts +320 -165
  50. package/lib/api/services/text.js +320 -165
  51. package/lib/api/services/transforms.d.ts +145 -58
  52. package/lib/api/services/transforms.js +145 -58
  53. package/lib/api/services/vector.d.ts +381 -156
  54. package/lib/api/services/vector.js +381 -156
  55. package/package.json +1 -1
@@ -21,72 +21,91 @@ export declare namespace Logic {
21
21
  equal = "==",
22
22
  notEqual = "!="
23
23
  }
24
+ /**
25
+ * Two values and an operator for `logic.compare`.
26
+ */
24
27
  class ComparisonDto<T> {
25
28
  constructor(first?: T, second?: T, operator?: BooleanOperatorsEnum);
26
29
  /**
27
- * First item
30
+ * The value on the left of the operator.
28
31
  * @default undefined
29
32
  */
30
33
  first: T;
31
34
  /**
32
- * Second item
35
+ * The value on the right of the operator.
33
36
  * @default undefined
34
37
  */
35
38
  second: T;
36
39
  /**
37
- * Operator
40
+ * The comparison: `<`, `<=`, `>`, `>=`, `==`, `!=`, or the strict `===` and `!==`, which do
41
+ * not convert types.
38
42
  * @default less
39
43
  */
40
44
  operator: BooleanOperatorsEnum;
41
45
  }
46
+ /**
47
+ * One boolean for `logic.boolean` and `logic.not`, which pass it through or flip it.
48
+ */
42
49
  class BooleanDto {
43
50
  constructor(boolean?: boolean);
44
51
  /**
45
- * Boolean value
52
+ * The boolean value.
46
53
  * @default false
47
54
  */
48
55
  boolean: boolean;
49
56
  }
57
+ /**
58
+ * A list of booleans for `logic.notList`, which flips every one of them.
59
+ */
50
60
  class BooleanListDto {
51
61
  constructor(booleans?: boolean[]);
52
62
  /**
53
- * Boolean value
63
+ * The booleans, in order.
54
64
  * @default undefined
55
65
  */
56
66
  booleans: boolean[];
57
67
  }
68
+ /**
69
+ * A value and a condition for `logic.valueGate`.
70
+ */
58
71
  class ValueGateDto<T> {
59
72
  constructor(value?: T, boolean?: boolean);
60
73
  /**
61
- * Value to transmit when gate will be released. When value is not released we will transmit undefined value
74
+ * The value that passes through when the gate is open.
62
75
  * @default undefined
63
76
  */
64
77
  value: T;
65
78
  /**
66
- * Boolean value to release the gate
79
+ * When true the gate is open and the value passes; when false the result is undefined.
67
80
  * @default false
68
81
  */
69
82
  boolean: boolean;
70
83
  }
84
+ /**
85
+ * A preferred value and a fallback for `logic.firstDefinedValueGate`.
86
+ */
71
87
  class TwoValueGateDto<T, U> {
72
88
  constructor(value1?: T, value2?: U);
73
89
  /**
74
- * First value to check
90
+ * The value used when it is defined.
75
91
  * @default undefined
76
92
  * @optional true
77
93
  */
78
94
  value1?: T | undefined;
79
95
  /**
80
- * Second value to check
96
+ * The value used when the first is undefined.
81
97
  * @default undefined
82
98
  * @optional true
83
99
  */
84
100
  value2?: U | undefined;
85
101
  }
102
+ /**
103
+ * A length and a probability for `logic.randomBooleans`.
104
+ */
86
105
  class RandomBooleansDto {
87
106
  constructor(length?: number);
88
107
  /**
89
- * Length of the list
108
+ * How many booleans to draw.
90
109
  * @default 10
91
110
  * @minimum 1
92
111
  * @maximum Infinity
@@ -94,7 +113,7 @@ export declare namespace Logic {
94
113
  */
95
114
  length: number;
96
115
  /**
97
- * Threshold for true value between 0 and 1. The closer the value is to 1 the more true values there will be in the list.
116
+ * The chance of each boolean being true, from 0 (never) to 1 (always).
98
117
  * @default 0.5
99
118
  * @minimum 0
100
119
  * @maximum 1
@@ -102,14 +121,17 @@ export declare namespace Logic {
102
121
  */
103
122
  trueThreshold: number;
104
123
  }
124
+ /**
125
+ * Numbers, two thresholds and a step count for `logic.twoThresholdRandomGradient`.
126
+ */
105
127
  class TwoThresholdRandomGradientDto {
106
128
  /**
107
- * Numbers to remap to bools
129
+ * The numbers to turn into booleans, one each.
108
130
  * @default undefined
109
131
  */
110
132
  numbers: number[];
111
133
  /**
112
- * Threshold for the numeric value until which the output will be true
134
+ * Numbers below this are always true.
113
135
  * @default 1
114
136
  * @minimum 0
115
137
  * @maximum Infinity
@@ -117,7 +139,8 @@ export declare namespace Logic {
117
139
  */
118
140
  thresholdTotalTrue: number;
119
141
  /**
120
- * Threshold for the numeric value until which the output will be true
142
+ * Numbers above this are always false; between the two thresholds the chance of true fades
143
+ * from certain to none.
121
144
  * @default 2
122
145
  * @minimum 0
123
146
  * @maximum Infinity
@@ -125,7 +148,7 @@ export declare namespace Logic {
125
148
  */
126
149
  thresholdTotalFalse: number;
127
150
  /**
128
- * Number of levels to go through in between thresholds for gradient
151
+ * How many steps the fade between the thresholds has; more steps make it smoother.
129
152
  * @default 10
130
153
  * @minimum 0
131
154
  * @maximum Infinity
@@ -133,15 +156,17 @@ export declare namespace Logic {
133
156
  */
134
157
  nrLevels: number;
135
158
  }
159
+ /**
160
+ * Numbers and a threshold for `logic.thresholdBooleanList`, which turns them into booleans.
161
+ */
136
162
  class ThresholdBooleanListDto {
137
163
  /**
138
- * Numbers to remap to bools based on threshold
164
+ * The numbers to turn into booleans, one each.
139
165
  * @default undefined
140
166
  */
141
167
  numbers: number[];
142
168
  /**
143
- * Threshold for the numeric value until which the output will be true.
144
- * If number in the list is larger than this threshold it will become false if inverse stays false.
169
+ * Numbers below this become true and the rest false, unless `inverse` flips them.
145
170
  * @default 1
146
171
  * @minimum 0
147
172
  * @maximum Infinity
@@ -149,24 +174,29 @@ export declare namespace Logic {
149
174
  */
150
175
  threshold: number;
151
176
  /**
152
- * True values become false and false values become true
177
+ * When true, every result is flipped: true becomes false and false becomes true.
153
178
  * @default false
154
179
  */
155
180
  inverse: boolean;
156
181
  }
182
+ /**
183
+ * Numbers and ranges for `logic.thresholdGapsBooleanList`, which marks the numbers inside any
184
+ * range.
185
+ */
157
186
  class ThresholdGapsBooleanListDto {
158
187
  /**
159
- * Numbers to remap to bools based on threshold
188
+ * The numbers to turn into booleans, one each.
160
189
  * @default undefined
161
190
  */
162
191
  numbers: number[];
163
192
  /**
164
- * 2D arrays representing gaps of the thresholds on which numbers should be flipped from false to true if inverse is false.
193
+ * The ranges, each `[min, max]` with both ends included; a number inside any of them
194
+ * becomes true.
165
195
  * @default undefined
166
196
  */
167
197
  gapThresholds: Base.Vector2[];
168
198
  /**
169
- * True values become false and false values become true
199
+ * When true, every result is flipped: true becomes false and false becomes true.
170
200
  * @default false
171
201
  */
172
202
  inverse: boolean;
@@ -24,10 +24,14 @@ export var Logic;
24
24
  BooleanOperatorsEnum["equal"] = "==";
25
25
  BooleanOperatorsEnum["notEqual"] = "!=";
26
26
  })(BooleanOperatorsEnum = Logic.BooleanOperatorsEnum || (Logic.BooleanOperatorsEnum = {}));
27
+ /**
28
+ * Two values and an operator for `logic.compare`.
29
+ */
27
30
  class ComparisonDto {
28
31
  constructor(first, second, operator) {
29
32
  /**
30
- * Operator
33
+ * The comparison: `<`, `<=`, `>`, `>=`, `==`, `!=`, or the strict `===` and `!==`, which do
34
+ * not convert types.
31
35
  * @default less
32
36
  */
33
37
  this.operator = BooleanOperatorsEnum.less;
@@ -43,10 +47,13 @@ export var Logic;
43
47
  }
44
48
  }
45
49
  Logic.ComparisonDto = ComparisonDto;
50
+ /**
51
+ * One boolean for `logic.boolean` and `logic.not`, which pass it through or flip it.
52
+ */
46
53
  class BooleanDto {
47
54
  constructor(boolean) {
48
55
  /**
49
- * Boolean value
56
+ * The boolean value.
50
57
  * @default false
51
58
  */
52
59
  this.boolean = false;
@@ -56,6 +63,9 @@ export var Logic;
56
63
  }
57
64
  }
58
65
  Logic.BooleanDto = BooleanDto;
66
+ /**
67
+ * A list of booleans for `logic.notList`, which flips every one of them.
68
+ */
59
69
  class BooleanListDto {
60
70
  constructor(booleans) {
61
71
  if (booleans !== undefined) {
@@ -64,10 +74,13 @@ export var Logic;
64
74
  }
65
75
  }
66
76
  Logic.BooleanListDto = BooleanListDto;
77
+ /**
78
+ * A value and a condition for `logic.valueGate`.
79
+ */
67
80
  class ValueGateDto {
68
81
  constructor(value, boolean) {
69
82
  /**
70
- * Boolean value to release the gate
83
+ * When true the gate is open and the value passes; when false the result is undefined.
71
84
  * @default false
72
85
  */
73
86
  this.boolean = false;
@@ -80,6 +93,9 @@ export var Logic;
80
93
  }
81
94
  }
82
95
  Logic.ValueGateDto = ValueGateDto;
96
+ /**
97
+ * A preferred value and a fallback for `logic.firstDefinedValueGate`.
98
+ */
83
99
  class TwoValueGateDto {
84
100
  constructor(value1, value2) {
85
101
  if (value1 !== undefined) {
@@ -91,10 +107,13 @@ export var Logic;
91
107
  }
92
108
  }
93
109
  Logic.TwoValueGateDto = TwoValueGateDto;
110
+ /**
111
+ * A length and a probability for `logic.randomBooleans`.
112
+ */
94
113
  class RandomBooleansDto {
95
114
  constructor(length) {
96
115
  /**
97
- * Length of the list
116
+ * How many booleans to draw.
98
117
  * @default 10
99
118
  * @minimum 1
100
119
  * @maximum Infinity
@@ -102,7 +121,7 @@ export var Logic;
102
121
  */
103
122
  this.length = 10;
104
123
  /**
105
- * Threshold for true value between 0 and 1. The closer the value is to 1 the more true values there will be in the list.
124
+ * The chance of each boolean being true, from 0 (never) to 1 (always).
106
125
  * @default 0.5
107
126
  * @minimum 0
108
127
  * @maximum 1
@@ -115,10 +134,13 @@ export var Logic;
115
134
  }
116
135
  }
117
136
  Logic.RandomBooleansDto = RandomBooleansDto;
137
+ /**
138
+ * Numbers, two thresholds and a step count for `logic.twoThresholdRandomGradient`.
139
+ */
118
140
  class TwoThresholdRandomGradientDto {
119
141
  constructor() {
120
142
  /**
121
- * Threshold for the numeric value until which the output will be true
143
+ * Numbers below this are always true.
122
144
  * @default 1
123
145
  * @minimum 0
124
146
  * @maximum Infinity
@@ -126,7 +148,8 @@ export var Logic;
126
148
  */
127
149
  this.thresholdTotalTrue = 1;
128
150
  /**
129
- * Threshold for the numeric value until which the output will be true
151
+ * Numbers above this are always false; between the two thresholds the chance of true fades
152
+ * from certain to none.
130
153
  * @default 2
131
154
  * @minimum 0
132
155
  * @maximum Infinity
@@ -134,7 +157,7 @@ export var Logic;
134
157
  */
135
158
  this.thresholdTotalFalse = 2;
136
159
  /**
137
- * Number of levels to go through in between thresholds for gradient
160
+ * How many steps the fade between the thresholds has; more steps make it smoother.
138
161
  * @default 10
139
162
  * @minimum 0
140
163
  * @maximum Infinity
@@ -144,11 +167,13 @@ export var Logic;
144
167
  }
145
168
  }
146
169
  Logic.TwoThresholdRandomGradientDto = TwoThresholdRandomGradientDto;
170
+ /**
171
+ * Numbers and a threshold for `logic.thresholdBooleanList`, which turns them into booleans.
172
+ */
147
173
  class ThresholdBooleanListDto {
148
174
  constructor() {
149
175
  /**
150
- * Threshold for the numeric value until which the output will be true.
151
- * If number in the list is larger than this threshold it will become false if inverse stays false.
176
+ * Numbers below this become true and the rest false, unless `inverse` flips them.
152
177
  * @default 1
153
178
  * @minimum 0
154
179
  * @maximum Infinity
@@ -156,17 +181,21 @@ export var Logic;
156
181
  */
157
182
  this.threshold = 1;
158
183
  /**
159
- * True values become false and false values become true
184
+ * When true, every result is flipped: true becomes false and false becomes true.
160
185
  * @default false
161
186
  */
162
187
  this.inverse = false;
163
188
  }
164
189
  }
165
190
  Logic.ThresholdBooleanListDto = ThresholdBooleanListDto;
191
+ /**
192
+ * Numbers and ranges for `logic.thresholdGapsBooleanList`, which marks the numbers inside any
193
+ * range.
194
+ */
166
195
  class ThresholdGapsBooleanListDto {
167
196
  constructor() {
168
197
  /**
169
- * True values become false and false values become true
198
+ * When true, every result is flipped: true becomes false and false becomes true.
170
199
  * @default false
171
200
  */
172
201
  this.inverse = false;