@fugood/bricks-project 2.24.0-beta.9 → 2.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) hide show
  1. package/compile/action-name-map.ts +38 -0
  2. package/compile/index.ts +460 -158
  3. package/compile/util.ts +2 -0
  4. package/package.json +7 -3
  5. package/package.json.bak +27 -0
  6. package/skills/{bricks-project → bricks-ctor}/SKILL.md +2 -2
  7. package/skills/{bricks-project → bricks-ctor}/rules/animation.md +1 -1
  8. package/skills/{bricks-project → bricks-ctor}/rules/architecture-patterns.md +7 -0
  9. package/skills/{bricks-project → bricks-ctor}/rules/buttress.md +10 -7
  10. package/skills/{bricks-project → bricks-ctor}/rules/data-calculation.md +1 -1
  11. package/skills/{bricks-project → bricks-ctor}/rules/local-sync.md +2 -2
  12. package/skills/{bricks-project → bricks-ctor}/rules/media-flow.md +3 -3
  13. package/skills/{bricks-project → bricks-ctor}/rules/remote-data-bank.md +6 -6
  14. package/skills/{bricks-project → bricks-ctor}/rules/standby-transition.md +1 -1
  15. package/skills/bricks-design/LICENSE.txt +180 -0
  16. package/skills/bricks-design/SKILL.md +66 -0
  17. package/tools/deploy.ts +66 -12
  18. package/tools/icons/fa6pro-meta.json +3669 -26125
  19. package/tools/mcp-server.ts +11 -878
  20. package/tools/mcp-tools/compile.ts +91 -0
  21. package/tools/mcp-tools/huggingface.ts +762 -0
  22. package/tools/mcp-tools/icons.ts +70 -0
  23. package/tools/mcp-tools/lottie.ts +102 -0
  24. package/tools/mcp-tools/media.ts +110 -0
  25. package/tools/postinstall.ts +137 -40
  26. package/tools/preview-main.mjs +135 -2
  27. package/tools/preview.ts +41 -2
  28. package/tools/pull.ts +37 -19
  29. package/tsconfig.json +16 -0
  30. package/types/animation.ts +4 -0
  31. package/types/automation.ts +4 -1
  32. package/types/brick-base.ts +1 -1
  33. package/types/bricks/Camera.ts +47 -12
  34. package/types/bricks/Chart.ts +9 -3
  35. package/types/bricks/GenerativeMedia.ts +29 -13
  36. package/types/bricks/Icon.ts +8 -4
  37. package/types/bricks/Image.ts +9 -5
  38. package/types/bricks/Items.ts +28 -14
  39. package/types/bricks/Lottie.ts +14 -6
  40. package/types/bricks/Maps.ts +15 -7
  41. package/types/bricks/QrCode.ts +8 -4
  42. package/types/bricks/Rect.ts +44 -5
  43. package/types/bricks/RichText.ts +8 -4
  44. package/types/bricks/Rive.ts +20 -10
  45. package/types/bricks/Slideshow.ts +19 -9
  46. package/types/bricks/Svg.ts +7 -3
  47. package/types/bricks/Text.ts +8 -4
  48. package/types/bricks/TextInput.ts +22 -12
  49. package/types/bricks/Video.ts +10 -6
  50. package/types/bricks/VideoStreaming.ts +7 -3
  51. package/types/bricks/WebRtcStream.ts +6 -2
  52. package/types/bricks/WebView.ts +11 -7
  53. package/types/canvas.ts +2 -0
  54. package/types/common.ts +15 -8
  55. package/types/data-calc-command.ts +2 -0
  56. package/types/data-calc.ts +1 -0
  57. package/types/data.ts +2 -0
  58. package/types/generators/AlarmClock.ts +16 -10
  59. package/types/generators/Assistant.ts +68 -17
  60. package/types/generators/BleCentral.ts +30 -10
  61. package/types/generators/BlePeripheral.ts +10 -6
  62. package/types/generators/CanvasMap.ts +9 -5
  63. package/types/generators/CastlesPay.ts +14 -6
  64. package/types/generators/DataBank.ts +43 -8
  65. package/types/generators/File.ts +108 -29
  66. package/types/generators/GraphQl.ts +11 -5
  67. package/types/generators/Http.ts +32 -9
  68. package/types/generators/HttpServer.ts +22 -14
  69. package/types/generators/Information.ts +8 -4
  70. package/types/generators/Intent.ts +14 -4
  71. package/types/generators/Iterator.ts +14 -10
  72. package/types/generators/Keyboard.ts +26 -12
  73. package/types/generators/LlmAnthropicCompat.ts +32 -10
  74. package/types/generators/LlmAppleBuiltin.ts +24 -9
  75. package/types/generators/LlmGgml.ts +139 -30
  76. package/types/generators/LlmMediaTekNeuroPilot.ts +235 -0
  77. package/types/generators/LlmMlx.ts +227 -0
  78. package/types/generators/LlmOnnx.ts +33 -13
  79. package/types/generators/LlmOpenAiCompat.ts +46 -10
  80. package/types/generators/LlmQualcommAiEngine.ts +44 -12
  81. package/types/generators/Mcp.ts +374 -33
  82. package/types/generators/McpServer.ts +57 -18
  83. package/types/generators/MediaFlow.ts +37 -11
  84. package/types/generators/MqttBroker.ts +28 -10
  85. package/types/generators/MqttClient.ts +18 -8
  86. package/types/generators/Question.ts +12 -8
  87. package/types/generators/RealtimeTranscription.ts +107 -18
  88. package/types/generators/RerankerGgml.ts +42 -11
  89. package/types/generators/SerialPort.ts +17 -9
  90. package/types/generators/SoundPlayer.ts +9 -3
  91. package/types/generators/SoundRecorder.ts +23 -8
  92. package/types/generators/SpeechToTextGgml.ts +51 -17
  93. package/types/generators/SpeechToTextOnnx.ts +17 -10
  94. package/types/generators/SpeechToTextPlatform.ts +14 -6
  95. package/types/generators/SqLite.ts +19 -9
  96. package/types/generators/Step.ts +8 -4
  97. package/types/generators/SttAppleBuiltin.ts +21 -8
  98. package/types/generators/Tcp.ts +12 -8
  99. package/types/generators/TcpServer.ts +19 -13
  100. package/types/generators/TextToSpeechAppleBuiltin.ts +20 -7
  101. package/types/generators/TextToSpeechGgml.ts +28 -10
  102. package/types/generators/TextToSpeechOnnx.ts +18 -11
  103. package/types/generators/TextToSpeechOpenAiLike.ts +13 -7
  104. package/types/generators/ThermalPrinter.ts +12 -8
  105. package/types/generators/Tick.ts +10 -6
  106. package/types/generators/Udp.ts +16 -7
  107. package/types/generators/VadGgml.ts +50 -13
  108. package/types/generators/VadOnnx.ts +41 -11
  109. package/types/generators/VadTraditional.ts +27 -12
  110. package/types/generators/VectorStore.ts +32 -11
  111. package/types/generators/Watchdog.ts +18 -9
  112. package/types/generators/WebCrawler.ts +10 -6
  113. package/types/generators/WebRtc.ts +29 -15
  114. package/types/generators/WebSocket.ts +10 -6
  115. package/types/generators/index.ts +2 -0
  116. package/types/subspace.ts +4 -0
  117. package/types/system.ts +1 -1
  118. package/utils/event-props.ts +833 -1022
  119. package/api/index.ts +0 -1
  120. package/api/instance.ts +0 -213
  121. package/types/generators/TextToSpeechApple.ts +0 -113
  122. package/types/generators/TtsAppleBuiltin.ts +0 -105
  123. /package/skills/{bricks-project → bricks-ctor}/rules/automations.md +0 -0
