@fugood/bricks-project 2.24.0-beta.2 → 2.24.0-beta.21
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 +14 -0
- package/compile/index.ts +377 -129
- package/package.json +8 -3
- package/skills/bricks-project/rules/architecture-patterns.md +7 -0
- package/skills/bricks-project/rules/automations.md +74 -28
- package/skills/bricks-project/rules/buttress.md +9 -6
- package/tools/deploy.ts +39 -10
- package/tools/mcp-server.ts +10 -877
- package/tools/mcp-tools/compile.ts +91 -0
- package/tools/mcp-tools/huggingface.ts +762 -0
- package/tools/mcp-tools/icons.ts +60 -0
- package/tools/mcp-tools/lottie.ts +102 -0
- package/tools/mcp-tools/media.ts +110 -0
- package/tools/postinstall.ts +121 -33
- package/tools/preview-main.mjs +12 -8
- package/tools/pull.ts +37 -19
- package/tsconfig.json +16 -0
- package/types/animation.ts +4 -0
- package/types/automation.ts +3 -0
- package/types/brick-base.ts +1 -1
- package/types/bricks/Camera.ts +34 -7
- package/types/bricks/Chart.ts +1 -1
- package/types/bricks/GenerativeMedia.ts +6 -6
- package/types/bricks/Icon.ts +3 -3
- package/types/bricks/Image.ts +4 -4
- package/types/bricks/Items.ts +7 -7
- package/types/bricks/Lottie.ts +4 -4
- package/types/bricks/Maps.ts +4 -4
- package/types/bricks/QrCode.ts +4 -4
- package/types/bricks/Rect.ts +4 -4
- package/types/bricks/RichText.ts +3 -3
- package/types/bricks/Rive.ts +1 -1
- package/types/bricks/Slideshow.ts +4 -4
- package/types/bricks/Svg.ts +3 -3
- package/types/bricks/Text.ts +4 -4
- package/types/bricks/TextInput.ts +11 -7
- package/types/bricks/Video.ts +4 -4
- package/types/bricks/VideoStreaming.ts +3 -3
- package/types/bricks/WebRtcStream.ts +1 -1
- package/types/bricks/WebView.ts +4 -4
- package/types/canvas.ts +4 -2
- package/types/common.ts +9 -4
- package/types/data-calc-command.ts +2 -0
- package/types/data-calc.ts +1 -0
- package/types/data.ts +2 -0
- package/types/generators/AlarmClock.ts +5 -5
- package/types/generators/Assistant.ts +57 -12
- package/types/generators/BleCentral.ts +12 -4
- package/types/generators/BlePeripheral.ts +5 -5
- package/types/generators/CanvasMap.ts +4 -4
- package/types/generators/CastlesPay.ts +3 -3
- package/types/generators/DataBank.ts +31 -4
- package/types/generators/File.ts +63 -14
- package/types/generators/GraphQl.ts +3 -3
- package/types/generators/Http.ts +27 -8
- package/types/generators/HttpServer.ts +9 -9
- package/types/generators/Information.ts +2 -2
- package/types/generators/Intent.ts +8 -2
- package/types/generators/Iterator.ts +6 -6
- package/types/generators/Keyboard.ts +18 -8
- package/types/generators/LlmAnthropicCompat.ts +12 -6
- package/types/generators/LlmAppleBuiltin.ts +6 -6
- package/types/generators/LlmGgml.ts +75 -25
- package/types/generators/LlmMlx.ts +210 -0
- package/types/generators/LlmOnnx.ts +18 -9
- package/types/generators/LlmOpenAiCompat.ts +22 -6
- package/types/generators/LlmQualcommAiEngine.ts +32 -8
- package/types/generators/Mcp.ts +332 -17
- package/types/generators/McpServer.ts +38 -11
- package/types/generators/MediaFlow.ts +26 -8
- package/types/generators/MqttBroker.ts +10 -4
- package/types/generators/MqttClient.ts +11 -5
- package/types/generators/Question.ts +6 -6
- package/types/generators/RealtimeTranscription.ts +70 -11
- package/types/generators/RerankerGgml.ts +23 -9
- package/types/generators/SerialPort.ts +6 -6
- package/types/generators/SoundPlayer.ts +2 -2
- package/types/generators/SoundRecorder.ts +5 -5
- package/types/generators/SpeechToTextGgml.ts +34 -14
- package/types/generators/SpeechToTextOnnx.ts +8 -8
- package/types/generators/SpeechToTextPlatform.ts +4 -4
- package/types/generators/SqLite.ts +10 -6
- package/types/generators/Step.ts +3 -3
- package/types/generators/SttAppleBuiltin.ts +6 -6
- package/types/generators/Tcp.ts +5 -5
- package/types/generators/TcpServer.ts +7 -7
- package/types/generators/TextToSpeechApple.ts +1 -1
- package/types/generators/TextToSpeechAppleBuiltin.ts +5 -5
- package/types/generators/TextToSpeechGgml.ts +8 -8
- package/types/generators/TextToSpeechOnnx.ts +9 -9
- package/types/generators/TextToSpeechOpenAiLike.ts +5 -5
- package/types/generators/ThermalPrinter.ts +6 -6
- package/types/generators/Tick.ts +3 -3
- package/types/generators/Udp.ts +9 -4
- package/types/generators/VadGgml.ts +39 -10
- package/types/generators/VadOnnx.ts +31 -8
- package/types/generators/VadTraditional.ts +15 -9
- package/types/generators/VectorStore.ts +26 -9
- package/types/generators/Watchdog.ts +11 -6
- package/types/generators/WebCrawler.ts +5 -5
- package/types/generators/WebRtc.ts +17 -11
- package/types/generators/WebSocket.ts +5 -5
- package/types/generators/index.ts +1 -0
- package/types/subspace.ts +1 -0
- package/types/system.ts +1 -1
- package/utils/calc.ts +12 -8
- package/utils/event-props.ts +104 -87
- package/utils/id.ts +4 -0
- package/api/index.ts +0 -1
- package/api/instance.ts +0 -213
package/types/automation.ts
CHANGED
|
@@ -182,6 +182,7 @@ export interface TestCase {
|
|
|
182
182
|
__typename: 'TestCase'
|
|
183
183
|
id: string
|
|
184
184
|
name: string
|
|
185
|
+
hideShortRef?: boolean
|
|
185
186
|
run: TestMethodRun
|
|
186
187
|
exit_on_failed: boolean
|
|
187
188
|
commented: boolean
|
|
@@ -203,6 +204,7 @@ export interface AutomationTest {
|
|
|
203
204
|
__typename: 'AutomationTest'
|
|
204
205
|
id: string
|
|
205
206
|
title: string
|
|
207
|
+
hideShortRef?: boolean
|
|
206
208
|
timeout: number
|
|
207
209
|
trigger_type?: TestTriggerType
|
|
208
210
|
cron?: string // Cron expression when trigger_type is 'cron'
|
|
@@ -220,6 +222,7 @@ export interface AutomationTestMap {
|
|
|
220
222
|
__typename: 'AutomationTestMap'
|
|
221
223
|
id: string
|
|
222
224
|
title: string
|
|
225
|
+
hideShortRef?: boolean
|
|
223
226
|
createdAt: number
|
|
224
227
|
tests: AutomationTest[]
|
|
225
228
|
}
|
package/types/brick-base.ts
CHANGED
|
@@ -59,7 +59,7 @@ export interface BrickBasicProperty {
|
|
|
59
59
|
shadowOffsetWidth?: number | DataLink
|
|
60
60
|
/* The brick shadow offset height */
|
|
61
61
|
shadowOffsetHeight?: number | DataLink
|
|
62
|
-
/* Brick pressable.
|
|
62
|
+
/* Brick pressable.
|
|
63
63
|
Disabled: Disabled even if event or animation is set.
|
|
64
64
|
Bypass: Disable and bypass the touch event on the brick. */
|
|
65
65
|
pressable?: 'enabled' | 'disabled' | 'bypass' | DataLink
|
package/types/bricks/Camera.ts
CHANGED
|
@@ -167,15 +167,42 @@ Default property:
|
|
|
167
167
|
}
|
|
168
168
|
outlets?: {
|
|
169
169
|
/* Camera device and format information */
|
|
170
|
-
info?: () => Data
|
|
170
|
+
info?: () => Data<{ [key: string]: any }>
|
|
171
171
|
/* Picture taken result */
|
|
172
|
-
pictureTaken?: () => Data
|
|
172
|
+
pictureTaken?: () => Data<{
|
|
173
|
+
width?: number
|
|
174
|
+
height?: number
|
|
175
|
+
uri?: string
|
|
176
|
+
base64?: string
|
|
177
|
+
[key: string]: any
|
|
178
|
+
}>
|
|
173
179
|
/* Record video result */
|
|
174
|
-
recordVideo?: () => Data
|
|
180
|
+
recordVideo?: () => Data<{
|
|
181
|
+
uri?: string
|
|
182
|
+
[key: string]: any
|
|
183
|
+
}>
|
|
175
184
|
/* Barcode read result */
|
|
176
|
-
barcodeRead?: () => Data
|
|
185
|
+
barcodeRead?: () => Data<{
|
|
186
|
+
type?: string
|
|
187
|
+
data?: string
|
|
188
|
+
rawData?: string
|
|
189
|
+
bounds?: {
|
|
190
|
+
origin?: {
|
|
191
|
+
x?: number
|
|
192
|
+
y?: number
|
|
193
|
+
[key: string]: any
|
|
194
|
+
}
|
|
195
|
+
size?: {
|
|
196
|
+
width?: number
|
|
197
|
+
height?: number
|
|
198
|
+
[key: string]: any
|
|
199
|
+
}
|
|
200
|
+
[key: string]: any
|
|
201
|
+
}
|
|
202
|
+
[key: string]: any
|
|
203
|
+
}>
|
|
177
204
|
/* Faces detected result */
|
|
178
|
-
faceDetected?: () => Data
|
|
205
|
+
faceDetected?: () => Data<Array<{ [key: string]: any }>>
|
|
179
206
|
}
|
|
180
207
|
animation?: AnimationBasicEvents & {
|
|
181
208
|
stateChange?: Animation
|
|
@@ -188,11 +215,11 @@ Default property:
|
|
|
188
215
|
}
|
|
189
216
|
}
|
|
190
217
|
|
|
191
|
-
/* Camera view brick
|
|
218
|
+
/* Camera view brick */
|
|
192
219
|
export type BrickCamera = Brick &
|
|
193
220
|
BrickCameraDef & {
|
|
194
221
|
templateKey: 'BRICK_CAMERA'
|
|
195
|
-
switches
|
|
222
|
+
switches?: Array<
|
|
196
223
|
SwitchDef &
|
|
197
224
|
BrickCameraDef & {
|
|
198
225
|
conds?: Array<{
|
package/types/bricks/Chart.ts
CHANGED
|
@@ -209,15 +209,15 @@ Default property:
|
|
|
209
209
|
}
|
|
210
210
|
outlets?: {
|
|
211
211
|
/* Brick is pressing */
|
|
212
|
-
brickPressing?: () => Data
|
|
212
|
+
brickPressing?: () => Data<boolean>
|
|
213
213
|
/* Brick is focusing (Use TV Device with controller) */
|
|
214
|
-
brickFocusing?: () => Data
|
|
214
|
+
brickFocusing?: () => Data<boolean>
|
|
215
215
|
/* Generated media URL */
|
|
216
|
-
url?: () => Data
|
|
216
|
+
url?: () => Data<string>
|
|
217
217
|
/* Generated media error */
|
|
218
|
-
error?: () => Data
|
|
218
|
+
error?: () => Data<string>
|
|
219
219
|
/* Loading state */
|
|
220
|
-
loading?: () => Data
|
|
220
|
+
loading?: () => Data<boolean>
|
|
221
221
|
}
|
|
222
222
|
animation?: AnimationBasicEvents & {
|
|
223
223
|
generativeMediaOnPress?: Animation
|
|
@@ -241,7 +241,7 @@ Default property:
|
|
|
241
241
|
export type GenerativeMedia = Brick &
|
|
242
242
|
GenerativeMediaDef & {
|
|
243
243
|
templateKey: 'BRICK_GENERATIVE_MEDIA'
|
|
244
|
-
switches
|
|
244
|
+
switches?: Array<
|
|
245
245
|
SwitchDef &
|
|
246
246
|
GenerativeMediaDef & {
|
|
247
247
|
conds?: Array<{
|
package/types/bricks/Icon.ts
CHANGED
|
@@ -57,9 +57,9 @@ Default property:
|
|
|
57
57
|
}
|
|
58
58
|
outlets?: {
|
|
59
59
|
/* Brick is pressing */
|
|
60
|
-
brickPressing?: () => Data
|
|
60
|
+
brickPressing?: () => Data<boolean>
|
|
61
61
|
/* Brick is focusing (Use TV Device with controller) */
|
|
62
|
-
brickFocusing?: () => Data
|
|
62
|
+
brickFocusing?: () => Data<boolean>
|
|
63
63
|
}
|
|
64
64
|
animation?: AnimationBasicEvents & {
|
|
65
65
|
onPress?: Animation
|
|
@@ -75,7 +75,7 @@ Default property:
|
|
|
75
75
|
export type BrickIcon = Brick &
|
|
76
76
|
BrickIconDef & {
|
|
77
77
|
templateKey: 'BRICK_ICON'
|
|
78
|
-
switches
|
|
78
|
+
switches?: Array<
|
|
79
79
|
SwitchDef &
|
|
80
80
|
BrickIconDef & {
|
|
81
81
|
conds?: Array<{
|
package/types/bricks/Image.ts
CHANGED
|
@@ -71,9 +71,9 @@ Default property:
|
|
|
71
71
|
}
|
|
72
72
|
outlets?: {
|
|
73
73
|
/* Brick is pressing */
|
|
74
|
-
brickPressing?: () => Data
|
|
74
|
+
brickPressing?: () => Data<boolean>
|
|
75
75
|
/* Brick is focusing (Use TV Device with controller) */
|
|
76
|
-
brickFocusing?: () => Data
|
|
76
|
+
brickFocusing?: () => Data<boolean>
|
|
77
77
|
}
|
|
78
78
|
animation?: AnimationBasicEvents & {
|
|
79
79
|
onPress?: Animation
|
|
@@ -87,11 +87,11 @@ Default property:
|
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
-
/* Image brick
|
|
90
|
+
/* Image brick */
|
|
91
91
|
export type BrickImage = Brick &
|
|
92
92
|
BrickImageDef & {
|
|
93
93
|
templateKey: 'BRICK_IMAGE'
|
|
94
|
-
switches
|
|
94
|
+
switches?: Array<
|
|
95
95
|
SwitchDef &
|
|
96
96
|
BrickImageDef & {
|
|
97
97
|
conds?: Array<{
|
package/types/bricks/Items.ts
CHANGED
|
@@ -411,17 +411,17 @@ Default property:
|
|
|
411
411
|
}
|
|
412
412
|
outlets?: {
|
|
413
413
|
/* Catched error message */
|
|
414
|
-
error?: () => Data
|
|
414
|
+
error?: () => Data<string>
|
|
415
415
|
/* Current render mode */
|
|
416
|
-
mode?: () => Data
|
|
416
|
+
mode?: () => Data<string>
|
|
417
417
|
/* Current page index */
|
|
418
|
-
pageIndex?: () => Data
|
|
418
|
+
pageIndex?: () => Data<number>
|
|
419
419
|
/* Current page size */
|
|
420
|
-
pageSize?: () => Data
|
|
420
|
+
pageSize?: () => Data<number>
|
|
421
421
|
/* Selected item index of detail mode */
|
|
422
|
-
selectedItemIndex?: () => Data
|
|
422
|
+
selectedItemIndex?: () => Data<number>
|
|
423
423
|
/* Page is out of bound */
|
|
424
|
-
pageIsOutOfBound?: () => Data
|
|
424
|
+
pageIsOutOfBound?: () => Data<boolean>
|
|
425
425
|
}
|
|
426
426
|
animation?: AnimationBasicEvents & {
|
|
427
427
|
onPageRender?: Animation
|
|
@@ -437,7 +437,7 @@ Default property:
|
|
|
437
437
|
export type BrickItems = Brick &
|
|
438
438
|
BrickItemsDef & {
|
|
439
439
|
templateKey: 'BRICK_ITEMS'
|
|
440
|
-
switches
|
|
440
|
+
switches?: Array<
|
|
441
441
|
SwitchDef &
|
|
442
442
|
BrickItemsDef & {
|
|
443
443
|
conds?: Array<{
|
package/types/bricks/Lottie.ts
CHANGED
|
@@ -120,9 +120,9 @@ Default property:
|
|
|
120
120
|
}
|
|
121
121
|
outlets?: {
|
|
122
122
|
/* Brick is pressing */
|
|
123
|
-
brickPressing?: () => Data
|
|
123
|
+
brickPressing?: () => Data<boolean>
|
|
124
124
|
/* Brick is focusing (Use TV Device with controller) */
|
|
125
|
-
brickFocusing?: () => Data
|
|
125
|
+
brickFocusing?: () => Data<boolean>
|
|
126
126
|
}
|
|
127
127
|
animation?: AnimationBasicEvents & {
|
|
128
128
|
onPress?: Animation
|
|
@@ -137,11 +137,11 @@ Default property:
|
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
139
|
|
|
140
|
-
/* Lottie Adobe After Effects animations brick
|
|
140
|
+
/* Lottie Adobe After Effects animations brick */
|
|
141
141
|
export type BrickLottie = Brick &
|
|
142
142
|
BrickLottieDef & {
|
|
143
143
|
templateKey: 'BRICK_LOTTIE'
|
|
144
|
-
switches
|
|
144
|
+
switches?: Array<
|
|
145
145
|
SwitchDef &
|
|
146
146
|
BrickLottieDef & {
|
|
147
147
|
conds?: Array<{
|
package/types/bricks/Maps.ts
CHANGED
|
@@ -213,9 +213,9 @@ Default property:
|
|
|
213
213
|
}
|
|
214
214
|
outlets?: {
|
|
215
215
|
/* Brick is pressing */
|
|
216
|
-
brickPressing?: () => Data
|
|
216
|
+
brickPressing?: () => Data<boolean>
|
|
217
217
|
/* Brick is focusing (Use TV Device with controller) */
|
|
218
|
-
brickFocusing?: () => Data
|
|
218
|
+
brickFocusing?: () => Data<boolean>
|
|
219
219
|
}
|
|
220
220
|
animation?: AnimationBasicEvents & {
|
|
221
221
|
onPress?: Animation
|
|
@@ -231,11 +231,11 @@ Default property:
|
|
|
231
231
|
}
|
|
232
232
|
}
|
|
233
233
|
|
|
234
|
-
/* Maps brick
|
|
234
|
+
/* Maps brick */
|
|
235
235
|
export type BrickMaps = Brick &
|
|
236
236
|
BrickMapsDef & {
|
|
237
237
|
templateKey: 'BRICK_MAPS'
|
|
238
|
-
switches
|
|
238
|
+
switches?: Array<
|
|
239
239
|
SwitchDef &
|
|
240
240
|
BrickMapsDef & {
|
|
241
241
|
conds?: Array<{
|
package/types/bricks/QrCode.ts
CHANGED
|
@@ -76,9 +76,9 @@ Default property:
|
|
|
76
76
|
}
|
|
77
77
|
outlets?: {
|
|
78
78
|
/* Brick is pressing */
|
|
79
|
-
brickPressing?: () => Data
|
|
79
|
+
brickPressing?: () => Data<boolean>
|
|
80
80
|
/* Brick is focusing (Use TV Device with controller) */
|
|
81
|
-
brickFocusing?: () => Data
|
|
81
|
+
brickFocusing?: () => Data<boolean>
|
|
82
82
|
}
|
|
83
83
|
animation?: AnimationBasicEvents & {
|
|
84
84
|
onPress?: Animation
|
|
@@ -90,11 +90,11 @@ Default property:
|
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
-
/* QRCode brick
|
|
93
|
+
/* QRCode brick */
|
|
94
94
|
export type BrickQrcode = Brick &
|
|
95
95
|
BrickQrcodeDef & {
|
|
96
96
|
templateKey: 'BRICK_QRCODE'
|
|
97
|
-
switches
|
|
97
|
+
switches?: Array<
|
|
98
98
|
SwitchDef &
|
|
99
99
|
BrickQrcodeDef & {
|
|
100
100
|
conds?: Array<{
|
package/types/bricks/Rect.ts
CHANGED
|
@@ -74,9 +74,9 @@ Default property:
|
|
|
74
74
|
}
|
|
75
75
|
outlets?: {
|
|
76
76
|
/* Brick is pressing */
|
|
77
|
-
brickPressing?: () => Data
|
|
77
|
+
brickPressing?: () => Data<boolean>
|
|
78
78
|
/* Brick is focusing (Use TV Device with controller) */
|
|
79
|
-
brickFocusing?: () => Data
|
|
79
|
+
brickFocusing?: () => Data<boolean>
|
|
80
80
|
}
|
|
81
81
|
animation?: AnimationBasicEvents & {
|
|
82
82
|
onPress?: Animation
|
|
@@ -88,11 +88,11 @@ Default property:
|
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
-
/* Rect brick
|
|
91
|
+
/* Rect brick */
|
|
92
92
|
export type BrickRect = Brick &
|
|
93
93
|
BrickRectDef & {
|
|
94
94
|
templateKey: 'BRICK_RECT'
|
|
95
|
-
switches
|
|
95
|
+
switches?: Array<
|
|
96
96
|
SwitchDef &
|
|
97
97
|
BrickRectDef & {
|
|
98
98
|
conds?: Array<{
|
package/types/bricks/RichText.ts
CHANGED
|
@@ -87,9 +87,9 @@ Default property:
|
|
|
87
87
|
}
|
|
88
88
|
outlets?: {
|
|
89
89
|
/* Brick is pressing */
|
|
90
|
-
brickPressing?: () => Data
|
|
90
|
+
brickPressing?: () => Data<boolean>
|
|
91
91
|
/* Brick is focusing (Use TV Device with controller) */
|
|
92
|
-
brickFocusing?: () => Data
|
|
92
|
+
brickFocusing?: () => Data<boolean>
|
|
93
93
|
}
|
|
94
94
|
animation?: AnimationBasicEvents & {
|
|
95
95
|
onPress?: Animation
|
|
@@ -105,7 +105,7 @@ Default property:
|
|
|
105
105
|
export type BrickRichText = Brick &
|
|
106
106
|
BrickRichTextDef & {
|
|
107
107
|
templateKey: 'BRICK_RICH_TEXT'
|
|
108
|
-
switches
|
|
108
|
+
switches?: Array<
|
|
109
109
|
SwitchDef &
|
|
110
110
|
BrickRichTextDef & {
|
|
111
111
|
conds?: Array<{
|
package/types/bricks/Rive.ts
CHANGED
|
@@ -81,7 +81,7 @@ Default property:
|
|
|
81
81
|
property?: BrickBasicProperty & {
|
|
82
82
|
/* The time interval of show for each photo */
|
|
83
83
|
countdown?: number | DataLink
|
|
84
|
-
/* The slideshow media path list (File, URL)
|
|
84
|
+
/* The slideshow media path list (File, URL)
|
|
85
85
|
Each path object can override global photo/video settings.
|
|
86
86
|
Item-level properties take precedence over brick-level properties. */
|
|
87
87
|
paths?:
|
|
@@ -102,7 +102,7 @@ Default property:
|
|
|
102
102
|
}
|
|
103
103
|
>
|
|
104
104
|
| DataLink
|
|
105
|
-
/* Multiple slideshow media path lists to combine (Array of path arrays).
|
|
105
|
+
/* Multiple slideshow media path lists to combine (Array of path arrays).
|
|
106
106
|
All arrays are flattened and combined: [...paths, ...pathsList[0], ...pathsList[1], ...] */
|
|
107
107
|
pathsList?: Array<Array<any> | DataLink | DataLink> | DataLink
|
|
108
108
|
/* Loop the slideshow */
|
|
@@ -168,11 +168,11 @@ Default property:
|
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
170
|
|
|
171
|
-
/* Slideshow brick
|
|
171
|
+
/* Slideshow brick */
|
|
172
172
|
export type BrickSlideshow = Brick &
|
|
173
173
|
BrickSlideshowDef & {
|
|
174
174
|
templateKey: 'BRICK_SLIDESHOW'
|
|
175
|
-
switches
|
|
175
|
+
switches?: Array<
|
|
176
176
|
SwitchDef &
|
|
177
177
|
BrickSlideshowDef & {
|
|
178
178
|
conds?: Array<{
|
package/types/bricks/Svg.ts
CHANGED
|
@@ -58,9 +58,9 @@ Default property:
|
|
|
58
58
|
}
|
|
59
59
|
outlets?: {
|
|
60
60
|
/* Brick is pressing */
|
|
61
|
-
brickPressing?: () => Data
|
|
61
|
+
brickPressing?: () => Data<boolean>
|
|
62
62
|
/* Brick is focusing (Use TV Device with controller) */
|
|
63
|
-
brickFocusing?: () => Data
|
|
63
|
+
brickFocusing?: () => Data<boolean>
|
|
64
64
|
}
|
|
65
65
|
animation?: AnimationBasicEvents & {
|
|
66
66
|
onPress?: Animation
|
|
@@ -76,7 +76,7 @@ Default property:
|
|
|
76
76
|
export type BrickSvg = Brick &
|
|
77
77
|
BrickSvgDef & {
|
|
78
78
|
templateKey: 'BRICK_SVG'
|
|
79
|
-
switches
|
|
79
|
+
switches?: Array<
|
|
80
80
|
SwitchDef &
|
|
81
81
|
BrickSvgDef & {
|
|
82
82
|
conds?: Array<{
|
package/types/bricks/Text.ts
CHANGED
|
@@ -105,9 +105,9 @@ Default property:
|
|
|
105
105
|
}
|
|
106
106
|
outlets?: {
|
|
107
107
|
/* Brick is pressing */
|
|
108
|
-
brickPressing?: () => Data
|
|
108
|
+
brickPressing?: () => Data<boolean>
|
|
109
109
|
/* Brick is focusing (Use TV Device with controller) */
|
|
110
|
-
brickFocusing?: () => Data
|
|
110
|
+
brickFocusing?: () => Data<boolean>
|
|
111
111
|
}
|
|
112
112
|
animation?: AnimationBasicEvents & {
|
|
113
113
|
onPress?: Animation
|
|
@@ -121,11 +121,11 @@ Default property:
|
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
123
|
|
|
124
|
-
/* Text brick
|
|
124
|
+
/* Text brick */
|
|
125
125
|
export type BrickText = Brick &
|
|
126
126
|
BrickTextDef & {
|
|
127
127
|
templateKey: 'BRICK_TEXT'
|
|
128
|
-
switches
|
|
128
|
+
switches?: Array<
|
|
129
129
|
SwitchDef &
|
|
130
130
|
BrickTextDef & {
|
|
131
131
|
conds?: Array<{
|
|
@@ -186,15 +186,19 @@ Default property:
|
|
|
186
186
|
}
|
|
187
187
|
outlets?: {
|
|
188
188
|
/* The raw input */
|
|
189
|
-
rawInput?: () => Data
|
|
189
|
+
rawInput?: () => Data<any>
|
|
190
190
|
/* The regex result */
|
|
191
|
-
resultVariable?: () => Data
|
|
191
|
+
resultVariable?: () => Data<{ [key: string]: any }>
|
|
192
192
|
/* Last key in */
|
|
193
|
-
lastKey?: () => Data
|
|
193
|
+
lastKey?: () => Data<any>
|
|
194
194
|
/* Selection of the TextInput (start, end, text) */
|
|
195
|
-
selection?: () => Data
|
|
195
|
+
selection?: () => Data<{
|
|
196
|
+
start?: number
|
|
197
|
+
end?: number
|
|
198
|
+
text?: string
|
|
199
|
+
}>
|
|
196
200
|
/* Selection text of the TextInput */
|
|
197
|
-
selectionText?: () => Data
|
|
201
|
+
selectionText?: () => Data<string>
|
|
198
202
|
}
|
|
199
203
|
animation?: AnimationBasicEvents & {
|
|
200
204
|
onFocus?: Animation
|
|
@@ -209,11 +213,11 @@ Default property:
|
|
|
209
213
|
}
|
|
210
214
|
}
|
|
211
215
|
|
|
212
|
-
/* Text Input brick
|
|
216
|
+
/* Text Input brick */
|
|
213
217
|
export type BrickTextInput = Brick &
|
|
214
218
|
BrickTextInputDef & {
|
|
215
219
|
templateKey: 'BRICK_TEXT_INPUT'
|
|
216
|
-
switches
|
|
220
|
+
switches?: Array<
|
|
217
221
|
SwitchDef &
|
|
218
222
|
BrickTextInputDef & {
|
|
219
223
|
conds?: Array<{
|
package/types/bricks/Video.ts
CHANGED
|
@@ -129,9 +129,9 @@ Default property:
|
|
|
129
129
|
}
|
|
130
130
|
outlets?: {
|
|
131
131
|
/* Brick is pressing */
|
|
132
|
-
brickPressing?: () => Data
|
|
132
|
+
brickPressing?: () => Data<boolean>
|
|
133
133
|
/* Brick is focusing (Use TV Device with controller) */
|
|
134
|
-
brickFocusing?: () => Data
|
|
134
|
+
brickFocusing?: () => Data<boolean>
|
|
135
135
|
}
|
|
136
136
|
animation?: AnimationBasicEvents & {
|
|
137
137
|
onPress?: Animation
|
|
@@ -148,11 +148,11 @@ Default property:
|
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
150
|
|
|
151
|
-
/* Video brick
|
|
151
|
+
/* Video brick */
|
|
152
152
|
export type BrickVideo = Brick &
|
|
153
153
|
BrickVideoDef & {
|
|
154
154
|
templateKey: 'BRICK_VIDEO'
|
|
155
|
-
switches
|
|
155
|
+
switches?: Array<
|
|
156
156
|
SwitchDef &
|
|
157
157
|
BrickVideoDef & {
|
|
158
158
|
conds?: Array<{
|
|
@@ -68,9 +68,9 @@ Default property:
|
|
|
68
68
|
}
|
|
69
69
|
outlets?: {
|
|
70
70
|
/* Brick is pressing */
|
|
71
|
-
brickPressing?: () => Data
|
|
71
|
+
brickPressing?: () => Data<boolean>
|
|
72
72
|
/* Brick is focusing (Use TV Device with controller) */
|
|
73
|
-
brickFocusing?: () => Data
|
|
73
|
+
brickFocusing?: () => Data<boolean>
|
|
74
74
|
}
|
|
75
75
|
animation?: AnimationBasicEvents & {
|
|
76
76
|
onPress?: Animation
|
|
@@ -89,7 +89,7 @@ Default property:
|
|
|
89
89
|
export type BrickVideoStreaming = Brick &
|
|
90
90
|
BrickVideoStreamingDef & {
|
|
91
91
|
templateKey: 'BRICK_VIDEO_STREAMING'
|
|
92
|
-
switches
|
|
92
|
+
switches?: Array<
|
|
93
93
|
SwitchDef &
|
|
94
94
|
BrickVideoStreamingDef & {
|
|
95
95
|
conds?: Array<{
|
package/types/bricks/WebView.ts
CHANGED
|
@@ -130,9 +130,9 @@ Default property:
|
|
|
130
130
|
}
|
|
131
131
|
outlets?: {
|
|
132
132
|
/* The result of the query selector action */
|
|
133
|
-
queryResult?: () => Data
|
|
133
|
+
queryResult?: () => Data<any>
|
|
134
134
|
/* The error of the query selector action */
|
|
135
|
-
queryError?: () => Data
|
|
135
|
+
queryError?: () => Data<string>
|
|
136
136
|
}
|
|
137
137
|
animation?: AnimationBasicEvents & {
|
|
138
138
|
onLoad?: Animation
|
|
@@ -141,11 +141,11 @@ Default property:
|
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
143
|
|
|
144
|
-
/* WebView brick
|
|
144
|
+
/* WebView brick */
|
|
145
145
|
export type BrickWebView = Brick &
|
|
146
146
|
BrickWebViewDef & {
|
|
147
147
|
templateKey: 'BRICK_WEBVIEW'
|
|
148
|
-
switches
|
|
148
|
+
switches?: Array<
|
|
149
149
|
SwitchDef &
|
|
150
150
|
BrickWebViewDef & {
|
|
151
151
|
conds?: Array<{
|
package/types/canvas.ts
CHANGED
|
@@ -36,9 +36,11 @@ interface CanvasDef {
|
|
|
36
36
|
export type Canvas = CanvasDef & {
|
|
37
37
|
__typename: 'Canvas'
|
|
38
38
|
id: string
|
|
39
|
-
|
|
39
|
+
alias?: string
|
|
40
|
+
title?: string
|
|
40
41
|
description?: string
|
|
41
|
-
|
|
42
|
+
hideShortRef?: boolean
|
|
43
|
+
switches?: Array<
|
|
42
44
|
SwitchDef &
|
|
43
45
|
CanvasDef & {
|
|
44
46
|
conds?: Array<{
|
package/types/common.ts
CHANGED
|
@@ -6,9 +6,11 @@ import type { AutomationMap } from './automation'
|
|
|
6
6
|
export interface Brick {
|
|
7
7
|
__typename: 'Brick'
|
|
8
8
|
id: string
|
|
9
|
+
alias?: string
|
|
9
10
|
templateKey: string
|
|
10
|
-
title
|
|
11
|
-
description
|
|
11
|
+
title?: string
|
|
12
|
+
description?: string
|
|
13
|
+
hideShortRef?: boolean
|
|
12
14
|
property?: {}
|
|
13
15
|
events: {}
|
|
14
16
|
outlets?: {}
|
|
@@ -24,9 +26,11 @@ export enum LocalSyncStrategy {
|
|
|
24
26
|
export interface Generator {
|
|
25
27
|
__typename: 'Generator'
|
|
26
28
|
id: string
|
|
29
|
+
alias?: string
|
|
27
30
|
templateKey: string
|
|
28
|
-
title
|
|
29
|
-
description
|
|
31
|
+
title?: string
|
|
32
|
+
description?: string
|
|
33
|
+
hideShortRef?: boolean
|
|
30
34
|
localSyncRunMode?: LocalSyncStrategy
|
|
31
35
|
property?: {}
|
|
32
36
|
events: {}
|
|
@@ -121,6 +125,7 @@ export type ApplicationSettings = {
|
|
|
121
125
|
useOpenAiApiKeySystemData?: boolean
|
|
122
126
|
useGeminiApiKeySystemData?: boolean
|
|
123
127
|
}
|
|
128
|
+
hideShortRefs?: boolean
|
|
124
129
|
}
|
|
125
130
|
|
|
126
131
|
export type Application = {
|
|
@@ -6,6 +6,7 @@ export interface DataCalculationData {
|
|
|
6
6
|
__typename: 'DataCalculationData'
|
|
7
7
|
title?: string
|
|
8
8
|
description?: string
|
|
9
|
+
hideShortRef?: boolean
|
|
9
10
|
data: () => Data
|
|
10
11
|
inputs: Array<{
|
|
11
12
|
key: 'change'
|
|
@@ -26,6 +27,7 @@ export interface DataCommand {
|
|
|
26
27
|
id: string
|
|
27
28
|
title?: string
|
|
28
29
|
description?: string
|
|
30
|
+
hideShortRef?: boolean
|
|
29
31
|
inputs: Array<{
|
|
30
32
|
key: string
|
|
31
33
|
source: (() => DataCalculationData | DataCommand) | any
|
package/types/data-calc.ts
CHANGED
|
@@ -4,6 +4,7 @@ export interface DataCalculation {
|
|
|
4
4
|
id: string
|
|
5
5
|
title?: string
|
|
6
6
|
description?: string
|
|
7
|
+
hideShortRef?: boolean
|
|
7
8
|
// Auto: Run the calculation when inputs change and allow triggers. Careful with circular dependencies!
|
|
8
9
|
// Manual: Only run the calculation when manually triggered by System Action PROPERTY_BANK_COMMAND
|
|
9
10
|
triggerMode?: 'auto' | 'manual'
|
package/types/data.ts
CHANGED
|
@@ -17,8 +17,10 @@ interface DataDef {
|
|
|
17
17
|
export type Data<T = any> = DataDef & {
|
|
18
18
|
__typename: 'Data'
|
|
19
19
|
id: string
|
|
20
|
+
alias?: string
|
|
20
21
|
title: string
|
|
21
22
|
description?: string
|
|
23
|
+
hideShortRef?: boolean
|
|
22
24
|
metadata?: {
|
|
23
25
|
linked?: Array<SubspaceID>
|
|
24
26
|
linkedFrom?: SubspaceID
|