@fugood/bricks-project 2.24.0-beta.4 → 2.24.0-beta.41

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 (126) hide show
  1. package/compile/action-name-map.ts +38 -0
  2. package/compile/index.ts +429 -160
  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-ctor/rules/automations.md +221 -0
  10. package/skills/{bricks-project → bricks-ctor}/rules/buttress.md +10 -7
  11. package/skills/{bricks-project → bricks-ctor}/rules/data-calculation.md +1 -1
  12. package/skills/{bricks-project → bricks-ctor}/rules/local-sync.md +2 -2
  13. package/skills/{bricks-project → bricks-ctor}/rules/media-flow.md +3 -3
  14. package/skills/{bricks-project → bricks-ctor}/rules/remote-data-bank.md +6 -6
  15. package/skills/{bricks-project → bricks-ctor}/rules/standby-transition.md +1 -1
  16. package/skills/bricks-design/LICENSE.txt +180 -0
  17. package/skills/bricks-design/SKILL.md +66 -0
  18. package/tools/deploy.ts +66 -12
  19. package/tools/icons/fa6pro-meta.json +3669 -26125
  20. package/tools/mcp-server.ts +11 -878
  21. package/tools/mcp-tools/compile.ts +91 -0
  22. package/tools/mcp-tools/huggingface.ts +762 -0
  23. package/tools/mcp-tools/icons.ts +70 -0
  24. package/tools/mcp-tools/lottie.ts +102 -0
  25. package/tools/mcp-tools/media.ts +110 -0
  26. package/tools/postinstall.ts +137 -40
  27. package/tools/preview-main.mjs +146 -9
  28. package/tools/preview.ts +30 -2
  29. package/tools/pull.ts +37 -19
  30. package/tsconfig.json +16 -0
  31. package/types/animation.ts +4 -0
  32. package/types/automation.ts +4 -1
  33. package/types/brick-base.ts +1 -1
  34. package/types/bricks/Camera.ts +48 -13
  35. package/types/bricks/Chart.ts +10 -4
  36. package/types/bricks/GenerativeMedia.ts +30 -14
  37. package/types/bricks/Icon.ts +9 -5
  38. package/types/bricks/Image.ts +10 -6
  39. package/types/bricks/Items.ts +29 -15
  40. package/types/bricks/Lottie.ts +15 -7
  41. package/types/bricks/Maps.ts +16 -8
  42. package/types/bricks/QrCode.ts +9 -5
  43. package/types/bricks/Rect.ts +45 -6
  44. package/types/bricks/RichText.ts +9 -5
  45. package/types/bricks/Rive.ts +21 -11
  46. package/types/bricks/Slideshow.ts +20 -10
  47. package/types/bricks/Svg.ts +8 -4
  48. package/types/bricks/Text.ts +9 -5
  49. package/types/bricks/TextInput.ts +23 -13
  50. package/types/bricks/Video.ts +11 -7
  51. package/types/bricks/VideoStreaming.ts +8 -4
  52. package/types/bricks/WebRtcStream.ts +7 -3
  53. package/types/bricks/WebView.ts +12 -8
  54. package/types/canvas.ts +4 -2
  55. package/types/common.ts +19 -12
  56. package/types/data-calc-command.ts +2 -0
  57. package/types/data-calc.ts +1 -0
  58. package/types/data.ts +2 -0
  59. package/types/generators/AlarmClock.ts +17 -11
  60. package/types/generators/Assistant.ts +69 -18
  61. package/types/generators/BleCentral.ts +31 -11
  62. package/types/generators/BlePeripheral.ts +11 -7
  63. package/types/generators/CanvasMap.ts +10 -6
  64. package/types/generators/CastlesPay.ts +15 -7
  65. package/types/generators/DataBank.ts +44 -9
  66. package/types/generators/File.ts +109 -30
  67. package/types/generators/GraphQl.ts +12 -6
  68. package/types/generators/Http.ts +33 -10
  69. package/types/generators/HttpServer.ts +23 -15
  70. package/types/generators/Information.ts +9 -5
  71. package/types/generators/Intent.ts +15 -5
  72. package/types/generators/Iterator.ts +15 -11
  73. package/types/generators/Keyboard.ts +27 -13
  74. package/types/generators/LlmAnthropicCompat.ts +33 -11
  75. package/types/generators/LlmAppleBuiltin.ts +25 -10
  76. package/types/generators/LlmGgml.ts +140 -31
  77. package/types/generators/LlmMediaTekNeuroPilot.ts +235 -0
  78. package/types/generators/LlmMlx.ts +227 -0
  79. package/types/generators/LlmOnnx.ts +34 -14
  80. package/types/generators/LlmOpenAiCompat.ts +47 -11
  81. package/types/generators/LlmQualcommAiEngine.ts +45 -13
  82. package/types/generators/Mcp.ts +375 -34
  83. package/types/generators/McpServer.ts +58 -19
  84. package/types/generators/MediaFlow.ts +38 -12
  85. package/types/generators/MqttBroker.ts +29 -11
  86. package/types/generators/MqttClient.ts +19 -9
  87. package/types/generators/Question.ts +13 -9
  88. package/types/generators/RealtimeTranscription.ts +108 -19
  89. package/types/generators/RerankerGgml.ts +43 -12
  90. package/types/generators/SerialPort.ts +18 -10
  91. package/types/generators/SoundPlayer.ts +10 -4
  92. package/types/generators/SoundRecorder.ts +24 -9
  93. package/types/generators/SpeechToTextGgml.ts +52 -18
  94. package/types/generators/SpeechToTextOnnx.ts +18 -11
  95. package/types/generators/SpeechToTextPlatform.ts +15 -7
  96. package/types/generators/SqLite.ts +20 -10
  97. package/types/generators/Step.ts +9 -5
  98. package/types/generators/SttAppleBuiltin.ts +22 -9
  99. package/types/generators/Tcp.ts +13 -9
  100. package/types/generators/TcpServer.ts +20 -14
  101. package/types/generators/TextToSpeechAppleBuiltin.ts +21 -8
  102. package/types/generators/TextToSpeechGgml.ts +29 -11
  103. package/types/generators/TextToSpeechOnnx.ts +19 -12
  104. package/types/generators/TextToSpeechOpenAiLike.ts +14 -8
  105. package/types/generators/ThermalPrinter.ts +13 -9
  106. package/types/generators/Tick.ts +11 -7
  107. package/types/generators/Udp.ts +17 -8
  108. package/types/generators/VadGgml.ts +51 -14
  109. package/types/generators/VadOnnx.ts +42 -12
  110. package/types/generators/VadTraditional.ts +28 -13
  111. package/types/generators/VectorStore.ts +33 -12
  112. package/types/generators/Watchdog.ts +19 -10
  113. package/types/generators/WebCrawler.ts +11 -7
  114. package/types/generators/WebRtc.ts +30 -16
  115. package/types/generators/WebSocket.ts +11 -7
  116. package/types/generators/index.ts +2 -0
  117. package/types/subspace.ts +3 -0
  118. package/types/system.ts +1 -1
  119. package/utils/calc.ts +12 -8
  120. package/utils/event-props.ts +833 -1022
  121. package/utils/id.ts +4 -0
  122. package/api/index.ts +0 -1
  123. package/api/instance.ts +0 -213
  124. package/skills/bricks-project/rules/automations.md +0 -175
  125. package/types/generators/TextToSpeechApple.ts +0 -113
  126. package/types/generators/TtsAppleBuiltin.ts +0 -105
