@fugood/bricks-ctor 2.24.0-beta.40

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 (129) hide show
  1. package/compile/action-name-map.ts +988 -0
  2. package/compile/index.ts +1245 -0
  3. package/compile/util.ts +358 -0
  4. package/index.ts +6 -0
  5. package/package.json +28 -0
  6. package/skills/bricks-design/LICENSE.txt +180 -0
  7. package/skills/bricks-design/SKILL.md +66 -0
  8. package/skills/bricks-project/SKILL.md +32 -0
  9. package/skills/bricks-project/rules/animation.md +159 -0
  10. package/skills/bricks-project/rules/architecture-patterns.md +69 -0
  11. package/skills/bricks-project/rules/automations.md +221 -0
  12. package/skills/bricks-project/rules/buttress.md +156 -0
  13. package/skills/bricks-project/rules/data-calculation.md +208 -0
  14. package/skills/bricks-project/rules/local-sync.md +129 -0
  15. package/skills/bricks-project/rules/media-flow.md +158 -0
  16. package/skills/bricks-project/rules/remote-data-bank.md +196 -0
  17. package/skills/bricks-project/rules/standby-transition.md +124 -0
  18. package/skills/rive-marketplace/SKILL.md +99 -0
  19. package/tools/deploy.ts +151 -0
  20. package/tools/icons/.gitattributes +1 -0
  21. package/tools/icons/fa6pro-glyphmap.json +4686 -0
  22. package/tools/icons/fa6pro-meta.json +3671 -0
  23. package/tools/mcp-server.ts +28 -0
  24. package/tools/mcp-tools/compile.ts +91 -0
  25. package/tools/mcp-tools/huggingface.ts +762 -0
  26. package/tools/mcp-tools/icons.ts +70 -0
  27. package/tools/mcp-tools/lottie.ts +102 -0
  28. package/tools/mcp-tools/media.ts +110 -0
  29. package/tools/postinstall.ts +229 -0
  30. package/tools/preview-main.mjs +293 -0
  31. package/tools/preview.ts +143 -0
  32. package/tools/pull.ts +116 -0
  33. package/tsconfig.json +16 -0
  34. package/types/animation.ts +100 -0
  35. package/types/automation.ts +235 -0
  36. package/types/brick-base.ts +80 -0
  37. package/types/bricks/Camera.ts +246 -0
  38. package/types/bricks/Chart.ts +372 -0
  39. package/types/bricks/GenerativeMedia.ts +276 -0
  40. package/types/bricks/Icon.ts +98 -0
  41. package/types/bricks/Image.ts +114 -0
  42. package/types/bricks/Items.ts +476 -0
  43. package/types/bricks/Lottie.ts +168 -0
  44. package/types/bricks/Maps.ts +262 -0
  45. package/types/bricks/QrCode.ts +117 -0
  46. package/types/bricks/Rect.ts +150 -0
  47. package/types/bricks/RichText.ts +128 -0
  48. package/types/bricks/Rive.ts +220 -0
  49. package/types/bricks/Slideshow.ts +201 -0
  50. package/types/bricks/Svg.ts +99 -0
  51. package/types/bricks/Text.ts +148 -0
  52. package/types/bricks/TextInput.ts +242 -0
  53. package/types/bricks/Video.ts +175 -0
  54. package/types/bricks/VideoStreaming.ts +112 -0
  55. package/types/bricks/WebRtcStream.ts +65 -0
  56. package/types/bricks/WebView.ts +168 -0
  57. package/types/bricks/index.ts +21 -0
  58. package/types/canvas.ts +82 -0
  59. package/types/common.ts +144 -0
  60. package/types/data-calc-command.ts +7005 -0
  61. package/types/data-calc-script.ts +21 -0
  62. package/types/data-calc.ts +11 -0
  63. package/types/data.ts +95 -0
  64. package/types/generators/AlarmClock.ts +110 -0
  65. package/types/generators/Assistant.ts +621 -0
  66. package/types/generators/BleCentral.ts +247 -0
  67. package/types/generators/BlePeripheral.ts +208 -0
  68. package/types/generators/CanvasMap.ts +74 -0
  69. package/types/generators/CastlesPay.ts +87 -0
  70. package/types/generators/DataBank.ts +160 -0
  71. package/types/generators/File.ts +432 -0
  72. package/types/generators/GraphQl.ts +132 -0
  73. package/types/generators/Http.ts +222 -0
  74. package/types/generators/HttpServer.ts +176 -0
  75. package/types/generators/Information.ts +103 -0
  76. package/types/generators/Intent.ts +168 -0
  77. package/types/generators/Iterator.ts +108 -0
  78. package/types/generators/Keyboard.ts +105 -0
  79. package/types/generators/LlmAnthropicCompat.ts +212 -0
  80. package/types/generators/LlmAppleBuiltin.ts +159 -0
  81. package/types/generators/LlmGgml.ts +861 -0
  82. package/types/generators/LlmMediaTekNeuroPilot.ts +235 -0
  83. package/types/generators/LlmMlx.ts +227 -0
  84. package/types/generators/LlmOnnx.ts +213 -0
  85. package/types/generators/LlmOpenAiCompat.ts +244 -0
  86. package/types/generators/LlmQualcommAiEngine.ts +247 -0
  87. package/types/generators/Mcp.ts +637 -0
  88. package/types/generators/McpServer.ts +289 -0
  89. package/types/generators/MediaFlow.ts +170 -0
  90. package/types/generators/MqttBroker.ts +141 -0
  91. package/types/generators/MqttClient.ts +141 -0
  92. package/types/generators/Question.ts +408 -0
  93. package/types/generators/RealtimeTranscription.ts +279 -0
  94. package/types/generators/RerankerGgml.ts +191 -0
  95. package/types/generators/SerialPort.ts +151 -0
  96. package/types/generators/SoundPlayer.ts +94 -0
  97. package/types/generators/SoundRecorder.ts +130 -0
  98. package/types/generators/SpeechToTextGgml.ts +415 -0
  99. package/types/generators/SpeechToTextOnnx.ts +236 -0
  100. package/types/generators/SpeechToTextPlatform.ts +85 -0
  101. package/types/generators/SqLite.ts +159 -0
  102. package/types/generators/Step.ts +107 -0
  103. package/types/generators/SttAppleBuiltin.ts +130 -0
  104. package/types/generators/Tcp.ts +126 -0
  105. package/types/generators/TcpServer.ts +147 -0
  106. package/types/generators/TextToSpeechAppleBuiltin.ts +127 -0
  107. package/types/generators/TextToSpeechGgml.ts +221 -0
  108. package/types/generators/TextToSpeechOnnx.ts +178 -0
  109. package/types/generators/TextToSpeechOpenAiLike.ts +121 -0
  110. package/types/generators/ThermalPrinter.ts +191 -0
  111. package/types/generators/Tick.ts +83 -0
  112. package/types/generators/Udp.ts +120 -0
  113. package/types/generators/VadGgml.ts +250 -0
  114. package/types/generators/VadOnnx.ts +231 -0
  115. package/types/generators/VadTraditional.ts +138 -0
  116. package/types/generators/VectorStore.ts +257 -0
  117. package/types/generators/Watchdog.ts +107 -0
  118. package/types/generators/WebCrawler.ts +103 -0
  119. package/types/generators/WebRtc.ts +181 -0
  120. package/types/generators/WebSocket.ts +148 -0
  121. package/types/generators/index.ts +57 -0
  122. package/types/index.ts +13 -0
  123. package/types/subspace.ts +59 -0
  124. package/types/switch.ts +51 -0
  125. package/types/system.ts +707 -0
  126. package/utils/calc.ts +126 -0
  127. package/utils/data.ts +497 -0
  128. package/utils/event-props.ts +836 -0
  129. package/utils/id.ts +80 -0