@@ -1,4 +1,7 @@
1
- /* Auto generated by build script */
1
+ /* Auto generated by build script
2
+ *
3
+ * Display images from URL or local assets with resize modes and caching
4
+ */
2
5
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
6
  import type { Data, DataLink } from '../data'
4
7
  import type { Animation, AnimationBasicEvents } from '../animation'
@@ -12,6 +15,7 @@ import type {
12
15
  EventProperty,
13
16
  } from '../common'
14
17
  import type { BrickBasicProperty, BrickBasicEvents, BrickBasicEventsForItem } from '../brick-base'
18
+ import type { TemplateEventPropsMap } from '../../utils/event-props'
15
19
 
16
20
  interface BrickImageDef {
17
21
  /*
@@ -67,13 +71,13 @@ Default property:
67
71
  /* Event of the image on load */
68
72
  onLoad?: Array<EventAction>
69
73
  /* Event of the image on error */
70
- onError?: Array<EventAction>
74
+ onError?: Array<EventAction<string & keyof TemplateEventPropsMap['Image']['onError']>>
71
75
  }
72
76
  outlets?: {
73
77
  /* Brick is pressing */
74
- brickPressing?: () => Data
78
+ brickPressing?: () => Data<boolean>
75
79
  /* Brick is focusing (Use TV Device with controller) */
76
- brickFocusing?: () => Data
80
+ brickFocusing?: () => Data<boolean>
77
81
  }
78
82
  animation?: AnimationBasicEvents & {
79
83
  onPress?: Animation
@@ -87,7 +91,7 @@ Default property:
87
91
  }
88
92
  }
89
93
 
90
- /* Image brick ([Tutorial](https://intercom.help/bricks-dag-inc/articles/5378576-image)) */
94
+ /* Display images from URL or local assets with resize modes and caching */
91
95
  export type BrickImage = Brick &