@@ -1,4 +1,7 @@
1
- /* Auto generated by build script */
1
+ /* Auto generated by build script
2
+ *
3
+ * Display Font Awesome 6 Pro icons. Supports Solid, Regular, Light, Duotone, Thin, Brands, and Sharp styles
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 BrickIconDef {
17
21
  /*
@@ -57,9 +61,9 @@ Default property:
57
61
  }
58
62
  outlets?: {
59
63
  /* Brick is pressing */
60
- brickPressing?: () => Data
64
+ brickPressing?: () => Data<boolean>
61
65
  /* Brick is focusing (Use TV Device with controller) */
62
- brickFocusing?: () => Data
66
+ brickFocusing?: () => Data<boolean>
63
67
  }
64
68
  animation?: AnimationBasicEvents & {
65
69
  onPress?: Animation
@@ -71,11 +75,11 @@ Default property:
71
75
  }
72
76
  }
73
77
 
74
- /* Icon brick */
78
+ /* Display Font Awesome 6 Pro icons. Supports Solid, Regular, Light, Duotone, Thin, Brands, and Sharp styles */
75
79
  export type BrickIcon = Brick &
76
80
  BrickIconDef & {
77
81
  templateKey: 'BRICK_ICON'
78
- switches: Array<
82
+ switches?: Array<
79
83
  SwitchDef &
80
84
  BrickIconDef & {
81
85
  conds?: Array<{
@@ -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,11 +91,11 @@ 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'
94
- switches: Array<
98
+ switches?: Array<
95
99
  SwitchDef &
96
100
  BrickImageDef & {
97
101
  conds?: Array<{
@@ -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,11 +447,11 @@ 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'
440
- switches: Array<
454
+ switches?: Array<
441
455
  SwitchDef &
442
456
  BrickItemsDef & {
443
457
  conds?: Array<{
@@ -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,11 +145,11 @@ 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'
144
- switches: Array<
152
+ switches?: Array<
145
153
  SwitchDef &
146
154
  BrickLottieDef & {
147
155
  conds?: Array<{
@@ -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,11 +239,11 @@ 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'
238
- switches: Array<
246
+ switches?: Array<
239
247
  SwitchDef &
240
248
  BrickMapsDef & {
241
249
  conds?: Array<{
@@ -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,11 +94,11 @@ 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'
97
- switches: Array<
101
+ switches?: Array<
98
102
  SwitchDef &
99
103
  BrickQrcodeDef & {
100
104
  conds?: Array<{
@@ -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,11 +127,11 @@ 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'
95
- switches: Array<
134
+ switches?: Array<
96
135
  SwitchDef &
97
136
  BrickRectDef & {
98
137
  conds?: Array<{
@@ -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,11 +105,11 @@ 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'
108
- switches: Array<
112
+ switches?: Array<
109
113
  SwitchDef &
110
114
  BrickRichTextDef & {
111
115
  conds?: Array<{
@@ -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,11 +197,11 @@ 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'
194
- switches: Array<
204
+ switches?: Array<
195
205
  SwitchDef &
196
206
  BrickRiveDef & {
197
207
  conds?: Array<{
@@ -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,11 +178,11 @@ 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'
175
- switches: Array<
185
+ switches?: Array<
176
186
  SwitchDef &
177
187
  BrickSlideshowDef & {
178
188
  conds?: Array<{
@@ -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
@@ -76,7 +80,7 @@ Default property:
76
80
  export type BrickSvg = Brick &
77
81
  BrickSvgDef & {
78
82
  templateKey: 'BRICK_SVG'
79
- switches: Array<
83
+ switches?: Array<
80
84
  SwitchDef &
81
85
  BrickSvgDef & {
82
86
  conds?: Array<{