@fugood/bricks-project 2.24.4 → 2.24.5
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/compile/action-name-map.ts +5 -0
- package/compile/index.ts +8 -4
- package/package.json +2 -2
- package/package.json.bak +2 -2
- package/skills/bricks-ctor/SKILL.md +2 -2
- package/skills/bricks-ctor/rules/architecture-patterns.md +12 -0
- package/skills/bricks-ctor/rules/automations.md +11 -0
- package/skills/bricks-ctor/rules/data-calculation.md +5 -5
- package/skills/bricks-ctor/rules/verification-toolchain.md +16 -9
- package/skills/bricks-design/SKILL.md +2 -2
- package/skills/bricks-design/references/architecture-truths.md +10 -3
- package/skills/bricks-design/references/variations-and-tweaks.md +1 -1
- package/tools/_shell.ts +8 -1
- package/tools/mcp-tools/compile.ts +17 -7
- package/tools/mcp-tools/media.ts +4 -1
- package/types/animation.ts +8 -3
- package/types/brick-base.ts +1 -1
- package/types/bricks/Camera.ts +8 -8
- package/types/bricks/Chart.ts +4 -4
- package/types/bricks/GenerativeMedia.ts +15 -15
- package/types/bricks/Icon.ts +7 -7
- package/types/bricks/Image.ts +9 -9
- package/types/bricks/Items.ts +7 -7
- package/types/bricks/Lottie.ts +10 -10
- package/types/bricks/Maps.ts +11 -11
- package/types/bricks/QrCode.ts +7 -7
- package/types/bricks/Rect.ts +7 -7
- package/types/bricks/RichText.ts +12 -9
- package/types/bricks/Rive.ts +9 -9
- package/types/bricks/Sketch.ts +6 -6
- package/types/bricks/Slideshow.ts +7 -7
- package/types/bricks/Svg.ts +7 -7
- package/types/bricks/Text.ts +9 -9
- package/types/bricks/TextInput.ts +10 -10
- package/types/bricks/Video.ts +12 -12
- package/types/bricks/VideoStreaming.ts +10 -10
- package/types/bricks/WebRtcStream.ts +1 -1
- package/types/bricks/WebView.ts +4 -4
- package/types/common.ts +2 -2
- package/types/data-calc-command/base.ts +57 -0
- package/types/data-calc-command/collection.ts +418 -0
- package/types/data-calc-command/color.ts +432 -0
- package/types/data-calc-command/constant.ts +50 -0
- package/types/data-calc-command/datetime.ts +147 -0
- package/types/data-calc-command/file.ts +129 -0
- package/types/data-calc-command/index.ts +13 -0
- package/types/data-calc-command/iteratee.ts +23 -0
- package/types/data-calc-command/logictype.ts +190 -0
- package/types/data-calc-command/math.ts +275 -0
- package/types/data-calc-command/object.ts +119 -0
- package/types/data-calc-command/sandbox.ts +58 -0
- package/types/data-calc-command/string.ts +407 -0
- package/types/data.ts +1 -1
- package/types/generators/LlmGgml.ts +37 -0
- package/utils/data.ts +1 -1
- package/utils/id.ts +78 -27
- package/types/data-calc-command.ts +0 -7005
|
@@ -0,0 +1,432 @@
|
|
|
1
|
+
/* Auto generated by build script */
|
|
2
|
+
import type { DataCalculationData, DataCommand, DataCalcInput, DataCalcOutput } from './base'
|
|
3
|
+
|
|
4
|
+
/* Color alpha — Get and set the color opacity. */
|
|
5
|
+
export type DataCommandColorAlpha = DataCommand & {
|
|
6
|
+
__commandName: 'COLOR_ALPHA'
|
|
7
|
+
inputs?: Array<
|
|
8
|
+
DataCalcInput<'color', string> /* default: "" */ | DataCalcInput<'a', number> /* default: 0 */
|
|
9
|
+
>
|
|
10
|
+
outputs?: Array<DataCalcOutput<'result'> /* target: string */>
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/* Color average — Similar to COLOR_MIX, but accepts more than two colors. Simple averaging of R,G,B components and the alpha channel. */
|
|
14
|
+
export type DataCommandColorAverage = DataCommand & {
|
|
15
|
+
__commandName: 'COLOR_AVERAGE'
|
|
16
|
+
inputs?: Array<
|
|
17
|
+
| DataCalcInput<'colors', Array<any>> /* default: [] */
|
|
18
|
+
| DataCalcInput<'mode', string> /* default: "lrgb" */
|
|
19
|
+
| DataCalcInput<'weights', Array<any>> /* default: [] */
|
|
20
|
+
>
|
|
21
|
+
outputs?: Array<DataCalcOutput<'result'> /* target: string */>
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/* Color bezier colors — Similar to COLOR_SCALE_COLORS, but use bezier instead of linear. */
|
|
25
|
+
export type DataCommandColorBezierColors = DataCommand & {
|
|
26
|
+
__commandName: 'COLOR_BEZIER_COLORS'
|
|
27
|
+
inputs?: Array<
|
|
28
|
+
| DataCalcInput<'colors', Array<any>> /* default: undefined */
|
|
29
|
+
| DataCalcInput<'domain', Array<any>> /* default: undefined */
|
|
30
|
+
| DataCalcInput<'mode', string> /* default: "rgb" */
|
|
31
|
+
| DataCalcInput<'gamma', number> /* default: 1 */
|
|
32
|
+
| DataCalcInput<'correctLightness', boolean> /* default: false */
|
|
33
|
+
| DataCalcInput<'padding', number> /* default: undefined */
|
|
34
|
+
| DataCalcInput<'classes', any> /* default: undefined */
|
|
35
|
+
| DataCalcInput<'length', number> /* default: 0 */
|
|
36
|
+
>
|
|
37
|
+
outputs?: Array<DataCalcOutput<'result'> /* target: any */>
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/* Color bezier value — Similar to COLOR_SCALE_VALUE, but use bezier instead of linear. */
|
|
41
|
+
export type DataCommandColorBezierValue = DataCommand & {
|
|
42
|
+
__commandName: 'COLOR_BEZIER_VALUE'
|
|
43
|
+
inputs?: Array<
|
|
44
|
+
| DataCalcInput<'colors', Array<any>> /* default: undefined */
|
|
45
|
+
| DataCalcInput<'domain', Array<any>> /* default: undefined */
|
|
46
|
+
| DataCalcInput<'mode', string> /* default: "rgb" */
|
|
47
|
+
| DataCalcInput<'gamma', number> /* default: 1 */
|
|
48
|
+
| DataCalcInput<'correctLightness', boolean> /* default: false */
|
|
49
|
+
| DataCalcInput<'padding', number> /* default: undefined */
|
|
50
|
+
| DataCalcInput<'classes', any> /* default: undefined */
|
|
51
|
+
| DataCalcInput<'nodata', string> /* default: undefined */
|
|
52
|
+
| DataCalcInput<'value', number> /* default: undefined */
|
|
53
|
+
>
|
|
54
|
+
outputs?: Array<DataCalcOutput<'result'> /* target: string */>
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/* Color blend — Blends two colors using RGB channel-wise blend functions. Valid blend modes are multiply, darken, lighten, screen, overlay, burn, and dodge. */
|
|
58
|
+
export type DataCommandColorBlend = DataCommand & {
|
|
59
|
+
__commandName: 'COLOR_BLEND'
|
|
60
|
+
inputs?: Array<
|
|
61
|
+
| DataCalcInput<'color1', string> /* default: "" */
|
|
62
|
+
| DataCalcInput<'color2', string> /* default: "" */
|
|
63
|
+
| DataCalcInput<'mode', string> /* default: "" */
|
|
64
|
+
>
|
|
65
|
+
outputs?: Array<DataCalcOutput<'result'> /* target: string */>
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/* Color brighten — Brighten the color. */
|
|
69
|
+
export type DataCommandColorBrighten = DataCommand & {
|
|
70
|
+
__commandName: 'COLOR_BRIGHTEN'
|
|
71
|
+
inputs?: Array<
|
|
72
|
+
| DataCalcInput<'color', string> /* default: "" */
|
|
73
|
+
| DataCalcInput<'value', number> /* default: 0 */
|
|
74
|
+
>
|
|
75
|
+
outputs?: Array<DataCalcOutput<'result'> /* target: string */>
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/* CMYK — Generate color string CMYK values */
|
|
79
|
+
export type DataCommandColorCmyk = DataCommand & {
|
|
80
|
+
__commandName: 'COLOR_CMYK'
|
|
81
|
+
inputs?: Array<
|
|
82
|
+
| DataCalcInput<'cyan', number> /* default: 0 */
|
|
83
|
+
| DataCalcInput<'magenta', number> /* default: 0 */
|
|
84
|
+
| DataCalcInput<'yellow', number> /* default: 0 */
|
|
85
|
+
| DataCalcInput<'black', number> /* default: 0 */
|
|
86
|
+
>
|
|
87
|
+
outputs?: Array<DataCalcOutput<'result'> /* target: string */>
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/* Color contrast — Computes the WCAG contrast ratio between two colors. A minimum contrast of 4.5:1 is recommended to ensure that text is still readable against a background color. */
|
|
91
|
+
export type DataCommandColorContrast = DataCommand & {
|
|
92
|
+
__commandName: 'COLOR_CONTRAST'
|
|
93
|
+
inputs?: Array<
|
|
94
|
+
| DataCalcInput<'color1', string> /* default: "" */
|
|
95
|
+
| DataCalcInput<'color2', string> /* default: "" */
|
|
96
|
+
>
|
|
97
|
+
outputs?: Array<DataCalcOutput<'result'> /* target: number */>
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/* Color darken — Darken the color */
|
|
101
|
+
export type DataCommandColorDarken = DataCommand & {
|
|
102
|
+
__commandName: 'COLOR_DARKEN'
|
|
103
|
+
inputs?: Array<
|
|
104
|
+
| DataCalcInput<'color', string> /* default: "" */
|
|
105
|
+
| DataCalcInput<'value', number> /* default: 0 */
|
|
106
|
+
>
|
|
107
|
+
outputs?: Array<DataCalcOutput<'result'> /* target: string */>
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/* Color delta E — Computes color difference as developed by the Colour Measurement Committee of the Society of Dyers and Colourists (CMC) in 1984. The implementation is adapted from Bruce Lindbloom. The parameters L and C are weighting factors for lightness and chromaticity. */
|
|
111
|
+
export type DataCommandColorDeltaE = DataCommand & {
|
|
112
|
+
__commandName: 'COLOR_DELTA_E'
|
|
113
|
+
inputs?: Array<
|
|
114
|
+
| DataCalcInput<'color1', string> /* default: "" */
|
|
115
|
+
| DataCalcInput<'color2', string> /* default: "" */
|
|
116
|
+
| DataCalcInput<'L', number> /* default: 1 */
|
|
117
|
+
| DataCalcInput<'C', number> /* default: 1 */
|
|
118
|
+
| DataCalcInput<'mode', string> /* default: "lab" */
|
|
119
|
+
>
|
|
120
|
+
outputs?: Array<DataCalcOutput<'result'> /* target: number */>
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/* Color desaturate — Similar to COLOR_SATURATE, but the opposite direction. */
|
|
124
|
+
export type DataCommandColorDesaturate = DataCommand & {
|
|
125
|
+
__commandName: 'COLOR_DESATURATE'
|
|
126
|
+
inputs?: Array<
|
|
127
|
+
| DataCalcInput<'color', string> /* default: "" */
|
|
128
|
+
| DataCalcInput<'value', number> /* default: 0 */
|
|
129
|
+
>
|
|
130
|
+
outputs?: Array<DataCalcOutput<'result'> /* target: string */>
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/* Color distance — Computes the Euclidean distance between two colors in a given color space (default mode is lab). */
|
|
134
|
+
export type DataCommandColorDistance = DataCommand & {
|
|
135
|
+
__commandName: 'COLOR_DISTANCE'
|
|
136
|
+
inputs?: Array<
|
|
137
|
+
| DataCalcInput<'color1', string> /* default: "" */
|
|
138
|
+
| DataCalcInput<'color2', string> /* default: "" */
|
|
139
|
+
| DataCalcInput<'mode', string> /* default: "lab" */
|
|
140
|
+
>
|
|
141
|
+
outputs?: Array<DataCalcOutput<'result'> /* target: number */>
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/* Color get — Returns a single channel value. E.g. channel='hsl.h' */
|
|
145
|
+
export type DataCommandColorGet = DataCommand & {
|
|
146
|
+
__commandName: 'COLOR_GET'
|
|
147
|
+
inputs?: Array<
|
|
148
|
+
| DataCalcInput<'color', string> /* default: "" */
|
|
149
|
+
| DataCalcInput<'channel', string> /* default: "" */
|
|
150
|
+
>
|
|
151
|
+
outputs?: Array<DataCalcOutput<'result'> /* target: number */>
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/* HCL — Generate color string HCL values */
|
|
155
|
+
export type DataCommandColorHcl = DataCommand & {
|
|
156
|
+
__commandName: 'COLOR_HCL'
|
|
157
|
+
inputs?: Array<
|
|
158
|
+
| DataCalcInput<'hue', number> /* default: 0 */
|
|
159
|
+
| DataCalcInput<'chroma', number> /* default: 0 */
|
|
160
|
+
| DataCalcInput<'lightness', number> /* default: 0 */
|
|
161
|
+
>
|
|
162
|
+
outputs?: Array<DataCalcOutput<'result'> /* target: string */>
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/* HSL — Generate color string with HSL values */
|
|
166
|
+
export type DataCommandColorHsl = DataCommand & {
|
|
167
|
+
__commandName: 'COLOR_HSL'
|
|
168
|
+
inputs?: Array<
|
|
169
|
+
| DataCalcInput<'hue', number> /* default: 0 */
|
|
170
|
+
| DataCalcInput<'saturation', number> /* default: 0 */
|
|
171
|
+
| DataCalcInput<'lightness', number> /* default: 0 */
|
|
172
|
+
>
|
|
173
|
+
outputs?: Array<DataCalcOutput<'result'> /* target: string */>
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/* HSV — Generate color string with HSV values */
|
|
177
|
+
export type DataCommandColorHsv = DataCommand & {
|
|
178
|
+
__commandName: 'COLOR_HSV'
|
|
179
|
+
inputs?: Array<
|
|
180
|
+
| DataCalcInput<'hue', number> /* default: 0 */
|
|
181
|
+
| DataCalcInput<'saturation', number> /* default: 0 */
|
|
182
|
+
| DataCalcInput<'value', number> /* default: 0 */
|
|
183
|
+
>
|
|
184
|
+
outputs?: Array<DataCalcOutput<'result'> /* target: string */>
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/* LAB — Generate color string with LAB values */
|
|
188
|
+
export type DataCommandColorLab = DataCommand & {
|
|
189
|
+
__commandName: 'COLOR_LAB'
|
|
190
|
+
inputs?: Array<
|
|
191
|
+
| DataCalcInput<'lightness', number> /* default: 0 */
|
|
192
|
+
| DataCalcInput<'a', number> /* default: 0 */
|
|
193
|
+
| DataCalcInput<'b', number> /* default: 0 */
|
|
194
|
+
>
|
|
195
|
+
outputs?: Array<DataCalcOutput<'result'> /* target: string */>
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
/* Color limits — Computes class breaks for you, based on data. It supports the modes equidistant (e), quantile (q), logarithmic (l), and k-means (k). */
|
|
199
|
+
export type DataCommandColorLimits = DataCommand & {
|
|
200
|
+
__commandName: 'COLOR_LIMITS'
|
|
201
|
+
inputs?: Array<
|
|
202
|
+
| DataCalcInput<'data', Array<any>> /* default: [] */
|
|
203
|
+
| DataCalcInput<'mode', string> /* default: "" */
|
|
204
|
+
| DataCalcInput<'n', number> /* default: 0 */
|
|
205
|
+
>
|
|
206
|
+
outputs?: Array<DataCalcOutput<'result'> /* target: any */>
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
/* Color luminance — Change color luminance. */
|
|
210
|
+
export type DataCommandColorLuminance = DataCommand & {
|
|
211
|
+
__commandName: 'COLOR_LUMINANCE'
|
|
212
|
+
inputs?: Array<
|
|
213
|
+
| DataCalcInput<'color', string> /* default: "" */
|
|
214
|
+
| DataCalcInput<'lum', number> /* default: 1 */
|
|
215
|
+
| DataCalcInput<'mode', string> /* default: "rgb" */
|
|
216
|
+
>
|
|
217
|
+
outputs?: Array<DataCalcOutput<'result'> /* target: string */>
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
/* Color luminance number — Get color luminance. (0 - 1) */
|
|
221
|
+
export type DataCommandColorLuminanceNum = DataCommand & {
|
|
222
|
+
__commandName: 'COLOR_LUMINANCE_NUM'
|
|
223
|
+
inputs?: Array<DataCalcInput<'color', string> /* default: "" */>
|
|
224
|
+
outputs?: Array<DataCalcOutput<'result'> /* target: number */>
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
/* Color mix — Mixes two colors. The mix ratio is a value between 0 and 1. */
|
|
228
|
+
export type DataCommandColorMix = DataCommand & {
|
|
229
|
+
__commandName: 'COLOR_MIX'
|
|
230
|
+
inputs?: Array<
|
|
231
|
+
| DataCalcInput<'color1', string> /* default: "" */
|
|
232
|
+
| DataCalcInput<'color2', string> /* default: "" */
|
|
233
|
+
| DataCalcInput<'ratio', number> /* default: 0.5 */
|
|
234
|
+
| DataCalcInput<'mode', string> /* default: "lrgb" */
|
|
235
|
+
>
|
|
236
|
+
outputs?: Array<DataCalcOutput<'result'> /* target: string */>
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
/* Color name — Returns the named color. Falls back to hexadecimal RGB string, if the color isn't present. */
|
|
240
|
+
export type DataCommandColorName = DataCommand & {
|
|
241
|
+
__commandName: 'COLOR_NAME'
|
|
242
|
+
inputs?: Array<DataCalcInput<'color', string> /* default: "" */>
|
|
243
|
+
outputs?: Array<DataCalcOutput<'result'> /* target: string */>
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
/* Random color — Creates a random color by generating a random hexadecimal string. */
|
|
247
|
+
export type DataCommandColorRandom = DataCommand & {
|
|
248
|
+
__commandName: 'COLOR_RANDOM'
|
|
249
|
+
inputs?: Array<DataCalcInput<'trigger', any> /* default: undefined */>
|
|
250
|
+
outputs?: Array<DataCalcOutput<'result'> /* target: string */>
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
/* RGBA — Generate color string RGBA values */
|
|
254
|
+
export type DataCommandColorRgba = DataCommand & {
|
|
255
|
+
__commandName: 'COLOR_RGBA'
|
|
256
|
+
inputs?: Array<
|
|
257
|
+
| DataCalcInput<'red', number> /* default: 0 */
|
|
258
|
+
| DataCalcInput<'green', number> /* default: 0 */
|
|
259
|
+
| DataCalcInput<'blue', number> /* default: 0 */
|
|
260
|
+
| DataCalcInput<'alpha', number> /* default: undefined */
|
|
261
|
+
>
|
|
262
|
+
outputs?: Array<DataCalcOutput<'result'> /* target: string */>
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
/* Color saturate — Changes the saturation of a color by manipulating the Lch chromaticity. */
|
|
266
|
+
export type DataCommandColorSaturate = DataCommand & {
|
|
267
|
+
__commandName: 'COLOR_SATURATE'
|
|
268
|
+
inputs?: Array<
|
|
269
|
+
| DataCalcInput<'color', string> /* default: "" */
|
|
270
|
+
| DataCalcInput<'value', number> /* default: 0 */
|
|
271
|
+
>
|
|
272
|
+
outputs?: Array<DataCalcOutput<'result'> /* target: string */>
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
/* Color scale colors — Similar to COLOR_SCALE_VALUE, but get the color array with length. */
|
|
276
|
+
export type DataCommandColorScaleColors = DataCommand & {
|
|
277
|
+
__commandName: 'COLOR_SCALE_COLORS'
|
|
278
|
+
inputs?: Array<
|
|
279
|
+
| DataCalcInput<'colors', Array<any>> /* default: undefined */
|
|
280
|
+
| DataCalcInput<'domain', Array<any>> /* default: undefined */
|
|
281
|
+
| DataCalcInput<'mode', string> /* default: "rgb" */
|
|
282
|
+
| DataCalcInput<'gamma', number> /* default: 1 */
|
|
283
|
+
| DataCalcInput<'correctLightness', boolean> /* default: false */
|
|
284
|
+
| DataCalcInput<'padding', number> /* default: undefined */
|
|
285
|
+
| DataCalcInput<'classes', any> /* default: undefined */
|
|
286
|
+
| DataCalcInput<'length', number> /* default: 0 */
|
|
287
|
+
>
|
|
288
|
+
outputs?: Array<DataCalcOutput<'result'> /* target: any */>
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
/* Color scale value — Create color scale to get the color with some arguments.
|
|
292
|
+
- colors: Your input color scale. - domain: You can change the input domain to match your specific use case. - mode: Color mode. - gamma: Gamma-correction can be used to "shift" a scale's center more the the beginning (gamma < 1) or end (gamma > 1), typically used to "even" the lightness gradient. Default is 1. - correctLightness: This makes sure the lightness range is spread evenly across a color scale. Especially useful when working with multi-hue color scales, where simple gamma correction can't help you very much. - padding: Reduces the color range by cutting of a fraction of the gradient on both sides. If you pass a single number, the same padding will be applied to both ends. - classes: If you want the scale function to return a distinct set of colors instead of a continuous gradient. - nodata: When you pass a non-numeric value like undefined or undefined to a chroma.scale, "#cccccc" is returned as fallback or "no data" color. - value: Value to get the color */
|
|
293
|
+
export type DataCommandColorScaleValue = DataCommand & {
|
|
294
|
+
__commandName: 'COLOR_SCALE_VALUE'
|
|
295
|
+
inputs?: Array<
|
|
296
|
+
| DataCalcInput<'colors', Array<any>> /* default: undefined */
|
|
297
|
+
| DataCalcInput<'domain', Array<any>> /* default: undefined */
|
|
298
|
+
| DataCalcInput<'mode', string> /* default: "rgb" */
|
|
299
|
+
| DataCalcInput<'gamma', number> /* default: 1 */
|
|
300
|
+
| DataCalcInput<'correctLightness', boolean> /* default: false */
|
|
301
|
+
| DataCalcInput<'padding', number> /* default: undefined */
|
|
302
|
+
| DataCalcInput<'classes', any> /* default: undefined */
|
|
303
|
+
| DataCalcInput<'nodata', string> /* default: undefined */
|
|
304
|
+
| DataCalcInput<'value', number> /* default: undefined */
|
|
305
|
+
>
|
|
306
|
+
outputs?: Array<DataCalcOutput<'result'> /* target: string */>
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
/* Color set — Changes a single channel and returns the result. E.g. channel='hsl.h' */
|
|
310
|
+
export type DataCommandColorSet = DataCommand & {
|
|
311
|
+
__commandName: 'COLOR_SET'
|
|
312
|
+
inputs?: Array<
|
|
313
|
+
| DataCalcInput<'color', string> /* default: "" */
|
|
314
|
+
| DataCalcInput<'channel', string> /* default: "" */
|
|
315
|
+
| DataCalcInput<'value', number> /* default: 0 */
|
|
316
|
+
>
|
|
317
|
+
outputs?: Array<DataCalcOutput<'result'> /* target: string */>
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
/* Temperature — Returns a color from the color temperature scale. See http://www.zombieprototypes.com/?p=210. */
|
|
321
|
+
export type DataCommandColorTemperature = DataCommand & {
|
|
322
|
+
__commandName: 'COLOR_TEMPERATURE'
|
|
323
|
+
inputs?: Array<DataCalcInput<'K', number> /* default: 0 */>
|
|
324
|
+
outputs?: Array<DataCalcOutput<'result'> /* target: string */>
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
/* Color CSS — Returns a RGB() or HSL() string representation that can be used as CSS-color definition. */
|
|
328
|
+
export type DataCommandColorToCss = DataCommand & {
|
|
329
|
+
__commandName: 'COLOR_TO_CSS'
|
|
330
|
+
inputs?: Array<DataCalcInput<'color', string> /* default: "" */>
|
|
331
|
+
outputs?: Array<DataCalcOutput<'result'> /* target: string */>
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
/* Color gl — Like COLOR_TO_RGB, but in the channel range of [0..1] instead of [0..255] */
|
|
335
|
+
export type DataCommandColorToGl = DataCommand & {
|
|
336
|
+
__commandName: 'COLOR_TO_GL'
|
|
337
|
+
inputs?: Array<DataCalcInput<'color', string> /* default: "" */>
|
|
338
|
+
outputs?: Array<DataCalcOutput<'result'> /* target: any */>
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
/* Color HCL — Alias of COLOR_TO_LCH, but with the components in reverse order. */
|
|
342
|
+
export type DataCommandColorToHcl = DataCommand & {
|
|
343
|
+
__commandName: 'COLOR_TO_HCL'
|
|
344
|
+
inputs?: Array<DataCalcInput<'color', string> /* default: "" */>
|
|
345
|
+
outputs?: Array<DataCalcOutput<'result'> /* target: any */>
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
/* Color hex — Change color string to hexadecimal RGB string. */
|
|
349
|
+
export type DataCommandColorToHex = DataCommand & {
|
|
350
|
+
__commandName: 'COLOR_TO_HEX'
|
|
351
|
+
inputs?: Array<
|
|
352
|
+
| DataCalcInput<'color', string> /* default: "" */
|
|
353
|
+
| DataCalcInput<'mode', string> /* default: "auto" */
|
|
354
|
+
>
|
|
355
|
+
outputs?: Array<DataCalcOutput<'result'> /* target: string */>
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
/* Color HSI — Returns an array with the hue, saturation, and intensity components. */
|
|
359
|
+
export type DataCommandColorToHsi = DataCommand & {
|
|
360
|
+
__commandName: 'COLOR_TO_HSI'
|
|
361
|
+
inputs?: Array<DataCalcInput<'color', string> /* default: "" */>
|
|
362
|
+
outputs?: Array<DataCalcOutput<'result'> /* target: any */>
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
/* Color HSL — Returns an array with the hue, saturation, and lightness component. */
|
|
366
|
+
export type DataCommandColorToHsl = DataCommand & {
|
|
367
|
+
__commandName: 'COLOR_TO_HSL'
|
|
368
|
+
inputs?: Array<DataCalcInput<'color', string> /* default: "" */>
|
|
369
|
+
outputs?: Array<DataCalcOutput<'result'> /* target: any */>
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
/* Color HSV — Returns an array with the hue, saturation, and value components. */
|
|
373
|
+
export type DataCommandColorToHsv = DataCommand & {
|
|
374
|
+
__commandName: 'COLOR_TO_HSV'
|
|
375
|
+
inputs?: Array<DataCalcInput<'color', string> /* default: "" */>
|
|
376
|
+
outputs?: Array<DataCalcOutput<'result'> /* target: any */>
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
/* Color Lab — Returns an array with the L, a, and b components. */
|
|
380
|
+
export type DataCommandColorToLab = DataCommand & {
|
|
381
|
+
__commandName: 'COLOR_TO_LAB'
|
|
382
|
+
inputs?: Array<DataCalcInput<'color', string> /* default: "" */>
|
|
383
|
+
outputs?: Array<DataCalcOutput<'result'> /* target: any */>
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
/* Color LCH — Returns an array with the Lightness, chroma, and hue components. */
|
|
387
|
+
export type DataCommandColorToLch = DataCommand & {
|
|
388
|
+
__commandName: 'COLOR_TO_LCH'
|
|
389
|
+
inputs?: Array<DataCalcInput<'color', string> /* default: "" */>
|
|
390
|
+
outputs?: Array<DataCalcOutput<'result'> /* target: any */>
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
/* Color number — Returns the numeric representation of the hexadecimal RGB color. */
|
|
394
|
+
export type DataCommandColorToNum = DataCommand & {
|
|
395
|
+
__commandName: 'COLOR_TO_NUM'
|
|
396
|
+
inputs?: Array<DataCalcInput<'color', string> /* default: "" */>
|
|
397
|
+
outputs?: Array<DataCalcOutput<'result'> /* target: number */>
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
/* Color RGB — Returns an array with the red, green, and blue component, each as number within the range 0..255. */
|
|
401
|
+
export type DataCommandColorToRgb = DataCommand & {
|
|
402
|
+
__commandName: 'COLOR_TO_RGB'
|
|
403
|
+
inputs?: Array<
|
|
404
|
+
| DataCalcInput<'color', string> /* default: "" */
|
|
405
|
+
| DataCalcInput<'round', boolean> /* default: true */
|
|
406
|
+
>
|
|
407
|
+
outputs?: Array<DataCalcOutput<'result'> /* target: any */>
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
/* Color RGBA — Just like COLOR_TO_RGB but adds the alpha channel to the returned array. */
|
|
411
|
+
export type DataCommandColorToRgba = DataCommand & {
|
|
412
|
+
__commandName: 'COLOR_TO_RGBA'
|
|
413
|
+
inputs?: Array<
|
|
414
|
+
| DataCalcInput<'color', string> /* default: "" */
|
|
415
|
+
| DataCalcInput<'round', boolean> /* default: true */
|
|
416
|
+
>
|
|
417
|
+
outputs?: Array<DataCalcOutput<'result'> /* target: any */>
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
/* Color temperature — Estimate the temperature in Kelvin of any given color, though this makes the only sense for colors from the temperature gradient above. */
|
|
421
|
+
export type DataCommandColorToTemperature = DataCommand & {
|
|
422
|
+
__commandName: 'COLOR_TO_TEMPERATURE'
|
|
423
|
+
inputs?: Array<DataCalcInput<'color', string> /* default: "" */>
|
|
424
|
+
outputs?: Array<DataCalcOutput<'result'> /* target: number */>
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
/* Valid color string — Valid string can be correctly parsed as color */
|
|
428
|
+
export type DataCommandColorValid = DataCommand & {
|
|
429
|
+
__commandName: 'COLOR_VALID'
|
|
430
|
+
inputs?: Array<DataCalcInput<'color', string> /* default: "" */>
|
|
431
|
+
outputs?: Array<DataCalcOutput<'result'> /* target: boolean */>
|
|
432
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/* Auto generated by build script */
|
|
2
|
+
import type { DataCalculationData, DataCommand, DataCalcInput, DataCalcOutput } from './base'
|
|
3
|
+
|
|
4
|
+
/* Empty array [] — Return empty array [] */
|
|
5
|
+
export type DataCommandConstantEmptyArray = DataCommand & {
|
|
6
|
+
__commandName: 'CONSTANT_EMPTY_ARRAY'
|
|
7
|
+
outputs?: Array<DataCalcOutput<'result'> /* target: any */>
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/* Empty object {} — Return empty object {} */
|
|
11
|
+
export type DataCommandConstantEmptyObject = DataCommand & {
|
|
12
|
+
__commandName: 'CONSTANT_EMPTY_OBJECT'
|
|
13
|
+
outputs?: Array<DataCalcOutput<'result'> /* target: object */>
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/* Empty string "" — Return empty string "" */
|
|
17
|
+
export type DataCommandConstantEmptyString = DataCommand & {
|
|
18
|
+
__commandName: 'CONSTANT_EMPTY_STRING'
|
|
19
|
+
outputs?: Array<DataCalcOutput<'result'> /* target: string */>
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/* False — Return false */
|
|
23
|
+
export type DataCommandConstantFalse = DataCommand & {
|
|
24
|
+
__commandName: 'CONSTANT_FALSE'
|
|
25
|
+
outputs?: Array<DataCalcOutput<'result'> /* target: boolean */>
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/* 1 — Return 1 */
|
|
29
|
+
export type DataCommandConstantOne = DataCommand & {
|
|
30
|
+
__commandName: 'CONSTANT_ONE'
|
|
31
|
+
outputs?: Array<DataCalcOutput<'result'> /* target: any */>
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/* Basic Platform Info — Return basic platform info */
|
|
35
|
+
export type DataCommandConstantPlatform = DataCommand & {
|
|
36
|
+
__commandName: 'CONSTANT_PLATFORM'
|
|
37
|
+
outputs?: Array<DataCalcOutput<'result'> /* target: object */>
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/* True — Return true */
|
|
41
|
+
export type DataCommandConstantTrue = DataCommand & {
|
|
42
|
+
__commandName: 'CONSTANT_TRUE'
|
|
43
|
+
outputs?: Array<DataCalcOutput<'result'> /* target: boolean */>
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/* 0 — Return 0 */
|
|
47
|
+
export type DataCommandConstantZero = DataCommand & {
|
|
48
|
+
__commandName: 'CONSTANT_ZERO'
|
|
49
|
+
outputs?: Array<DataCalcOutput<'result'> /* target: any */>
|
|
50
|
+
}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
/* Auto generated by build script */
|
|
2
|
+
import type { DataCalculationData, DataCommand, DataCalcInput, DataCalcOutput } from './base'
|
|
3
|
+
|
|
4
|
+
/* Add — Datetime add */
|
|
5
|
+
export type DataCommandDatetimeAdd = DataCommand & {
|
|
6
|
+
__commandName: 'DATETIME_ADD'
|
|
7
|
+
inputs?: Array<
|
|
8
|
+
| DataCalcInput<'datetime', string> /* default: DATETIME_NOW */
|
|
9
|
+
| DataCalcInput<'value', number> /* default: 0 */
|
|
10
|
+
| DataCalcInput<'unit', string> /* default: "days" */
|
|
11
|
+
>
|
|
12
|
+
outputs?: Array<DataCalcOutput<'result'> /* target: string */>
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/* Date — Get date */
|
|
16
|
+
export type DataCommandDatetimeDate = DataCommand & {
|
|
17
|
+
__commandName: 'DATETIME_DATE'
|
|
18
|
+
inputs?: Array<
|
|
19
|
+
| DataCalcInput<'datetime', string> /* default: DATETIME_NOW */
|
|
20
|
+
| DataCalcInput<'timezone', string> /* default: Machine default */
|
|
21
|
+
>
|
|
22
|
+
outputs?: Array<DataCalcOutput<'result'> /* target: number */>
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/* Day — Get day (Sunday is 7) */
|
|
26
|
+
export type DataCommandDatetimeDay = DataCommand & {
|
|
27
|
+
__commandName: 'DATETIME_DAY'
|
|
28
|
+
inputs?: Array<
|
|
29
|
+
| DataCalcInput<'datetime', string> /* default: DATETIME_NOW */
|
|
30
|
+
| DataCalcInput<'timezone', string> /* default: Machine default */
|
|
31
|
+
>
|
|
32
|
+
outputs?: Array<DataCalcOutput<'result'> /* target: number */>
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/* Format — Format datetime to string */
|
|
36
|
+
export type DataCommandDatetimeFormat = DataCommand & {
|
|
37
|
+
__commandName: 'DATETIME_FORMAT'
|
|
38
|
+
inputs?: Array<
|
|
39
|
+
| DataCalcInput<'datetime', string> /* default: DATETIME_NOW */
|
|
40
|
+
| DataCalcInput<'format', string> /* default: "ISO8061" */
|
|
41
|
+
| DataCalcInput<'timezone', string> /* default: Machine default */
|
|
42
|
+
| DataCalcInput<'locale', string> /* default: Machine default */
|
|
43
|
+
>
|
|
44
|
+
outputs?: Array<DataCalcOutput<'result'> /* target: string */>
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/* Hour — Get hour (24H) */
|
|
48
|
+
export type DataCommandDatetimeHour = DataCommand & {
|
|
49
|
+
__commandName: 'DATETIME_HOUR'
|
|
50
|
+
inputs?: Array<
|
|
51
|
+
| DataCalcInput<'datetime', string> /* default: DATETIME_NOW */
|
|
52
|
+
| DataCalcInput<'timezone', string> /* default: Machine default */
|
|
53
|
+
>
|
|
54
|
+
outputs?: Array<DataCalcOutput<'result'> /* target: number */>
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/* Minute — Get minute */
|
|
58
|
+
export type DataCommandDatetimeMinute = DataCommand & {
|
|
59
|
+
__commandName: 'DATETIME_MINUTE'
|
|
60
|
+
inputs?: Array<
|
|
61
|
+
| DataCalcInput<'datetime', string> /* default: DATETIME_NOW */
|
|
62
|
+
| DataCalcInput<'timezone', string> /* default: Machine default */
|
|
63
|
+
>
|
|
64
|
+
outputs?: Array<DataCalcOutput<'result'> /* target: number */>
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/* Month — Get month (January is 1) */
|
|
68
|
+
export type DataCommandDatetimeMonth = DataCommand & {
|
|
69
|
+
__commandName: 'DATETIME_MONTH'
|
|
70
|
+
inputs?: Array<
|
|
71
|
+
| DataCalcInput<'datetime', string> /* default: DATETIME_NOW */
|
|
72
|
+
| DataCalcInput<'timezone', string> /* default: Machine default */
|
|
73
|
+
>
|
|
74
|
+
outputs?: Array<DataCalcOutput<'result'> /* target: number */>
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/* Now — Get now */
|
|
78
|
+
export type DataCommandDatetimeNow = DataCommand & {
|
|
79
|
+
__commandName: 'DATETIME_NOW'
|
|
80
|
+
inputs?: Array<DataCalcInput<'trigger', any> /* default: undefined */>
|
|
81
|
+
outputs?: Array<DataCalcOutput<'result'> /* target: string */>
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/* Parse — Parse datetime string (empty use DATETIME_NOW) */
|
|
85
|
+
export type DataCommandDatetimeParse = DataCommand & {
|
|
86
|
+
__commandName: 'DATETIME_PARSE'
|
|
87
|
+
inputs?: Array<DataCalcInput<'value', string> /* default: "" */>
|
|
88
|
+
outputs?: Array<DataCalcOutput<'result'> /* target: string */>
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/* Quarter — Get quarter */
|
|
92
|
+
export type DataCommandDatetimeQuarter = DataCommand & {
|
|
93
|
+
__commandName: 'DATETIME_QUARTER'
|
|
94
|
+
inputs?: Array<
|
|
95
|
+
| DataCalcInput<'datetime', string> /* default: DATETIME_NOW */
|
|
96
|
+
| DataCalcInput<'timezone', string> /* default: Machine default */
|
|
97
|
+
>
|
|
98
|
+
outputs?: Array<DataCalcOutput<'result'> /* target: number */>
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/* Second — Get second */
|
|
102
|
+
export type DataCommandDatetimeSecond = DataCommand & {
|
|
103
|
+
__commandName: 'DATETIME_SECOND'
|
|
104
|
+
inputs?: Array<
|
|
105
|
+
| DataCalcInput<'datetime', string> /* default: DATETIME_NOW */
|
|
106
|
+
| DataCalcInput<'timezone', string> /* default: Machine default */
|
|
107
|
+
>
|
|
108
|
+
outputs?: Array<DataCalcOutput<'result'> /* target: number */>
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/* Substract — Datetime substract */
|
|
112
|
+
export type DataCommandDatetimeSubtract = DataCommand & {
|
|
113
|
+
__commandName: 'DATETIME_SUBTRACT'
|
|
114
|
+
inputs?: Array<
|
|
115
|
+
| DataCalcInput<'datetime', string> /* default: DATETIME_NOW */
|
|
116
|
+
| DataCalcInput<'value', number> /* default: 0 */
|
|
117
|
+
| DataCalcInput<'unit', string> /* default: "days" */
|
|
118
|
+
>
|
|
119
|
+
outputs?: Array<DataCalcOutput<'result'> /* target: string */>
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/* Unix Timestamp for now — Get now (Unix timestamp) */
|
|
123
|
+
export type DataCommandDatetimeUnixTimestamp = DataCommand & {
|
|
124
|
+
__commandName: 'DATETIME_UNIX_TIMESTAMP'
|
|
125
|
+
inputs?: Array<DataCalcInput<'trigger', any> /* default: undefined */>
|
|
126
|
+
outputs?: Array<DataCalcOutput<'result'> /* target: number */>
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/* Week — Get week */
|
|
130
|
+
export type DataCommandDatetimeWeek = DataCommand & {
|
|
131
|
+
__commandName: 'DATETIME_WEEK'
|
|
132
|
+
inputs?: Array<
|
|
133
|
+
| DataCalcInput<'datetime', string> /* default: DATETIME_NOW */
|
|
134
|
+
| DataCalcInput<'timezone', string> /* default: Machine default */
|
|
135
|
+
>
|
|
136
|
+
outputs?: Array<DataCalcOutput<'result'> /* target: number */>
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/* Year — Get year */
|
|
140
|
+
export type DataCommandDatetimeYear = DataCommand & {
|
|
141
|
+
__commandName: 'DATETIME_YEAR'
|
|
142
|
+
inputs?: Array<
|
|
143
|
+
| DataCalcInput<'datetime', string> /* default: DATETIME_NOW */
|
|
144
|
+
| DataCalcInput<'timezone', string> /* default: Machine default */
|
|
145
|
+
>
|
|
146
|
+
outputs?: Array<DataCalcOutput<'result'> /* target: number */>
|
|
147
|
+
}
|