@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.
- package/compile/action-name-map.ts +988 -0
- package/compile/index.ts +1245 -0
- package/compile/util.ts +358 -0
- package/index.ts +6 -0
- package/package.json +28 -0
- package/skills/bricks-design/LICENSE.txt +180 -0
- package/skills/bricks-design/SKILL.md +66 -0
- 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 +69 -0
- package/skills/bricks-project/rules/automations.md +221 -0
- package/skills/bricks-project/rules/buttress.md +156 -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 +151 -0
- package/tools/icons/.gitattributes +1 -0
- package/tools/icons/fa6pro-glyphmap.json +4686 -0
- package/tools/icons/fa6pro-meta.json +3671 -0
- package/tools/mcp-server.ts +28 -0
- package/tools/mcp-tools/compile.ts +91 -0
- package/tools/mcp-tools/huggingface.ts +762 -0
- package/tools/mcp-tools/icons.ts +70 -0
- package/tools/mcp-tools/lottie.ts +102 -0
- package/tools/mcp-tools/media.ts +110 -0
- package/tools/postinstall.ts +229 -0
- package/tools/preview-main.mjs +293 -0
- package/tools/preview.ts +143 -0
- package/tools/pull.ts +116 -0
- package/tsconfig.json +16 -0
- package/types/animation.ts +100 -0
- package/types/automation.ts +235 -0
- package/types/brick-base.ts +80 -0
- package/types/bricks/Camera.ts +246 -0
- package/types/bricks/Chart.ts +372 -0
- package/types/bricks/GenerativeMedia.ts +276 -0
- package/types/bricks/Icon.ts +98 -0
- package/types/bricks/Image.ts +114 -0
- package/types/bricks/Items.ts +476 -0
- package/types/bricks/Lottie.ts +168 -0
- package/types/bricks/Maps.ts +262 -0
- package/types/bricks/QrCode.ts +117 -0
- package/types/bricks/Rect.ts +150 -0
- package/types/bricks/RichText.ts +128 -0
- package/types/bricks/Rive.ts +220 -0
- package/types/bricks/Slideshow.ts +201 -0
- package/types/bricks/Svg.ts +99 -0
- package/types/bricks/Text.ts +148 -0
- package/types/bricks/TextInput.ts +242 -0
- package/types/bricks/Video.ts +175 -0
- package/types/bricks/VideoStreaming.ts +112 -0
- package/types/bricks/WebRtcStream.ts +65 -0
- package/types/bricks/WebView.ts +168 -0
- package/types/bricks/index.ts +21 -0
- package/types/canvas.ts +82 -0
- package/types/common.ts +144 -0
- package/types/data-calc-command.ts +7005 -0
- package/types/data-calc-script.ts +21 -0
- package/types/data-calc.ts +11 -0
- package/types/data.ts +95 -0
- package/types/generators/AlarmClock.ts +110 -0
- package/types/generators/Assistant.ts +621 -0
- package/types/generators/BleCentral.ts +247 -0
- package/types/generators/BlePeripheral.ts +208 -0
- package/types/generators/CanvasMap.ts +74 -0
- package/types/generators/CastlesPay.ts +87 -0
- package/types/generators/DataBank.ts +160 -0
- package/types/generators/File.ts +432 -0
- package/types/generators/GraphQl.ts +132 -0
- package/types/generators/Http.ts +222 -0
- package/types/generators/HttpServer.ts +176 -0
- package/types/generators/Information.ts +103 -0
- package/types/generators/Intent.ts +168 -0
- package/types/generators/Iterator.ts +108 -0
- package/types/generators/Keyboard.ts +105 -0
- package/types/generators/LlmAnthropicCompat.ts +212 -0
- package/types/generators/LlmAppleBuiltin.ts +159 -0
- package/types/generators/LlmGgml.ts +861 -0
- package/types/generators/LlmMediaTekNeuroPilot.ts +235 -0
- package/types/generators/LlmMlx.ts +227 -0
- package/types/generators/LlmOnnx.ts +213 -0
- package/types/generators/LlmOpenAiCompat.ts +244 -0
- package/types/generators/LlmQualcommAiEngine.ts +247 -0
- package/types/generators/Mcp.ts +637 -0
- package/types/generators/McpServer.ts +289 -0
- package/types/generators/MediaFlow.ts +170 -0
- package/types/generators/MqttBroker.ts +141 -0
- package/types/generators/MqttClient.ts +141 -0
- package/types/generators/Question.ts +408 -0
- package/types/generators/RealtimeTranscription.ts +279 -0
- package/types/generators/RerankerGgml.ts +191 -0
- package/types/generators/SerialPort.ts +151 -0
- package/types/generators/SoundPlayer.ts +94 -0
- package/types/generators/SoundRecorder.ts +130 -0
- package/types/generators/SpeechToTextGgml.ts +415 -0
- package/types/generators/SpeechToTextOnnx.ts +236 -0
- package/types/generators/SpeechToTextPlatform.ts +85 -0
- package/types/generators/SqLite.ts +159 -0
- package/types/generators/Step.ts +107 -0
- package/types/generators/SttAppleBuiltin.ts +130 -0
- package/types/generators/Tcp.ts +126 -0
- package/types/generators/TcpServer.ts +147 -0
- package/types/generators/TextToSpeechAppleBuiltin.ts +127 -0
- package/types/generators/TextToSpeechGgml.ts +221 -0
- package/types/generators/TextToSpeechOnnx.ts +178 -0
- package/types/generators/TextToSpeechOpenAiLike.ts +121 -0
- package/types/generators/ThermalPrinter.ts +191 -0
- package/types/generators/Tick.ts +83 -0
- package/types/generators/Udp.ts +120 -0
- package/types/generators/VadGgml.ts +250 -0
- package/types/generators/VadOnnx.ts +231 -0
- package/types/generators/VadTraditional.ts +138 -0
- package/types/generators/VectorStore.ts +257 -0
- package/types/generators/Watchdog.ts +107 -0
- package/types/generators/WebCrawler.ts +103 -0
- package/types/generators/WebRtc.ts +181 -0
- package/types/generators/WebSocket.ts +148 -0
- package/types/generators/index.ts +57 -0
- package/types/index.ts +13 -0
- package/types/subspace.ts +59 -0
- package/types/switch.ts +51 -0
- package/types/system.ts +707 -0
- package/utils/calc.ts +126 -0
- package/utils/data.ts +497 -0
- package/utils/event-props.ts +836 -0
- 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
|
+
}
|