@fugood/bricks-project 2.22.0-beta.26 → 2.22.0-beta.28

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 (78) hide show
  1. package/package.json +2 -2
  2. package/types/animation.ts +1 -0
  3. package/types/brick-base.ts +77 -0
  4. package/types/bricks/3DViewer.ts +200 -0
  5. package/types/bricks/Camera.ts +195 -0
  6. package/types/bricks/Chart.ts +362 -0
  7. package/types/bricks/GenerativeMedia.ts +237 -0
  8. package/types/bricks/Icon.ts +90 -0
  9. package/types/bricks/Image.ts +101 -0
  10. package/types/bricks/Items.ts +461 -0
  11. package/types/bricks/Lottie.ts +156 -0
  12. package/types/bricks/Qrcode.ts +109 -0
  13. package/types/bricks/Rect.ts +107 -0
  14. package/types/bricks/RichText.ts +120 -0
  15. package/types/bricks/Rive.ts +209 -0
  16. package/types/bricks/Slideshow.ts +155 -0
  17. package/types/bricks/Svg.ts +91 -0
  18. package/types/bricks/Text.ts +140 -0
  19. package/types/bricks/TextInput.ts +231 -0
  20. package/types/bricks/Video.ts +167 -0
  21. package/types/bricks/VideoStreaming.ts +104 -0
  22. package/types/bricks/WebRTCStream.ts +60 -0
  23. package/types/bricks/WebView.ts +157 -0
  24. package/types/bricks/index.ts +20 -0
  25. package/types/generators/AlarmClock.ts +102 -0
  26. package/types/generators/Assistant.ts +546 -0
  27. package/types/generators/BleCentral.ts +225 -0
  28. package/types/generators/BlePeripheral.ts +202 -0
  29. package/types/generators/CanvasMap.ts +57 -0
  30. package/types/generators/CastlesPay.ts +77 -0
  31. package/types/generators/DataBank.ts +123 -0
  32. package/types/generators/File.ts +351 -0
  33. package/types/generators/GraphQL.ts +124 -0
  34. package/types/generators/HTTP.ts +117 -0
  35. package/types/generators/HTTPServer.ts +156 -0
  36. package/types/generators/Information.ts +97 -0
  37. package/types/generators/Intent.ts +107 -0
  38. package/types/generators/Iterator.ts +95 -0
  39. package/types/generators/Keyboard.ts +85 -0
  40. package/types/generators/LlmAnthropicCompat.ts +188 -0
  41. package/types/generators/LlmGgml.ts +719 -0
  42. package/types/generators/LlmOnnx.ts +184 -0
  43. package/types/generators/LlmOpenAiCompat.ts +206 -0
  44. package/types/generators/LlmQualcommAiEngine.ts +213 -0
  45. package/types/generators/MCP.ts +294 -0
  46. package/types/generators/MCPServer.ts +245 -0
  47. package/types/generators/MQTTBroker.ts +121 -0
  48. package/types/generators/MediaFlow.ts +142 -0
  49. package/types/generators/MqttClient.ts +129 -0
  50. package/types/generators/Question.ts +395 -0
  51. package/types/generators/RealtimeTranscription.ts +172 -0
  52. package/types/generators/RerankerGgml.ts +153 -0
  53. package/types/generators/SerialPort.ts +141 -0
  54. package/types/generators/SoundPlayer.ts +86 -0
  55. package/types/generators/SoundRecorder.ts +113 -0
  56. package/types/generators/SpeechToTextGgml.ts +462 -0
  57. package/types/generators/SpeechToTextOnnx.ts +227 -0
  58. package/types/generators/SpeechToTextPlatform.ts +75 -0
  59. package/types/generators/Sqlite.ts +118 -0
  60. package/types/generators/Step.ts +101 -0
  61. package/types/generators/TCP.ts +120 -0
  62. package/types/generators/TCPServer.ts +137 -0
  63. package/types/generators/TapToPayOnIPhone.ts +175 -0
  64. package/types/generators/TextToSpeechGgml.ts +182 -0
  65. package/types/generators/TextToSpeechOnnx.ts +169 -0
  66. package/types/generators/TextToSpeechOpenAiLike.ts +113 -0
  67. package/types/generators/ThermalPrinter.ts +185 -0
  68. package/types/generators/Tick.ts +75 -0
  69. package/types/generators/UDP.ts +109 -0
  70. package/types/generators/VadGgml.ts +211 -0
  71. package/types/generators/VectorStore.ts +223 -0
  72. package/types/generators/Watchdog.ts +96 -0
  73. package/types/generators/WebCrawler.ts +97 -0
  74. package/types/generators/WebRTC.ts +165 -0
  75. package/types/generators/WebSocket.ts +142 -0
  76. package/types/generators/index.ts +51 -0
  77. package/types/bricks.ts +0 -3269
  78. package/types/generators.ts +0 -8627
