@fugood/bricks-project 2.23.0-beta.9 → 2.23.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/instance.ts +37 -5
- package/compile/action-name-map.ts +107 -0
- package/compile/index.ts +172 -66
- package/compile/util.ts +13 -4
- package/package.json +9 -5
- package/skills/bricks-project/SKILL.md +32 -0
- package/skills/bricks-project/rules/animation.md +159 -0
- package/skills/bricks-project/rules/architecture-patterns.md +62 -0
- package/skills/bricks-project/rules/automations.md +221 -0
- package/skills/bricks-project/rules/buttress.md +153 -0
- package/skills/bricks-project/rules/data-calculation.md +208 -0
- package/skills/bricks-project/rules/local-sync.md +129 -0
- package/skills/bricks-project/rules/media-flow.md +158 -0
- package/skills/bricks-project/rules/remote-data-bank.md +196 -0
- package/skills/bricks-project/rules/standby-transition.md +124 -0
- package/skills/rive-marketplace/SKILL.md +99 -0
- package/tools/deploy.ts +74 -12
- package/tools/icons/.gitattributes +1 -0
- package/tools/icons/fa6pro-glyphmap.json +4686 -0
- package/tools/icons/fa6pro-meta.json +26127 -0
- package/tools/mcp-server.ts +818 -9
- package/tools/postinstall.ts +75 -13
- package/tools/preview-main.mjs +54 -4
- package/tools/preview.ts +54 -7
- package/tools/pull.ts +37 -16
- package/types/automation.ts +232 -0
- package/types/brick-base.ts +1 -0
- package/types/bricks/Camera.ts +26 -10
- package/types/bricks/Chart.ts +1 -0
- package/types/bricks/GenerativeMedia.ts +21 -3
- package/types/bricks/Icon.ts +1 -0
- package/types/bricks/Image.ts +6 -0
- package/types/bricks/Items.ts +1 -0
- package/types/bricks/Lottie.ts +1 -0
- package/types/bricks/Maps.ts +254 -0
- package/types/bricks/QrCode.ts +1 -0
- package/types/bricks/Rect.ts +1 -0
- package/types/bricks/RichText.ts +1 -0
- package/types/bricks/Rive.ts +1 -0
- package/types/bricks/Slideshow.ts +1 -0
- package/types/bricks/Svg.ts +1 -0
- package/types/bricks/Text.ts +1 -0
- package/types/bricks/TextInput.ts +1 -0
- package/types/bricks/Video.ts +1 -0
- package/types/bricks/VideoStreaming.ts +1 -0
- package/types/bricks/WebRtcStream.ts +1 -0
- package/types/bricks/WebView.ts +8 -1
- package/types/bricks/index.ts +2 -0
- package/types/canvas.ts +1 -0
- package/types/common.ts +2 -0
- package/types/data-calc-command.ts +7003 -0
- package/types/data-calc-script.ts +21 -0
- package/types/data-calc.ts +3 -6977
- package/types/data.ts +3 -0
- package/types/generators/AlarmClock.ts +2 -0
- package/types/generators/Assistant.ts +30 -6
- package/types/generators/BleCentral.ts +2 -0
- package/types/generators/BlePeripheral.ts +2 -0
- package/types/generators/CanvasMap.ts +2 -0
- package/types/generators/CastlesPay.ts +2 -0
- package/types/generators/DataBank.ts +2 -0
- package/types/generators/File.ts +2 -0
- package/types/generators/GraphQl.ts +2 -0
- package/types/generators/Http.ts +84 -2
- package/types/generators/HttpServer.ts +5 -1
- package/types/generators/Information.ts +2 -0
- package/types/generators/Intent.ts +51 -0
- package/types/generators/Iterator.ts +11 -2
- package/types/generators/Keyboard.ts +2 -0
- package/types/generators/LlmAnthropicCompat.ts +2 -0
- package/types/generators/LlmAppleBuiltin.ts +144 -0
- package/types/generators/LlmGgml.ts +28 -4
- package/types/generators/LlmOnnx.ts +2 -0
- package/types/generators/LlmOpenAiCompat.ts +2 -0
- package/types/generators/LlmQualcommAiEngine.ts +2 -0
- package/types/generators/Mcp.ts +6 -4
- package/types/generators/McpServer.ts +8 -6
- package/types/generators/MediaFlow.ts +2 -0
- package/types/generators/MqttBroker.ts +2 -0
- package/types/generators/MqttClient.ts +2 -0
- package/types/generators/Question.ts +9 -0
- package/types/generators/RealtimeTranscription.ts +18 -8
- package/types/generators/RerankerGgml.ts +23 -16
- package/types/generators/SerialPort.ts +2 -0
- package/types/generators/SoundPlayer.ts +2 -0
- package/types/generators/SoundRecorder.ts +2 -0
- package/types/generators/SpeechToTextGgml.ts +19 -4
- package/types/generators/SpeechToTextOnnx.ts +2 -0
- package/types/generators/SpeechToTextPlatform.ts +2 -0
- package/types/generators/SqLite.ts +32 -1
- package/types/generators/Step.ts +2 -0
- package/types/generators/SttAppleBuiltin.ts +117 -0
- package/types/generators/Tcp.ts +2 -0
- package/types/generators/TcpServer.ts +5 -1
- package/types/generators/TextToSpeechApple.ts +113 -0
- package/types/generators/TextToSpeechAppleBuiltin.ts +114 -0
- package/types/generators/TextToSpeechGgml.ts +24 -3
- package/types/generators/TextToSpeechOnnx.ts +2 -0
- package/types/generators/TextToSpeechOpenAiLike.ts +2 -0
- package/types/generators/ThermalPrinter.ts +2 -0
- package/types/generators/Tick.ts +5 -1
- package/types/generators/TtsAppleBuiltin.ts +105 -0
- package/types/generators/Udp.ts +2 -0
- package/types/generators/VadGgml.ts +4 -2
- package/types/generators/VadOnnx.ts +201 -0
- package/types/generators/VadTraditional.ts +123 -0
- package/types/generators/VectorStore.ts +15 -2
- package/types/generators/Watchdog.ts +2 -0
- package/types/generators/WebCrawler.ts +2 -0
- package/types/generators/WebRtc.ts +4 -2
- package/types/generators/WebSocket.ts +2 -0
- package/types/generators/index.ts +5 -0
- package/types/index.ts +3 -0
- package/types/system.ts +48 -6
- package/utils/calc.ts +15 -9
- package/utils/data.ts +1 -0
- package/utils/event-props.ts +112 -2
- package/utils/id.ts +3 -1
package/utils/event-props.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* Auto generated by build script */
|
|
1
2
|
export const templateEventPropsMap = {
|
|
2
3
|
BRICK_RECT: {},
|
|
3
4
|
BRICK_TEXT: {},
|
|
@@ -209,6 +210,25 @@ export const templateEventPropsMap = {
|
|
|
209
210
|
'BRICK_GENERATIVE_MEDIA_ERROR', // type: string
|
|
210
211
|
],
|
|
211
212
|
},
|
|
213
|
+
BRICK_MAPS: {
|
|
214
|
+
onMarkerPress: [
|
|
215
|
+
'BRICK_MAPS_MARKER_ID', // type: string
|
|
216
|
+
'BRICK_MAPS_MARKER_TITLE', // type: string
|
|
217
|
+
'BRICK_MAPS_MARKER_DESCRIPTION', // type: string
|
|
218
|
+
'BRICK_MAPS_MARKER_LATITUDE', // type: number
|
|
219
|
+
'BRICK_MAPS_MARKER_LONGITUDE', // type: number
|
|
220
|
+
],
|
|
221
|
+
onMapPress: [
|
|
222
|
+
'BRICK_MAPS_PRESS_LATITUDE', // type: number
|
|
223
|
+
'BRICK_MAPS_PRESS_LONGITUDE', // type: number
|
|
224
|
+
],
|
|
225
|
+
onRegionChange: [
|
|
226
|
+
'BRICK_MAPS_REGION_LATITUDE', // type: number
|
|
227
|
+
'BRICK_MAPS_REGION_LONGITUDE', // type: number
|
|
228
|
+
'BRICK_MAPS_REGION_LATITUDE_DELTA', // type: number
|
|
229
|
+
'BRICK_MAPS_REGION_LONGITUDE_DELTA', // type: number
|
|
230
|
+
],
|
|
231
|
+
},
|
|
212
232
|
GENERATOR_TICK: {
|
|
213
233
|
ticking: [
|
|
214
234
|
'GENERATOR_TICK_COUNTDOWN', // type: number
|
|
@@ -396,7 +416,21 @@ export const templateEventPropsMap = {
|
|
|
396
416
|
iterate: [
|
|
397
417
|
'GENERATOR_ITERATOR_ITERATE_VALUE', // type: any
|
|
398
418
|
'GENERATOR_ITERATOR_ITERATE_KEY', // type: any
|
|
399
|
-
'GENERATOR_ITERATOR_ITERATE_INDEX', // type:
|
|
419
|
+
'GENERATOR_ITERATOR_ITERATE_INDEX', // type: number
|
|
420
|
+
],
|
|
421
|
+
first: [
|
|
422
|
+
'GENERATOR_ITERATOR_ITERATE_VALUE', // type: any
|
|
423
|
+
'GENERATOR_ITERATOR_ITERATE_KEY', // type: any
|
|
424
|
+
'GENERATOR_ITERATOR_ITERATE_INDEX', // type: number
|
|
425
|
+
],
|
|
426
|
+
end: [
|
|
427
|
+
'GENERATOR_ITERATOR_ITERATE_VALUE', // type: any
|
|
428
|
+
'GENERATOR_ITERATOR_ITERATE_KEY', // type: any
|
|
429
|
+
'GENERATOR_ITERATOR_ITERATE_INDEX', // type: number
|
|
430
|
+
],
|
|
431
|
+
error: [
|
|
432
|
+
'GENERATOR_ITERATOR_ERROR_MESSAGE', // type: string
|
|
433
|
+
'GENERATOR_ITERATOR_ERROR_DATA', // type: any
|
|
400
434
|
],
|
|
401
435
|
},
|
|
402
436
|
GENERATOR_WATCHDOG: {
|
|
@@ -699,6 +733,18 @@ export const templateEventPropsMap = {
|
|
|
699
733
|
'GENERATOR_MCP_ERROR_MESSAGE', // type: string
|
|
700
734
|
],
|
|
701
735
|
},
|
|
736
|
+
GENERATOR_TRADITIONAL_VAD: {
|
|
737
|
+
onContextStateChange: [
|
|
738
|
+
'GENERATOR_TRADITIONAL_VAD_CONTEXT_STATE', // type: string
|
|
739
|
+
],
|
|
740
|
+
onDetected: [
|
|
741
|
+
'GENERATOR_TRADITIONAL_VAD_DETECTION_SEGMENTS', // type: array
|
|
742
|
+
'GENERATOR_TRADITIONAL_VAD_DETECTION_TIME', // type: number
|
|
743
|
+
],
|
|
744
|
+
onError: [
|
|
745
|
+
'GENERATOR_TRADITIONAL_VAD_ERROR', // type: string
|
|
746
|
+
],
|
|
747
|
+
},
|
|
702
748
|
GENERATOR_TTS: {
|
|
703
749
|
onContextStateChange: [
|
|
704
750
|
'GENERATOR_TTS_CONTEXT_STATE', // type: string
|
|
@@ -733,6 +779,18 @@ export const templateEventPropsMap = {
|
|
|
733
779
|
'GENERATOR_ONNX_STT_ERROR', // type: string
|
|
734
780
|
],
|
|
735
781
|
},
|
|
782
|
+
GENERATOR_ONNX_VAD: {
|
|
783
|
+
onContextStateChange: [
|
|
784
|
+
'GENERATOR_ONNX_VAD_CONTEXT_STATE', // type: string
|
|
785
|
+
],
|
|
786
|
+
onError: [
|
|
787
|
+
'GENERATOR_ONNX_VAD_ERROR', // type: string
|
|
788
|
+
],
|
|
789
|
+
onDetected: [
|
|
790
|
+
'GENERATOR_ONNX_VAD_DETECTION_SEGMENTS', // type: array
|
|
791
|
+
'GENERATOR_ONNX_VAD_DETECTION_TIME', // type: number
|
|
792
|
+
],
|
|
793
|
+
},
|
|
736
794
|
GENERATOR_SPEECH_INFERENCE: {
|
|
737
795
|
onContextStateChange: [
|
|
738
796
|
'GENERATOR_SPEECH_INFERENCE_CONTEXT_STATE', // type: string
|
|
@@ -789,6 +847,9 @@ export const templateEventPropsMap = {
|
|
|
789
847
|
'GENERATOR_REALTIME_TRANSCRIPTION_STATS_TIMESTAMP', // type: number
|
|
790
848
|
'GENERATOR_REALTIME_TRANSCRIPTION_STATS', // type: object
|
|
791
849
|
],
|
|
850
|
+
onStabilized: [
|
|
851
|
+
'GENERATOR_REALTIME_TRANSCRIPTION_STABILIZED_TEXT', // type: string
|
|
852
|
+
],
|
|
792
853
|
onEnd: [
|
|
793
854
|
'GENERATOR_REALTIME_TRANSCRIPTION_END_RESULTS', // type: array
|
|
794
855
|
'GENERATOR_REALTIME_TRANSCRIPTION_END_AUDIO_OUTPUT_PATH', // type: string
|
|
@@ -835,7 +896,15 @@ export const templateEventPropsMap = {
|
|
|
835
896
|
'GENERATOR_GGML_TTS_ERROR', // type: string
|
|
836
897
|
],
|
|
837
898
|
},
|
|
838
|
-
GENERATOR_RERANKER: {
|
|
899
|
+
GENERATOR_RERANKER: {
|
|
900
|
+
onContextStateChange: [
|
|
901
|
+
'GENERATOR_RERANKER_CONTEXT_STATE', // type: string
|
|
902
|
+
'GENERATOR_RERANKER_CONTEXT_DETAILS', // type: object
|
|
903
|
+
],
|
|
904
|
+
onError: [
|
|
905
|
+
'GENERATOR_RERANKER_ERROR', // type: string
|
|
906
|
+
],
|
|
907
|
+
},
|
|
839
908
|
GENERATOR_QNN_LLM: {
|
|
840
909
|
onContextStateChange: [
|
|
841
910
|
'GENERATOR_QNN_LLM_CONTEXT_STATE', // type: string
|
|
@@ -896,6 +965,38 @@ export const templateEventPropsMap = {
|
|
|
896
965
|
'GENERATOR_ANTHROPIC_LLM_TOOL_USE_INPUT', // type: object
|
|
897
966
|
],
|
|
898
967
|
},
|
|
968
|
+
GENERATOR_APPLE_LLM: {
|
|
969
|
+
onError: [
|
|
970
|
+
'GENERATOR_APPLE_LLM_ERROR', // type: string
|
|
971
|
+
],
|
|
972
|
+
onModelLoaded: [],
|
|
973
|
+
onCompletion: [
|
|
974
|
+
'GENERATOR_APPLE_LLM_COMPLETION_TOKEN', // type: string
|
|
975
|
+
'GENERATOR_APPLE_LLM_COMPLETION_RESULT', // type: string
|
|
976
|
+
],
|
|
977
|
+
onCompletionFinished: [
|
|
978
|
+
'GENERATOR_APPLE_LLM_COMPLETION_RESULT', // type: string
|
|
979
|
+
],
|
|
980
|
+
},
|
|
981
|
+
GENERATOR_APPLE_STT: {
|
|
982
|
+
onError: [
|
|
983
|
+
'GENERATOR_APPLE_STT_ERROR', // type: string
|
|
984
|
+
],
|
|
985
|
+
onTranscribed: [
|
|
986
|
+
'GENERATOR_APPLE_STT_TRANSCRIBE_RESULT', // type: string
|
|
987
|
+
'GENERATOR_APPLE_STT_TRANSCRIBE_START_TIME', // type: number
|
|
988
|
+
'GENERATOR_APPLE_STT_TRANSCRIBE_END_TIME', // type: number
|
|
989
|
+
'GENERATOR_APPLE_STT_TRANSCRIBE_TIME', // type: number
|
|
990
|
+
],
|
|
991
|
+
},
|
|
992
|
+
GENERATOR_APPLE_TTS: {
|
|
993
|
+
onContextStateChange: [
|
|
994
|
+
'GENERATOR_APPLE_TTS_CONTEXT_STATE', // type: string
|
|
995
|
+
],
|
|
996
|
+
onError: [
|
|
997
|
+
'GENERATOR_APPLE_TTS_ERROR', // type: string
|
|
998
|
+
],
|
|
999
|
+
},
|
|
899
1000
|
GENERATOR_ASSISTANT: {
|
|
900
1001
|
onError: [
|
|
901
1002
|
'GENERATOR_ASSISTANT_ERROR', // type: string
|
|
@@ -906,6 +1007,15 @@ export const templateEventPropsMap = {
|
|
|
906
1007
|
onMessagesUpdate: [
|
|
907
1008
|
'GENERATOR_ASSISTANT_MESSAGES', // type: array
|
|
908
1009
|
],
|
|
1010
|
+
onHeatupFinished: [],
|
|
1011
|
+
onGenerating: [],
|
|
1012
|
+
onFinished: [
|
|
1013
|
+
'GENERATOR_ASSISTANT_MESSAGES', // type: array
|
|
1014
|
+
'GENERATOR_ASSISTANT_LAST_MESSAGE', // type: object
|
|
1015
|
+
'GENERATOR_ASSISTANT_IS_ERROR', // type: bool
|
|
1016
|
+
'GENERATOR_ASSISTANT_FINISH_REASON', // type: string
|
|
1017
|
+
'GENERATOR_ASSISTANT_TRANSFORMED_MESSAGES', // type: array
|
|
1018
|
+
],
|
|
909
1019
|
},
|
|
910
1020
|
GENERATOR_VECTOR_STORE: {
|
|
911
1021
|
onError: [
|
package/utils/id.ts
CHANGED
|
@@ -4,7 +4,9 @@ let count = 0
|
|
|
4
4
|
|
|
5
5
|
// Used for snapshot mode
|
|
6
6
|
const countUUID = () => {
|
|
7
|
-
|
|
7
|
+
const current = count
|
|
8
|
+
count += 1
|
|
9
|
+
return `00000000-0000-0000-0000-${current.toString().padStart(12, '0')}`
|
|
8
10
|
}
|
|
9
11
|
|
|
10
12
|
// Make a random id if not want to use fixed id
|