@fugood/bricks-project 2.23.0-beta.23 → 2.23.0-beta.25
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 +25 -0
- package/package.json +2 -2
- package/types/brick-base.ts +1 -0
- package/types/bricks/Camera.ts +1 -0
- package/types/bricks/Chart.ts +1 -0
- package/types/bricks/GenerativeMedia.ts +3 -0
- package/types/bricks/Icon.ts +1 -0
- package/types/bricks/Image.ts +1 -0
- package/types/bricks/Items.ts +1 -0
- package/types/bricks/Lottie.ts +1 -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 +1 -0
- package/types/bricks/index.ts +1 -0
- package/types/canvas.ts +1 -0
- package/types/data-calc.ts +1 -0
- package/types/data.ts +1 -0
- package/types/generators/AlarmClock.ts +1 -0
- package/types/generators/Assistant.ts +1 -0
- package/types/generators/BleCentral.ts +1 -0
- package/types/generators/BlePeripheral.ts +1 -0
- package/types/generators/CanvasMap.ts +1 -0
- package/types/generators/CastlesPay.ts +1 -0
- package/types/generators/DataBank.ts +1 -0
- package/types/generators/File.ts +1 -0
- package/types/generators/GraphQl.ts +1 -0
- package/types/generators/Http.ts +1 -0
- package/types/generators/HttpServer.ts +1 -0
- package/types/generators/Information.ts +1 -0
- package/types/generators/Intent.ts +1 -0
- package/types/generators/Iterator.ts +1 -0
- package/types/generators/Keyboard.ts +1 -0
- package/types/generators/LlmAnthropicCompat.ts +1 -0
- package/types/generators/LlmAppleBuiltin.ts +143 -0
- package/types/generators/LlmGgml.ts +1 -0
- package/types/generators/LlmOnnx.ts +1 -0
- package/types/generators/LlmOpenAiCompat.ts +1 -0
- package/types/generators/LlmQualcommAiEngine.ts +1 -0
- package/types/generators/Mcp.ts +1 -0
- package/types/generators/McpServer.ts +1 -0
- package/types/generators/MediaFlow.ts +1 -0
- package/types/generators/MqttBroker.ts +1 -0
- package/types/generators/MqttClient.ts +1 -0
- package/types/generators/Question.ts +1 -0
- package/types/generators/RealtimeTranscription.ts +1 -0
- package/types/generators/RerankerGgml.ts +1 -0
- package/types/generators/SerialPort.ts +1 -0
- package/types/generators/SoundPlayer.ts +1 -0
- package/types/generators/SoundRecorder.ts +1 -0
- package/types/generators/SpeechToTextGgml.ts +1 -0
- package/types/generators/SpeechToTextOnnx.ts +1 -0
- package/types/generators/SpeechToTextPlatform.ts +1 -0
- package/types/generators/SqLite.ts +1 -0
- package/types/generators/Step.ts +1 -0
- package/types/generators/SttAppleBuiltin.ts +116 -0
- package/types/generators/Tcp.ts +1 -0
- package/types/generators/TcpServer.ts +1 -0
- package/types/generators/TextToSpeechApple.ts +113 -0
- package/types/generators/TextToSpeechAppleBuiltin.ts +113 -0
- package/types/generators/TextToSpeechGgml.ts +1 -0
- package/types/generators/TextToSpeechOnnx.ts +1 -0
- package/types/generators/TextToSpeechOpenAiLike.ts +1 -0
- package/types/generators/ThermalPrinter.ts +1 -0
- package/types/generators/Tick.ts +1 -0
- package/types/generators/TtsAppleBuiltin.ts +105 -0
- package/types/generators/Udp.ts +1 -0
- package/types/generators/VadGgml.ts +3 -2
- package/types/generators/VectorStore.ts +1 -0
- package/types/generators/Watchdog.ts +1 -0
- package/types/generators/WebCrawler.ts +1 -0
- package/types/generators/WebRtc.ts +1 -0
- package/types/generators/WebSocket.ts +1 -0
- package/types/generators/index.ts +3 -0
- package/types/system.ts +1 -0
- package/utils/data.ts +1 -0
- package/utils/event-props.ts +33 -0
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/* Auto generated by build script */
|
|
2
|
+
|
|
1
3
|
// NOTE: The action parameter name convertion is not 1:1 mapping case conversion, so we need to define the mapping here
|
|
2
4
|
// This may be improved in the future
|
|
3
5
|
export const templateActionNameMap = {
|
|
@@ -754,6 +756,29 @@ export const templateActionNameMap = {
|
|
|
754
756
|
toolChoice: 'GENERATOR_ANTHROPIC_LLM_TOOL_CHOICE',
|
|
755
757
|
},
|
|
756
758
|
},
|
|
759
|
+
GENERATOR_APPLE_LLM: {
|
|
760
|
+
GENERATOR_APPLE_LLM_COMPLETION: {
|
|
761
|
+
messages: 'GENERATOR_APPLE_LLM_MESSAGES',
|
|
762
|
+
maxTokens: 'GENERATOR_APPLE_LLM_MAX_TOKENS',
|
|
763
|
+
temperature: 'GENERATOR_APPLE_LLM_TEMPERATURE',
|
|
764
|
+
topP: 'GENERATOR_APPLE_LLM_TOP_P',
|
|
765
|
+
},
|
|
766
|
+
},
|
|
767
|
+
GENERATOR_APPLE_STT: {
|
|
768
|
+
GENERATOR_APPLE_STT_TRANSCRIBE_FILE: {
|
|
769
|
+
fileUrl: 'GENERATOR_APPLE_STT_FILE_URL',
|
|
770
|
+
language: 'GENERATOR_APPLE_STT_LANGUAGE',
|
|
771
|
+
},
|
|
772
|
+
GENERATOR_APPLE_STT_TRANSCRIBE_DATA: {
|
|
773
|
+
data: 'GENERATOR_APPLE_STT_DATA',
|
|
774
|
+
language: 'GENERATOR_APPLE_STT_LANGUAGE',
|
|
775
|
+
},
|
|
776
|
+
},
|
|
777
|
+
GENERATOR_APPLE_TTS: {
|
|
778
|
+
GENERATOR_APPLE_TTS_GENERATE: {
|
|
779
|
+
text: 'GENERATOR_APPLE_TTS_TEXT',
|
|
780
|
+
},
|
|
781
|
+
},
|
|
757
782
|
GENERATOR_ASSISTANT: {
|
|
758
783
|
GENERATOR_ASSISTANT_ADD_MESSAGE: {
|
|
759
784
|
role: 'GENERATOR_ASSISTANT_ROLE',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fugood/bricks-project",
|
|
3
|
-
"version": "2.23.0-beta.
|
|
3
|
+
"version": "2.23.0-beta.25",
|
|
4
4
|
"main": "index.ts",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "node scripts/build.js"
|
|
@@ -14,5 +14,5 @@
|
|
|
14
14
|
"lodash": "^4.17.4",
|
|
15
15
|
"uuid": "^8.3.1"
|
|
16
16
|
},
|
|
17
|
-
"gitHead": "
|
|
17
|
+
"gitHead": "89d05d356e4deae1c06afd6db781e2b83c547991"
|
|
18
18
|
}
|
package/types/brick-base.ts
CHANGED
package/types/bricks/Camera.ts
CHANGED
package/types/bricks/Chart.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* Auto generated by build script */
|
|
1
2
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
2
3
|
import type { Data, DataLink } from '../data'
|
|
3
4
|
import type { Animation, AnimationBasicEvents } from '../animation'
|
|
@@ -160,6 +161,8 @@ Default property:
|
|
|
160
161
|
deepaiHeight?: number | DataLink
|
|
161
162
|
/* Gemini aspect ratio (1:1, 16:9, 9:16, 3:2, 2:3) */
|
|
162
163
|
geminiAspectRatio?: '1:1' | '16:9' | '9:16' | '3:2' | '2:3' | DataLink
|
|
164
|
+
/* Gemini model to use for image generation */
|
|
165
|
+
geminiModel?: 'gemini-2.5-flash-image' | 'gemini-3-pro-image-preview' | DataLink
|
|
163
166
|
}
|
|
164
167
|
events?: BrickBasicEvents & {
|
|
165
168
|
/* Event of the brick press */
|
package/types/bricks/Icon.ts
CHANGED
package/types/bricks/Image.ts
CHANGED
package/types/bricks/Items.ts
CHANGED
package/types/bricks/Lottie.ts
CHANGED
package/types/bricks/QrCode.ts
CHANGED
package/types/bricks/Rect.ts
CHANGED
package/types/bricks/RichText.ts
CHANGED
package/types/bricks/Rive.ts
CHANGED
package/types/bricks/Svg.ts
CHANGED
package/types/bricks/Text.ts
CHANGED
package/types/bricks/Video.ts
CHANGED
package/types/bricks/WebView.ts
CHANGED
package/types/bricks/index.ts
CHANGED
package/types/canvas.ts
CHANGED
package/types/data-calc.ts
CHANGED
package/types/data.ts
CHANGED
package/types/generators/File.ts
CHANGED
package/types/generators/Http.ts
CHANGED
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/* Auto generated by build script */
|
|
2
|
+
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
3
|
+
import type { Data, DataLink } from '../data'
|
|
4
|
+
import type {
|
|
5
|
+
Generator,
|
|
6
|
+
EventAction,
|
|
7
|
+
ActionWithDataParams,
|
|
8
|
+
ActionWithParams,
|
|
9
|
+
Action,
|
|
10
|
+
EventProperty,
|
|
11
|
+
} from '../common'
|
|
12
|
+
|
|
13
|
+
/* Load model */
|
|
14
|
+
export type GeneratorAppleLLMActionLoadModel = Action & {
|
|
15
|
+
__actionName: 'GENERATOR_APPLE_LLM_LOAD_MODEL'
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/* Run text completion */
|
|
19
|
+
export type GeneratorAppleLLMActionCompletion = ActionWithParams & {
|
|
20
|
+
__actionName: 'GENERATOR_APPLE_LLM_COMPLETION'
|
|
21
|
+
params?: Array<
|
|
22
|
+
| {
|
|
23
|
+
input: 'messages'
|
|
24
|
+
value?: Array<any> | DataLink | EventProperty
|
|
25
|
+
mapping?: string
|
|
26
|
+
}
|
|
27
|
+
| {
|
|
28
|
+
input: 'maxTokens'
|
|
29
|
+
value?: number | DataLink | EventProperty
|
|
30
|
+
mapping?: string
|
|
31
|
+
}
|
|
32
|
+
| {
|
|
33
|
+
input: 'temperature'
|
|
34
|
+
value?: number | DataLink | EventProperty
|
|
35
|
+
mapping?: string
|
|
36
|
+
}
|
|
37
|
+
| {
|
|
38
|
+
input: 'topP'
|
|
39
|
+
value?: number | DataLink | EventProperty
|
|
40
|
+
mapping?: string
|
|
41
|
+
}
|
|
42
|
+
>
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/* Stop text completion */
|
|
46
|
+
export type GeneratorAppleLLMActionStopCompletion = Action & {
|
|
47
|
+
__actionName: 'GENERATOR_APPLE_LLM_STOP_COMPLETION'
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
interface GeneratorAppleLLMDef {
|
|
51
|
+
/*
|
|
52
|
+
Default property:
|
|
53
|
+
{
|
|
54
|
+
"init": false,
|
|
55
|
+
"completionMessages": [
|
|
56
|
+
{
|
|
57
|
+
"role": "system",
|
|
58
|
+
"content": "You are a helpful assistant."
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"role": "user",
|
|
62
|
+
"content": "Hello"
|
|
63
|
+
}
|
|
64
|
+
],
|
|
65
|
+
"completionMaxTokens": 1024,
|
|
66
|
+
"completionTemperature": 0.7,
|
|
67
|
+
"completionTopP": 0.9
|
|
68
|
+
}
|
|
69
|
+
*/
|
|
70
|
+
property?: {
|
|
71
|
+
/* Initialize model on generator init */
|
|
72
|
+
init?: boolean | DataLink
|
|
73
|
+
/* Chat messages (if first message has role 'system', it will be used as system prompt) */
|
|
74
|
+
completionMessages?:
|
|
75
|
+
| Array<
|
|
76
|
+
| DataLink
|
|
77
|
+
| {
|
|
78
|
+
role?: string | DataLink
|
|
79
|
+
content?: string | DataLink
|
|
80
|
+
}
|
|
81
|
+
>
|
|
82
|
+
| DataLink
|
|
83
|
+
/* Maximum tokens to generate */
|
|
84
|
+
completionMaxTokens?: number | DataLink
|
|
85
|
+
/* Temperature (0.0 to 1.0) */
|
|
86
|
+
completionTemperature?: number | DataLink
|
|
87
|
+
/* Top P sampling */
|
|
88
|
+
completionTopP?: number | DataLink
|
|
89
|
+
}
|
|
90
|
+
events?: {
|
|
91
|
+
/* Error event */
|
|
92
|
+
onError?: Array<EventAction>
|
|
93
|
+
/* Model loaded event */
|
|
94
|
+
onModelLoaded?: Array<EventAction>
|
|
95
|
+
/* Completion event */
|
|
96
|
+
onCompletion?: Array<EventAction>
|
|
97
|
+
/* Completion finished event */
|
|
98
|
+
onCompletionFinished?: Array<EventAction>
|
|
99
|
+
}
|
|
100
|
+
outlets?: {
|
|
101
|
+
/* Context state outlet */
|
|
102
|
+
contextState?: () => Data
|
|
103
|
+
/* Evaluating outlet */
|
|
104
|
+
isEvaluating?: () => Data
|
|
105
|
+
/* Completion result outlet */
|
|
106
|
+
completionResult?: () => Data
|
|
107
|
+
/* Last token outlet */
|
|
108
|
+
completionLastToken?: () => Data
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/* LLM inference using Apple Intelligence on iOS/tvOS 26+
|
|
113
|
+
|
|
114
|
+
## Features
|
|
115
|
+
- Native Apple Intelligence integration
|
|
116
|
+
- No model download required
|
|
117
|
+
- Privacy-focused on-device processing
|
|
118
|
+
- Optimized for Apple Silicon
|
|
119
|
+
- Requires iOS 26+ or tvOS 26+ */
|
|
120
|
+
export type GeneratorAppleLLM = Generator &
|
|
121
|
+
GeneratorAppleLLMDef & {
|
|
122
|
+
templateKey: 'GENERATOR_APPLE_LLM'
|
|
123
|
+
switches: Array<
|
|
124
|
+
SwitchDef &
|
|
125
|
+
GeneratorAppleLLMDef & {
|
|
126
|
+
conds?: Array<{
|
|
127
|
+
method: '==' | '!=' | '>' | '<' | '>=' | '<='
|
|
128
|
+
cond:
|
|
129
|
+
| SwitchCondInnerStateCurrentCanvas
|
|
130
|
+
| SwitchCondData
|
|
131
|
+
| {
|
|
132
|
+
__typename: 'SwitchCondInnerStateOutlet'
|
|
133
|
+
outlet:
|
|
134
|
+
| 'contextState'
|
|
135
|
+
| 'isEvaluating'
|
|
136
|
+
| 'completionResult'
|
|
137
|
+
| 'completionLastToken'
|
|
138
|
+
value: any
|
|
139
|
+
}
|
|
140
|
+
}>
|
|
141
|
+
}
|
|
142
|
+
>
|
|
143
|
+
}
|
package/types/generators/Mcp.ts
CHANGED
package/types/generators/Step.ts
CHANGED