package/types/bricks.ts DELETED
@@ -1,3269 +0,0 @@
1
- import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from './switch'
2
- import type { Data, DataLink } from './data'
3
- import type { Animation, AnimationBasicEvents } from './animation'
4
- import type {
5
- Brick,
6
- EventAction,
7
- EventActionForItem,
8
- ActionWithDataParams,
9
- ActionWithParams,
10
- Action,
11
- EventProperty,
12
- } from './common'
13
-
14
- interface BrickBasicProperty {
15
- /* The brick opacity (0 ~ 1) */
16
- opacity?: number | DataLink
17
- /* The brick background color */
18
- backgroundColor?: string | DataLink
19
- /* The brick border style */
20
- borderStyle?: 'solid' | 'dotted' | 'dashed' | DataLink
21
- /* The brick border width (top) */
22
- borderTopSize?: number | DataLink
23
- /* The brick border color (top) */
24
- borderTopColor?: string | DataLink
25
- /* The brick border radius (top left) */
26
- borderTopLeftRadius?: number | DataLink
27
- /* The brick border radius (top right) */
28
- borderTopRightRadius?: number | DataLink
29
- /* The brick border width (bottom) */
30
- borderBottomSize?: number | DataLink
31
- /* The brick border color (bottom) */
32
- borderBottomColor?: string | DataLink
33
- /* The brick border radius (bottom left) */
34
- borderBottomLeftRadius?: number | DataLink
35
- /* The brick border radius (bottom right) */
36
- borderBottomRightRadius?: number | DataLink
37
- /* The brick border width (left) */
38
- borderLeftSize?: number | DataLink
39
- /* The brick border color (bottom) */
40
- borderLeftColor?: string | DataLink
41
- /* The brick border width (right) */
42
- borderRightSize?: number | DataLink
43
- /* The brick border color (right) */
44
- borderRightColor?: string | DataLink
45
- /* The brick rotate (deg) */
46
- rotate?: number | DataLink
47
- /* The brick rotateX (deg) */
48
- rotateX?: number | DataLink
49
- /* The brick rotateY (deg) */
50
- rotateY?: number | DataLink
51
- /* The brick shadow color */
52
- shadowColor?: string | DataLink
53
- /* The brick shadow opacity (0 ~ 1) */
54
- shadowOpacity?: number | DataLink
55
- /* The brick shadow radius */
56
- shadowRadius?: number | DataLink
57
- /* The brick shadow offset width */
58
- shadowOffsetWidth?: number | DataLink
59
- /* The brick shadow offset height */
60
- shadowOffsetHeight?: number | DataLink
61
- /* Brick pressable.
62
- Disabled: Disabled even if event or animation is set.
63
- Bypass: Disable and bypass the touch event on the brick. */
64
- pressable?: 'enabled' | 'disabled' | 'bypass' | DataLink
65
- }
66
-
67
- interface BrickBasicEvents {
68
- showStart?: Array<EventAction>
69
- switchUpdate?: Array<EventAction>
70
- standby?: Array<EventAction>
71
- }
72
-
73
- interface BrickBasicEventsForItem {
74
- showStart?: Array<EventActionForItem>
75
- switchUpdate?: Array<EventActionForItem>
76
- standby?: Array<EventActionForItem>
77
- }
78
-
79
- interface BrickRectDef {
80
- /*
81
- Default property:
82
- {
83
- "linearGradientEnabled": false,
84
- "linearGradientColors": [
85
- "#000000",
86
- "#FFFFFF"
87
- ],
88
- "linearGradientStart": {
89
- "x": 0,
90
- "y": 0
91
- },
92
- "linearGradientEnd": {
93
- "x": 1,
94
- "y": 1
95
- },
96
- "linearGradientLocations": [
97
- 0,
98
- 1
99
- ]
100
- }
101
- */
102
- property?: BrickBasicProperty & {
103
- /* Enables or disables linear gradient */
104
- linearGradientEnabled?: boolean | DataLink
105
- /* An array of at least two color values that represent gradient colors */
106
- linearGradientColors?: Array<string | DataLink> | DataLink
107
- /* An optional object of the following type: { x: number, y: number } */
108
- linearGradientStart?:
109
- | DataLink
110
- | {
111
- x?: number | DataLink
112
- y?: number | DataLink
113
- }
114
- /* Same as start, but for the end of the gradient */
115
- linearGradientEnd?:
116
- | DataLink
117
- | {
118
- x?: number | DataLink
119
- y?: number | DataLink
120
- }
121
- /* An optional array of numbers defining the location of each gradient color stop */
122
- linearGradientLocations?: Array<number | DataLink> | DataLink
123
- }
124
- events?: BrickBasicEvents & {
125
- /* Event of the brick press */
126
- onPress?: Array<EventAction>
127
- /* Event of the brick press in */
128
- onPressIn?: Array<EventAction>
129
- /* Event of the brick press out */
130
- onPressOut?: Array<EventAction>
131
- /* Event of the brick focus (Use TV Device with controller) */
132
- onFocus?: Array<EventAction>
133
- /* Event of the brick blur (Use TV Device with controller) */
134
- onBlur?: Array<EventAction>
135
- }
136
- outlets?: {
137
- /* Brick is pressing */
138
- brickPressing?: () => Data
139
- /* Brick is focusing (Use TV Device with controller) */
140
- brickFocusing?: () => Data
141
- }
142
- animation?: AnimationBasicEvents & {
143
- onPress?: Animation
144
- onPressIn?: Animation
145
- onPressOut?: Animation
146
- onFocus?: Animation
147
- onBlur?: Animation
148
- }
149
- }
150
-
151
- /* Rect brick ([Tutorial](https://intercom.help/bricks-dag-inc/articles/5378573-rect)) */
152
- export type BrickRect = Brick &
153
- BrickRectDef & {
154
- templateKey: 'BRICK_RECT'
155
- switches: Array<
156
- SwitchDef &
157
- BrickRectDef & {
158
- conds?: Array<{
159
- method: '==' | '!=' | '>' | '<' | '>=' | '<='
160
- cond:
161
- | SwitchCondInnerStateCurrentCanvas
162
- | SwitchCondData
163
- | {
164
- __typename: 'SwitchCondInnerStateOutlet'
165
- outlet: 'brickPressing' | 'brickFocusing'
166
- value: any
167
- }
168
- }>
169
- }
170
- >
171
- }
172
-
173
- interface BrickTextDef {
174
- /*
175
- Default property:
176
- {
177
- "text": "",
178
- "templateType": "${}",
179
- "color": "#000",
180
- "fontWeight": "normal",
181
- "fontStyle": "normal",
182
- "fontPadding": true,
183
- "fontSizeVector": 0.5,
184
- "lineNumber": 1,
185
- "textAlign": "center",
186
- "textAlignVertical": "center"
187
- }
188
- */
189
- property?: BrickBasicProperty & {
190
- /* The text content */
191
- text?: string | DataLink | number | DataLink | boolean | DataLink | string | DataLink | DataLink
192
- /* Data to be used in the text template (e.g. `Hello ${name}`). Supports nested data, such as `Hello ${user.name}`. */
193
- templateData?: {} | DataLink
194
- /* The text template type */
195
- templateType?: '${}' | '{{}}' | DataLink
196
- /* The text replacement (Regular Expression), can be multiple. */
197
- replace?:
198
- | Array<
199
- | DataLink
200
- | {
201
- regex?: string | DataLink
202
- replaceWith?: string | DataLink
203
- }
204
- >
205
- | DataLink
206
- /* The text color */
207
- color?: string | DataLink
208
- /* Specifies font weight. The values 'normal' and are supported for most fonts. Not all fonts have a variant for each of the numeric values, in that case the closest one is chosen. */
209
- fontWeight?:
210
- | 'normal'
211
- | 'bold'
212
- | '100'
213
- | '200'
214
- | '300'
215
- | '400'
216
- | '500'
217
- | '600'
218
- | '700'
219
- | '800'
220
- | '900'
221
- | DataLink
222
- /* The text font style */
223
- fontStyle?: 'normal' | 'italic' | DataLink
224
- /* The text font family */
225
- fontFamily?: string | DataLink
226
- /* [Android only] Set to No to remove extra font padding intended to make space for certain ascenders / descenders. */
227
- fontPadding?: boolean | DataLink
228
- /* The text font size (grid) */
229
- fontSize?: number | DataLink
230
- /* The text font size vector. If the font size is not specified, the font size will be calculated by the height of the text box. */
231
- fontSizeVector?: number | DataLink
232
- /* The text letter spacing (grid) */
233
- letterSpacing?: number | DataLink
234
- /* The line height of text content (grid) */
235
- lineHeight?: number | DataLink
236
- /* The line number limit of text content */
237
- lineNumber?: number | DataLink
238
- /* The text align */
239
- textAlign?: 'auto' | 'left' | 'right' | 'center' | 'justify' | DataLink
240
- /* The text align vertical */
241
- textAlignVertical?: 'auto' | 'top' | 'bottom' | 'center' | DataLink
242
- /* Enable vertical rendering */
243
- verticalRendering?: boolean | DataLink
244
- }
245
- events?: BrickBasicEvents & {
246
- /* Event of the brick press */
247
- onPress?: Array<EventAction>
248
- /* Event of the brick press in */
249
- onPressIn?: Array<EventAction>
250
- /* Event of the brick press out */
251
- onPressOut?: Array<EventAction>
252
- /* Event of the brick focus (Use TV Device with controller) */
253
- onFocus?: Array<EventAction>
254
- /* Event of the brick blur (Use TV Device with controller) */
255
- onBlur?: Array<EventAction>
256
- /* Event of the text content on change start */
257
- beforeValueChange?: Array<EventAction>
258
- /* Event of the text content on change end */
259
- valueChange?: Array<EventAction>
260
- }
261
- outlets?: {
262
- /* Brick is pressing */
263
- brickPressing?: () => Data
264
- /* Brick is focusing (Use TV Device with controller) */
265
- brickFocusing?: () => Data
266
- }
267
- animation?: AnimationBasicEvents & {
268
- onPress?: Animation
269
- onPressIn?: Animation
270
- onPressOut?: Animation
271
- onFocus?: Animation
272
- onBlur?: Animation
273
- beforeValueChange?: Animation
274
- valueChange?: Animation
275
- }
276
- }
277
-
278
- /* Text brick ([Tutorial](https://intercom.help/bricks-dag-inc/articles/5378574-text)) */
279
- export type BrickText = Brick &
280
- BrickTextDef & {
281
- templateKey: 'BRICK_TEXT'
282
- switches: Array<
283
- SwitchDef &
284
- BrickTextDef & {
285
- conds?: Array<{
286
- method: '==' | '!=' | '>' | '<' | '>=' | '<='
287
- cond:
288
- | SwitchCondInnerStateCurrentCanvas
289
- | SwitchCondData
290
- | {
291
- __typename: 'SwitchCondInnerStateOutlet'
292
- outlet: 'brickPressing' | 'brickFocusing'
293
- value: any
294
- }
295
- }>
296
- }
297
- >
298
- }
299
-
300
- /* Focus TextInput */
301
- export type BrickTextInputActionFocus = Action & {
302
- __actionName: 'BRICK_TEXT_INPUT_FOCUS'
303
- }
304
-
305
- /* Blur TextInput */
306
- export type BrickTextInputActionBlur = Action & {
307
- __actionName: 'BRICK_TEXT_INPUT_BLUR'
308
- }
309
-
310
- /* Clear TextInput */
311
- export type BrickTextInputActionClear = Action & {
312
- __actionName: 'BRICK_TEXT_INPUT_CLEAR'
313
- }
314
-
315
- /* Reset TextInput to default value */
316
- export type BrickTextInputActionResetToDefault = Action & {
317
- __actionName: 'BRICK_TEXT_INPUT_RESET_TO_DEFAULT'
318
- }
319
-
320
- /* Focus the input and select text with regex or start/end */
321
- export type BrickTextInputActionSelectText = ActionWithParams & {
322
- __actionName: 'BRICK_TEXT_INPUT_SELECT_TEXT'
323
- params?: Array<
324
- | {
325
- input: 'regex'
326
- value?: string | DataLink | EventProperty
327
- mapping?: string
328
- }
329
- | {
330
- input: 'start'
331
- value?: number | DataLink | EventProperty
332
- mapping?: string
333
- }
334
- | {
335
- input: 'end'
336
- value?: number | DataLink | EventProperty
337
- mapping?: string
338
- }
339
- >
340
- }
341
-
342
- /* Set text value of the TextInput */
343
- export type BrickTextInputActionSetText = ActionWithParams & {
344
- __actionName: 'BRICK_TEXT_INPUT_SET_TEXT'
345
- params?: Array<{
346
- input: 'text'
347
- value?: string | DataLink | EventProperty
348
- mapping?: string
349
- }>
350
- }
351
-
352
- /* Append text value of the TextInput */
353
- export type BrickTextInputActionAppendText = ActionWithParams & {
354
- __actionName: 'BRICK_TEXT_INPUT_APPEND_TEXT'
355
- params?: Array<{
356
- input: 'text'
357
- value?: string | DataLink | EventProperty
358
- mapping?: string
359
- }>
360
- }
361
-
362
- /* Trigger regex */
363
- export type BrickTextInputActionTrySubmit = Action & {
364
- __actionName: 'BRICK_TEXT_INPUT_TRY_SUBMIT'
365
- }
366
-
367
- interface BrickTextInputDef {
368
- /*
369
- Default property:
370
- {
371
- "editable": true,
372
- "defaultValue": "",
373
- "color": "#000",
374
- "fontWeight": "normal",
375
- "fontStyle": "normal",
376
- "fontSizeVector": 0.5,
377
- "lineNumber": 1,
378
- "textAlign": "center",
379
- "textAlignVertical": "center",
380
- "keyboardType": "default",
381
- "returnKeyType": "done"
382
- }
383
- */
384
- property?: BrickBasicProperty & {
385
- /* Allow to edit */
386
- editable?: boolean | DataLink
387
- /* The default value of the text input */
388
- defaultValue?: string | DataLink
389
- /* The text color */
390
- color?: string | DataLink
391
- /* Specifies font weight. The values 'normal' and are supported for most fonts. Not all fonts have a variant for each of the numeric values, in that case the closest one is chosen. */
392
- fontWeight?:
393
- | 'normal'
394
- | 'bold'
395
- | '100'
396
- | '200'
397
- | '300'
398
- | '400'
399
- | '500'
400
- | '600'
401
- | '700'
402
- | '800'
403
- | '900'
404
- | DataLink
405
- /* The text font style */
406
- fontStyle?: 'normal' | 'italic' | DataLink
407
- /* The text font family */
408
- fontFamily?: string | DataLink
409
- /* The text font size (grid) */
410
- fontSize?: number | DataLink
411
- /* The text font size vector. If the font size is not specified, the font size will be calculated by the height of the text box. */
412
- fontSizeVector?: number | DataLink
413
- /* The text letter spacing (grid) */
414
- letterSpacing?: number | DataLink
415
- /* The line height of text content (grid) */
416
- lineHeight?: number | DataLink
417
- /* The line number limit of text content (Use 0 to unlimited) */
418
- lineNumber?: number | DataLink
419
- /* The text align */
420
- textAlign?: 'auto' | 'left' | 'right' | 'center' | 'justify' | DataLink
421
- /* The text align vertical */
422
- textAlignVertical?: 'auto' | 'top' | 'bottom' | 'center' | DataLink
423
- /* The placeholder text */
424
- placeholder?: string | DataLink
425
- /* Color of the placeholder text */
426
- placeholderTextColor?: string | DataLink
427
- /* Limits the maximum number of characters that can be entered */
428
- maxLength?: number | DataLink
429
- /* The virtual keyboard type */
430
- keyboardType?:
431
- | 'default'
432
- | 'number-pad'
433
- | 'decimal-pad'
434
- | 'numeric'
435
- | 'email-address'
436
- | 'phone-pad'
437
- | DataLink
438
- /* The virtual keyboard return key type The line number should be 1. */
439
- returnKeyType?: 'done' | 'go' | 'next' | 'search' | 'send' | DataLink
440
- /* Trigger event on input change after debounce time */
441
- debounce?: number | DataLink
442
- /* Regular Expression to match */
443
- regex?: string | DataLink
444
- /* The regex matching complete mode */
445
- completeMode?: 'allMatch' | 'oneMatch' | DataLink
446
- /* Auto submit when regex match */
447
- autoSubmitWhenMatch?: boolean | DataLink
448
- /* Blur TextInput on submit */
449
- blurOnSubmit?: boolean | DataLink
450
- }
451
- events?: BrickBasicEvents & {
452
- /* Event of the TextInput is focused */
453
- onFocus?: Array<EventAction>
454
- /* Event of the input field is blurred */
455
- onBlur?: Array<EventAction>
456
- /* Event of the TextInput is empty */
457
- onEmpty?: Array<EventAction>
458
- /* Event of the TextInput value change */
459
- onChange?: Array<EventAction>
460
- /* Event of the TextInput submit */
461
- onSubmit?: Array<EventAction>
462
- /* Event of the TextInput match regex (check every value change) */
463
- onMatch?: Array<EventAction>
464
- /* Event of the TextInput not match regex (check every value change) */
465
- onNotMatch?: Array<EventAction>
466
- /* Event of the TextInput not match regex (check every submit) */
467
- onResultNotMatch?: Array<EventAction>
468
- /* Event of the TextInput reach max length or match regex */
469
- onFullFill?: Array<EventAction>
470
- }
471
- outlets?: {
472
- /* The raw input */
473
- rawInput?: () => Data
474
- /* The regex result */
475
- resultVariable?: () => Data
476
- /* Last key in */
477
- lastKey?: () => Data
478
- /* Selection of the TextInput (start, end, text) */
479
- selection?: () => Data
480
- /* Selection text of the TextInput */
481
- selectionText?: () => Data
482
- }
483
- animation?: AnimationBasicEvents & {
484
- onFocus?: Animation
485
- onBlur?: Animation
486
- onEmpty?: Animation
487
- onChange?: Animation
488
- onSubmit?: Animation
489
- onMatch?: Animation
490
- onNotMatch?: Animation
491
- onResultNotMatch?: Animation
492
- onFullFill?: Animation
493
- }
494
- }
495
-
496
- /* Text Input brick ([Tutorial](https://intercom.help/bricks-dag-inc/articles/5378575-text-input)) */
497
- export type BrickTextInput = Brick &
498
- BrickTextInputDef & {
499
- templateKey: 'BRICK_TEXT_INPUT'
500
- switches: Array<
501
- SwitchDef &
502
- BrickTextInputDef & {
503
- conds?: Array<{
504
- method: '==' | '!=' | '>' | '<' | '>=' | '<='
505
- cond:
506
- | SwitchCondInnerStateCurrentCanvas
507
- | SwitchCondData
508
- | {
509
- __typename: 'SwitchCondInnerStateOutlet'
510
- outlet: 'rawInput' | 'resultVariable' | 'lastKey' | 'selection' | 'selectionText'
511
- value: any
512
- }
513
- }>
514
- }
515
- >
516
- }
517
-
518
- interface BrickRichTextDef {
519
- /*
520
- Default property:
521
- {
522
- "content": "",
523
- "renderImage": false,
524
- "color": "#000",
525
- "fontWeight": "normal",
526
- "fontStyle": "normal",
527
- "fontSizes": {
528
- "base": 3,
529
- "h1": 6.857142857142857,
530
- "h2": 5.714285714285714,
531
- "h3": 4.011428571428572,
532
- "h4": 3.428571428571429,
533
- "h5": 2.845714285714286,
534
- "h6": 2.285714285714286
535
- }
536
- }
537
- */
538
- property?: BrickBasicProperty & {
539
- /* The text content */
540
- content?: string | DataLink
541
- /* Render Image */
542
- renderImage?: boolean | DataLink
543
- /* The text color */
544
- color?: string | DataLink
545
- /* Specifies font weight. The values 'normal' and are supported for most fonts. Not all fonts have a variant for each of the numeric values, in that case the closest one is chosen. */
546
- fontWeight?:
547
- | 'normal'
548
- | 'bold'
549
- | '100'
550
- | '200'
551
- | '300'
552
- | '400'
553
- | '500'
554
- | '600'
555
- | '700'
556
- | '800'
557
- | '900'
558
- | DataLink
559
- /* The text font style */
560
- fontStyle?: 'normal' | 'italic' | DataLink
561
- /* The text font family */
562
- fontFamily?: string | DataLink
563
- /* The text font size definition (base and headers) */
564
- fontSizes?:
565
- | DataLink
566
- | {
567
- base?: number | DataLink // BRICKS Grid unit
568
- h1?: number | DataLink // BRICKS Grid unit
569
- h2?: number | DataLink // BRICKS Grid unit
570
- h3?: number | DataLink // BRICKS Grid unit
571
- h4?: number | DataLink // BRICKS Grid unit
572
- h5?: number | DataLink // BRICKS Grid unit
573
- h6?: number | DataLink // BRICKS Grid unit
574
- }
575
- }
576
- events?: BrickBasicEvents & {
577
- /* Event of the brick press */
578
- onPress?: Array<EventAction>
579
- /* Event of the brick press in */
580
- onPressIn?: Array<EventAction>
581
- /* Event of the brick press out */
582
- onPressOut?: Array<EventAction>
583
- /* Event of the brick focus (Use TV Device with controller) */
584
- onFocus?: Array<EventAction>
585
- /* Event of the brick blur (Use TV Device with controller) */
586
- onBlur?: Array<EventAction>
587
- }
588
- outlets?: {
589
- /* Brick is pressing */
590
- brickPressing?: () => Data
591
- /* Brick is focusing (Use TV Device with controller) */
592
- brickFocusing?: () => Data
593
- }
594
- animation?: AnimationBasicEvents & {
595
- onPress?: Animation
596
- onPressIn?: Animation
597
- onPressOut?: Animation
598
- onFocus?: Animation
599
- onBlur?: Animation
600
- }
601
- }
602
-
603
- /* RichText brick */
604
- export type BrickRichText = Brick &
605
- BrickRichTextDef & {
606
- templateKey: 'BRICK_RICH_TEXT'
607
- switches: Array<
608
- SwitchDef &
609
- BrickRichTextDef & {
610
- conds?: Array<{
611
- method: '==' | '!=' | '>' | '<' | '>=' | '<='
612
- cond:
613
- | SwitchCondInnerStateCurrentCanvas
614
- | SwitchCondData
615
- | {
616
- __typename: 'SwitchCondInnerStateOutlet'
617
- outlet: 'brickPressing' | 'brickFocusing'
618
- value: any
619
- }
620
- }>
621
- }
622
- >
623
- }
624
-
625
- interface BrickImageDef {
626
- /*
627
- Default property:
628
- {
629
- "path": "",
630
- "fadeDuration": 0,
631
- "blurBackgroundRadius": 8,
632
- "loadSystemIos": "auto",
633
- "loadSystemAndroid": "auto"
634
- }
635
- */
636
- property?: BrickBasicProperty & {
637
- /* The image resize mode */
638
- resizeMode?: 'contain' | 'cover' | 'stretch' | 'center' | 'repeat' | DataLink
639
- /* The image file path (File, URL) */
640
- path?: string | DataLink
641
- /* The checksum of file */
642
- md5?: string | DataLink
643
- /* The image fade duration */
644
- fadeDuration?: number | DataLink
645
- /* The image avatar mode */
646
- avatar?: boolean | DataLink
647
- /* The image fixed width with `avatar` */
648
- width?: number | DataLink
649
- /* Add blurred image at background if photo is not full */
650
- enableBlurBackground?: boolean | DataLink
651
- /* The blur radius of the blur filter added to the image background */
652
- blurBackgroundRadius?: number | DataLink
653
- /* [iOS] The use priority of image loading system (Auto: sdwebimage, fallback to default if failed) */
654
- loadSystemIos?: 'auto' | 'sdwebimage' | 'default' | DataLink
655
- /* [Android] The use priority of image loading system (Auto: glide, fallback to fresco if failed) */
656
- loadSystemAndroid?: 'auto' | 'glide' | 'fresco' | DataLink
657
- }
658
- events?: BrickBasicEvents & {
659
- /* Event of the brick press */
660
- onPress?: Array<EventAction>
661
- /* Event of the brick press in */
662
- onPressIn?: Array<EventAction>
663
- /* Event of the brick press out */
664
- onPressOut?: Array<EventAction>
665
- /* Event of the brick focus (Use TV Device with controller) */
666
- onFocus?: Array<EventAction>
667
- /* Event of the brick blur (Use TV Device with controller) */
668
- onBlur?: Array<EventAction>
669
- /* Event of the image on load */
670
- onLoad?: Array<EventAction>
671
- /* Event of the image on error */
672
- onError?: Array<EventAction>
673
- }
674
- outlets?: {
675
- /* Brick is pressing */
676
- brickPressing?: () => Data
677
- /* Brick is focusing (Use TV Device with controller) */
678
- brickFocusing?: () => Data
679
- }
680
- animation?: AnimationBasicEvents & {
681
- onPress?: Animation
682
- onPressIn?: Animation
683
- onPressOut?: Animation
684
- onFocus?: Animation
685
- onBlur?: Animation
686
- onLoad?: Animation
687
- onError?: Animation
688
- }
689
- }
690
-
691
- /* Image brick ([Tutorial](https://intercom.help/bricks-dag-inc/articles/5378576-image)) */
692
- export type BrickImage = Brick &
693
- BrickImageDef & {
694
- templateKey: 'BRICK_IMAGE'
695
- switches: Array<
696
- SwitchDef &
697
- BrickImageDef & {
698
- conds?: Array<{
699
- method: '==' | '!=' | '>' | '<' | '>=' | '<='
700
- cond:
701
- | SwitchCondInnerStateCurrentCanvas
702
- | SwitchCondData
703
- | {
704
- __typename: 'SwitchCondInnerStateOutlet'
705
- outlet: 'brickPressing' | 'brickFocusing'
706
- value: any
707
- }
708
- }>
709
- }
710
- >
711
- }
712
-
713
- interface BrickSvgDef {
714
- /*
715
- Default property:
716
- {
717
- "source": "",
718
- "uri": "",
719
- "renderMode": "general"
720
- }
721
- */
722
- property?: BrickBasicProperty & {
723
- /* The SVG XML content */
724
- source?: string | DataLink
725
- /* The svg source location (URL or LocalPath) */
726
- uri?: string | DataLink
727
- /* The checksum of file */
728
- md5?: string | DataLink
729
- /* The rules of replacing origin colour */
730
- colorMapping?:
731
- | Array<
732
- | DataLink
733
- | {
734
- findItem?: string | DataLink
735
- replaceItem?: string | DataLink
736
- }
737
- >
738
- | DataLink
739
- /* The render mode */
740
- renderMode?: 'general' | 'legacy' | DataLink
741
- }
742
- events?: BrickBasicEvents & {
743
- /* Event of the brick press */
744
- onPress?: Array<EventAction>
745
- /* Event of the brick press in */
746
- onPressIn?: Array<EventAction>
747
- /* Event of the brick press out */
748
- onPressOut?: Array<EventAction>
749
- /* Event of the brick focus (Use TV Device with controller) */
750
- onFocus?: Array<EventAction>
751
- /* Event of the brick blur (Use TV Device with controller) */
752
- onBlur?: Array<EventAction>
753
- }
754
- outlets?: {
755
- /* Brick is pressing */
756
- brickPressing?: () => Data
757
- /* Brick is focusing (Use TV Device with controller) */
758
- brickFocusing?: () => Data
759
- }
760
- animation?: AnimationBasicEvents & {
761
- onPress?: Animation
762
- onPressIn?: Animation
763
- onPressOut?: Animation
764
- onFocus?: Animation
765
- onBlur?: Animation
766
- }
767
- }
768
-
769
- /* SVG is an XML-based vector image format for 2D graphics */
770
- export type BrickSvg = Brick &
771
- BrickSvgDef & {
772
- templateKey: 'BRICK_SVG'
773
- switches: Array<
774
- SwitchDef &
775
- BrickSvgDef & {
776
- conds?: Array<{
777
- method: '==' | '!=' | '>' | '<' | '>=' | '<='
778
- cond:
779
- | SwitchCondInnerStateCurrentCanvas
780
- | SwitchCondData
781
- | {
782
- __typename: 'SwitchCondInnerStateOutlet'
783
- outlet: 'brickPressing' | 'brickFocusing'
784
- value: any
785
- }
786
- }>
787
- }
788
- >
789
- }
790
-
791
- interface BrickIconDef {
792
- /*
793
- Default property:
794
- {}
795
- */
796
- property?: BrickBasicProperty & {
797
- /* Select icon */
798
- icon?:
799
- | DataLink
800
- | {
801
- type?:
802
- | 'solid'
803
- | 'regular'
804
- | 'light'
805
- | 'duotone'
806
- | 'thin'
807
- | 'brands'
808
- | 'sharpSolid'
809
- | 'sharpLight'
810
- | 'sharpRegular'
811
- | DataLink
812
- name?: string | DataLink
813
- }
814
- /* Icon main color */
815
- color?: string | DataLink
816
- /* Icon secondary color (For Duotone type) */
817
- secondaryColor?: string | DataLink
818
- }
819
- events?: BrickBasicEvents & {
820
- /* Event of the brick press */
821
- onPress?: Array<EventAction>
822
- /* Event of the brick press in */
823
- onPressIn?: Array<EventAction>
824
- /* Event of the brick press out */
825
- onPressOut?: Array<EventAction>
826
- /* Event of the brick focus (Use TV Device with controller) */
827
- onFocus?: Array<EventAction>
828
- /* Event of the brick blur (Use TV Device with controller) */
829
- onBlur?: Array<EventAction>
830
- }
831
- outlets?: {
832
- /* Brick is pressing */
833
- brickPressing?: () => Data
834
- /* Brick is focusing (Use TV Device with controller) */
835
- brickFocusing?: () => Data
836
- }
837
- animation?: AnimationBasicEvents & {
838
- onPress?: Animation
839
- onPressIn?: Animation
840
- onPressOut?: Animation
841
- onFocus?: Animation
842
- onBlur?: Animation
843
- }
844
- }
845
-
846
- /* Icon brick */
847
- export type BrickIcon = Brick &
848
- BrickIconDef & {
849
- templateKey: 'BRICK_ICON'
850
- switches: Array<
851
- SwitchDef &
852
- BrickIconDef & {
853
- conds?: Array<{
854
- method: '==' | '!=' | '>' | '<' | '>=' | '<='
855
- cond:
856
- | SwitchCondInnerStateCurrentCanvas
857
- | SwitchCondData
858
- | {
859
- __typename: 'SwitchCondInnerStateOutlet'
860
- outlet: 'brickPressing' | 'brickFocusing'
861
- value: any
862
- }
863
- }>
864
- }
865
- >
866
- }
867
-
868
- /* Play the video */
869
- export type BrickVideoActionPlay = Action & {
870
- __actionName: 'BRICK_VIDEO_PLAY'
871
- }
872
-
873
- /* Seek the video */
874
- export type BrickVideoActionSeek = ActionWithParams & {
875
- __actionName: 'BRICK_VIDEO_SEEK'
876
- params?: Array<
877
- | {
878
- input: 'seekTime'
879
- value?: number | DataLink | EventProperty
880
- mapping?: string
881
- }
882
- | {
883
- input: 'play'
884
- value?: boolean | DataLink | EventProperty
885
- mapping?: string
886
- }
887
- >
888
- }
889
-
890
- /* Pause the video */
891
- export type BrickVideoActionPause = Action & {
892
- __actionName: 'BRICK_VIDEO_PAUSE'
893
- }
894
-
895
- /* Replay the video */
896
- export type BrickVideoActionReplay = Action & {
897
- __actionName: 'BRICK_VIDEO_REPLAY'
898
- }
899
-
900
- /* Stop the video */
901
- export type BrickVideoActionStop = Action & {
902
- __actionName: 'BRICK_VIDEO_STOP'
903
- }
904
-
905
- interface BrickVideoDef {
906
- /*
907
- Default property:
908
- {
909
- "paused": false,
910
- "volume": 100,
911
- "muted": false,
912
- "progressUpdateInterval": 1000,
913
- "replayTimeout": 500,
914
- "renderMode": "auto"
915
- }
916
- */
917
- property?: BrickBasicProperty & {
918
- /* The video path list or single path (File, URL) */
919
- path?:
920
- | string
921
- | DataLink
922
- | DataLink
923
- | {
924
- url?: string | DataLink
925
- }
926
- | Array<
927
- | DataLink
928
- | {
929
- url?: string | DataLink
930
- }
931
- | string
932
- | DataLink
933
- | DataLink
934
- >
935
- | DataLink
936
- | DataLink
937
- /* The checksum of file */
938
- md5?: string | DataLink
939
- /* Controls whether the video is paused */
940
- paused?: boolean | DataLink
941
- /* Volume */
942
- volume?: number | DataLink
943
- /* Muted */
944
- muted?: boolean | DataLink
945
- /* Video resize mode */
946
- resizeMode?: 'contain' | 'cover' | 'stretch' | DataLink
947
- /* Repeat the video path list */
948
- repeat?: boolean | DataLink
949
- /* Progress Update Interval */
950
- progressUpdateInterval?: number | DataLink
951
- /* Replay on playing error */
952
- replayOnError?: boolean | DataLink
953
- /* Timeout to replay if repeat or replayOnError is true and video is end or error */
954
- replayTimeout?: number | DataLink
955
- /* Use what view type for render video (Auto / Texture or Surface). Notice: Although using surface has better performance, it also affects the Animation & Standby Transition used by itself */
956
- renderMode?: 'auto' | 'texture' | 'surface' | DataLink
957
- }
958
- events?: BrickBasicEvents & {
959
- /* Event of the brick press */
960
- onPress?: Array<EventAction>
961
- /* Event of the brick press in */
962
- onPressIn?: Array<EventAction>
963
- /* Event of the brick press out */
964
- onPressOut?: Array<EventAction>
965
- /* Event of the brick focus (Use TV Device with controller) */
966
- onFocus?: Array<EventAction>
967
- /* Event of the brick blur (Use TV Device with controller) */
968
- onBlur?: Array<EventAction>
969
- /* Event of the next video on change start */
970
- nextVideo?: Array<EventAction>
971
- /* Event on plays of path are totally end */
972
- roundEnd?: Array<EventAction>
973
- /* Event on video load */
974
- onLoad?: Array<EventAction>
975
- /* Event of the video playing error */
976
- onError?: Array<EventAction>
977
- /* Event of the video progress interval */
978
- onProgress?: Array<EventAction>
979
- }
980
- outlets?: {
981
- /* Brick is pressing */
982
- brickPressing?: () => Data
983
- /* Brick is focusing (Use TV Device with controller) */
984
- brickFocusing?: () => Data
985
- }
986
- animation?: AnimationBasicEvents & {
987
- onPress?: Animation
988
- onPressIn?: Animation
989
- onPressOut?: Animation
990
- onFocus?: Animation
991
- onBlur?: Animation
992
- nextVideo?: Animation
993
- roundEnd?: Animation
994
- onLoad?: Animation
995
- onError?: Animation
996
- onProgress?: Animation
997
- }
998
- }
999
-
1000
- /* Video brick ([Tutorial](https://intercom.help/bricks-dag-inc/articles/5378577-video)) */
1001
- export type BrickVideo = Brick &
1002
- BrickVideoDef & {
1003
- templateKey: 'BRICK_VIDEO'
1004
- switches: Array<
1005
- SwitchDef &
1006
- BrickVideoDef & {
1007
- conds?: Array<{
1008
- method: '==' | '!=' | '>' | '<' | '>=' | '<='
1009
- cond:
1010
- | SwitchCondInnerStateCurrentCanvas
1011
- | SwitchCondData
1012
- | {
1013
- __typename: 'SwitchCondInnerStateOutlet'
1014
- outlet: 'brickPressing' | 'brickFocusing'
1015
- value: any
1016
- }
1017
- }>
1018
- }
1019
- >
1020
- }
1021
-
1022
- interface BrickVideoStreamingDef {
1023
- /*
1024
- Default property:
1025
- {
1026
- "networkCaching": 300,
1027
- "paused": false,
1028
- "volume": 100,
1029
- "muted": false,
1030
- "replayTimeout": 500
1031
- }
1032
- */
1033
- property?: BrickBasicProperty & {
1034
- /* The video path list or single path (File, URL) */
1035
- uri?: string | DataLink
1036
- /* Set cache time from streaming (You can adjust according to network conditions), it will delay the playing. */
1037
- networkCaching?: number | DataLink
1038
- /* Controls whether the video is paused */
1039
- paused?: boolean | DataLink
1040
- /* Volume */
1041
- volume?: number | DataLink
1042
- /* Muted */
1043
- muted?: boolean | DataLink
1044
- /* Video Auto Aspect Ratio */
1045
- autoAspectRatio?: boolean | DataLink
1046
- /* Video Aspect Ratio */
1047
- aspectRatio?: string | DataLink
1048
- /* Repeat the video path list */
1049
- repeat?: boolean | DataLink
1050
- /* Replay on playing error */
1051
- replayOnError?: boolean | DataLink
1052
- /* Timeout to replay if repeat or replayOnError is true and video is end or error */
1053
- replayTimeout?: number | DataLink
1054
- }
1055
- events?: BrickBasicEvents & {
1056
- /* Event of the brick press */
1057
- onPress?: Array<EventAction>
1058
- /* Event of the brick press in */
1059
- onPressIn?: Array<EventAction>
1060
- /* Event of the brick press out */
1061
- onPressOut?: Array<EventAction>
1062
- /* Event of the brick focus (Use TV Device with controller) */
1063
- onFocus?: Array<EventAction>
1064
- /* Event of the brick blur (Use TV Device with controller) */
1065
- onBlur?: Array<EventAction>
1066
- /* Event on plays of path are end */
1067
- onEnd?: Array<EventAction>
1068
- /* Event on plays of path are end */
1069
- onLoad?: Array<EventAction>
1070
- /* Event of the video playing error */
1071
- onError?: Array<EventAction>
1072
- }
1073
- outlets?: {
1074
- /* Brick is pressing */
1075
- brickPressing?: () => Data
1076
- /* Brick is focusing (Use TV Device with controller) */
1077
- brickFocusing?: () => Data
1078
- }
1079
- animation?: AnimationBasicEvents & {
1080
- onPress?: Animation
1081
- onPressIn?: Animation
1082
- onPressOut?: Animation
1083
- onFocus?: Animation
1084
- onBlur?: Animation
1085
- onEnd?: Animation
1086
- onLoad?: Animation
1087
- onError?: Animation
1088
- }
1089
- }
1090
-
1091
- /* Brick video streaming component, supports RTSP / RTMP streaming. */
1092
- export type BrickVideoStreaming = Brick &
1093
- BrickVideoStreamingDef & {
1094
- templateKey: 'BRICK_VIDEO_STREAMING'
1095
- switches: Array<
1096
- SwitchDef &
1097
- BrickVideoStreamingDef & {
1098
- conds?: Array<{
1099
- method: '==' | '!=' | '>' | '<' | '>=' | '<='
1100
- cond:
1101
- | SwitchCondInnerStateCurrentCanvas
1102
- | SwitchCondData
1103
- | {
1104
- __typename: 'SwitchCondInnerStateOutlet'
1105
- outlet: 'brickPressing' | 'brickFocusing'
1106
- value: any
1107
- }
1108
- }>
1109
- }
1110
- >
1111
- }
1112
-
1113
- interface BrickQrcodeDef {
1114
- /*
1115
- Default property:
1116
- {
1117
- "value": "",
1118
- "positiveColor": "#1e252a",
1119
- "negativeColor": "transparent",
1120
- "padding": 0,
1121
- "linearGradientEnabled": false,
1122
- "linearGradientStart": "black",
1123
- "linearGradientEnd": "black",
1124
- "linearGradientDirection": [
1125
- "0%",
1126
- "0%",
1127
- "100%",
1128
- "100%"
1129
- ],
1130
- "logoSize": 20,
1131
- "logoBackgroundColor": "transparent"
1132
- }
1133
- */
1134
- property?: BrickBasicProperty & {
1135
- /* The QRCode content */
1136
- value?: string | DataLink
1137
- /* The foreground color of QRCode */
1138
- positiveColor?: string | DataLink
1139
- /* The background color of QRCode */
1140
- negativeColor?: string | DataLink
1141
- /* Quiet zone around the qr */
1142
- padding?: number | DataLink
1143
- /* Enables or disables linear gradient */
1144
- linearGradientEnabled?: boolean | DataLink
1145
- /* Linear gradient start color */
1146
- linearGradientStart?: string | DataLink
1147
- /* Linear gradient end color */
1148
- linearGradientEnd?: string | DataLink
1149
- /* Linear gradient direction ('0%', '0%', '100%', '100%') */
1150
- linearGradientDirection?: Array<string | DataLink> | DataLink
1151
- /* Logo image source */
1152
- logoPath?: string | DataLink
1153
- /* The checksum of logo file */
1154
- md5?: string | DataLink
1155
- /* Logo image size (% of QRCode) */
1156
- logoSize?: number | DataLink
1157
- /* The logo gets a filled quadratic background with this color. */
1158
- logoBackgroundColor?: string | DataLink
1159
- }
1160
- events?: BrickBasicEvents & {
1161
- /* Event of the brick press */
1162
- onPress?: Array<EventAction>
1163
- /* Event of the brick press in */
1164
- onPressIn?: Array<EventAction>
1165
- /* Event of the brick press out */
1166
- onPressOut?: Array<EventAction>
1167
- /* Event of the brick focus (Use TV Device with controller) */
1168
- onFocus?: Array<EventAction>
1169
- /* Event of the brick blur (Use TV Device with controller) */
1170
- onBlur?: Array<EventAction>
1171
- }
1172
- outlets?: {
1173
- /* Brick is pressing */
1174
- brickPressing?: () => Data
1175
- /* Brick is focusing (Use TV Device with controller) */
1176
- brickFocusing?: () => Data
1177
- }
1178
- animation?: AnimationBasicEvents & {
1179
- onPress?: Animation
1180
- onPressIn?: Animation
1181
- onPressOut?: Animation
1182
- onFocus?: Animation
1183
- onBlur?: Animation
1184
- }
1185
- }
1186
-
1187
- /* QRCode brick ([Tutorial](https://intercom.help/bricks-dag-inc/articles/5378579-qr-code)) */
1188
- export type BrickQrcode = Brick &
1189
- BrickQrcodeDef & {
1190
- templateKey: 'BRICK_QRCODE'
1191
- switches: Array<
1192
- SwitchDef &
1193
- BrickQrcodeDef & {
1194
- conds?: Array<{
1195
- method: '==' | '!=' | '>' | '<' | '>=' | '<='
1196
- cond:
1197
- | SwitchCondInnerStateCurrentCanvas
1198
- | SwitchCondData
1199
- | {
1200
- __typename: 'SwitchCondInnerStateOutlet'
1201
- outlet: 'brickPressing' | 'brickFocusing'
1202
- value: any
1203
- }
1204
- }>
1205
- }
1206
- >
1207
- }
1208
-
1209
- /* Jump to a specific index in the slideshow */
1210
- export type BrickSlideshowActionJumpToIndex = ActionWithParams & {
1211
- __actionName: 'BRICK_SLIDESHOW_JUMP_TO_INDEX'
1212
- params?: Array<
1213
- | {
1214
- input: 'index'
1215
- value?: number | DataLink | EventProperty
1216
- mapping?: string
1217
- }
1218
- | {
1219
- input: 'reset'
1220
- value?: boolean | DataLink | EventProperty
1221
- mapping?: string
1222
- }
1223
- | {
1224
- input: 'shuffle'
1225
- value?: boolean | DataLink | EventProperty
1226
- mapping?: string
1227
- }
1228
- >
1229
- }
1230
-
1231
- interface BrickSlideshowDef {
1232
- /*
1233
- Default property:
1234
- {
1235
- "countdown": 2000,
1236
- "loop": true,
1237
- "shuffle": false,
1238
- "videoVolume": 100,
1239
- "emptyViewText": "no available image item to show",
1240
- "emptyViewTextSize": 44,
1241
- "emptyViewTextColor": "#fff",
1242
- "blurBackgroundRadius": 8
1243
- }
1244
- */
1245
- property?: BrickBasicProperty & {
1246
- /* The time interval of show for each photo */
1247
- countdown?: number | DataLink
1248
- /* The slideshow media path list (File, URL) */
1249
- paths?:
1250
- | Array<
1251
- | DataLink
1252
- | {
1253
- url?: string | DataLink
1254
- mediaType?: 'video' | 'video-streaming' | 'photo' | DataLink
1255
- photoResizeMode?: 'contain' | 'cover' | 'stretch' | 'center' | 'repeat' | DataLink
1256
- photoLoadSystemIos?: 'auto' | 'sdwebimage' | 'default' | DataLink
1257
- photoLoadSystemAndroid?: 'auto' | 'glide' | 'fresco' | DataLink
1258
- videoResizeMode?: 'contain' | 'cover' | 'stretch' | DataLink
1259
- videoAutoAspectRatio?: boolean | DataLink
1260
- videoAspectRatio?: string | DataLink
1261
- videoVolume?: number | DataLink
1262
- videoMuted?: boolean | DataLink
1263
- videoRenderMode?: 'auto' | 'texture' | 'surface' | DataLink
1264
- }
1265
- >
1266
- | DataLink
1267
- /* Multiple slideshow media path lists to combine (Array of path arrays) */
1268
- pathsList?: Array<Array<any> | DataLink | DataLink> | DataLink
1269
- /* Loop the slideshow */
1270
- loop?: boolean | DataLink
1271
- /* Shuffle the slideshow */
1272
- shuffle?: boolean | DataLink
1273
- /* Slideshow Photo resize mode */
1274
- photoResizeMode?: 'contain' | 'cover' | 'stretch' | 'center' | 'repeat' | DataLink
1275
- /* [iOS] The use priority of image loading system (Auto: sdwebimage, fallback to default if failed) */
1276
- photoLoadSystemIos?: 'auto' | 'sdwebimage' | 'default' | DataLink
1277
- /* [Android] The use priority of image loading system (Auto: glide, fallback to fresco if failed) */
1278
- photoLoadSystemAndroid?: 'auto' | 'glide' | 'fresco' | DataLink
1279
- /* Slideshow Video resize mode */
1280
- videoResizeMode?: 'contain' | 'cover' | 'stretch' | DataLink
1281
- /* Video Auto Aspect Ratio for use Video Streaming */
1282
- videoAutoAspectRatio?: boolean | DataLink
1283
- /* Video Aspect Ratio for use Video Streaming */
1284
- videoAspectRatio?: string | DataLink
1285
- /* Video Volume */
1286
- videoVolume?: number | DataLink
1287
- /* Video Muted */
1288
- videoMuted?: boolean | DataLink
1289
- /* [Android only] Use what view type for render video (Auto / Texture or Surface). Notice: Although using surface has better performance, it also affects the Animation & Standby Transition used by itself */
1290
- videoRenderMode?: 'auto' | 'texture' | 'surface' | DataLink
1291
- /* The photo fade duration */
1292
- fadeDuration?: number | DataLink
1293
- /* Show text content if path list is empty */
1294
- emptyViewText?: string | DataLink
1295
- /* The font size of shown text content if path list is empty */
1296
- emptyViewTextSize?: number | DataLink
1297
- /* The color of shown text content if path list is empty */
1298
- emptyViewTextColor?: string | DataLink
1299
- /* Show emptyViewText when timeout and paths is empty */
1300
- emptyViewTimeout?: number | DataLink
1301
- /* The blur radius of the blur filter added to the image */
1302
- blurRadius?: number | DataLink
1303
- /* Add blurred image at background if photo is not full */
1304
- enableBlurBackground?: boolean | DataLink
1305
- /* The blur radius of the blur filter added to the image background */
1306
- blurBackgroundRadius?: number | DataLink
1307
- }
1308
- events?: BrickBasicEvents & {
1309
- /* Event of the next slideshow on change start */
1310
- changeStart?: Array<EventAction>
1311
- /* Event of the next slideshow on change end */
1312
- changeEnd?: Array<EventAction>
1313
- /* Event on paths change */
1314
- contentChange?: Array<EventAction>
1315
- /* Event on plays of paths are end */
1316
- roundEnd?: Array<EventAction>
1317
- /* Event of the slideshow on load */
1318
- mediaOnLoad?: Array<EventAction>
1319
- }
1320
- animation?: AnimationBasicEvents & {
1321
- changeStart?: Animation
1322
- changeEnd?: Animation
1323
- contentChange?: Animation
1324
- roundEnd?: Animation
1325
- mediaOnLoad?: Animation
1326
- }
1327
- }
1328
-
1329
- /* Slideshow brick ([Tutorial](https://intercom.help/bricks-dag-inc/articles/5378580-slideshow)) */
1330
- export type BrickSlideshow = Brick &
1331
- BrickSlideshowDef & {
1332
- templateKey: 'BRICK_SLIDESHOW'
1333
- switches: Array<
1334
- SwitchDef &
1335
- BrickSlideshowDef & {
1336
- conds?: Array<{
1337
- method: '==' | '!=' | '>' | '<' | '>=' | '<='
1338
- cond:
1339
- | SwitchCondInnerStateCurrentCanvas
1340
- | SwitchCondData
1341
- | {
1342
- __typename: 'SwitchCondInnerStateOutlet'
1343
- outlet: ''
1344
- value: any
1345
- }
1346
- }>
1347
- }
1348
- >
1349
- }
1350
-
1351
- /* Data highlight */
1352
- export type BrickChartActionDataHighlight = ActionWithParams & {
1353
- __actionName: 'BRICK_CHART_DATA_HIGHLIGHT'
1354
- params?: Array<
1355
- | {
1356
- input: 'seriesName'
1357
- value?: string | DataLink | EventProperty
1358
- mapping?: string
1359
- }
1360
- | {
1361
- input: 'seriesId'
1362
- value?: string | DataLink | EventProperty
1363
- mapping?: string
1364
- }
1365
- | {
1366
- input: 'seriesIndex'
1367
- value?: number | DataLink | EventProperty
1368
- mapping?: string
1369
- }
1370
- | {
1371
- input: 'dataIndex'
1372
- value?: number | DataLink | EventProperty
1373
- mapping?: string
1374
- }
1375
- | {
1376
- input: 'name'
1377
- value?: string | DataLink | EventProperty
1378
- mapping?: string
1379
- }
1380
- >
1381
- }
1382
-
1383
- /* Data downplay */
1384
- export type BrickChartActionDataDownplay = ActionWithParams & {
1385
- __actionName: 'BRICK_CHART_DATA_DOWNPLAY'
1386
- params?: Array<
1387
- | {
1388
- input: 'seriesName'
1389
- value?: string | DataLink | EventProperty
1390
- mapping?: string
1391
- }
1392
- | {
1393
- input: 'seriesId'
1394
- value?: string | DataLink | EventProperty
1395
- mapping?: string
1396
- }
1397
- | {
1398
- input: 'seriesIndex'
1399
- value?: number | DataLink | EventProperty
1400
- mapping?: string
1401
- }
1402
- | {
1403
- input: 'dataIndex'
1404
- value?: number | DataLink | EventProperty
1405
- mapping?: string
1406
- }
1407
- | {
1408
- input: 'name'
1409
- value?: string | DataLink | EventProperty
1410
- mapping?: string
1411
- }
1412
- >
1413
- }
1414
-
1415
- /* Data select */
1416
- export type BrickChartActionDataSelect = ActionWithParams & {
1417
- __actionName: 'BRICK_CHART_DATA_SELECT'
1418
- params?: Array<
1419
- | {
1420
- input: 'seriesName'
1421
- value?: string | DataLink | EventProperty
1422
- mapping?: string
1423
- }
1424
- | {
1425
- input: 'seriesId'
1426
- value?: string | DataLink | EventProperty
1427
- mapping?: string
1428
- }
1429
- | {
1430
- input: 'seriesIndex'
1431
- value?: number | DataLink | EventProperty
1432
- mapping?: string
1433
- }
1434
- | {
1435
- input: 'dataIndex'
1436
- value?: number | DataLink | EventProperty
1437
- mapping?: string
1438
- }
1439
- | {
1440
- input: 'name'
1441
- value?: string | DataLink | EventProperty
1442
- mapping?: string
1443
- }
1444
- >
1445
- }
1446
-
1447
- /* Data unselect */
1448
- export type BrickChartActionDataUnselect = ActionWithParams & {
1449
- __actionName: 'BRICK_CHART_DATA_UNSELECT'
1450
- params?: Array<
1451
- | {
1452
- input: 'seriesName'
1453
- value?: string | DataLink | EventProperty
1454
- mapping?: string
1455
- }
1456
- | {
1457
- input: 'seriesId'
1458
- value?: string | DataLink | EventProperty
1459
- mapping?: string
1460
- }
1461
- | {
1462
- input: 'seriesIndex'
1463
- value?: number | DataLink | EventProperty
1464
- mapping?: string
1465
- }
1466
- | {
1467
- input: 'dataIndex'
1468
- value?: number | DataLink | EventProperty
1469
- mapping?: string
1470
- }
1471
- | {
1472
- input: 'name'
1473
- value?: string | DataLink | EventProperty
1474
- mapping?: string
1475
- }
1476
- >
1477
- }
1478
-
1479
- /* Data toggle select */
1480
- export type BrickChartActionDataToggleSelect = ActionWithParams & {
1481
- __actionName: 'BRICK_CHART_DATA_TOGGLE_SELECT'
1482
- params?: Array<
1483
- | {
1484
- input: 'seriesName'
1485
- value?: string | DataLink | EventProperty
1486
- mapping?: string
1487
- }
1488
- | {
1489
- input: 'seriesId'
1490
- value?: string | DataLink | EventProperty
1491
- mapping?: string
1492
- }
1493
- | {
1494
- input: 'seriesIndex'
1495
- value?: number | DataLink | EventProperty
1496
- mapping?: string
1497
- }
1498
- | {
1499
- input: 'dataIndex'
1500
- value?: number | DataLink | EventProperty
1501
- mapping?: string
1502
- }
1503
- | {
1504
- input: 'name'
1505
- value?: string | DataLink | EventProperty
1506
- mapping?: string
1507
- }
1508
- >
1509
- }
1510
-
1511
- /* Legend select */
1512
- export type BrickChartActionLegendSelect = ActionWithParams & {
1513
- __actionName: 'BRICK_CHART_LEGEND_SELECT'
1514
- params?: Array<{
1515
- input: 'name'
1516
- value?: string | DataLink | EventProperty
1517
- mapping?: string
1518
- }>
1519
- }
1520
-
1521
- /* Legend unselect */
1522
- export type BrickChartActionLegendUnselect = ActionWithParams & {
1523
- __actionName: 'BRICK_CHART_LEGEND_UNSELECT'
1524
- params?: Array<{
1525
- input: 'name'
1526
- value?: string | DataLink | EventProperty
1527
- mapping?: string
1528
- }>
1529
- }
1530
-
1531
- /* Legend toggle select */
1532
- export type BrickChartActionLegendToggleSelect = Action & {
1533
- __actionName: 'BRICK_CHART_LEGEND_TOGGLE_SELECT'
1534
- }
1535
-
1536
- /* Legend all select */
1537
- export type BrickChartActionLegendAllSelect = Action & {
1538
- __actionName: 'BRICK_CHART_LEGEND_ALL_SELECT'
1539
- }
1540
-
1541
- /* Legend inverse select */
1542
- export type BrickChartActionLegendInverseSelect = Action & {
1543
- __actionName: 'BRICK_CHART_LEGEND_INVERSE_SELECT'
1544
- }
1545
-
1546
- /* Tooltip show */
1547
- export type BrickChartActionTooltipShow = ActionWithParams & {
1548
- __actionName: 'BRICK_CHART_TOOLTIP_SHOW'
1549
- params?: Array<
1550
- | {
1551
- input: 'seriesIndex'
1552
- value?: number | DataLink | EventProperty
1553
- mapping?: string
1554
- }
1555
- | {
1556
- input: 'dataIndex'
1557
- value?: number | DataLink | EventProperty
1558
- mapping?: string
1559
- }
1560
- | {
1561
- input: 'name'
1562
- value?: string | DataLink | EventProperty
1563
- mapping?: string
1564
- }
1565
- >
1566
- }
1567
-
1568
- /* Tooltip hide */
1569
- export type BrickChartActionTooltipHide = ActionWithParams & {
1570
- __actionName: 'BRICK_CHART_TOOLTIP_HIDE'
1571
- params?: Array<
1572
- | {
1573
- input: 'seriesIndex'
1574
- value?: number | DataLink | EventProperty
1575
- mapping?: string
1576
- }
1577
- | {
1578
- input: 'dataIndex'
1579
- value?: number | DataLink | EventProperty
1580
- mapping?: string
1581
- }
1582
- | {
1583
- input: 'name'
1584
- value?: string | DataLink | EventProperty
1585
- mapping?: string
1586
- }
1587
- >
1588
- }
1589
-
1590
- interface BrickChartDef {
1591
- /*
1592
- Default property:
1593
- {
1594
- "legendShow": true,
1595
- "xAxisShow": true,
1596
- "xAxisType": "category",
1597
- "yAxisShow": true,
1598
- "yAxisType": "value",
1599
- "tooltipShow": true,
1600
- "tooltipTrigger": "item"
1601
- }
1602
- */
1603
- property?: BrickBasicProperty & {
1604
- /* Theme. You can use https://echarts.apache.org/en/theme-builder.html to generate theme */
1605
- themeEntry?: {} | DataLink
1606
- /* Theme of URL (.json) */
1607
- themeUrl?: string | DataLink
1608
- /* Theme of MD5 */
1609
- themeMd5?: string | DataLink
1610
- /* Title text */
1611
- titleText?: string | DataLink
1612
- /* Subtitle text */
1613
- titleSubtext?: string | DataLink
1614
- /* Full configuration of title, see https://echarts.apache.org/en/option.html#title */
1615
- titleOptions?: {} | DataLink
1616
- /* Show legend */
1617
- legendShow?: boolean | DataLink
1618
- /* Legend data */
1619
- legendData?: Array<string | DataLink> | DataLink
1620
- /* Full configuration of legend, see https://echarts.apache.org/en/option.html#legend */
1621
- legendOptions?: {} | DataLink
1622
- /* Show grid */
1623
- gridShow?: boolean | DataLink
1624
- /* Full configuration of grid, see https://echarts.apache.org/en/option.html#grid */
1625
- gridOptions?: {} | DataLink
1626
- /* Dataset (see https://echarts.apache.org/en/option.html#dataset) */
1627
- dataset?: Array<any> | DataLink
1628
- /* Show x axis */
1629
- xAxisShow?: boolean | DataLink
1630
- /* Type of x axis */
1631
- xAxisType?: 'category' | 'value' | 'time' | 'log' | DataLink
1632
- /* Name of x axis */
1633
- xAxisName?: string | DataLink
1634
- /* Data of x axis */
1635
- xAxisData?: Array<string | DataLink> | DataLink
1636
- /* Full configuration of x axis, see https://echarts.apache.org/en/option.html#xAxis */
1637
- xAxisOptions?: {} | DataLink
1638
- /* Show y axis */
1639
- yAxisShow?: boolean | DataLink
1640
- /* Type of x axis */
1641
- yAxisType?: 'value' | 'category' | 'time' | 'log' | DataLink
1642
- /* Name of x axis */
1643
- yAxisName?: string | DataLink
1644
- /* Data of y axis */
1645
- yAxisData?: Array<string | DataLink> | DataLink
1646
- /* Full configuration of y axis, see https://echarts.apache.org/en/option.html#yAxis */
1647
- yAxisOptions?: {} | DataLink
1648
- /* Show axis pointer */
1649
- axisPointerShow?: boolean | DataLink
1650
- /* Full configuration of axis pointer, see https://echarts.apache.org/en/option.html#axisPointer */
1651
- axisPointerOptions?: {} | DataLink
1652
- /* data series (see https://echarts.apache.org/en/option.html#series-line) */
1653
- series?: Array<any> | DataLink
1654
- /* Show tooltip */
1655
- tooltipShow?: boolean | DataLink
1656
- /* Trigger type of tooltip */
1657
- tooltipTrigger?: 'item' | 'axis' | 'none' | DataLink
1658
- /* data series (see https://echarts.apache.org/en/option.html#tooltip) */
1659
- tooltipOptions?: {} | DataLink
1660
- /* Full configuration of options, see https://echarts.apache.org/en/option.html */
1661
- options?: {} | DataLink
1662
- }
1663
- events?: BrickBasicEvents & {
1664
- /* Event of chart render */
1665
- onRender?: Array<EventAction>
1666
- /* Event of data point on press */
1667
- onPress?: Array<EventAction>
1668
- /* Event of legend select changed */
1669
- onLegendSelectChanged?: Array<EventAction>
1670
- }
1671
- animation?: AnimationBasicEvents & {
1672
- onRender?: Animation
1673
- onPress?: Animation
1674
- onLegendSelectChanged?: Animation
1675
- }
1676
- }
1677
-
1678
- /* Chart brick, based on [Apache ECharts](https://echarts.apache.org/en/index.html). */
1679
- export type BrickChart = Brick &
1680
- BrickChartDef & {
1681
- templateKey: 'BRICK_CHART'
1682
- switches: Array<
1683
- SwitchDef &
1684
- BrickChartDef & {
1685
- conds?: Array<{
1686
- method: '==' | '!=' | '>' | '<' | '>=' | '<='
1687
- cond:
1688
- | SwitchCondInnerStateCurrentCanvas
1689
- | SwitchCondData
1690
- | {
1691
- __typename: 'SwitchCondInnerStateOutlet'
1692
- outlet: ''
1693
- value: any
1694
- }
1695
- }>
1696
- }
1697
- >
1698
- }
1699
-
1700
- /* prev page */
1701
- export type BrickItemsActionPrevPage = Action & {
1702
- __actionName: 'BRICK_ITEMS_PREV_PAGE'
1703
- }
1704
-
1705
- /* next page */
1706
- export type BrickItemsActionNextPage = Action & {
1707
- __actionName: 'BRICK_ITEMS_NEXT_PAGE'
1708
- }
1709
-
1710
- /* jump page */
1711
- export type BrickItemsActionJumpPage = ActionWithParams & {
1712
- __actionName: 'BRICK_ITEMS_JUMP_PAGE'
1713
- params?: Array<{
1714
- input: 'pageIndex'
1715
- value?: number | DataLink | EventProperty
1716
- mapping?: string
1717
- }>
1718
- }
1719
-
1720
- /* open detail */
1721
- export type BrickItemsActionOpenDetail = ActionWithParams & {
1722
- __actionName: 'BRICK_ITEMS_OPEN_DETAIL'
1723
- params?: Array<{
1724
- input: 'detailIndex'
1725
- value?: number | DataLink | EventProperty
1726
- mapping?: string
1727
- }>
1728
- }
1729
-
1730
- /* back list */
1731
- export type BrickItemsActionBackList = Action & {
1732
- __actionName: 'BRICK_ITEMS_BACK_LIST'
1733
- }
1734
-
1735
- /* Trigger dynamic animation of item by data id or index */
1736
- export type BrickItemsActionDynamicAnimation = ActionWithParams & {
1737
- __actionName: 'BRICK_ITEMS_DYNAMIC_ANIMATION'
1738
- params?: Array<
1739
- | {
1740
- input: 'mode'
1741
- value?: 'list' | 'detail' | DataLink | EventProperty
1742
- mapping?: string
1743
- }
1744
- | {
1745
- input: 'brickId'
1746
- value?: string | DataLink | EventProperty
1747
- mapping?: string
1748
- }
1749
- | {
1750
- input: 'dataId'
1751
- value?: string | DataLink | EventProperty
1752
- mapping?: string
1753
- }
1754
- | {
1755
- input: 'index'
1756
- value?: number | DataLink | EventProperty
1757
- mapping?: string
1758
- }
1759
- | {
1760
- input: 'animationId'
1761
- value?: string | DataLink | (() => Animation) | EventProperty
1762
- mapping?: string
1763
- }
1764
- | {
1765
- input: 'animationType'
1766
- value?: 'once' | 'loop' | DataLink | EventProperty
1767
- mapping?: string
1768
- }
1769
- | {
1770
- input: 'animationResetInitialValue'
1771
- value?: boolean | DataLink | EventProperty
1772
- mapping?: string
1773
- }
1774
- >
1775
- }
1776
-
1777
- /* Reset dynamic action of item by data id or index */
1778
- export type BrickItemsActionDynamicAnimationReset = ActionWithParams & {
1779
- __actionName: 'BRICK_ITEMS_DYNAMIC_ANIMATION_RESET'
1780
- params?: Array<
1781
- | {
1782
- input: 'mode'
1783
- value?: 'list' | 'detail' | DataLink | EventProperty
1784
- mapping?: string
1785
- }
1786
- | {
1787
- input: 'brickId'
1788
- value?: string | DataLink | EventProperty
1789
- mapping?: string
1790
- }
1791
- | {
1792
- input: 'dataId'
1793
- value?: string | DataLink | EventProperty
1794
- mapping?: string
1795
- }
1796
- | {
1797
- input: 'index'
1798
- value?: number | DataLink | EventProperty
1799
- mapping?: string
1800
- }
1801
- >
1802
- }
1803
-
1804
- /* Stop dynamic action of item by data id or index */
1805
- export type BrickItemsActionDynamicAnimationStop = ActionWithParams & {
1806
- __actionName: 'BRICK_ITEMS_DYNAMIC_ANIMATION_STOP'
1807
- params?: Array<
1808
- | {
1809
- input: 'mode'
1810
- value?: 'list' | 'detail' | DataLink | EventProperty
1811
- mapping?: string
1812
- }
1813
- | {
1814
- input: 'brickId'
1815
- value?: string | DataLink | EventProperty
1816
- mapping?: string
1817
- }
1818
- | {
1819
- input: 'dataId'
1820
- value?: string | DataLink | EventProperty
1821
- mapping?: string
1822
- }
1823
- | {
1824
- input: 'index'
1825
- value?: number | DataLink | EventProperty
1826
- mapping?: string
1827
- }
1828
- >
1829
- }
1830
-
1831
- interface BrickItemsDef {
1832
- /*
1833
- Default property:
1834
- {
1835
- "mode": "list",
1836
- "items": [],
1837
- "transformScriptEnabled": false,
1838
- "transformScriptCode": "\/\* Global variable: inputs = { items, variables } \*\/\nreturn inputs.items",
1839
- "transformScriptVariables": {},
1840
- "postTransformScriptEnabled": false,
1841
- "postTransformScriptCode": "\/\*\n * Global variable: inputs = {\n * itemsLength, // items data length\n * collections, // [{ index, item, renderList }] (all items data)\n * collectionsCurrentPage, // [{ index, item, renderList }] (current page items data)\n * renderList, // Flattened bricks of current page { frame: { x, y, width, height ... }, ... }\n * variables\n * }\n \*\/\nreturn inputs.renderList",
1842
- "postTransformScriptVariables": {},
1843
- "pageIndex": 0,
1844
- "selectedItemIndex": 0,
1845
- "allowPageOutOfBound": true,
1846
- "standbySequenceInterval": 500,
1847
- "standbySequenceRandom": 0,
1848
- "brickEditWidth": 10,
1849
- "brickEditHeight": 10,
1850
- "detailBrickEditWidth": 50,
1851
- "detailBrickEditHeight": 50,
1852
- "orderMode": "horizontal",
1853
- "resizeMode": "auto",
1854
- "justifyContent": "start",
1855
- "alignContent": "stretch",
1856
- "detailResizeMode": "auto",
1857
- "detailJustifyContent": "start",
1858
- "detailAlignContent": "stretch"
1859
- }
1860
- */
1861
- property?: BrickBasicProperty & {
1862
- /* Set current display to `list` or `detail` mode */
1863
- mode?: 'list' | 'detail' | DataLink
1864
- /* Items to generate bricks for rendering */
1865
- items?: Array<any> | DataLink
1866
- /* Enable Transform Script */
1867
- transformScriptEnabled?: boolean | DataLink
1868
- /* Code of Transform Script */
1869
- transformScriptCode?: string | DataLink
1870
- /* Variables used in Transform Script (object) */
1871
- transformScriptVariables?: {} | DataLink
1872
- /* Enable Post Transform Script */
1873
- postTransformScriptEnabled?: boolean | DataLink
1874
- /* Code of Post Transform Script */
1875
- postTransformScriptCode?: string | DataLink
1876
- /* Variables used in Post Transform Script (object) */
1877
- postTransformScriptVariables?: {} | DataLink
1878
- /* Path to get item property for generate brick id instead of use index */
1879
- dataKeyPath?: string | DataLink
1880
- /* Items per page (Default: Items size) */
1881
- itemsPerPage?: number | DataLink
1882
- /* Current page index for `list` mode */
1883
- pageIndex?: number | DataLink
1884
- /* Current selected item index for `detail` mode */
1885
- selectedItemIndex?: number | DataLink
1886
- /* Allow page out of bound */
1887
- allowPageOutOfBound?: boolean | DataLink
1888
- /* Sequentially run Standby Transition for each item */
1889
- standbySequenceEnabled?: boolean | DataLink
1890
- /* Delay time (ms) between each item */
1891
- standbySequenceInterval?: number | DataLink
1892
- /* Random delay time (ms) increase or decrease between each item (e.g. if 100ms then delay time will be -100ms ~ 100ms) */
1893
- standbySequenceRandom?: number | DataLink
1894
- /* Define frame width of Brick List editor */
1895
- brickEditWidth?: number | DataLink
1896
- /* Define frame height of Brick List editor */
1897
- brickEditHeight?: number | DataLink
1898
- /* Define frame width of Brick List editor for detail mode */
1899
- detailBrickEditWidth?: number | DataLink
1900
- /* Define frame height of Brick List editor */
1901
- detailBrickEditHeight?: number | DataLink
1902
- /* order of horizontal first or vertical first */
1903
- orderMode?: 'horizontal' | 'vertical' | DataLink
1904
- /* Max horizontal item quantity */
1905
- horizontalMaxQuantity?: number | DataLink
1906
- /* Max vertical item quantity */
1907
- verticalMaxQuantity?: number | DataLink
1908
- /* Resize mode */
1909
- resizeMode?: 'auto' | 'fix' | DataLink
1910
- /* Justify Content */
1911
- justifyContent?: 'start' | 'end' | 'center' | 'space-between' | 'space-around' | DataLink
1912
- /* Align Content */
1913
- alignContent?:
1914
- | 'stretch'
1915
- | 'start'
1916
- | 'end'
1917
- | 'center'
1918
- | 'space-between'
1919
- | 'space-around'
1920
- | DataLink
1921
- /* Resize mode for detail mode */
1922
- detailResizeMode?: 'auto' | 'fix' | DataLink
1923
- /* Align Content for detail mode */
1924
- detailJustifyContent?: 'start' | 'end' | 'center' | DataLink
1925
- /* Align Content for detail mode */
1926
- detailAlignContent?: 'stretch' | 'start' | 'end' | 'center' | DataLink
1927
- }
1928
- /* Brick Definitions for render bricks for each item of `items` on `list` mode */
1929
- brickList?:
1930
- | Array<
1931
- | DataLink
1932
- | {
1933
- title?: string | DataLink
1934
- description?: string | DataLink
1935
- hidden?: boolean | DataLink
1936
- brickId?: string | DataLink
1937
- brickIdPrefix?: string | DataLink
1938
- templateKey?: string | DataLink
1939
- property?: {} | DataLink
1940
- animation?: {} | DataLink
1941
- eventMap?: {} | DataLink
1942
- outlet?: {} | DataLink
1943
- stateGroup?: any
1944
- propertyMapping?: {} | DataLink
1945
- frame?:
1946
- | DataLink
1947
- | {
1948
- x?: number | DataLink
1949
- y?: number | DataLink
1950
- width?: number | DataLink
1951
- height?: number | DataLink
1952
- standbyMode?: 'custom' | 'top' | 'bottom' | 'left' | 'right' | DataLink
1953
- standbyFrame?: DataLink | {}
1954
- standbyOpacity?: number | DataLink
1955
- standbyDelay?: number | DataLink
1956
- standbyDelayRandom?: number | DataLink
1957
- standbyEasing?:
1958
- | DataLink
1959
- | {
1960
- default?:
1961
- | DataLink
1962
- | {
1963
- method?: string | DataLink
1964
- duration?: number | DataLink
1965
- }
1966
- x?:
1967
- | DataLink
1968
- | {
1969
- method?: string | DataLink
1970
- duration?: number | DataLink
1971
- }
1972
- y?:
1973
- | DataLink
1974
- | {
1975
- method?: string | DataLink
1976
- duration?: number | DataLink
1977
- }
1978
- width?:
1979
- | DataLink
1980
- | {
1981
- method?: string | DataLink
1982
- duration?: number | DataLink
1983
- }
1984
- height?:
1985
- | DataLink
1986
- | {
1987
- method?: string | DataLink
1988
- duration?: number | DataLink
1989
- }
1990
- opacity?:
1991
- | DataLink
1992
- | {
1993
- method?: string | DataLink
1994
- duration?: number | DataLink
1995
- }
1996
- }
1997
- showingDelay?: number | DataLink
1998
- renderOutOfViewport?: boolean | DataLink
1999
- }
2000
- show?: string | DataLink
2001
- pressToOpenDetail?: boolean | DataLink
2002
- }
2003
- >
2004
- | DataLink
2005
- /* Brick Definitions for render bricks for each item of `items` on `detail` mode */
2006
- brickDetails?:
2007
- | Array<
2008
- | DataLink
2009
- | {
2010
- title?: string | DataLink
2011
- description?: string | DataLink
2012
- hidden?: boolean | DataLink
2013
- brickId?: string | DataLink
2014
- brickIdPrefix?: string | DataLink
2015
- templateKey?: string | DataLink
2016
- property?: {} | DataLink
2017
- animation?: {} | DataLink
2018
- eventMap?: {} | DataLink
2019
- outlet?: {} | DataLink
2020
- stateGroup?: any
2021
- propertyMapping?: {} | DataLink
2022
- frame?:
2023
- | DataLink
2024
- | {
2025
- x?: number | DataLink
2026
- y?: number | DataLink
2027
- width?: number | DataLink
2028
- height?: number | DataLink
2029
- standbyMode?: 'custom' | 'top' | 'bottom' | 'left' | 'right' | DataLink
2030
- standbyFrame?: DataLink | {}
2031
- standbyOpacity?: number | DataLink
2032
- standbyDelay?: number | DataLink
2033
- standbyDelayRandom?: number | DataLink
2034
- standbyEasing?:
2035
- | DataLink
2036
- | {
2037
- default?:
2038
- | DataLink
2039
- | {
2040
- method?: string | DataLink
2041
- duration?: number | DataLink
2042
- }
2043
- x?:
2044
- | DataLink
2045
- | {
2046
- method?: string | DataLink
2047
- duration?: number | DataLink
2048
- }
2049
- y?:
2050
- | DataLink
2051
- | {
2052
- method?: string | DataLink
2053
- duration?: number | DataLink
2054
- }
2055
- width?:
2056
- | DataLink
2057
- | {
2058
- method?: string | DataLink
2059
- duration?: number | DataLink
2060
- }
2061
- height?:
2062
- | DataLink
2063
- | {
2064
- method?: string | DataLink
2065
- duration?: number | DataLink
2066
- }
2067
- opacity?:
2068
- | DataLink
2069
- | {
2070
- method?: string | DataLink
2071
- duration?: number | DataLink
2072
- }
2073
- }
2074
- showingDelay?: number | DataLink
2075
- renderOutOfViewport?: boolean | DataLink
2076
- }
2077
- show?: string | DataLink
2078
- pressToBackList?: boolean | DataLink
2079
- }
2080
- >
2081
- | DataLink
2082
- events?: BrickBasicEventsForItem & {
2083
- /* Event on page render finished */
2084
- onPageRender?: Array<EventActionForItem>
2085
- /* Event on page change. */
2086
- onPageChange?: Array<EventActionForItem>
2087
- /* Event on page index out of bound. */
2088
- onPageOutOfBound?: Array<EventActionForItem>
2089
- /* Event on into `detail` mode */
2090
- onIntoDetailMode?: Array<EventActionForItem>
2091
- /* Event on into `list` mode. */
2092
- onIntoListMode?: Array<EventActionForItem>
2093
- /* Event on render error */
2094
- onError?: Array<EventActionForItem>
2095
- }
2096
- outlets?: {
2097
- /* Catched error message */
2098
- error?: () => Data
2099
- /* Current render mode */
2100
- mode?: () => Data
2101
- /* Current page index */
2102
- pageIndex?: () => Data
2103
- /* Current page size */
2104
- pageSize?: () => Data
2105
- /* Selected item index of detail mode */
2106
- selectedItemIndex?: () => Data
2107
- /* Page is out of bound */
2108
- pageIsOutOfBound?: () => Data
2109
- }
2110
- animation?: AnimationBasicEvents & {
2111
- onPageRender?: Animation
2112
- onPageChange?: Animation
2113
- onPageOutOfBound?: Animation
2114
- onIntoDetailMode?: Animation
2115
- onIntoListMode?: Animation
2116
- onError?: Animation
2117
- }
2118
- }
2119
-
2120
- /* Brick items component */
2121
- export type BrickItems = Brick &
2122
- BrickItemsDef & {
2123
- templateKey: 'BRICK_ITEMS'
2124
- switches: Array<
2125
- SwitchDef &
2126
- BrickItemsDef & {
2127
- conds?: Array<{
2128
- method: '==' | '!=' | '>' | '<' | '>=' | '<='
2129
- cond:
2130
- | SwitchCondInnerStateCurrentCanvas
2131
- | SwitchCondData
2132
- | {
2133
- __typename: 'SwitchCondInnerStateOutlet'
2134
- outlet:
2135
- | 'error'
2136
- | 'mode'
2137
- | 'pageIndex'
2138
- | 'pageSize'
2139
- | 'selectedItemIndex'
2140
- | 'pageIsOutOfBound'
2141
- value: any
2142
- }
2143
- }>
2144
- }
2145
- >
2146
- }
2147
-
2148
- /* Play animation */
2149
- export type BrickLottieActionPlay = ActionWithParams & {
2150
- __actionName: 'BRICK_LOTTIE_PLAY'
2151
- params?: Array<
2152
- | {
2153
- input: 'startFrame'
2154
- value?: number | DataLink | EventProperty
2155
- mapping?: string
2156
- }
2157
- | {
2158
- input: 'endFrame'
2159
- value?: number | DataLink | EventProperty
2160
- mapping?: string
2161
- }
2162
- >
2163
- }
2164
-
2165
- /* Pause animation */
2166
- export type BrickLottieActionPause = Action & {
2167
- __actionName: 'BRICK_LOTTIE_PAUSE'
2168
- }
2169
-
2170
- /* Resume animation */
2171
- export type BrickLottieActionResume = Action & {
2172
- __actionName: 'BRICK_LOTTIE_RESUME'
2173
- }
2174
-
2175
- /* Stop animation */
2176
- export type BrickLottieActionStop = Action & {
2177
- __actionName: 'BRICK_LOTTIE_STOP'
2178
- }
2179
-
2180
- /* Reset animation */
2181
- export type BrickLottieActionReset = Action & {
2182
- __actionName: 'BRICK_LOTTIE_RESET'
2183
- }
2184
-
2185
- interface BrickLottieDef {
2186
- /*
2187
- Default property:
2188
- {
2189
- "loop": true,
2190
- "autoPlay": true,
2191
- "resizeMode": "contain",
2192
- "renderMode": "auto"
2193
- }
2194
- */
2195
- property?: BrickBasicProperty & {
2196
- /* The animation json config content from uri */
2197
- uri?: string | DataLink
2198
- /* The checksum of `uri` */
2199
- md5?: string | DataLink
2200
- /* The animation json config content(The `uri` will be ignored if `source` is defined) */
2201
- source?: {} | DataLink
2202
- /* The speed the animation will progress. This only affects the imperative API. Sending a negative value will reverse the animation. */
2203
- speed?: number | DataLink
2204
- /* A boolean flag indicating whether or not the animation should loop. */
2205
- loop?: boolean | DataLink
2206
- /* A boolean flag indicating whether or not the animation should start automatically when mounted. This only affects the imperative API. */
2207
- autoPlay?: boolean | DataLink
2208
- /* The animation resize mode */
2209
- resizeMode?: 'cover' | 'contain' | 'center' | DataLink
2210
- /* A flag to set whether or not to render with hardware or software acceleration (Not supported for iOS) */
2211
- renderMode?: 'auto' | 'hardware' | 'software' | DataLink
2212
- /* Replace color (as hex string) by keypath */
2213
- colorFilters?:
2214
- | Array<
2215
- | DataLink
2216
- | {
2217
- keypath?: string | DataLink
2218
- color?: string | DataLink
2219
- }
2220
- >
2221
- | DataLink
2222
- /* Replace color (as hex string) by find text. Use text filters will disable glyphs text render / force software render mode, This means that a specific font needs to be loaded. */
2223
- textFilters?:
2224
- | Array<
2225
- | DataLink
2226
- | {
2227
- find?: string | DataLink
2228
- replace?: string | DataLink
2229
- }
2230
- >
2231
- | DataLink
2232
- }
2233
- events?: BrickBasicEvents & {
2234
- /* Event of the brick press */
2235
- onPress?: Array<EventAction>
2236
- /* Event of the brick press in */
2237
- onPressIn?: Array<EventAction>
2238
- /* Event of the brick press out */
2239
- onPressOut?: Array<EventAction>
2240
- /* Event of the brick focus (Use TV Device with controller) */
2241
- onFocus?: Array<EventAction>
2242
- /* Event of the brick blur (Use TV Device with controller) */
2243
- onBlur?: Array<EventAction>
2244
- /* Event of the animation finished */
2245
- onAnimationFinish?: Array<EventAction>
2246
- /* Event of the uri on load failed */
2247
- onAnimationFailure?: Array<EventAction>
2248
- /* Event of the animation on loop */
2249
- onAnimationLoop?: Array<EventAction>
2250
- }
2251
- outlets?: {
2252
- /* Brick is pressing */
2253
- brickPressing?: () => Data
2254
- /* Brick is focusing (Use TV Device with controller) */
2255
- brickFocusing?: () => Data
2256
- }
2257
- animation?: AnimationBasicEvents & {
2258
- onPress?: Animation
2259
- onPressIn?: Animation
2260
- onPressOut?: Animation
2261
- onFocus?: Animation
2262
- onBlur?: Animation
2263
- onAnimationFinish?: Animation
2264
- onAnimationFailure?: Animation
2265
- onAnimationLoop?: Animation
2266
- }
2267
- }
2268
-
2269
- /* Lottie Adobe After Effects animations brick ([Tutorial](https://intercom.help/bricks-dag-inc/articles/5378583-lottie)) */
2270
- export type BrickLottie = Brick &
2271
- BrickLottieDef & {
2272
- templateKey: 'BRICK_LOTTIE'
2273
- switches: Array<
2274
- SwitchDef &
2275
- BrickLottieDef & {
2276
- conds?: Array<{
2277
- method: '==' | '!=' | '>' | '<' | '>=' | '<='
2278
- cond:
2279
- | SwitchCondInnerStateCurrentCanvas
2280
- | SwitchCondData
2281
- | {
2282
- __typename: 'SwitchCondInnerStateOutlet'
2283
- outlet: 'brickPressing' | 'brickFocusing'
2284
- value: any
2285
- }
2286
- }>
2287
- }
2288
- >
2289
- }
2290
-
2291
- /* Play animation */
2292
- export type BrickRiveActionPlay = ActionWithParams & {
2293
- __actionName: 'BRICK_RIVE_PLAY'
2294
- params?: Array<
2295
- | {
2296
- input: 'animationName'
2297
- value?: string | DataLink | EventProperty
2298
- mapping?: string
2299
- }
2300
- | {
2301
- input: 'loop'
2302
- value?: 'auto' | 'oneShot' | 'loop' | 'pingPong' | DataLink | EventProperty
2303
- mapping?: string
2304
- }
2305
- | {
2306
- input: 'direction'
2307
- value?: 'auto' | 'backwards' | 'forwards' | DataLink | EventProperty
2308
- mapping?: string
2309
- }
2310
- | {
2311
- input: 'isStateMachine'
2312
- value?: boolean | DataLink | EventProperty
2313
- mapping?: string
2314
- }
2315
- >
2316
- }
2317
-
2318
- /* Pause animation */
2319
- export type BrickRiveActionPause = Action & {
2320
- __actionName: 'BRICK_RIVE_PAUSE'
2321
- }
2322
-
2323
- /* Stop animation */
2324
- export type BrickRiveActionStop = Action & {
2325
- __actionName: 'BRICK_RIVE_STOP'
2326
- }
2327
-
2328
- /* Reset animation */
2329
- export type BrickRiveActionReset = Action & {
2330
- __actionName: 'BRICK_RIVE_RESET'
2331
- }
2332
-
2333
- /* Fire state */
2334
- export type BrickRiveActionFireState = ActionWithParams & {
2335
- __actionName: 'BRICK_RIVE_FIRE_STATE'
2336
- params?: Array<
2337
- | {
2338
- input: 'stateMachineName'
2339
- value?: string | DataLink | EventProperty
2340
- mapping?: string
2341
- }
2342
- | {
2343
- input: 'inputName'
2344
- value?: string | DataLink | EventProperty
2345
- mapping?: string
2346
- }
2347
- >
2348
- }
2349
-
2350
- /* Set input state */
2351
- export type BrickRiveActionSetInputState = ActionWithParams & {
2352
- __actionName: 'BRICK_RIVE_SET_INPUT_STATE'
2353
- params?: Array<
2354
- | {
2355
- input: 'stateMachineName'
2356
- value?: string | DataLink | EventProperty
2357
- mapping?: string
2358
- }
2359
- | {
2360
- input: 'inputName'
2361
- value?: string | DataLink | EventProperty
2362
- mapping?: string
2363
- }
2364
- | {
2365
- input: 'value'
2366
- value?: any | EventProperty
2367
- mapping?: string
2368
- }
2369
- >
2370
- }
2371
-
2372
- /* Set text run value. Text Run name need to defined as unique name in Rive file. (Ref: https://rive.app/community/doc/text/docn2E6y1lXo) */
2373
- export type BrickRiveActionSetTextRunValue = ActionWithParams & {
2374
- __actionName: 'BRICK_RIVE_SET_TEXT_RUN_VALUE'
2375
- params?: Array<
2376
- | {
2377
- input: 'textRunName'
2378
- value?: string | DataLink | EventProperty
2379
- mapping?: string
2380
- }
2381
- | {
2382
- input: 'value'
2383
- value?: any | EventProperty
2384
- mapping?: string
2385
- }
2386
- >
2387
- }
2388
-
2389
- interface BrickRiveDef {
2390
- /*
2391
- Default property:
2392
- {
2393
- "autoplay": true,
2394
- "alignment": "center",
2395
- "fit": "contain"
2396
- }
2397
- */
2398
- property?: BrickBasicProperty & {
2399
- /* Rive file url */
2400
- url?: string | DataLink
2401
- /* The checksum of `url` */
2402
- md5?: string | DataLink
2403
- /* Autoplay the animation */
2404
- autoplay?: boolean | DataLink
2405
- /* Alignment of the animation */
2406
- alignment?:
2407
- | 'topLeft'
2408
- | 'topCenter'
2409
- | 'topRight'
2410
- | 'centerLeft'
2411
- | 'center'
2412
- | 'centerRight'
2413
- | 'bottomLeft'
2414
- | 'bottomCenter'
2415
- | 'bottomRight'
2416
- | DataLink
2417
- /* Fit mode of the animation */
2418
- fit?:
2419
- | 'cover'
2420
- | 'contain'
2421
- | 'fill'
2422
- | 'fitWidth'
2423
- | 'fitHeight'
2424
- | 'none'
2425
- | 'scaleDown'
2426
- | 'layout'
2427
- | DataLink
2428
- /* Artboard name */
2429
- artboardName?: string | DataLink
2430
- /* Animation name */
2431
- animationName?: string | DataLink
2432
- /* State machine name */
2433
- stateMachineName?: string | DataLink
2434
- }
2435
- events?: BrickBasicEvents & {
2436
- /* Event of animation play */
2437
- onPlay?: Array<EventAction>
2438
- /* Event of animation pause */
2439
- onPause?: Array<EventAction>
2440
- /* Event of animation stop */
2441
- onStop?: Array<EventAction>
2442
- /* Event of animation loop end */
2443
- onLoopEnd?: Array<EventAction>
2444
- /* Event of state changed */
2445
- onStateChanged?: Array<EventAction>
2446
- /* Event of error */
2447
- onError?: Array<EventAction>
2448
- /* Event of Rive general event received */
2449
- onRiveGeneralEvent?: Array<EventAction>
2450
- /* Event of Rive open-url event received */
2451
- onRiveOpenUrlEvent?: Array<EventAction>
2452
- }
2453
- animation?: AnimationBasicEvents & {
2454
- onPlay?: Animation
2455
- onPause?: Animation
2456
- onStop?: Animation
2457
- onLoopEnd?: Animation
2458
- onStateChanged?: Animation
2459
- onError?: Animation
2460
- onRiveGeneralEvent?: Animation
2461
- onRiveOpenUrlEvent?: Animation
2462
- }
2463
- }
2464
-
2465
- /* Rive file component */
2466
- export type BrickRive = Brick &
2467
- BrickRiveDef & {
2468
- templateKey: 'BRICK_RIVE'
2469
- switches: Array<
2470
- SwitchDef &
2471
- BrickRiveDef & {
2472
- conds?: Array<{
2473
- method: '==' | '!=' | '>' | '<' | '>=' | '<='
2474
- cond:
2475
- | SwitchCondInnerStateCurrentCanvas
2476
- | SwitchCondData
2477
- | {
2478
- __typename: 'SwitchCondInnerStateOutlet'
2479
- outlet: ''
2480
- value: any
2481
- }
2482
- }>
2483
- }
2484
- >
2485
- }
2486
-
2487
- /* Run Javascript on the WebView */
2488
- export type BrickWebViewActionInjectJavascript = ActionWithParams & {
2489
- __actionName: 'BRICK_WEBVIEW_INJECT_JAVASCRIPT'
2490
- params?: Array<{
2491
- input: 'javascriptCode'
2492
- value?: string | DataLink | EventProperty
2493
- mapping?: string
2494
- }>
2495
- }
2496
-
2497
- /* Query selector on the WebView */
2498
- export type BrickWebViewActionQuerySelector = ActionWithParams & {
2499
- __actionName: 'BRICK_WEBVIEW_QUERY_SELECTOR'
2500
- params?: Array<
2501
- | {
2502
- input: 'querySelector'
2503
- value?: string | DataLink | EventProperty
2504
- mapping?: string
2505
- }
2506
- | {
2507
- input: 'expression'
2508
- value?: string | DataLink | EventProperty
2509
- mapping?: string
2510
- }
2511
- >
2512
- }
2513
-
2514
- /* Do go forward on the WebView */
2515
- export type BrickWebViewActionGoForward = Action & {
2516
- __actionName: 'BRICK_WEBVIEW_GO_FORWARD'
2517
- }
2518
-
2519
- /* Do go back on the webview */
2520
- export type BrickWebViewActionGoBack = Action & {
2521
- __actionName: 'BRICK_WEBVIEW_GO_BACK'
2522
- }
2523
-
2524
- /* Do reload on the webview */
2525
- export type BrickWebViewActionReload = Action & {
2526
- __actionName: 'BRICK_WEBVIEW_RELOAD'
2527
- }
2528
-
2529
- interface BrickWebViewDef {
2530
- /*
2531
- Default property:
2532
- {
2533
- "cropLeft": 0,
2534
- "cropRight": 0,
2535
- "cropTop": 0,
2536
- "cropBottom": 0,
2537
- "allowContentControl": true,
2538
- "allowFileAccess": true,
2539
- "domStorageEnabled": true,
2540
- "cacheEnabled": true,
2541
- "geolocationEnabled": true,
2542
- "thirdPartyCookiesEnabled": true,
2543
- "javaScriptEnabled": true
2544
- }
2545
- */
2546
- property?: BrickBasicProperty & {
2547
- /* The WebView content URL */
2548
- url?: string | DataLink
2549
- /* The request headers to load content */
2550
- headers?: {} | DataLink
2551
- /* The request UserAgent */
2552
- userAgent?: string | DataLink
2553
- /* The webview content HTML (Use `url` first) */
2554
- html?: string | DataLink
2555
- /* Crop webview content left position (px) */
2556
- cropLeft?: number | DataLink
2557
- /* Crop webview content right position (px) */
2558
- cropRight?: number | DataLink
2559
- /* Crop webview content top position (px) */
2560
- cropTop?: number | DataLink
2561
- /* Crop webview content bottom position (px) */
2562
- cropBottom?: number | DataLink
2563
- /* Allow content control */
2564
- allowContentControl?: boolean | DataLink
2565
- /* List of origin strings to allow being navigated to. (Allowed all if not provided) */
2566
- originAllowList?: Array<string | DataLink> | DataLink
2567
- /* Allow file:// access */
2568
- allowFileAccess?: boolean | DataLink
2569
- /* Enable DOM Storage */
2570
- domStorageEnabled?: boolean | DataLink
2571
- /* Enable Cache */
2572
- cacheEnabled?: boolean | DataLink
2573
- /* Enable Geolocation */
2574
- geolocationEnabled?: boolean | DataLink
2575
- /* Enable Third Party Cooikies */
2576
- thirdPartyCookiesEnabled?: boolean | DataLink
2577
- /* Enable JavaScript */
2578
- javaScriptEnabled?: boolean | DataLink
2579
- /* Inject JavaScript code */
2580
- code?: string | DataLink
2581
- /* Inject JavaScript code before content loaded */
2582
- beforeContentLoaded?: string | DataLink
2583
- /* Inject JavaScript code for main frame only (only `YES` supported for Android) */
2584
- forMainFrameOnly?: boolean | DataLink
2585
- /* Inject JavaScript code before content loaded for main frame only (only `YES` supported for Android) */
2586
- beforeContentLoadedForMainFrameOnly?: boolean | DataLink
2587
- }
2588
- events?: BrickBasicEvents & {
2589
- /* Event of the WebView on load */
2590
- onLoad?: Array<EventAction>
2591
- /* Event when the WebView load fails */
2592
- onError?: Array<EventAction>
2593
- /* Event of the webview on message by `window.ReactNativeWebView.postMessage` on you're injected javascript code */
2594
- onMessage?: Array<EventAction>
2595
- }
2596
- outlets?: {
2597
- /* The result of the query selector action */
2598
- queryResult?: () => Data
2599
- /* The error of the query selector action */
2600
- queryError?: () => Data
2601
- }
2602
- animation?: AnimationBasicEvents & {
2603
- onLoad?: Animation
2604
- onError?: Animation
2605
- onMessage?: Animation
2606
- }
2607
- }
2608
-
2609
- /* WebView brick ([Tutorial](https://intercom.help/bricks-dag-inc/articles/5378588-web-view)) */
2610
- export type BrickWebView = Brick &
2611
- BrickWebViewDef & {
2612
- templateKey: 'BRICK_WEBVIEW'
2613
- switches: Array<
2614
- SwitchDef &
2615
- BrickWebViewDef & {
2616
- conds?: Array<{
2617
- method: '==' | '!=' | '>' | '<' | '>=' | '<='
2618
- cond:
2619
- | SwitchCondInnerStateCurrentCanvas
2620
- | SwitchCondData
2621
- | {
2622
- __typename: 'SwitchCondInnerStateOutlet'
2623
- outlet: 'queryResult' | 'queryError'
2624
- value: any
2625
- }
2626
- }>
2627
- }
2628
- >
2629
- }
2630
-
2631
- /* Take picture on the Camera */
2632
- export type BrickCameraActionTakePicture = ActionWithParams & {
2633
- __actionName: 'BRICK_CAMERA_TAKE_PICTURE'
2634
- params?: Array<
2635
- | {
2636
- input: 'width'
2637
- value?: number | DataLink | EventProperty
2638
- mapping?: string
2639
- }
2640
- | {
2641
- input: 'quality'
2642
- value?: string | DataLink | EventProperty
2643
- mapping?: string
2644
- }
2645
- | {
2646
- input: 'base64'
2647
- value?: boolean | DataLink | EventProperty
2648
- mapping?: string
2649
- }
2650
- | {
2651
- input: 'mirrorImage'
2652
- value?: boolean | DataLink | EventProperty
2653
- mapping?: string
2654
- }
2655
- >
2656
- }
2657
-
2658
- /* Record video on the Camera */
2659
- export type BrickCameraActionRecord = ActionWithParams & {
2660
- __actionName: 'BRICK_CAMERA_RECORD'
2661
- params?: Array<
2662
- | {
2663
- input: 'quality'
2664
- value?: '4:3' | '288p' | '480p' | '720p' | '1080p' | '2160p' | DataLink | EventProperty
2665
- mapping?: string
2666
- }
2667
- | {
2668
- input: 'mirrorVideo'
2669
- value?: boolean | DataLink | EventProperty
2670
- mapping?: string
2671
- }
2672
- | {
2673
- input: 'videoBitrate'
2674
- value?: string | DataLink | EventProperty
2675
- mapping?: string
2676
- }
2677
- | {
2678
- input: 'maxDuration'
2679
- value?: number | DataLink | EventProperty
2680
- mapping?: string
2681
- }
2682
- | {
2683
- input: 'maxFileSize'
2684
- value?: string | DataLink | EventProperty
2685
- mapping?: string
2686
- }
2687
- >
2688
- }
2689
-
2690
- /* Record video on the Camera */
2691
- export type BrickCameraActionStopRecord = Action & {
2692
- __actionName: 'BRICK_CAMERA_STOP_RECORD'
2693
- }
2694
-
2695
- interface BrickCameraDef {
2696
- /*
2697
- Default property:
2698
- {
2699
- "autoFocusEnabled": false,
2700
- "focusDepth": 0.5,
2701
- "type": "back",
2702
- "flashMode": "off",
2703
- "captureAudio": false,
2704
- "whiteBalance": "auto",
2705
- "faceDetectionEnabled": false,
2706
- "faceDetectionEventMode": "when-detected"
2707
- }
2708
- */
2709
- property?: BrickBasicProperty & {
2710
- /* Camera auto focus */
2711
- autoFocusEnabled?: boolean | DataLink
2712
- /* The auto focus feature of the camera to attempt to focus on the part of the image at this coordinate. */
2713
- focusDepth?: number | DataLink
2714
- /* Camera type (Ignore it if you are using external camera) */
2715
- type?: 'back' | 'front' | DataLink
2716
- /* Camera zoom */
2717
- zoom?: number | DataLink
2718
- /* Camera flash mode */
2719
- flashMode?: 'off' | 'on' | 'torch' | 'auto' | DataLink
2720
- /* Camera ratio (Unsupported ratio will be ignored) */
2721
- ratio?: string | DataLink
2722
- /* Capture audio when start recording */
2723
- captureAudio?: boolean | DataLink
2724
- /* Allows you to control the color temperature in your photos by cooling down or warming up the colors. */
2725
- whiteBalance?:
2726
- | 'auto'
2727
- | 'sunny'
2728
- | 'cloudy'
2729
- | 'shadow'
2730
- | 'incandescent'
2731
- | 'fluorescent'
2732
- | DataLink
2733
- /* Enable face detection */
2734
- faceDetectionEnabled?: boolean | DataLink
2735
- /* Face detection event mode */
2736
- faceDetectionEventMode?: 'when-detected' | 'interval' | DataLink
2737
- /* Quality of take picture */
2738
- pictureQuality?: number | DataLink
2739
- /* Take picture format as base64 */
2740
- pictureBase64?: boolean | DataLink
2741
- /* Mirror image of take picture */
2742
- pictureIsMirrorImage?: boolean | DataLink
2743
- /* Quality of record video */
2744
- recordQuality?: '4:3' | '288p' | '480p' | '720p' | '1080p' | '2160p' | DataLink
2745
- /* Bitrate of record video (bit/s) */
2746
- recordVideoBitrate?: number | DataLink
2747
- /* Mirror video of record video */
2748
- recordMirrorVideo?: boolean | DataLink
2749
- /* Max duration of record video (s) */
2750
- recordMaxDuration?: number | DataLink
2751
- /* Max file size of record video (bytes) */
2752
- recordMaxFileSize?: number | DataLink
2753
- }
2754
- events?: BrickBasicEvents & {
2755
- /* Event of the Camera state change */
2756
- stateChange?: Array<EventAction>
2757
- /* Event of the Camera record start */
2758
- recordStart?: Array<EventAction>
2759
- /* Event of the Camera record end */
2760
- recordEnd?: Array<EventAction>
2761
- /* Event of the Camera barcode read */
2762
- barcodeRead?: Array<EventAction>
2763
- /* Event of the Camera picture taken */
2764
- pictureTaken?: Array<EventAction>
2765
- /* Event of the Camera record finished */
2766
- recordFinish?: Array<EventAction>
2767
- /* Event of the Camera mount error */
2768
- mountError?: Array<EventAction>
2769
- }
2770
- outlets?: {
2771
- /* Picture taken result */
2772
- pictureTaken?: () => Data
2773
- /* Record video result */
2774
- recordVideo?: () => Data
2775
- /* Barcode read result */
2776
- barcodeRead?: () => Data
2777
- /* Faces detected result */
2778
- faceDetected?: () => Data
2779
- }
2780
- animation?: AnimationBasicEvents & {
2781
- stateChange?: Animation
2782
- recordStart?: Animation
2783
- recordEnd?: Animation
2784
- barcodeRead?: Animation
2785
- pictureTaken?: Animation
2786
- recordFinish?: Animation
2787
- mountError?: Animation
2788
- }
2789
- }
2790
-
2791
- /* Camera view brick ([Tutorial](https://intercom.help/bricks-dag-inc/articles/5378589-camera)) */
2792
- export type BrickCamera = Brick &
2793
- BrickCameraDef & {
2794
- templateKey: 'BRICK_CAMERA'
2795
- switches: Array<
2796
- SwitchDef &
2797
- BrickCameraDef & {
2798
- conds?: Array<{
2799
- method: '==' | '!=' | '>' | '<' | '>=' | '<='
2800
- cond:
2801
- | SwitchCondInnerStateCurrentCanvas
2802
- | SwitchCondData
2803
- | {
2804
- __typename: 'SwitchCondInnerStateOutlet'
2805
- outlet: 'pictureTaken' | 'recordVideo' | 'barcodeRead' | 'faceDetected'
2806
- value: any
2807
- }
2808
- }>
2809
- }
2810
- >
2811
- }
2812
-
2813
- interface BrickWebRTCStreamDef {
2814
- /*
2815
- Default property:
2816
- {
2817
- "mirror": false,
2818
- "resizeMode": "contain",
2819
- "noStreamViewText": "no stream",
2820
- "noStreamViewTextSize": 44,
2821
- "noStreamViewTextColor": "#000"
2822
- }
2823
- */
2824
- property?: BrickBasicProperty & {
2825
- /* Mirror video */
2826
- mirror?: boolean | DataLink
2827
- /* The stream resize mode */
2828
- resizeMode?: 'contain' | 'cover' | DataLink
2829
- /* Show text content if no stream */
2830
- noStreamViewText?: string | DataLink
2831
- /* The font size of shown text content if no stream */
2832
- noStreamViewTextSize?: number | DataLink
2833
- /* The color of shown text content if no stream */
2834
- noStreamViewTextColor?: string | DataLink
2835
- }
2836
- }
2837
-
2838
- /* WebRTCStream brick */
2839
- export type BrickWebRTCStream = Brick &
2840
- BrickWebRTCStreamDef & {
2841
- templateKey: 'BRICK_WEBRTC_STREAM'
2842
- switches: Array<
2843
- SwitchDef &
2844
- BrickWebRTCStreamDef & {
2845
- conds?: Array<{
2846
- method: '==' | '!=' | '>' | '<' | '>=' | '<='
2847
- cond:
2848
- | SwitchCondInnerStateCurrentCanvas
2849
- | SwitchCondData
2850
- | {
2851
- __typename: 'SwitchCondInnerStateOutlet'
2852
- outlet: ''
2853
- value: any
2854
- }
2855
- }>
2856
- }
2857
- >
2858
- }
2859
-
2860
- /* Play object animation */
2861
- export type Brick3DViewerActionAnimationPlay = ActionWithParams & {
2862
- __actionName: 'BRICK_3D_VIEWER_ANIMATION_PLAY'
2863
- params?: Array<{
2864
- input: 'objectIndex'
2865
- value?: number | DataLink | EventProperty
2866
- mapping?: string
2867
- }>
2868
- }
2869
-
2870
- /* Pause object animation */
2871
- export type Brick3DViewerActionAnimationPause = ActionWithParams & {
2872
- __actionName: 'BRICK_3D_VIEWER_ANIMATION_PAUSE'
2873
- params?: Array<{
2874
- input: 'objectIndex'
2875
- value?: number | DataLink | EventProperty
2876
- mapping?: string
2877
- }>
2878
- }
2879
-
2880
- /* Goto object animation progress */
2881
- export type Brick3DViewerActionAnimationGoto = ActionWithParams & {
2882
- __actionName: 'BRICK_3D_VIEWER_ANIMATION_GOTO'
2883
- params?: Array<
2884
- | {
2885
- input: 'objectIndex'
2886
- value?: number | DataLink | EventProperty
2887
- mapping?: string
2888
- }
2889
- | {
2890
- input: 'animationProgress'
2891
- value?: number | DataLink | EventProperty
2892
- mapping?: string
2893
- }
2894
- >
2895
- }
2896
-
2897
- interface Brick3DViewerDef {
2898
- /*
2899
- Default property:
2900
- {
2901
- "showLoadingBox": true,
2902
- "enableOrbitControls": true
2903
- }
2904
- */
2905
- property?: BrickBasicProperty & {
2906
- /* 3D model list */
2907
- objects?:
2908
- | Array<
2909
- | DataLink
2910
- | {
2911
- url?: string | DataLink
2912
- md5?: string | DataLink
2913
- type?: 'USDZ' | 'glTF' | DataLink
2914
- rotation?: number | DataLink | Array<number | DataLink> | DataLink | DataLink
2915
- scale?: number | DataLink | Array<number | DataLink> | DataLink | DataLink
2916
- x?: number | DataLink
2917
- y?: number | DataLink
2918
- z?: number | DataLink
2919
- moveable?: boolean | DataLink
2920
- rotateable?: boolean | DataLink
2921
- selectable?: boolean | DataLink
2922
- enableCollision?: boolean | DataLink
2923
- animationLoopMode?: 'once' | 'repeat' | 'pingpong' | DataLink
2924
- animationProgress?: number | DataLink
2925
- animationPaused?: boolean | DataLink
2926
- boundingBox?:
2927
- | DataLink
2928
- | {
2929
- min?:
2930
- | DataLink
2931
- | {
2932
- x?: number | DataLink
2933
- y?: number | DataLink
2934
- z?: number | DataLink
2935
- }
2936
- max?:
2937
- | DataLink
2938
- | {
2939
- x?: number | DataLink
2940
- y?: number | DataLink
2941
- z?: number | DataLink
2942
- }
2943
- }
2944
- }
2945
- >
2946
- | DataLink
2947
- /* Show loading placeholder box */
2948
- showLoadingBox?: boolean | DataLink
2949
- /* Display shadows */
2950
- shadows?: boolean | DataLink
2951
- /* Default camera position */
2952
- camera?:
2953
- | DataLink
2954
- | {
2955
- fov?: number | DataLink
2956
- aspect?: number | DataLink
2957
- near?: number | DataLink
2958
- far?: number | DataLink
2959
- position?:
2960
- | DataLink
2961
- | {
2962
- x?: number | DataLink
2963
- y?: number | DataLink
2964
- z?: number | DataLink
2965
- }
2966
- quaternion?:
2967
- | DataLink
2968
- | {
2969
- x?: number | DataLink
2970
- y?: number | DataLink
2971
- z?: number | DataLink
2972
- w?: number | DataLink
2973
- }
2974
- }
2975
- /* Enable orbit controls */
2976
- enableOrbitControls?: boolean | DataLink
2977
- /* Camera control options */
2978
- orbitControls?:
2979
- | DataLink
2980
- | {
2981
- autoRotate?: boolean | DataLink
2982
- enableZoom?: boolean | DataLink
2983
- enablePan?: boolean | DataLink
2984
- enableRotate?: boolean | DataLink
2985
- enableDamping?: boolean | DataLink
2986
- dampingFactor?: number | DataLink
2987
- rotateSpeed?: number | DataLink
2988
- zoomSpeed?: number | DataLink
2989
- panSpeed?: number | DataLink
2990
- minDistance?: number | DataLink
2991
- maxDistance?: number | DataLink
2992
- minPolarAngle?: number | DataLink
2993
- maxPolarAngle?: number | DataLink
2994
- minAzimuthAngle?: number | DataLink
2995
- maxAzimuthAngle?: number | DataLink
2996
- }
2997
- /* Move controls options */
2998
- moveControls?:
2999
- | DataLink
3000
- | {
3001
- responsiveness?: number | DataLink
3002
- rotationRingColor?: string | DataLink
3003
- rotationRingSize?: number | DataLink
3004
- showBoundingBox?: boolean | DataLink
3005
- }
3006
- }
3007
- events?: BrickBasicEvents & {
3008
- /* Event of error occurred */
3009
- onError?: Array<EventAction>
3010
- /* Event of object changed position or rotation */
3011
- onChange?: Array<EventAction>
3012
- /* Event of object selected */
3013
- onSelectChange?: Array<EventAction>
3014
- /* Event of object collision occurred */
3015
- onCollision?: Array<EventAction>
3016
- }
3017
- animation?: AnimationBasicEvents & {
3018
- onError?: Animation
3019
- onChange?: Animation
3020
- onSelectChange?: Animation
3021
- onCollision?: Animation
3022
- }
3023
- }
3024
-
3025
- /* 3D viewer brick */
3026
- export type Brick3DViewer = Brick &
3027
- Brick3DViewerDef & {
3028
- templateKey: 'BRICK_3D_VIEWER'
3029
- switches: Array<
3030
- SwitchDef &
3031
- Brick3DViewerDef & {
3032
- conds?: Array<{
3033
- method: '==' | '!=' | '>' | '<' | '>=' | '<='
3034
- cond:
3035
- | SwitchCondInnerStateCurrentCanvas
3036
- | SwitchCondData
3037
- | {
3038
- __typename: 'SwitchCondInnerStateOutlet'
3039
- outlet: ''
3040
- value: any
3041
- }
3042
- }>
3043
- }
3044
- >
3045
- }
3046
-
3047
- interface GenerativeMediaDef {
3048
- /*
3049
- Default property:
3050
- {
3051
- "enableCache": true,
3052
- "type": "image",
3053
- "resizeMode": "cover",
3054
- "provider": "openai",
3055
- "freepikClassicImageSize": "square_1_1"
3056
- }
3057
- */
3058
- property?: BrickBasicProperty & {
3059
- /* The text prompt to generate media from */
3060
- prompt?: string | DataLink
3061
- /* Enable cache */
3062
- enableCache?: boolean | DataLink
3063
- /* The type of media to generate (image or video) */
3064
- type?: 'image' | 'video' | DataLink
3065
- /* Default image to display when no generated image is available */
3066
- defaultImage?: string | DataLink
3067
- /* The hash of the default image */
3068
- defaultImageHash?: string | DataLink
3069
- /* The type of the default image hash */
3070
- defaultImageHashType?: 'md5' | 'sha1' | 'sha256' | DataLink
3071
- /* The Lottie animation to show while generating */
3072
- loadingAnimation?: string | DataLink
3073
- /* The Lottie animation to show when an error occurs */
3074
- errorAnimation?: string | DataLink
3075
- /* The resize mode for the generated media */
3076
- resizeMode?: 'contain' | 'cover' | 'stretch' | 'center' | 'repeat' | DataLink
3077
- /* The API key for the generative media service */
3078
- apiKey?: string | DataLink
3079
- /* The AI provider to use for generation (openai, freepik, or deepai) */
3080
- provider?: 'openai' | 'freepik-classic' | 'deepai' | DataLink
3081
- /* OpenAI image size (256x256, 512x512, 1024x1024, etc) */
3082
- openaiSize?: '1024x1024' | '1024x1792' | '1792x1024' | DataLink
3083
- /* OpenAI image style (vivid or natural) */
3084
- openaiStyle?: 'vivid' | 'natural' | DataLink
3085
- /* OpenAI image quality (standard or hd) */
3086
- openaiQuality?: 'standard' | 'hd' | DataLink
3087
- /* Freepik image size */
3088
- freepikClassicImageSize?:
3089
- | 'square_1_1'
3090
- | 'classic_4_3'
3091
- | 'traditional_3_4'
3092
- | 'widescreen_16_9'
3093
- | 'social_story_9_16'
3094
- | 'smartphone_horizontal_20_9'
3095
- | 'smartphone_vertical_9_20'
3096
- | 'standard_3_2'
3097
- | 'portrait_2_3'
3098
- | 'horizontal_2_1'
3099
- | 'vertical_1_2'
3100
- | 'social_5_4'
3101
- | 'social_post_4_5'
3102
- | DataLink
3103
- /* Freepik image style */
3104
- freepikClassicStyle?:
3105
- | 'photo'
3106
- | 'digital-art'
3107
- | '3d'
3108
- | 'painting'
3109
- | 'low-poly'
3110
- | 'pixel-art'
3111
- | 'anime'
3112
- | 'cyberpunk'
3113
- | 'comic'
3114
- | 'vintage'
3115
- | 'cartoon'
3116
- | 'vector'
3117
- | 'studio-shot'
3118
- | 'dark'
3119
- | 'sketch'
3120
- | 'mockup'
3121
- | '2000s-pone'
3122
- | '70s-vibe'
3123
- | 'watercolor'
3124
- | 'art-nouveau'
3125
- | 'origami'
3126
- | 'surreal'
3127
- | 'fantasy'
3128
- | 'traditional-japan'
3129
- | DataLink
3130
- /* Freepik color scheme */
3131
- freepikClassicStyleColor?:
3132
- | 'b&w'
3133
- | 'pastel'
3134
- | 'sepia'
3135
- | 'dramatic'
3136
- | 'vibrant'
3137
- | 'orange&teal'
3138
- | 'film-filter'
3139
- | 'split'
3140
- | 'electric'
3141
- | 'pastel-pink'
3142
- | 'gold-glow'
3143
- | 'autumn'
3144
- | 'muted-green'
3145
- | 'deep-teal'
3146
- | 'duotone'
3147
- | 'terracotta&teal'
3148
- | 'red&blue'
3149
- | 'cold-neon'
3150
- | 'burgundy&blue'
3151
- | DataLink
3152
- /* Freepik lighting style */
3153
- freepikClassicStyleLighting?:
3154
- | 'studio'
3155
- | 'warm'
3156
- | 'cinematic'
3157
- | 'volumetric'
3158
- | 'golden-hour'
3159
- | 'long-exposure'
3160
- | 'cold'
3161
- | 'iridescent'
3162
- | 'dramatic'
3163
- | 'hardlight'
3164
- | 'redscale'
3165
- | 'indoor-light'
3166
- | DataLink
3167
- /* Freepik framing style */
3168
- freepikClassicStyleFraming?:
3169
- | 'portrait'
3170
- | 'macro'
3171
- | 'panoramic'
3172
- | 'aerial-view'
3173
- | 'close-up'
3174
- | 'cinematic'
3175
- | 'high-angle'
3176
- | 'low-angle'
3177
- | 'symmetry'
3178
- | 'fish-eye'
3179
- | 'first-person'
3180
- | DataLink
3181
- /* Freepik guidance scale (level of fidelity to prompt) */
3182
- freepikClassicGuidanceScale?: number | DataLink
3183
- /* Freepik negative prompt (attributes to avoid) */
3184
- freepikClassicNegativePrompt?: string | DataLink
3185
- /* DeepAI negative prompt (attributes to avoid) */
3186
- deepaiNegativePrompt?: string | DataLink
3187
- /* DeepAI image generator version */
3188
- deepaiImageGeneratorVersion?: 'standard' | 'hd' | DataLink
3189
- /* DeepAI output image width */
3190
- deepaiWidth?: number | DataLink
3191
- /* DeepAI output image height */
3192
- deepaiHeight?: number | DataLink
3193
- }
3194
- events?: BrickBasicEvents & {
3195
- /* Event of the brick press */
3196
- generativeMediaOnPress?: Array<EventAction>
3197
- /* Event of the brick press in */
3198
- generativeMediaOnPressIn?: Array<EventAction>
3199
- /* Event of the brick press out */
3200
- generativeMediaOnPressOut?: Array<EventAction>
3201
- /* Event of the brick focus (Use TV Device with controller) */
3202
- generativeMediaOnFocus?: Array<EventAction>
3203
- /* Event of the brick blur (Use TV Device with controller) */
3204
- generativeMediaOnBlur?: Array<EventAction>
3205
- /* Event when media generation succeeds */
3206
- onSuccess?: Array<EventAction>
3207
- /* Event when media generation fails */
3208
- onError?: Array<EventAction>
3209
- /* Event when media prompt request starts */
3210
- promptStart?: Array<EventAction>
3211
- /* Event when media prompt request succeeds */
3212
- promptSuccess?: Array<EventAction>
3213
- /* Event when media prompt request fails */
3214
- promptError?: Array<EventAction>
3215
- /* Event when media loading starts */
3216
- loadStart?: Array<EventAction>
3217
- /* Event when media loading succeeds */
3218
- loadSuccess?: Array<EventAction>
3219
- /* Event when media loading fails */
3220
- loadError?: Array<EventAction>
3221
- }
3222
- outlets?: {
3223
- /* Brick is pressing */
3224
- brickPressing?: () => Data
3225
- /* Brick is focusing (Use TV Device with controller) */
3226
- brickFocusing?: () => Data
3227
- /* Generated media URL */
3228
- url?: () => Data
3229
- /* Generated media error */
3230
- error?: () => Data
3231
- }
3232
- animation?: AnimationBasicEvents & {
3233
- generativeMediaOnPress?: Animation
3234
- generativeMediaOnPressIn?: Animation
3235
- generativeMediaOnPressOut?: Animation
3236
- generativeMediaOnFocus?: Animation
3237
- generativeMediaOnBlur?: Animation
3238
- onSuccess?: Animation
3239
- onError?: Animation
3240
- promptStart?: Animation
3241
- promptSuccess?: Animation
3242
- promptError?: Animation
3243
- loadStart?: Animation
3244
- loadSuccess?: Animation
3245
- loadError?: Animation
3246
- }
3247
- }
3248
-
3249
- /* Generative Media brick - Generate images and videos using AI */
3250
- export type GenerativeMedia = Brick &
3251
- GenerativeMediaDef & {
3252
- templateKey: 'BRICK_GENERATIVE_MEDIA'
3253
- switches: Array<
3254
- SwitchDef &
3255
- GenerativeMediaDef & {
3256
- conds?: Array<{
3257
- method: '==' | '!=' | '>' | '<' | '>=' | '<='
3258
- cond:
3259
- | SwitchCondInnerStateCurrentCanvas
3260
- | SwitchCondData
3261
- | {
3262
- __typename: 'SwitchCondInnerStateOutlet'
3263
- outlet: 'brickPressing' | 'brickFocusing' | 'url' | 'error'
3264
- value: any
3265
- }
3266
- }>
3267
- }
3268
- >
3269
- }