@fugood/bricks-project 2.24.0-beta.36 → 2.24.0-beta.37

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 (81) hide show
  1. package/compile/index.ts +14 -6
  2. package/package.json +2 -2
  3. package/types/bricks/Camera.ts +10 -5
  4. package/types/bricks/Chart.ts +5 -2
  5. package/types/bricks/GenerativeMedia.ts +20 -7
  6. package/types/bricks/Icon.ts +1 -0
  7. package/types/bricks/Image.ts +2 -1
  8. package/types/bricks/Items.ts +17 -6
  9. package/types/bricks/Lottie.ts +7 -2
  10. package/types/bricks/Maps.ts +8 -3
  11. package/types/bricks/QrCode.ts +1 -0
  12. package/types/bricks/Rect.ts +1 -0
  13. package/types/bricks/RichText.ts +1 -0
  14. package/types/bricks/Rive.ts +15 -8
  15. package/types/bricks/Slideshow.ts +12 -5
  16. package/types/bricks/Svg.ts +1 -0
  17. package/types/bricks/Text.ts +1 -0
  18. package/types/bricks/TextInput.ts +8 -5
  19. package/types/bricks/Video.ts +3 -2
  20. package/types/bricks/VideoStreaming.ts +1 -0
  21. package/types/bricks/WebRtcStream.ts +1 -0
  22. package/types/bricks/WebView.ts +4 -3
  23. package/types/common.ts +10 -8
  24. package/types/generators/AlarmClock.ts +7 -4
  25. package/types/generators/Assistant.ts +7 -4
  26. package/types/generators/BleCentral.ts +14 -5
  27. package/types/generators/BlePeripheral.ts +1 -0
  28. package/types/generators/CanvasMap.ts +2 -1
  29. package/types/generators/CastlesPay.ts +7 -2
  30. package/types/generators/DataBank.ts +8 -3
  31. package/types/generators/File.ts +41 -14
  32. package/types/generators/GraphQl.ts +4 -1
  33. package/types/generators/Http.ts +1 -0
  34. package/types/generators/HttpServer.ts +9 -4
  35. package/types/generators/Information.ts +2 -1
  36. package/types/generators/Intent.ts +3 -2
  37. package/types/generators/Iterator.ts +5 -4
  38. package/types/generators/Keyboard.ts +4 -3
  39. package/types/generators/LlmAnthropicCompat.ts +11 -4
  40. package/types/generators/LlmAppleBuiltin.ts +8 -3
  41. package/types/generators/LlmGgml.ts +12 -5
  42. package/types/generators/LlmMediaTekNeuroPilot.ts +11 -4
  43. package/types/generators/LlmMlx.ts +11 -4
  44. package/types/generators/LlmOnnx.ts +11 -4
  45. package/types/generators/LlmOpenAiCompat.ts +11 -4
  46. package/types/generators/LlmQualcommAiEngine.ts +9 -4
  47. package/types/generators/Mcp.ts +38 -15
  48. package/types/generators/McpServer.ts +15 -6
  49. package/types/generators/MediaFlow.ts +8 -3
  50. package/types/generators/MqttBroker.ts +14 -5
  51. package/types/generators/MqttClient.ts +3 -2
  52. package/types/generators/Question.ts +2 -1
  53. package/types/generators/RealtimeTranscription.ts +22 -7
  54. package/types/generators/RerankerGgml.ts +5 -2
  55. package/types/generators/SerialPort.ts +7 -2
  56. package/types/generators/SoundPlayer.ts +4 -1
  57. package/types/generators/SoundRecorder.ts +3 -2
  58. package/types/generators/SpeechToTextGgml.ts +8 -3
  59. package/types/generators/SpeechToTextOnnx.ts +5 -2
  60. package/types/generators/SpeechToTextPlatform.ts +7 -2
  61. package/types/generators/SqLite.ts +5 -2
  62. package/types/generators/Step.ts +2 -1
  63. package/types/generators/SttAppleBuiltin.ts +5 -2
  64. package/types/generators/Tcp.ts +3 -2
  65. package/types/generators/TcpServer.ts +8 -5
  66. package/types/generators/TextToSpeechAppleBuiltin.ts +5 -2
  67. package/types/generators/TextToSpeechGgml.ts +5 -2
  68. package/types/generators/TextToSpeechOnnx.ts +5 -2
  69. package/types/generators/TextToSpeechOpenAiLike.ts +5 -2
  70. package/types/generators/ThermalPrinter.ts +2 -1
  71. package/types/generators/Tick.ts +3 -2
  72. package/types/generators/Udp.ts +3 -2
  73. package/types/generators/VadGgml.ts +8 -3
  74. package/types/generators/VadOnnx.ts +6 -3
  75. package/types/generators/VadTraditional.ts +8 -3
  76. package/types/generators/VectorStore.ts +2 -1
  77. package/types/generators/Watchdog.ts +3 -2
  78. package/types/generators/WebCrawler.ts +1 -0
  79. package/types/generators/WebRtc.ts +8 -3
  80. package/types/generators/WebSocket.ts +2 -1
  81. package/utils/event-props.ts +833 -1059