92
96
  BrickImageDef & {
93
97
  templateKey: 'BRICK_IMAGE'
@@ -1,4 +1,7 @@
1
- /* Auto generated by build script */
1
+ /* Auto generated by build script
2
+ *
3
+ * Data-driven list/grid. Maps items array to brick templates via propertyMapping, with pagination and detail mode support
4
+ */
2
5
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
6
  import type { Data, DataLink } from '../data'
4
7
  import type { Animation, AnimationBasicEvents } from '../animation'
@@ -12,6 +15,7 @@ import type {
12
15
  EventProperty,
13
16
  } from '../common'
14
17
  import type { BrickBasicProperty, BrickBasicEvents, BrickBasicEventsForItem } from '../brick-base'
18
+ import type { TemplateEventPropsMap } from '../../utils/event-props'
15
19
 
16
20
  /* prev page */
17
21
  export type BrickItemsActionPrevPage = Action & {
@@ -397,31 +401,41 @@ Default property:
397
401
  | DataLink
398
402
  events?: BrickBasicEventsForItem & {
399
403
  /* Event on page render finished */
400
- onPageRender?: Array<EventActionForItem>
404
+ onPageRender?: Array<
405
+ EventActionForItem<string & keyof TemplateEventPropsMap['Items']['onPageRender']>
406
+ >
401
407
  /* Event on page change. */
402
- onPageChange?: Array<EventActionForItem>
408
+ onPageChange?: Array<
409
+ EventActionForItem<string & keyof TemplateEventPropsMap['Items']['onPageChange']>
410
+ >
403
411
  /* Event on page index out of bound. */
404
- onPageOutOfBound?: Array<EventActionForItem>
412
+ onPageOutOfBound?: Array<
413
+ EventActionForItem<string & keyof TemplateEventPropsMap['Items']['onPageOutOfBound']>
414
+ >
405
415
  /* Event on into `detail` mode */
406
- onIntoDetailMode?: Array<EventActionForItem>
416
+ onIntoDetailMode?: Array<
417
+ EventActionForItem<string & keyof TemplateEventPropsMap['Items']['onIntoDetailMode']>
418
+ >
407
419
  /* Event on into `list` mode. */
408
- onIntoListMode?: Array<EventActionForItem>
420
+ onIntoListMode?: Array<
421
+ EventActionForItem<string & keyof TemplateEventPropsMap['Items']['onIntoListMode']>
422
+ >
409
423
  /* Event on render error */
410
- onError?: Array<EventActionForItem>
424
+ onError?: Array<EventActionForItem<string & keyof TemplateEventPropsMap['Items']['onError']>>
411
425
  }
412
426
  outlets?: {
413
427
  /* Catched error message */
414
- error?: () => Data
428
+ error?: () => Data<string>
415
429
  /* Current render mode */
416
- mode?: () => Data
430
+ mode?: () => Data<string>
417
431
  /* Current page index */
418
- pageIndex?: () => Data
432
+ pageIndex?: () => Data<number>
419
433
  /* Current page size */
420
- pageSize?: () => Data
434
+ pageSize?: () => Data<number>
421
435
  /* Selected item index of detail mode */
422
- selectedItemIndex?: () => Data
436
+ selectedItemIndex?: () => Data<number>
423
437
  /* Page is out of bound */
424
- pageIsOutOfBound?: () => Data
438
+ pageIsOutOfBound?: () => Data<boolean>
425
439
  }
426
440
  animation?: AnimationBasicEvents & {
427
441
  onPageRender?: Animation
@@ -433,7 +447,7 @@ Default property:
433
447
  }
434
448
  }
435
449
 
436
- /* Brick items component */
450
+ /* Data-driven list/grid. Maps items array to brick templates via propertyMapping, with pagination and detail mode support */
437
451
  export type BrickItems = Brick &
438
452
  BrickItemsDef & {
439
453
  templateKey: 'BRICK_ITEMS'
@@ -1,4 +1,7 @@
1
- /* Auto generated by build script */
1
+ /* Auto generated by build script
2
+ *
3
+ * Lottie animation player supporting .json and .dotlottie formats. Supports speed, loop, frame range control, color/text filters, and hardware rendering
4
+ */
2
5
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
6
  import type { Data, DataLink } from '../data'
4
7
  import type { Animation, AnimationBasicEvents } from '../animation'
@@ -12,6 +15,7 @@ import type {
12
15
  EventProperty,
13
16
  } from '../common'
14
17
  import type { BrickBasicProperty, BrickBasicEvents, BrickBasicEventsForItem } from '../brick-base'
18
+ import type { TemplateEventPropsMap } from '../../utils/event-props'
15
19
 
16
20
  /* Play animation */
17
21
  export type BrickLottieActionPlay = ActionWithParams & {
@@ -112,17 +116,21 @@ Default property:
112
116
  /* Event of the brick blur (Use TV Device with controller) */
113
117
  onBlur?: Array<EventAction>
114
118
  /* Event of the animation finished */
115
- onAnimationFinish?: Array<EventAction>
119
+ onAnimationFinish?: Array<
120
+ EventAction<string & keyof TemplateEventPropsMap['Lottie']['onAnimationFinish']>
121
+ >
116
122
  /* Event of the uri on load failed */
117
- onAnimationFailure?: Array<EventAction>
123
+ onAnimationFailure?: Array<
124
+ EventAction<string & keyof TemplateEventPropsMap['Lottie']['onAnimationFailure']>
125
+ >
118
126
  /* Event of the animation on loop */
119
127
  onAnimationLoop?: Array<EventAction>
120
128
  }
121
129
  outlets?: {
122
130
  /* Brick is pressing */
123
- brickPressing?: () => Data
131
+ brickPressing?: () => Data<boolean>
124
132
  /* Brick is focusing (Use TV Device with controller) */
125
- brickFocusing?: () => Data
133
+ brickFocusing?: () => Data<boolean>
126
134
  }
127
135
  animation?: AnimationBasicEvents & {
128
136
  onPress?: Animation
@@ -137,7 +145,7 @@ Default property:
137
145
  }
138
146
  }
139
147
 
140
- /* Lottie Adobe After Effects animations brick ([Tutorial](https://intercom.help/bricks-dag-inc/articles/5378583-lottie)) */
148
+ /* Lottie animation player supporting .json and .dotlottie formats. Supports speed, loop, frame range control, color/text filters, and hardware rendering */
141
149
  export type BrickLottie = Brick &
142
150
  BrickLottieDef & {
143
151
  templateKey: 'BRICK_LOTTIE'
@@ -1,4 +1,7 @@
1
- /* Auto generated by build script */
1
+ /* Auto generated by build script
2
+ *
3
+ * Interactive map with markers, paths, and location tracking. Supports Google Maps (iOS/Android/Desktop/Web) and Apple Maps (iOS/tvOS)
4
+ */
2
5
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
6
  import type { Data, DataLink } from '../data'
4
7
  import type { Animation, AnimationBasicEvents } from '../animation'
@@ -12,6 +15,7 @@ import type {
12
15
  EventProperty,
13
16
  } from '../common'
14
17
  import type { BrickBasicProperty, BrickBasicEvents, BrickBasicEventsForItem } from '../brick-base'
18
+ import type { TemplateEventPropsMap } from '../../utils/event-props'
15
19
 
16
20
  /* Zoom in the map */
17
21
  export type BrickMapsActionZoomIn = Action & {
@@ -203,19 +207,23 @@ Default property:
203
207
  /* Event of the brick blur (Use TV Device with controller) */
204
208
  onBlur?: Array<EventAction>
205
209
  /* Event when a marker is pressed */
206
- onMarkerPress?: Array<EventAction>
210
+ onMarkerPress?: Array<
211
+ EventAction<string & keyof TemplateEventPropsMap['Maps']['onMarkerPress']>
212
+ >
207
213
  /* Event when the map is pressed */
208
- onMapPress?: Array<EventAction>
214
+ onMapPress?: Array<EventAction<string & keyof TemplateEventPropsMap['Maps']['onMapPress']>>
209
215
  /* Event when the map region changes */
210
- onRegionChange?: Array<EventAction>
216
+ onRegionChange?: Array<
217
+ EventAction<string & keyof TemplateEventPropsMap['Maps']['onRegionChange']>
218
+ >
211
219
  /* Event when the map is ready */
212
220
  onReady?: Array<EventAction>
213
221
  }
214
222
  outlets?: {
215
223
  /* Brick is pressing */
216
- brickPressing?: () => Data
224
+ brickPressing?: () => Data<boolean>
217
225
  /* Brick is focusing (Use TV Device with controller) */
218
- brickFocusing?: () => Data
226
+ brickFocusing?: () => Data<boolean>
219
227
  }
220
228
  animation?: AnimationBasicEvents & {
221
229
  onPress?: Animation
@@ -231,7 +239,7 @@ Default property:
231
239
  }
232
240
  }
233
241
 
234
- /* Maps brick ([Tutorial](https://intercom.help/bricks-dag-inc/articles/maps)) */
242
+ /* Interactive map with markers, paths, and location tracking. Supports Google Maps (iOS/Android/Desktop/Web) and Apple Maps (iOS/tvOS) */
235
243
  export type BrickMaps = Brick &
236
244
  BrickMapsDef & {
237
245
  templateKey: 'BRICK_MAPS'
@@ -1,4 +1,7 @@
1
- /* Auto generated by build script */
1
+ /* Auto generated by build script
2
+ *
3
+ * Generate and display QR codes from text or URL values
4
+ */
2
5
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
6
  import type { Data, DataLink } from '../data'
4
7
  import type { Animation, AnimationBasicEvents } from '../animation'
@@ -12,6 +15,7 @@ import type {
12
15
  EventProperty,
13
16
  } from '../common'
14
17
  import type { BrickBasicProperty, BrickBasicEvents, BrickBasicEventsForItem } from '../brick-base'
18
+ import type { TemplateEventPropsMap } from '../../utils/event-props'
15
19
 
16
20
  interface BrickQrcodeDef {
17
21
  /*
@@ -76,9 +80,9 @@ Default property:
76
80
  }
77
81
  outlets?: {
78
82
  /* Brick is pressing */
79
- brickPressing?: () => Data
83
+ brickPressing?: () => Data<boolean>
80
84
  /* Brick is focusing (Use TV Device with controller) */
81
- brickFocusing?: () => Data
85
+ brickFocusing?: () => Data<boolean>
82
86
  }
83
87
  animation?: AnimationBasicEvents & {
84
88
  onPress?: Animation
@@ -90,7 +94,7 @@ Default property:
90
94
  }
91
95
  }
92
96
 
93
- /* QRCode brick ([Tutorial](https://intercom.help/bricks-dag-inc/articles/5378579-qr-code)) */
97
+ /* Generate and display QR codes from text or URL values */
94
98
  export type BrickQrcode = Brick &
95
99
  BrickQrcodeDef & {
96
100
  templateKey: 'BRICK_QRCODE'
@@ -1,4 +1,7 @@
1
- /* Auto generated by build script */
1
+ /* Auto generated by build script
2
+ *
3
+ * Rectangle shape with customizable fill, border, radius, shadow, and blur
4
+ */
2
5
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
6
  import type { Data, DataLink } from '../data'
4
7
  import type { Animation, AnimationBasicEvents } from '../animation'
@@ -12,6 +15,7 @@ import type {
12
15
  EventProperty,
13
16
  } from '../common'
14
17
  import type { BrickBasicProperty, BrickBasicEvents, BrickBasicEventsForItem } from '../brick-base'
18
+ import type { TemplateEventPropsMap } from '../../utils/event-props'
15
19
 
16
20
  interface BrickRectDef {
17
21
  /*
@@ -33,7 +37,16 @@ Default property:
33
37
  "linearGradientLocations": [
34
38
  0,
35
39
  1
36
- ]
40
+ ],
41
+ "blurEnabled": false,
42
+ "blurVariant": "blur",
43
+ "blurType": "light",
44
+ "blurAmount": 10,
45
+ "blurDirection": "blurredTopClearBottom",
46
+ "blurStartOffset": 0,
47
+ "blurGlassType": "regular",
48
+ "blurGlassOpacity": 0.5,
49
+ "blurGlassInteractive": false
37
50
  }
38
51
  */
39
52
  property?: BrickBasicProperty & {
@@ -57,6 +70,32 @@ Default property:
57
70
  }
58
71
  /* An optional array of numbers defining the location of each gradient color stop */
59
72
  linearGradientLocations?: Array<number | DataLink> | DataLink
73
+ /* Enable blur effect.
74
+ Not supported on Desktop (Electron) and Web.
75
+ Avoid using opacity prop with blur — use alpha backgroundColor (e.g. rgba) instead. */
76
+ blurEnabled?: boolean | DataLink
77
+ /* Blur variant */
78
+ blurVariant?: 'blur' | 'progressiveBlur' | 'liquidGlass' | DataLink
79
+ /* Blur type (blur variant) */
80
+ blurType?: 'xlight' | 'light' | 'dark' | 'regular' | 'prominent' | DataLink
81
+ /* Blur amount (0 ~ 100, blur variant) */
82
+ blurAmount?: number | DataLink
83
+ /* Progressive blur direction (progressiveBlur variant) */
84
+ blurDirection?:
85
+ | 'blurredTopClearBottom'
86
+ | 'blurredBottomClearTop'
87
+ | 'blurredCenterClearTopAndBottom'
88
+ | DataLink
89
+ /* Progressive blur start offset (0 ~ 1, progressiveBlur variant) */
90
+ blurStartOffset?: number | DataLink
91
+ /* Glass type (liquidGlass variant, iOS 26+) */
92
+ blurGlassType?: 'clear' | 'regular' | DataLink
93
+ /* Glass tint color (liquidGlass variant) */
94
+ blurGlassTintColor?: string | DataLink
95
+ /* Glass opacity (0 ~ 1, liquidGlass variant) */
96
+ blurGlassOpacity?: number | DataLink
97
+ /* Enable glass interaction (liquidGlass variant) */
98
+ blurGlassInteractive?: boolean | DataLink
60
99
  }
61
100
  events?: BrickBasicEvents & {
62
101
  /* Event of the brick press */
@@ -74,9 +113,9 @@ Default property:
74
113
  }
75
114
  outlets?: {
76
115
  /* Brick is pressing */
77
- brickPressing?: () => Data
116
+ brickPressing?: () => Data<boolean>
78
117
  /* Brick is focusing (Use TV Device with controller) */
79
- brickFocusing?: () => Data
118
+ brickFocusing?: () => Data<boolean>
80
119
  }
81
120
  animation?: AnimationBasicEvents & {
82
121
  onPress?: Animation
@@ -88,7 +127,7 @@ Default property:
88
127
  }
89
128
  }
90
129
 
91
- /* Rect brick ([Tutorial](https://intercom.help/bricks-dag-inc/articles/5378573-rect)) */
130
+ /* Rectangle shape with customizable fill, border, radius, shadow, and blur */
92
131
  export type BrickRect = Brick &
93
132
  BrickRectDef & {
94
133
  templateKey: 'BRICK_RECT'
@@ -1,4 +1,7 @@
1
- /* Auto generated by build script */
1
+ /* Auto generated by build script
2
+ *
3
+ * Rich text with HTML content rendering, multiple fonts, colors, heading levels (h1-h6), and inline images
4
+ */
2
5
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
6
  import type { Data, DataLink } from '../data'
4
7
  import type { Animation, AnimationBasicEvents } from '../animation'
@@ -12,6 +15,7 @@ import type {
12
15
  EventProperty,
13
16
  } from '../common'
14
17
  import type { BrickBasicProperty, BrickBasicEvents, BrickBasicEventsForItem } from '../brick-base'
18
+ import type { TemplateEventPropsMap } from '../../utils/event-props'
15
19
 
16
20
  interface BrickRichTextDef {
17
21
  /*
@@ -87,9 +91,9 @@ Default property:
87
91
  }
88
92
  outlets?: {
89
93
  /* Brick is pressing */
90
- brickPressing?: () => Data
94
+ brickPressing?: () => Data<boolean>
91
95
  /* Brick is focusing (Use TV Device with controller) */
92
- brickFocusing?: () => Data
96
+ brickFocusing?: () => Data<boolean>
93
97
  }
94
98
  animation?: AnimationBasicEvents & {
95
99
  onPress?: Animation
@@ -101,7 +105,7 @@ Default property:
101
105
  }
102
106
  }
103
107
 
104
- /* RichText brick */
108
+ /* Rich text with HTML content rendering, multiple fonts, colors, heading levels (h1-h6), and inline images */
105
109
  export type BrickRichText = Brick &
106
110
  BrickRichTextDef & {
107
111
  templateKey: 'BRICK_RICH_TEXT'
@@ -1,4 +1,7 @@
1
- /* Auto generated by build script */
1
+ /* Auto generated by build script
2
+ *
3
+ * Render Rive (.riv) animations with state machine input control, text run updates, and artboard selection
4
+ */
2
5
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
6
  import type { Data, DataLink } from '../data'
4
7
  import type { Animation, AnimationBasicEvents } from '../animation'
@@ -12,6 +15,7 @@ import type {
12
15
  EventProperty,
13
16
  } from '../common'
14
17
  import type { BrickBasicProperty, BrickBasicEvents, BrickBasicEventsForItem } from '../brick-base'
18
+ import type { TemplateEventPropsMap } from '../../utils/event-props'
15
19
 
16
20
  /* Play animation */
17
21
  export type BrickRiveActionPlay = ActionWithParams & {
@@ -159,21 +163,27 @@ Default property:
159
163
  }
160
164
  events?: BrickBasicEvents & {
161
165
  /* Event of animation play */
162
- onPlay?: Array<EventAction>
166
+ onPlay?: Array<EventAction<string & keyof TemplateEventPropsMap['Rive']['onPlay']>>
163
167
  /* Event of animation pause */
164
- onPause?: Array<EventAction>
168
+ onPause?: Array<EventAction<string & keyof TemplateEventPropsMap['Rive']['onPause']>>
165
169
  /* Event of animation stop */
166
- onStop?: Array<EventAction>
170
+ onStop?: Array<EventAction<string & keyof TemplateEventPropsMap['Rive']['onStop']>>
167
171
  /* Event of animation loop end */
168
- onLoopEnd?: Array<EventAction>
172
+ onLoopEnd?: Array<EventAction<string & keyof TemplateEventPropsMap['Rive']['onLoopEnd']>>
169
173
  /* Event of state changed */
170
- onStateChanged?: Array<EventAction>
174
+ onStateChanged?: Array<
175
+ EventAction<string & keyof TemplateEventPropsMap['Rive']['onStateChanged']>
176
+ >
171
177
  /* Event of error */
172
- onError?: Array<EventAction>
178
+ onError?: Array<EventAction<string & keyof TemplateEventPropsMap['Rive']['onError']>>
173
179
  /* Event of Rive general event received */
174
- onRiveGeneralEvent?: Array<EventAction>
180
+ onRiveGeneralEvent?: Array<
181
+ EventAction<string & keyof TemplateEventPropsMap['Rive']['onRiveGeneralEvent']>
182
+ >
175
183
  /* Event of Rive open-url event received */
176
- onRiveOpenUrlEvent?: Array<EventAction>
184
+ onRiveOpenUrlEvent?: Array<
185
+ EventAction<string & keyof TemplateEventPropsMap['Rive']['onRiveOpenUrlEvent']>
186
+ >
177
187
  }
178
188
  animation?: AnimationBasicEvents & {
179
189
  onPlay?: Animation
@@ -187,7 +197,7 @@ Default property:
187
197
  }
188
198
  }
189
199
 
190
- /* Rive file component */
200
+ /* Render Rive (.riv) animations with state machine input control, text run updates, and artboard selection */
191
201
  export type BrickRive = Brick &
192
202
  BrickRiveDef & {
193
203
  templateKey: 'BRICK_RIVE'
@@ -1,4 +1,7 @@
1
- /* Auto generated by build script */
1
+ /* Auto generated by build script
2
+ *
3
+ * Auto-advancing slideshow of child bricks with transition effects
4
+ */
2
5
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
6
  import type { Data, DataLink } from '../data'
4
7
  import type { Animation, AnimationBasicEvents } from '../animation'
@@ -12,6 +15,7 @@ import type {
12
15
  EventProperty,
13
16
  } from '../common'
14
17
  import type { BrickBasicProperty, BrickBasicEvents, BrickBasicEventsForItem } from '../brick-base'
18
+ import type { TemplateEventPropsMap } from '../../utils/event-props'
15
19
 
16
20
  /* Jump to a specific index in the slideshow */
17
21
  export type BrickSlideshowActionJumpToIndex = ActionWithParams & {
@@ -81,7 +85,7 @@ Default property:
81
85
  property?: BrickBasicProperty & {
82
86
  /* The time interval of show for each photo */
83
87
  countdown?: number | DataLink
84
- /* The slideshow media path list (File, URL)
88
+ /* The slideshow media path list (File, URL)
85
89
  Each path object can override global photo/video settings.
86
90
  Item-level properties take precedence over brick-level properties. */
87
91
  paths?:
@@ -102,7 +106,7 @@ Default property:
102
106
  }
103
107
  >
104
108
  | DataLink
105
- /* Multiple slideshow media path lists to combine (Array of path arrays).
109
+ /* Multiple slideshow media path lists to combine (Array of path arrays).
106
110
  All arrays are flattened and combined: [...paths, ...pathsList[0], ...pathsList[1], ...] */
107
111
  pathsList?: Array<Array<any> | DataLink | DataLink> | DataLink
108
112
  /* Loop the slideshow */
@@ -146,17 +150,23 @@ Default property:
146
150
  }
147
151
  events?: BrickBasicEvents & {
148
152
  /* Event of the next slideshow on change start */
149
- changeStart?: Array<EventAction>
153
+ changeStart?: Array<
154
+ EventAction<string & keyof TemplateEventPropsMap['Slideshow']['changeStart']>
155
+ >
150
156
  /* Event of the next slideshow on change end */
151
- changeEnd?: Array<EventAction>
157
+ changeEnd?: Array<EventAction<string & keyof TemplateEventPropsMap['Slideshow']['changeEnd']>>
152
158
  /* Event on paths change */
153
- contentChange?: Array<EventAction>
159
+ contentChange?: Array<
160
+ EventAction<string & keyof TemplateEventPropsMap['Slideshow']['contentChange']>
161
+ >
154
162
  /* Event on plays of paths are end */
155
- roundEnd?: Array<EventAction>
163
+ roundEnd?: Array<EventAction<string & keyof TemplateEventPropsMap['Slideshow']['roundEnd']>>
156
164
  /* Event of the slideshow on load */
157
165
  mediaOnLoad?: Array<EventAction>
158
166
  /* Event of the slideshow media loading error */
159
- mediaOnError?: Array<EventAction>
167
+ mediaOnError?: Array<
168
+ EventAction<string & keyof TemplateEventPropsMap['Slideshow']['mediaOnError']>
169
+ >
160
170
  }
161
171
  animation?: AnimationBasicEvents & {
162
172
  changeStart?: Animation
@@ -168,7 +178,7 @@ Default property:
168
178
  }
169
179
  }
170
180
 
171
- /* Slideshow brick ([Tutorial](https://intercom.help/bricks-dag-inc/articles/5378580-slideshow)) */
181
+ /* Auto-advancing slideshow of child bricks with transition effects */
172
182
  export type BrickSlideshow = Brick &
173
183
  BrickSlideshowDef & {
174
184
  templateKey: 'BRICK_SLIDESHOW'
@@ -1,4 +1,7 @@
1
- /* Auto generated by build script */
1
+ /* Auto generated by build script
2
+ *
3
+ * SVG is an XML-based vector image format for 2D graphics
4
+ */
2
5
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
6
  import type { Data, DataLink } from '../data'
4
7
  import type { Animation, AnimationBasicEvents } from '../animation'
@@ -12,6 +15,7 @@ import type {
12
15
  EventProperty,
13
16
  } from '../common'
14
17
  import type { BrickBasicProperty, BrickBasicEvents, BrickBasicEventsForItem } from '../brick-base'
18
+ import type { TemplateEventPropsMap } from '../../utils/event-props'
15
19
 
16
20
  interface BrickSvgDef {
17
21
  /*
@@ -58,9 +62,9 @@ Default property:
58
62
  }
59
63
  outlets?: {
60
64
  /* Brick is pressing */
61
- brickPressing?: () => Data
65
+ brickPressing?: () => Data<boolean>
62
66
  /* Brick is focusing (Use TV Device with controller) */
63
- brickFocusing?: () => Data
67
+ brickFocusing?: () => Data<boolean>
64
68
  }
65
69
  animation?: AnimationBasicEvents & {
66
70
  onPress?: Animation
@@ -1,4 +1,7 @@
1
- /* Auto generated by build script */
1
+ /* Auto generated by build script
2
+ *
3
+ * Display styled text with font, color, alignment, and truncation controls
4
+ */
2
5
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
6
  import type { Data, DataLink } from '../data'
4
7
  import type { Animation, AnimationBasicEvents } from '../animation'
@@ -12,6 +15,7 @@ import type {
12
15
  EventProperty,
13
16
  } from '../common'
14
17
  import type { BrickBasicProperty, BrickBasicEvents, BrickBasicEventsForItem } from '../brick-base'
18
+ import type { TemplateEventPropsMap } from '../../utils/event-props'
15
19
 
16
20
  interface BrickTextDef {
17
21
  /*
@@ -105,9 +109,9 @@ Default property:
105
109
  }
106
110
  outlets?: {
107
111
  /* Brick is pressing */
108
- brickPressing?: () => Data
112
+ brickPressing?: () => Data<boolean>
109
113
  /* Brick is focusing (Use TV Device with controller) */
110
- brickFocusing?: () => Data
114
+ brickFocusing?: () => Data<boolean>
111
115
  }
112
116
  animation?: AnimationBasicEvents & {
113
117
  onPress?: Animation
@@ -121,7 +125,7 @@ Default property:
121
125
  }
122
126
  }
123
127
 
124
- /* Text brick ([Tutorial](https://intercom.help/bricks-dag-inc/articles/5378574-text)) */
128
+ /* Display styled text with font, color, alignment, and truncation controls */
125
129
  export type BrickText = Brick &
126
130
  BrickTextDef & {
127
131
  templateKey: 'BRICK_TEXT'
@@ -1,4 +1,7 @@
1
- /* Auto generated by build script */
1
+ /* Auto generated by build script
2
+ *
3
+ * Editable text input field with keyboard type, placeholder, and validation support
4
+ */
2
5
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
6
  import type { Data, DataLink } from '../data'
4
7
  import type { Animation, AnimationBasicEvents } from '../animation'
@@ -12,6 +15,7 @@ import type {
12
15
  EventProperty,
13
16
  } from '../common'
14
17
  import type { BrickBasicProperty, BrickBasicEvents, BrickBasicEventsForItem } from '../brick-base'
18
+ import type { TemplateEventPropsMap } from '../../utils/event-props'
15
19
 
16
20
  /* Focus TextInput */
17
21
  export type BrickTextInputActionFocus = Action & {
@@ -172,29 +176,35 @@ Default property:
172
176
  /* Event of the TextInput is empty */
173
177
  onEmpty?: Array<EventAction>
174
178
  /* Event of the TextInput value change */
175
- onChange?: Array<EventAction>
179
+ onChange?: Array<EventAction<string & keyof TemplateEventPropsMap['TextInput']['onChange']>>
176
180
  /* Event of the TextInput submit */
177
- onSubmit?: Array<EventAction>
181
+ onSubmit?: Array<EventAction<string & keyof TemplateEventPropsMap['TextInput']['onSubmit']>>
178
182
  /* Event of the TextInput match regex (check every value change) */
179
- onMatch?: Array<EventAction>
183
+ onMatch?: Array<EventAction<string & keyof TemplateEventPropsMap['TextInput']['onMatch']>>
180
184
  /* Event of the TextInput not match regex (check every value change) */
181
- onNotMatch?: Array<EventAction>
185
+ onNotMatch?: Array<EventAction<string & keyof TemplateEventPropsMap['TextInput']['onNotMatch']>>
182
186
  /* Event of the TextInput not match regex (check every submit) */
183
- onResultNotMatch?: Array<EventAction>
187
+ onResultNotMatch?: Array<
188
+ EventAction<string & keyof TemplateEventPropsMap['TextInput']['onResultNotMatch']>
189
+ >
184
190
  /* Event of the TextInput reach max length or match regex */
185
191
  onFullFill?: Array<EventAction>
186
192
  }
187
193
  outlets?: {
188
194
  /* The raw input */
189
- rawInput?: () => Data
195
+ rawInput?: () => Data<any>
190
196
  /* The regex result */
191
- resultVariable?: () => Data
197
+ resultVariable?: () => Data<{ [key: string]: any }>
192
198
  /* Last key in */
193
- lastKey?: () => Data
199
+ lastKey?: () => Data<any>
194
200
  /* Selection of the TextInput (start, end, text) */
195
- selection?: () => Data
201
+ selection?: () => Data<{
202
+ start?: number
203
+ end?: number
204
+ text?: string
205
+ }>
196
206
  /* Selection text of the TextInput */
197
- selectionText?: () => Data
207
+ selectionText?: () => Data<string>
198
208
  }
199
209
  animation?: AnimationBasicEvents & {
200
210
  onFocus?: Animation
@@ -209,7 +219,7 @@ Default property:
209
219
  }
210
220
  }
211
221
 
212
- /* Text Input brick ([Tutorial](https://intercom.help/bricks-dag-inc/articles/5378575-text-input)) */
222
+ /* Editable text input field with keyboard type, placeholder, and validation support */
213
223
  export type BrickTextInput = Brick &
214
224
  BrickTextInputDef & {
215
225
  templateKey: 'BRICK_TEXT_INPUT'