@@ -0,0 +1,159 @@
1
+ /* Auto generated by build script
2
+ *
3
+ * LLM inference using Apple Intelligence on iOS/tvOS 26+
4
+ *
5
+ * ## Features
6
+ * - Native Apple Intelligence integration
7
+ * - No model download required
8
+ * - Privacy-focused on-device processing
9
+ * - Optimized for Apple Silicon
10
+ * - Requires iOS 26+ or tvOS 26+
11
+ */
12
+ import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
13
+ import type { Data, DataLink } from '../data'
14
+ import type {
15
+ Brick,
16
+ Generator,
17
+ EventAction,
18
+ ActionWithDataParams,
19
+ ActionWithParams,
20
+ Action,
21
+ EventProperty,
22
+ } from '../common'
23
+ import type { TemplateEventPropsMap } from '../../utils/event-props'
24
+
25
+ /* Load model */
26
+ export type GeneratorAppleLLMActionLoadModel = Action & {
27
+ __actionName: 'GENERATOR_APPLE_LLM_LOAD_MODEL'
28
+ }
29
+
30
+ /* Run text completion */
31
+ export type GeneratorAppleLLMActionCompletion = ActionWithParams & {
32
+ __actionName: 'GENERATOR_APPLE_LLM_COMPLETION'
33
+ params?: Array<
34
+ | {
35
+ input: 'messages'
36
+ value?: Array<any> | DataLink | EventProperty
37
+ mapping?: string
38
+ }
39
+ | {
40
+ input: 'maxTokens'
41
+ value?: number | DataLink | EventProperty
42
+ mapping?: string
43
+ }
44
+ | {
45
+ input: 'temperature'
46
+ value?: number | DataLink | EventProperty
47
+ mapping?: string
48
+ }
49
+ | {
50
+ input: 'topP'
51
+ value?: number | DataLink | EventProperty
52
+ mapping?: string
53
+ }
54
+ >
55
+ }
56
+
57
+ /* Stop text completion */
58
+ export type GeneratorAppleLLMActionStopCompletion = Action & {
59
+ __actionName: 'GENERATOR_APPLE_LLM_STOP_COMPLETION'
60
+ }
61
+
62
+ interface GeneratorAppleLLMDef {
63
+ /*
64
+ Default property:
65
+ {
66
+ "init": false,
67
+ "completionMessages": [
68
+ {
69
+ "role": "system",
70
+ "content": "You are a helpful assistant."
71
+ },
72
+ {
73
+ "role": "user",
74
+ "content": "Hello"
75
+ }
76
+ ],
77
+ "completionMaxTokens": 1024,
78
+ "completionTemperature": 0.7,
79
+ "completionTopP": 0.9
80
+ }
81
+ */
82
+ property?: {
83
+ /* Initialize model on generator init */
84
+ init?: boolean | DataLink
85
+ /* Chat messages (if first message has role 'system', it will be used as system prompt) */
86
+ completionMessages?:
87
+ | Array<
88
+ | DataLink
89
+ | {
90
+ role?: string | DataLink
91
+ content?: string | DataLink
92
+ }
93
+ >
94
+ | DataLink
95
+ /* Maximum tokens to generate */
96
+ completionMaxTokens?: number | DataLink
97
+ /* Temperature (0.0 to 1.0) */
98
+ completionTemperature?: number | DataLink
99
+ /* Top P sampling */
100
+ completionTopP?: number | DataLink
101
+ }
102
+ events?: {
103
+ /* Error event */
104
+ onError?: Array<EventAction<string & keyof TemplateEventPropsMap['AppleLlm']['onError']>>
105
+ /* Model loaded event */
106
+ onModelLoaded?: Array<EventAction>
107
+ /* Completion event */
108
+ onCompletion?: Array<
109
+ EventAction<string & keyof TemplateEventPropsMap['AppleLlm']['onCompletion']>
110
+ >
111
+ /* Completion finished event */
112
+ onCompletionFinished?: Array<
113
+ EventAction<string & keyof TemplateEventPropsMap['AppleLlm']['onCompletionFinished']>
114
+ >
115
+ }
116
+ outlets?: {
117
+ /* Context state outlet */
118
+ contextState?: () => Data<string>
119
+ /* Evaluating outlet */
120
+ isEvaluating?: () => Data<boolean>
121
+ /* Completion result outlet */
122
+ completionResult?: () => Data<string>
123
+ /* Last token outlet */
124
+ completionLastToken?: () => Data<string>
125
+ }
126
+ }
127
+
128
+ /* LLM inference using Apple Intelligence on iOS/tvOS 26+
129
+
130
+ ## Features
131
+ - Native Apple Intelligence integration
132
+ - No model download required
133
+ - Privacy-focused on-device processing
134
+ - Optimized for Apple Silicon
135
+ - Requires iOS 26+ or tvOS 26+ */
136
+ export type GeneratorAppleLLM = Generator &
137
+ GeneratorAppleLLMDef & {
138
+ templateKey: 'GENERATOR_APPLE_LLM'
139
+ switches?: Array<
140
+ SwitchDef &
141
+ GeneratorAppleLLMDef & {
142
+ conds?: Array<{
143
+ method: '==' | '!=' | '>' | '<' | '>=' | '<='
144
+ cond:
145
+ | SwitchCondInnerStateCurrentCanvas
146
+ | SwitchCondData
147
+ | {
148
+ __typename: 'SwitchCondInnerStateOutlet'
149
+ outlet:
150
+ | 'contextState'
151
+ | 'isEvaluating'
152
+ | 'completionResult'
153
+ | 'completionLastToken'
154
+ value: any
155
+ }
156
+ }>
157
+ }
158
+ >
159
+ }