@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.
Files changed (118) hide show
  1. package/api/instance.ts +37 -5
  2. package/compile/action-name-map.ts +107 -0
  3. package/compile/index.ts +172 -66
  4. package/compile/util.ts +13 -4
  5. package/package.json +9 -5
  6. package/skills/bricks-project/SKILL.md +32 -0
  7. package/skills/bricks-project/rules/animation.md +159 -0
  8. package/skills/bricks-project/rules/architecture-patterns.md +62 -0
  9. package/skills/bricks-project/rules/automations.md +221 -0
  10. package/skills/bricks-project/rules/buttress.md +153 -0
  11. package/skills/bricks-project/rules/data-calculation.md +208 -0
  12. package/skills/bricks-project/rules/local-sync.md +129 -0
  13. package/skills/bricks-project/rules/media-flow.md +158 -0
  14. package/skills/bricks-project/rules/remote-data-bank.md +196 -0
  15. package/skills/bricks-project/rules/standby-transition.md +124 -0
  16. package/skills/rive-marketplace/SKILL.md +99 -0
  17. package/tools/deploy.ts +74 -12
  18. package/tools/icons/.gitattributes +1 -0
  19. package/tools/icons/fa6pro-glyphmap.json +4686 -0
  20. package/tools/icons/fa6pro-meta.json +26127 -0
  21. package/tools/mcp-server.ts +818 -9
  22. package/tools/postinstall.ts +75 -13
  23. package/tools/preview-main.mjs +54 -4
  24. package/tools/preview.ts +54 -7
  25. package/tools/pull.ts +37 -16
  26. package/types/automation.ts +232 -0
  27. package/types/brick-base.ts +1 -0
  28. package/types/bricks/Camera.ts +26 -10
  29. package/types/bricks/Chart.ts +1 -0
  30. package/types/bricks/GenerativeMedia.ts +21 -3
  31. package/types/bricks/Icon.ts +1 -0
  32. package/types/bricks/Image.ts +6 -0
  33. package/types/bricks/Items.ts +1 -0
  34. package/types/bricks/Lottie.ts +1 -0
  35. package/types/bricks/Maps.ts +254 -0
  36. package/types/bricks/QrCode.ts +1 -0
  37. package/types/bricks/Rect.ts +1 -0
  38. package/types/bricks/RichText.ts +1 -0
  39. package/types/bricks/Rive.ts +1 -0
  40. package/types/bricks/Slideshow.ts +1 -0
  41. package/types/bricks/Svg.ts +1 -0
  42. package/types/bricks/Text.ts +1 -0
  43. package/types/bricks/TextInput.ts +1 -0
  44. package/types/bricks/Video.ts +1 -0
  45. package/types/bricks/VideoStreaming.ts +1 -0
  46. package/types/bricks/WebRtcStream.ts +1 -0
  47. package/types/bricks/WebView.ts +8 -1
  48. package/types/bricks/index.ts +2 -0
  49. package/types/canvas.ts +1 -0
  50. package/types/common.ts +2 -0
  51. package/types/data-calc-command.ts +7003 -0
  52. package/types/data-calc-script.ts +21 -0
  53. package/types/data-calc.ts +3 -6977
  54. package/types/data.ts +3 -0
  55. package/types/generators/AlarmClock.ts +2 -0
  56. package/types/generators/Assistant.ts +30 -6
  57. package/types/generators/BleCentral.ts +2 -0
  58. package/types/generators/BlePeripheral.ts +2 -0
  59. package/types/generators/CanvasMap.ts +2 -0
  60. package/types/generators/CastlesPay.ts +2 -0
  61. package/types/generators/DataBank.ts +2 -0
  62. package/types/generators/File.ts +2 -0
  63. package/types/generators/GraphQl.ts +2 -0
  64. package/types/generators/Http.ts +84 -2
  65. package/types/generators/HttpServer.ts +5 -1
  66. package/types/generators/Information.ts +2 -0
  67. package/types/generators/Intent.ts +51 -0
  68. package/types/generators/Iterator.ts +11 -2
  69. package/types/generators/Keyboard.ts +2 -0
  70. package/types/generators/LlmAnthropicCompat.ts +2 -0
  71. package/types/generators/LlmAppleBuiltin.ts +144 -0
  72. package/types/generators/LlmGgml.ts +28 -4
  73. package/types/generators/LlmOnnx.ts +2 -0
  74. package/types/generators/LlmOpenAiCompat.ts +2 -0
  75. package/types/generators/LlmQualcommAiEngine.ts +2 -0
  76. package/types/generators/Mcp.ts +6 -4
  77. package/types/generators/McpServer.ts +8 -6
  78. package/types/generators/MediaFlow.ts +2 -0
  79. package/types/generators/MqttBroker.ts +2 -0
  80. package/types/generators/MqttClient.ts +2 -0
  81. package/types/generators/Question.ts +9 -0
  82. package/types/generators/RealtimeTranscription.ts +18 -8
  83. package/types/generators/RerankerGgml.ts +23 -16
  84. package/types/generators/SerialPort.ts +2 -0
  85. package/types/generators/SoundPlayer.ts +2 -0
  86. package/types/generators/SoundRecorder.ts +2 -0
  87. package/types/generators/SpeechToTextGgml.ts +19 -4
  88. package/types/generators/SpeechToTextOnnx.ts +2 -0
  89. package/types/generators/SpeechToTextPlatform.ts +2 -0
  90. package/types/generators/SqLite.ts +32 -1
  91. package/types/generators/Step.ts +2 -0
  92. package/types/generators/SttAppleBuiltin.ts +117 -0
  93. package/types/generators/Tcp.ts +2 -0
  94. package/types/generators/TcpServer.ts +5 -1
  95. package/types/generators/TextToSpeechApple.ts +113 -0
  96. package/types/generators/TextToSpeechAppleBuiltin.ts +114 -0
  97. package/types/generators/TextToSpeechGgml.ts +24 -3
  98. package/types/generators/TextToSpeechOnnx.ts +2 -0
  99. package/types/generators/TextToSpeechOpenAiLike.ts +2 -0
  100. package/types/generators/ThermalPrinter.ts +2 -0
  101. package/types/generators/Tick.ts +5 -1
  102. package/types/generators/TtsAppleBuiltin.ts +105 -0
  103. package/types/generators/Udp.ts +2 -0
  104. package/types/generators/VadGgml.ts +4 -2
  105. package/types/generators/VadOnnx.ts +201 -0
  106. package/types/generators/VadTraditional.ts +123 -0
  107. package/types/generators/VectorStore.ts +15 -2
  108. package/types/generators/Watchdog.ts +2 -0
  109. package/types/generators/WebCrawler.ts +2 -0
  110. package/types/generators/WebRtc.ts +4 -2
  111. package/types/generators/WebSocket.ts +2 -0
  112. package/types/generators/index.ts +5 -0
  113. package/types/index.ts +3 -0
  114. package/types/system.ts +48 -6
  115. package/utils/calc.ts +15 -9
  116. package/utils/data.ts +1 -0
  117. package/utils/event-props.ts +112 -2
  118. package/utils/id.ts +3 -1
@@ -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: string
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
- return `00000000-0000-0000-0000-${(count++).toString().padStart(12, '0')}`
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