@@ -13,6 +13,7 @@ import type {
13
13
  Action,
14
14
  EventProperty,
15
15
  } from '../common'
16
+ import type { TemplateEventPropsMap } from '../../utils/event-props'
16
17
 
17
18
  /* Init thermal printer connection */
18
19
  export type GeneratorThermalPrinterActionInit = Action & {
@@ -153,7 +154,7 @@ Default property:
153
154
  }
154
155
  events?: {
155
156
  /* Event of connection error */
156
- onError?: Array<EventAction>
157
+ onError?: Array<EventAction<string & keyof TemplateEventPropsMap['ThermalPrinter']['onError']>>
157
158
  }
158
159
  outlets?: {
159
160
  /* Is thermal printer initialized */
@@ -13,6 +13,7 @@ import type {
13
13
  Action,
14
14
  EventProperty,
15
15
  } from '../common'
16
+ import type { TemplateEventPropsMap } from '../../utils/event-props'
16
17
 
17
18
  /* Start the tick */
18
19
  export type GeneratorTickAction_ = Action & {
@@ -47,9 +48,9 @@ Default property:
47
48
  }
48
49
  events?: {
49
50
  /* Event for each tick start */
50
- ticking?: Array<EventAction>
51
+ ticking?: Array<EventAction<string & keyof TemplateEventPropsMap['Tick']['ticking']>>
51
52
  /* Event for tick completed */
52
- completed?: Array<EventAction>
53
+ completed?: Array<EventAction<string & keyof TemplateEventPropsMap['Tick']['completed']>>
53
54
  }
54
55
  outlets?: {
55
56
  /* Countdown step value */
@@ -13,6 +13,7 @@ import type {
13
13
  Action,
14
14
  EventProperty,
15
15
  } from '../common'
16
+ import type { TemplateEventPropsMap } from '../../utils/event-props'
16
17
 
17
18
  /* Bind UDP port */
18
19
  export type GeneratorUDPActionBind = Action & {
@@ -75,11 +76,11 @@ Default property:
75
76
  /* Event of UDP port is binded */
76
77
  onReady?: Array<EventAction>
77
78
  /* Event of receive data */
78
- onData?: Array<EventAction>
79
+ onData?: Array<EventAction<string & keyof TemplateEventPropsMap['Udp']['onData']>>
79
80
  /* Event of socket closeed */
80
81
  onClose?: Array<EventAction>
81
82
  /* Event of socket error */
82
- onError?: Array<EventAction>
83
+ onError?: Array<EventAction<string & keyof TemplateEventPropsMap['Udp']['onError']>>
83
84
  }
84
85
  outlets?: {
85
86
  /* Local UDP binded port */
@@ -13,6 +13,7 @@ import type {
13
13
  Action,
14
14
  EventProperty,
15
15
  } from '../common'
16
+ import type { TemplateEventPropsMap } from '../../utils/event-props'
16
17
 
17
18
  /* Load the model */
18
19
  export type GeneratorVadInferenceActionLoadModel = Action & {
@@ -168,11 +169,15 @@ Default property:
168
169
  }
169
170
  events?: {
170
171
  /* Event triggered when context state changes */
171
- onContextStateChange?: Array<EventAction>
172
+ onContextStateChange?: Array<
173
+ EventAction<string & keyof TemplateEventPropsMap['VadInference']['onContextStateChange']>
174
+ >
172
175
  /* Event triggered when error occurs */
173
- onError?: Array<EventAction>
176
+ onError?: Array<EventAction<string & keyof TemplateEventPropsMap['VadInference']['onError']>>
174
177
  /* Event triggered when got detection result */
175
- onDetected?: Array<EventAction>
178
+ onDetected?: Array<
179
+ EventAction<string & keyof TemplateEventPropsMap['VadInference']['onDetected']>
180
+ >
176
181
  }
177
182
  outlets?: {
178
183
  /* Context state */
@@ -14,6 +14,7 @@ import type {
14
14
  Action,
15
15
  EventProperty,
16
16
  } from '../common'
17
+ import type { TemplateEventPropsMap } from '../../utils/event-props'
17
18
 
18
19
  /* Load the model */
19
20
  export type GeneratorVadInferenceOnnxActionLoadModel = Action & {
@@ -163,11 +164,13 @@ Default property:
163
164
  }
164
165
  events?: {
165
166
  /* Event triggered when context state changes */
166
- onContextStateChange?: Array<EventAction>
167
+ onContextStateChange?: Array<
168
+ EventAction<string & keyof TemplateEventPropsMap['OnnxVad']['onContextStateChange']>
169
+ >
167
170
  /* Event triggered when error occurs */
168
- onError?: Array<EventAction>
171
+ onError?: Array<EventAction<string & keyof TemplateEventPropsMap['OnnxVad']['onError']>>
169
172
  /* Event triggered when got detection result */
170
- onDetected?: Array<EventAction>
173
+ onDetected?: Array<EventAction<string & keyof TemplateEventPropsMap['OnnxVad']['onDetected']>>
171
174
  }
172
175
  outlets?: {
173
176
  /* Context state */
@@ -14,6 +14,7 @@ import type {
14
14
  Action,
15
15
  EventProperty,
16
16
  } from '../common'
17
+ import type { TemplateEventPropsMap } from '../../utils/event-props'
17
18
 
18
19
  /* Detect speech in audio file */
19
20
  export type GeneratorVadInferenceTraditionalActionDetectFile = ActionWithParams & {
@@ -72,11 +73,15 @@ Default property:
72
73
  }
73
74
  events?: {
74
75
  /* Event triggered when context state changes */
75
- onContextStateChange?: Array<EventAction>
76
+ onContextStateChange?: Array<
77
+ EventAction<string & keyof TemplateEventPropsMap['TraditionalVad']['onContextStateChange']>
78
+ >
76
79
  /* Event triggered when detection result is available */
77
- onDetected?: Array<EventAction>
80
+ onDetected?: Array<
81
+ EventAction<string & keyof TemplateEventPropsMap['TraditionalVad']['onDetected']>
82
+ >
78
83
  /* Event triggered when error occurs */
79
- onError?: Array<EventAction>
84
+ onError?: Array<EventAction<string & keyof TemplateEventPropsMap['TraditionalVad']['onError']>>
80
85
  }
81
86
  outlets?: {
82
87
  /* Context state */
@@ -13,6 +13,7 @@ import type {
13
13
  Action,
14
14
  EventProperty,
15
15
  } from '../common'
16
+ import type { TemplateEventPropsMap } from '../../utils/event-props'
16
17
 
17
18
  /* Load the model (Only if source is ggml) */
18
19
  export type GeneratorVectorStoreActionModelLoad = Action & {
@@ -200,7 +201,7 @@ Default property:
200
201
  }
201
202
  events?: {
202
203
  /* Event triggered when error occurs */
203
- onError?: Array<EventAction>
204
+ onError?: Array<EventAction<string & keyof TemplateEventPropsMap['VectorStore']['onError']>>
204
205
  }
205
206
  outlets?: {
206
207
  /* undefined */
@@ -13,6 +13,7 @@ import type {
13
13
  Action,
14
14
  EventProperty,
15
15
  } from '../common'
16
+ import type { TemplateEventPropsMap } from '../../utils/event-props'
16
17
 
17
18
  /* Reset watch */
18
19
  export type GeneratorWatchdogActionResetWatch = Action & {
@@ -55,9 +56,9 @@ Default property:
55
56
  }
56
57
  events?: {
57
58
  /* Event on specific sender id trigger event */
58
- onEvent?: Array<EventAction>
59
+ onEvent?: Array<EventAction<string & keyof TemplateEventPropsMap['Watchdog']['onEvent']>>
59
60
  /* Event on timeout */
60
- onTimeout?: Array<EventAction>
61
+ onTimeout?: Array<EventAction<string & keyof TemplateEventPropsMap['Watchdog']['onTimeout']>>
61
62
  }
62
63
  outlets?: {
63
64
  /* The last event */
@@ -13,6 +13,7 @@ import type {
13
13
  Action,
14
14
  EventProperty,
15
15
  } from '../common'
16
+ import type { TemplateEventPropsMap } from '../../utils/event-props'
16
17
 
17
18
  /* Run Crawler request with defined properties */
18
19
  export type GeneratorWebCrawlerActionRunRequest = Action & {
@@ -13,6 +13,7 @@ import type {
13
13
  Action,
14
14
  EventProperty,
15
15
  } from '../common'
16
+ import type { TemplateEventPropsMap } from '../../utils/event-props'
16
17
 
17
18
  /* Initiate WebRTC request */
18
19
  export type GeneratorWebRTCActionInitiate = Action & {
@@ -105,19 +106,23 @@ Default property:
105
106
  }
106
107
  events?: {
107
108
  /* Event of signal update */
108
- onSignalUpdate?: Array<EventAction>
109
+ onSignalUpdate?: Array<
110
+ EventAction<string & keyof TemplateEventPropsMap['Webrtc']['onSignalUpdate']>
111
+ >
109
112
  /* Event of peer connected */
110
113
  onConnected?: Array<EventAction>
111
114
  /* Event of peer disconnected */
112
115
  onDisconnected?: Array<EventAction>
113
116
  /* Event of handshake error */
114
- onError?: Array<EventAction>
117
+ onError?: Array<EventAction<string & keyof TemplateEventPropsMap['Webrtc']['onError']>>
115
118
  /* Event of data channel open */
116
119
  onChannelOpen?: Array<EventAction>
117
120
  /* Event of data channel close */
118
121
  onChannelClose?: Array<EventAction>
119
122
  /* Event of received message on data channel */
120
- onChannelMessage?: Array<EventAction>
123
+ onChannelMessage?: Array<
124
+ EventAction<string & keyof TemplateEventPropsMap['Webrtc']['onChannelMessage']>
125
+ >
121
126
  }
122
127
  outlets?: {
123
128
  /* Signal to create peer connection */
@@ -13,6 +13,7 @@ import type {
13
13
  Action,
14
14
  EventProperty,
15
15
  } from '../common'
16
+ import type { TemplateEventPropsMap } from '../../utils/event-props'
16
17
 
17
18
  /* Connect */
18
19
  export type GeneratorWebSocketActionConnect = Action & {
@@ -108,7 +109,7 @@ Default property:
108
109
  /* Event for disconnect from server */
109
110
  onClose?: Array<EventAction>
110
111
  /* Event for receive message */
111
- onMessage?: Array<EventAction>
112
+ onMessage?: Array<EventAction<string & keyof TemplateEventPropsMap['WebSocket']['onMessage']>>
112
113
  /* Event for error occurred */
113
114
  onError?: Array<EventAction>
114
115
  }