@fugood/bricks-project 2.24.0-beta.9 → 2.24.0
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 +38 -0
- package/compile/index.ts +460 -158
- package/compile/util.ts +2 -0
- package/package.json +7 -3
- package/package.json.bak +27 -0
- package/skills/{bricks-project → bricks-ctor}/SKILL.md +2 -2
- package/skills/{bricks-project → bricks-ctor}/rules/animation.md +1 -1
- package/skills/{bricks-project → bricks-ctor}/rules/architecture-patterns.md +7 -0
- package/skills/{bricks-project → bricks-ctor}/rules/buttress.md +10 -7
- package/skills/{bricks-project → bricks-ctor}/rules/data-calculation.md +1 -1
- package/skills/{bricks-project → bricks-ctor}/rules/local-sync.md +2 -2
- package/skills/{bricks-project → bricks-ctor}/rules/media-flow.md +3 -3
- package/skills/{bricks-project → bricks-ctor}/rules/remote-data-bank.md +6 -6
- package/skills/{bricks-project → bricks-ctor}/rules/standby-transition.md +1 -1
- package/skills/bricks-design/LICENSE.txt +180 -0
- package/skills/bricks-design/SKILL.md +66 -0
- package/tools/deploy.ts +66 -12
- package/tools/icons/fa6pro-meta.json +3669 -26125
- package/tools/mcp-server.ts +11 -878
- 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 +137 -40
- package/tools/preview-main.mjs +135 -2
- package/tools/preview.ts +41 -2
- package/tools/pull.ts +37 -19
- package/tsconfig.json +16 -0
- package/types/animation.ts +4 -0
- package/types/automation.ts +4 -1
- package/types/brick-base.ts +1 -1
- package/types/bricks/Camera.ts +47 -12
- package/types/bricks/Chart.ts +9 -3
- package/types/bricks/GenerativeMedia.ts +29 -13
- package/types/bricks/Icon.ts +8 -4
- package/types/bricks/Image.ts +9 -5
- package/types/bricks/Items.ts +28 -14
- package/types/bricks/Lottie.ts +14 -6
- package/types/bricks/Maps.ts +15 -7
- package/types/bricks/QrCode.ts +8 -4
- package/types/bricks/Rect.ts +44 -5
- package/types/bricks/RichText.ts +8 -4
- package/types/bricks/Rive.ts +20 -10
- package/types/bricks/Slideshow.ts +19 -9
- package/types/bricks/Svg.ts +7 -3
- package/types/bricks/Text.ts +8 -4
- package/types/bricks/TextInput.ts +22 -12
- package/types/bricks/Video.ts +10 -6
- package/types/bricks/VideoStreaming.ts +7 -3
- package/types/bricks/WebRtcStream.ts +6 -2
- package/types/bricks/WebView.ts +11 -7
- package/types/canvas.ts +2 -0
- package/types/common.ts +15 -8
- 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 +16 -10
- package/types/generators/Assistant.ts +68 -17
- package/types/generators/BleCentral.ts +30 -10
- package/types/generators/BlePeripheral.ts +10 -6
- package/types/generators/CanvasMap.ts +9 -5
- package/types/generators/CastlesPay.ts +14 -6
- package/types/generators/DataBank.ts +43 -8
- package/types/generators/File.ts +108 -29
- package/types/generators/GraphQl.ts +11 -5
- package/types/generators/Http.ts +32 -9
- package/types/generators/HttpServer.ts +22 -14
- package/types/generators/Information.ts +8 -4
- package/types/generators/Intent.ts +14 -4
- package/types/generators/Iterator.ts +14 -10
- package/types/generators/Keyboard.ts +26 -12
- package/types/generators/LlmAnthropicCompat.ts +32 -10
- package/types/generators/LlmAppleBuiltin.ts +24 -9
- package/types/generators/LlmGgml.ts +139 -30
- package/types/generators/LlmMediaTekNeuroPilot.ts +235 -0
- package/types/generators/LlmMlx.ts +227 -0
- package/types/generators/LlmOnnx.ts +33 -13
- package/types/generators/LlmOpenAiCompat.ts +46 -10
- package/types/generators/LlmQualcommAiEngine.ts +44 -12
- package/types/generators/Mcp.ts +374 -33
- package/types/generators/McpServer.ts +57 -18
- package/types/generators/MediaFlow.ts +37 -11
- package/types/generators/MqttBroker.ts +28 -10
- package/types/generators/MqttClient.ts +18 -8
- package/types/generators/Question.ts +12 -8
- package/types/generators/RealtimeTranscription.ts +107 -18
- package/types/generators/RerankerGgml.ts +42 -11
- package/types/generators/SerialPort.ts +17 -9
- package/types/generators/SoundPlayer.ts +9 -3
- package/types/generators/SoundRecorder.ts +23 -8
- package/types/generators/SpeechToTextGgml.ts +51 -17
- package/types/generators/SpeechToTextOnnx.ts +17 -10
- package/types/generators/SpeechToTextPlatform.ts +14 -6
- package/types/generators/SqLite.ts +19 -9
- package/types/generators/Step.ts +8 -4
- package/types/generators/SttAppleBuiltin.ts +21 -8
- package/types/generators/Tcp.ts +12 -8
- package/types/generators/TcpServer.ts +19 -13
- package/types/generators/TextToSpeechAppleBuiltin.ts +20 -7
- package/types/generators/TextToSpeechGgml.ts +28 -10
- package/types/generators/TextToSpeechOnnx.ts +18 -11
- package/types/generators/TextToSpeechOpenAiLike.ts +13 -7
- package/types/generators/ThermalPrinter.ts +12 -8
- package/types/generators/Tick.ts +10 -6
- package/types/generators/Udp.ts +16 -7
- package/types/generators/VadGgml.ts +50 -13
- package/types/generators/VadOnnx.ts +41 -11
- package/types/generators/VadTraditional.ts +27 -12
- package/types/generators/VectorStore.ts +32 -11
- package/types/generators/Watchdog.ts +18 -9
- package/types/generators/WebCrawler.ts +10 -6
- package/types/generators/WebRtc.ts +29 -15
- package/types/generators/WebSocket.ts +10 -6
- package/types/generators/index.ts +2 -0
- package/types/subspace.ts +4 -0
- package/types/system.ts +1 -1
- package/utils/event-props.ts +833 -1022
- package/api/index.ts +0 -1
- package/api/instance.ts +0 -213
- package/types/generators/TextToSpeechApple.ts +0 -113
- package/types/generators/TtsAppleBuiltin.ts +0 -105
- /package/skills/{bricks-project → bricks-ctor}/rules/automations.md +0 -0
package/types/bricks/Image.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
/* Auto generated by build script
|
|
1
|
+
/* Auto generated by build script
|
|
2
|
+
*
|
|
3
|
+
* Display images from URL or local assets with resize modes and caching
|
|
4
|
+
*/
|
|
2
5
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
3
6
|
import type { Data, DataLink } from '../data'
|
|
4
7
|
import type { Animation, AnimationBasicEvents } from '../animation'
|
|
@@ -12,6 +15,7 @@ import type {
|
|
|
12
15
|
EventProperty,
|
|
13
16
|
} from '../common'
|
|
14
17
|
import type { BrickBasicProperty, BrickBasicEvents, BrickBasicEventsForItem } from '../brick-base'
|
|
18
|
+
import type { TemplateEventPropsMap } from '../../utils/event-props'
|
|
15
19
|
|
|
16
20
|
interface BrickImageDef {
|
|
17
21
|
/*
|
|
@@ -67,13 +71,13 @@ Default property:
|
|
|
67
71
|
/* Event of the image on load */
|
|
68
72
|
onLoad?: Array<EventAction>
|
|
69
73
|
/* Event of the image on error */
|
|
70
|
-
onError?: Array<EventAction
|
|
74
|
+
onError?: Array<EventAction<string & keyof TemplateEventPropsMap['Image']['onError']>>
|
|
71
75
|
}
|
|
72
76
|
outlets?: {
|
|
73
77
|
/* Brick is pressing */
|
|
74
|
-
brickPressing?: () => Data
|
|
78
|
+
brickPressing?: () => Data<boolean>
|
|
75
79
|
/* Brick is focusing (Use TV Device with controller) */
|
|
76
|
-
brickFocusing?: () => Data
|
|
80
|
+
brickFocusing?: () => Data<boolean>
|
|
77
81
|
}
|
|
78
82
|
animation?: AnimationBasicEvents & {
|
|
79
83
|
onPress?: Animation
|
|
@@ -87,7 +91,7 @@ Default property:
|
|
|
87
91
|
}
|
|
88
92
|
}
|
|
89
93
|
|
|
90
|
-
/*
|
|
94
|
+
/* Display images from URL or local assets with resize modes and caching */
|
|
91
95
|
export type BrickImage = Brick &
|
|
92
96
|
BrickImageDef & {
|
|
93
97
|
templateKey: 'BRICK_IMAGE'
|
package/types/bricks/Items.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
/* Auto generated by build script
|
|
1
|
+
/* Auto generated by build script
|
|
2
|
+
*
|
|
3
|
+
* Data-driven list/grid. Maps items array to brick templates via propertyMapping, with pagination and detail mode support
|
|
4
|
+
*/
|
|
2
5
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
3
6
|
import type { Data, DataLink } from '../data'
|
|
4
7
|
import type { Animation, AnimationBasicEvents } from '../animation'
|
|
@@ -12,6 +15,7 @@ import type {
|
|
|
12
15
|
EventProperty,
|
|
13
16
|
} from '../common'
|
|
14
17
|
import type { BrickBasicProperty, BrickBasicEvents, BrickBasicEventsForItem } from '../brick-base'
|
|
18
|
+
import type { TemplateEventPropsMap } from '../../utils/event-props'
|
|
15
19
|
|
|
16
20
|
/* prev page */
|
|
17
21
|
export type BrickItemsActionPrevPage = Action & {
|
|
@@ -397,31 +401,41 @@ Default property:
|
|
|
397
401
|
| DataLink
|
|
398
402
|
events?: BrickBasicEventsForItem & {
|
|
399
403
|
/* Event on page render finished */
|
|
400
|
-
onPageRender?: Array<
|
|
404
|
+
onPageRender?: Array<
|
|
405
|
+
EventActionForItem<string & keyof TemplateEventPropsMap['Items']['onPageRender']>
|
|
406
|
+
>
|
|
401
407
|
/* Event on page change. */
|
|
402
|
-
onPageChange?: Array<
|
|
408
|
+
onPageChange?: Array<
|
|
409
|
+
EventActionForItem<string & keyof TemplateEventPropsMap['Items']['onPageChange']>
|
|
410
|
+
>
|
|
403
411
|
/* Event on page index out of bound. */
|
|
404
|
-
onPageOutOfBound?: Array<
|
|
412
|
+
onPageOutOfBound?: Array<
|
|
413
|
+
EventActionForItem<string & keyof TemplateEventPropsMap['Items']['onPageOutOfBound']>
|
|
414
|
+
>
|
|
405
415
|
/* Event on into `detail` mode */
|
|
406
|
-
onIntoDetailMode?: Array<
|
|
416
|
+
onIntoDetailMode?: Array<
|
|
417
|
+
EventActionForItem<string & keyof TemplateEventPropsMap['Items']['onIntoDetailMode']>
|
|
418
|
+
>
|
|
407
419
|
/* Event on into `list` mode. */
|
|
408
|
-
onIntoListMode?: Array<
|
|
420
|
+
onIntoListMode?: Array<
|
|
421
|
+
EventActionForItem<string & keyof TemplateEventPropsMap['Items']['onIntoListMode']>
|
|
422
|
+
>
|
|
409
423
|
/* Event on render error */
|
|
410
|
-
onError?: Array<EventActionForItem
|
|
424
|
+
onError?: Array<EventActionForItem<string & keyof TemplateEventPropsMap['Items']['onError']>>
|
|
411
425
|
}
|
|
412
426
|
outlets?: {
|
|
413
427
|
/* Catched error message */
|
|
414
|
-
error?: () => Data
|
|
428
|
+
error?: () => Data<string>
|
|
415
429
|
/* Current render mode */
|
|
416
|
-
mode?: () => Data
|
|
430
|
+
mode?: () => Data<string>
|
|
417
431
|
/* Current page index */
|
|
418
|
-
pageIndex?: () => Data
|
|
432
|
+
pageIndex?: () => Data<number>
|
|
419
433
|
/* Current page size */
|
|
420
|
-
pageSize?: () => Data
|
|
434
|
+
pageSize?: () => Data<number>
|
|
421
435
|
/* Selected item index of detail mode */
|
|
422
|
-
selectedItemIndex?: () => Data
|
|
436
|
+
selectedItemIndex?: () => Data<number>
|
|
423
437
|
/* Page is out of bound */
|
|
424
|
-
pageIsOutOfBound?: () => Data
|
|
438
|
+
pageIsOutOfBound?: () => Data<boolean>
|
|
425
439
|
}
|
|
426
440
|
animation?: AnimationBasicEvents & {
|
|
427
441
|
onPageRender?: Animation
|
|
@@ -433,7 +447,7 @@ Default property:
|
|
|
433
447
|
}
|
|
434
448
|
}
|
|
435
449
|
|
|
436
|
-
/*
|
|
450
|
+
/* Data-driven list/grid. Maps items array to brick templates via propertyMapping, with pagination and detail mode support */
|
|
437
451
|
export type BrickItems = Brick &
|
|
438
452
|
BrickItemsDef & {
|
|
439
453
|
templateKey: 'BRICK_ITEMS'
|
package/types/bricks/Lottie.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
/* Auto generated by build script
|
|
1
|
+
/* Auto generated by build script
|
|
2
|
+
*
|
|
3
|
+
* Lottie animation player supporting .json and .dotlottie formats. Supports speed, loop, frame range control, color/text filters, and hardware rendering
|
|
4
|
+
*/
|
|
2
5
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
3
6
|
import type { Data, DataLink } from '../data'
|
|
4
7
|
import type { Animation, AnimationBasicEvents } from '../animation'
|
|
@@ -12,6 +15,7 @@ import type {
|
|
|
12
15
|
EventProperty,
|
|
13
16
|
} from '../common'
|
|
14
17
|
import type { BrickBasicProperty, BrickBasicEvents, BrickBasicEventsForItem } from '../brick-base'
|
|
18
|
+
import type { TemplateEventPropsMap } from '../../utils/event-props'
|
|
15
19
|
|
|
16
20
|
/* Play animation */
|
|
17
21
|
export type BrickLottieActionPlay = ActionWithParams & {
|
|
@@ -112,17 +116,21 @@ Default property:
|
|
|
112
116
|
/* Event of the brick blur (Use TV Device with controller) */
|
|
113
117
|
onBlur?: Array<EventAction>
|
|
114
118
|
/* Event of the animation finished */
|
|
115
|
-
onAnimationFinish?: Array<
|
|
119
|
+
onAnimationFinish?: Array<
|
|
120
|
+
EventAction<string & keyof TemplateEventPropsMap['Lottie']['onAnimationFinish']>
|
|
121
|
+
>
|
|
116
122
|
/* Event of the uri on load failed */
|
|
117
|
-
onAnimationFailure?: Array<
|
|
123
|
+
onAnimationFailure?: Array<
|
|
124
|
+
EventAction<string & keyof TemplateEventPropsMap['Lottie']['onAnimationFailure']>
|
|
125
|
+
>
|
|
118
126
|
/* Event of the animation on loop */
|
|
119
127
|
onAnimationLoop?: Array<EventAction>
|
|
120
128
|
}
|
|
121
129
|
outlets?: {
|
|
122
130
|
/* Brick is pressing */
|
|
123
|
-
brickPressing?: () => Data
|
|
131
|
+
brickPressing?: () => Data<boolean>
|
|
124
132
|
/* Brick is focusing (Use TV Device with controller) */
|
|
125
|
-
brickFocusing?: () => Data
|
|
133
|
+
brickFocusing?: () => Data<boolean>
|
|
126
134
|
}
|
|
127
135
|
animation?: AnimationBasicEvents & {
|
|
128
136
|
onPress?: Animation
|
|
@@ -137,7 +145,7 @@ Default property:
|
|
|
137
145
|
}
|
|
138
146
|
}
|
|
139
147
|
|
|
140
|
-
/* Lottie
|
|
148
|
+
/* Lottie animation player supporting .json and .dotlottie formats. Supports speed, loop, frame range control, color/text filters, and hardware rendering */
|
|
141
149
|
export type BrickLottie = Brick &
|
|
142
150
|
BrickLottieDef & {
|
|
143
151
|
templateKey: 'BRICK_LOTTIE'
|
package/types/bricks/Maps.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
/* Auto generated by build script
|
|
1
|
+
/* Auto generated by build script
|
|
2
|
+
*
|
|
3
|
+
* Interactive map with markers, paths, and location tracking. Supports Google Maps (iOS/Android/Desktop/Web) and Apple Maps (iOS/tvOS)
|
|
4
|
+
*/
|
|
2
5
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
3
6
|
import type { Data, DataLink } from '../data'
|
|
4
7
|
import type { Animation, AnimationBasicEvents } from '../animation'
|
|
@@ -12,6 +15,7 @@ import type {
|
|
|
12
15
|
EventProperty,
|
|
13
16
|
} from '../common'
|
|
14
17
|
import type { BrickBasicProperty, BrickBasicEvents, BrickBasicEventsForItem } from '../brick-base'
|
|
18
|
+
import type { TemplateEventPropsMap } from '../../utils/event-props'
|
|
15
19
|
|
|
16
20
|
/* Zoom in the map */
|
|
17
21
|
export type BrickMapsActionZoomIn = Action & {
|
|
@@ -203,19 +207,23 @@ Default property:
|
|
|
203
207
|
/* Event of the brick blur (Use TV Device with controller) */
|
|
204
208
|
onBlur?: Array<EventAction>
|
|
205
209
|
/* Event when a marker is pressed */
|
|
206
|
-
onMarkerPress?: Array<
|
|
210
|
+
onMarkerPress?: Array<
|
|
211
|
+
EventAction<string & keyof TemplateEventPropsMap['Maps']['onMarkerPress']>
|
|
212
|
+
>
|
|
207
213
|
/* Event when the map is pressed */
|
|
208
|
-
onMapPress?: Array<EventAction
|
|
214
|
+
onMapPress?: Array<EventAction<string & keyof TemplateEventPropsMap['Maps']['onMapPress']>>
|
|
209
215
|
/* Event when the map region changes */
|
|
210
|
-
onRegionChange?: Array<
|
|
216
|
+
onRegionChange?: Array<
|
|
217
|
+
EventAction<string & keyof TemplateEventPropsMap['Maps']['onRegionChange']>
|
|
218
|
+
>
|
|
211
219
|
/* Event when the map is ready */
|
|
212
220
|
onReady?: Array<EventAction>
|
|
213
221
|
}
|
|
214
222
|
outlets?: {
|
|
215
223
|
/* Brick is pressing */
|
|
216
|
-
brickPressing?: () => Data
|
|
224
|
+
brickPressing?: () => Data<boolean>
|
|
217
225
|
/* Brick is focusing (Use TV Device with controller) */
|
|
218
|
-
brickFocusing?: () => Data
|
|
226
|
+
brickFocusing?: () => Data<boolean>
|
|
219
227
|
}
|
|
220
228
|
animation?: AnimationBasicEvents & {
|
|
221
229
|
onPress?: Animation
|
|
@@ -231,7 +239,7 @@ Default property:
|
|
|
231
239
|
}
|
|
232
240
|
}
|
|
233
241
|
|
|
234
|
-
/* Maps
|
|
242
|
+
/* Interactive map with markers, paths, and location tracking. Supports Google Maps (iOS/Android/Desktop/Web) and Apple Maps (iOS/tvOS) */
|
|
235
243
|
export type BrickMaps = Brick &
|
|
236
244
|
BrickMapsDef & {
|
|
237
245
|
templateKey: 'BRICK_MAPS'
|
package/types/bricks/QrCode.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
/* Auto generated by build script
|
|
1
|
+
/* Auto generated by build script
|
|
2
|
+
*
|
|
3
|
+
* Generate and display QR codes from text or URL values
|
|
4
|
+
*/
|
|
2
5
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
3
6
|
import type { Data, DataLink } from '../data'
|
|
4
7
|
import type { Animation, AnimationBasicEvents } from '../animation'
|
|
@@ -12,6 +15,7 @@ import type {
|
|
|
12
15
|
EventProperty,
|
|
13
16
|
} from '../common'
|
|
14
17
|
import type { BrickBasicProperty, BrickBasicEvents, BrickBasicEventsForItem } from '../brick-base'
|
|
18
|
+
import type { TemplateEventPropsMap } from '../../utils/event-props'
|
|
15
19
|
|
|
16
20
|
interface BrickQrcodeDef {
|
|
17
21
|
/*
|
|
@@ -76,9 +80,9 @@ Default property:
|
|
|
76
80
|
}
|
|
77
81
|
outlets?: {
|
|
78
82
|
/* Brick is pressing */
|
|
79
|
-
brickPressing?: () => Data
|
|
83
|
+
brickPressing?: () => Data<boolean>
|
|
80
84
|
/* Brick is focusing (Use TV Device with controller) */
|
|
81
|
-
brickFocusing?: () => Data
|
|
85
|
+
brickFocusing?: () => Data<boolean>
|
|
82
86
|
}
|
|
83
87
|
animation?: AnimationBasicEvents & {
|
|
84
88
|
onPress?: Animation
|
|
@@ -90,7 +94,7 @@ Default property:
|
|
|
90
94
|
}
|
|
91
95
|
}
|
|
92
96
|
|
|
93
|
-
/*
|
|
97
|
+
/* Generate and display QR codes from text or URL values */
|
|
94
98
|
export type BrickQrcode = Brick &
|
|
95
99
|
BrickQrcodeDef & {
|
|
96
100
|
templateKey: 'BRICK_QRCODE'
|
package/types/bricks/Rect.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
/* Auto generated by build script
|
|
1
|
+
/* Auto generated by build script
|
|
2
|
+
*
|
|
3
|
+
* Rectangle shape with customizable fill, border, radius, shadow, and blur
|
|
4
|
+
*/
|
|
2
5
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
3
6
|
import type { Data, DataLink } from '../data'
|
|
4
7
|
import type { Animation, AnimationBasicEvents } from '../animation'
|
|
@@ -12,6 +15,7 @@ import type {
|
|
|
12
15
|
EventProperty,
|
|
13
16
|
} from '../common'
|
|
14
17
|
import type { BrickBasicProperty, BrickBasicEvents, BrickBasicEventsForItem } from '../brick-base'
|
|
18
|
+
import type { TemplateEventPropsMap } from '../../utils/event-props'
|
|
15
19
|
|
|
16
20
|
interface BrickRectDef {
|
|
17
21
|
/*
|
|
@@ -33,7 +37,16 @@ Default property:
|
|
|
33
37
|
"linearGradientLocations": [
|
|
34
38
|
0,
|
|
35
39
|
1
|
|
36
|
-
]
|
|
40
|
+
],
|
|
41
|
+
"blurEnabled": false,
|
|
42
|
+
"blurVariant": "blur",
|
|
43
|
+
"blurType": "light",
|
|
44
|
+
"blurAmount": 10,
|
|
45
|
+
"blurDirection": "blurredTopClearBottom",
|
|
46
|
+
"blurStartOffset": 0,
|
|
47
|
+
"blurGlassType": "regular",
|
|
48
|
+
"blurGlassOpacity": 0.5,
|
|
49
|
+
"blurGlassInteractive": false
|
|
37
50
|
}
|
|
38
51
|
*/
|
|
39
52
|
property?: BrickBasicProperty & {
|
|
@@ -57,6 +70,32 @@ Default property:
|
|
|
57
70
|
}
|
|
58
71
|
/* An optional array of numbers defining the location of each gradient color stop */
|
|
59
72
|
linearGradientLocations?: Array<number | DataLink> | DataLink
|
|
73
|
+
/* Enable blur effect.
|
|
74
|
+
Not supported on Desktop (Electron) and Web.
|
|
75
|
+
Avoid using opacity prop with blur — use alpha backgroundColor (e.g. rgba) instead. */
|
|
76
|
+
blurEnabled?: boolean | DataLink
|
|
77
|
+
/* Blur variant */
|
|
78
|
+
blurVariant?: 'blur' | 'progressiveBlur' | 'liquidGlass' | DataLink
|
|
79
|
+
/* Blur type (blur variant) */
|
|
80
|
+
blurType?: 'xlight' | 'light' | 'dark' | 'regular' | 'prominent' | DataLink
|
|
81
|
+
/* Blur amount (0 ~ 100, blur variant) */
|
|
82
|
+
blurAmount?: number | DataLink
|
|
83
|
+
/* Progressive blur direction (progressiveBlur variant) */
|
|
84
|
+
blurDirection?:
|
|
85
|
+
| 'blurredTopClearBottom'
|
|
86
|
+
| 'blurredBottomClearTop'
|
|
87
|
+
| 'blurredCenterClearTopAndBottom'
|
|
88
|
+
| DataLink
|
|
89
|
+
/* Progressive blur start offset (0 ~ 1, progressiveBlur variant) */
|
|
90
|
+
blurStartOffset?: number | DataLink
|
|
91
|
+
/* Glass type (liquidGlass variant, iOS 26+) */
|
|
92
|
+
blurGlassType?: 'clear' | 'regular' | DataLink
|
|
93
|
+
/* Glass tint color (liquidGlass variant) */
|
|
94
|
+
blurGlassTintColor?: string | DataLink
|
|
95
|
+
/* Glass opacity (0 ~ 1, liquidGlass variant) */
|
|
96
|
+
blurGlassOpacity?: number | DataLink
|
|
97
|
+
/* Enable glass interaction (liquidGlass variant) */
|
|
98
|
+
blurGlassInteractive?: boolean | DataLink
|
|
60
99
|
}
|
|
61
100
|
events?: BrickBasicEvents & {
|
|
62
101
|
/* Event of the brick press */
|
|
@@ -74,9 +113,9 @@ Default property:
|
|
|
74
113
|
}
|
|
75
114
|
outlets?: {
|
|
76
115
|
/* Brick is pressing */
|
|
77
|
-
brickPressing?: () => Data
|
|
116
|
+
brickPressing?: () => Data<boolean>
|
|
78
117
|
/* Brick is focusing (Use TV Device with controller) */
|
|
79
|
-
brickFocusing?: () => Data
|
|
118
|
+
brickFocusing?: () => Data<boolean>
|
|
80
119
|
}
|
|
81
120
|
animation?: AnimationBasicEvents & {
|
|
82
121
|
onPress?: Animation
|
|
@@ -88,7 +127,7 @@ Default property:
|
|
|
88
127
|
}
|
|
89
128
|
}
|
|
90
129
|
|
|
91
|
-
/*
|
|
130
|
+
/* Rectangle shape with customizable fill, border, radius, shadow, and blur */
|
|
92
131
|
export type BrickRect = Brick &
|
|
93
132
|
BrickRectDef & {
|
|
94
133
|
templateKey: 'BRICK_RECT'
|
package/types/bricks/RichText.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
/* Auto generated by build script
|
|
1
|
+
/* Auto generated by build script
|
|
2
|
+
*
|
|
3
|
+
* Rich text with HTML content rendering, multiple fonts, colors, heading levels (h1-h6), and inline images
|
|
4
|
+
*/
|
|
2
5
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
3
6
|
import type { Data, DataLink } from '../data'
|
|
4
7
|
import type { Animation, AnimationBasicEvents } from '../animation'
|
|
@@ -12,6 +15,7 @@ import type {
|
|
|
12
15
|
EventProperty,
|
|
13
16
|
} from '../common'
|
|
14
17
|
import type { BrickBasicProperty, BrickBasicEvents, BrickBasicEventsForItem } from '../brick-base'
|
|
18
|
+
import type { TemplateEventPropsMap } from '../../utils/event-props'
|
|
15
19
|
|
|
16
20
|
interface BrickRichTextDef {
|
|
17
21
|
/*
|
|
@@ -87,9 +91,9 @@ Default property:
|
|
|
87
91
|
}
|
|
88
92
|
outlets?: {
|
|
89
93
|
/* Brick is pressing */
|
|
90
|
-
brickPressing?: () => Data
|
|
94
|
+
brickPressing?: () => Data<boolean>
|
|
91
95
|
/* Brick is focusing (Use TV Device with controller) */
|
|
92
|
-
brickFocusing?: () => Data
|
|
96
|
+
brickFocusing?: () => Data<boolean>
|
|
93
97
|
}
|
|
94
98
|
animation?: AnimationBasicEvents & {
|
|
95
99
|
onPress?: Animation
|
|
@@ -101,7 +105,7 @@ Default property:
|
|
|
101
105
|
}
|
|
102
106
|
}
|
|
103
107
|
|
|
104
|
-
/*
|
|
108
|
+
/* Rich text with HTML content rendering, multiple fonts, colors, heading levels (h1-h6), and inline images */
|
|
105
109
|
export type BrickRichText = Brick &
|
|
106
110
|
BrickRichTextDef & {
|
|
107
111
|
templateKey: 'BRICK_RICH_TEXT'
|
package/types/bricks/Rive.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
/* Auto generated by build script
|
|
1
|
+
/* Auto generated by build script
|
|
2
|
+
*
|
|
3
|
+
* Render Rive (.riv) animations with state machine input control, text run updates, and artboard selection
|
|
4
|
+
*/
|
|
2
5
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
3
6
|
import type { Data, DataLink } from '../data'
|
|
4
7
|
import type { Animation, AnimationBasicEvents } from '../animation'
|
|
@@ -12,6 +15,7 @@ import type {
|
|
|
12
15
|
EventProperty,
|
|
13
16
|
} from '../common'
|
|
14
17
|
import type { BrickBasicProperty, BrickBasicEvents, BrickBasicEventsForItem } from '../brick-base'
|
|
18
|
+
import type { TemplateEventPropsMap } from '../../utils/event-props'
|
|
15
19
|
|
|
16
20
|
/* Play animation */
|
|
17
21
|
export type BrickRiveActionPlay = ActionWithParams & {
|
|
@@ -159,21 +163,27 @@ Default property:
|
|
|
159
163
|
}
|
|
160
164
|
events?: BrickBasicEvents & {
|
|
161
165
|
/* Event of animation play */
|
|
162
|
-
onPlay?: Array<EventAction
|
|
166
|
+
onPlay?: Array<EventAction<string & keyof TemplateEventPropsMap['Rive']['onPlay']>>
|
|
163
167
|
/* Event of animation pause */
|
|
164
|
-
onPause?: Array<EventAction
|
|
168
|
+
onPause?: Array<EventAction<string & keyof TemplateEventPropsMap['Rive']['onPause']>>
|
|
165
169
|
/* Event of animation stop */
|
|
166
|
-
onStop?: Array<EventAction
|
|
170
|
+
onStop?: Array<EventAction<string & keyof TemplateEventPropsMap['Rive']['onStop']>>
|
|
167
171
|
/* Event of animation loop end */
|
|
168
|
-
onLoopEnd?: Array<EventAction
|
|
172
|
+
onLoopEnd?: Array<EventAction<string & keyof TemplateEventPropsMap['Rive']['onLoopEnd']>>
|
|
169
173
|
/* Event of state changed */
|
|
170
|
-
onStateChanged?: Array<
|
|
174
|
+
onStateChanged?: Array<
|
|
175
|
+
EventAction<string & keyof TemplateEventPropsMap['Rive']['onStateChanged']>
|
|
176
|
+
>
|
|
171
177
|
/* Event of error */
|
|
172
|
-
onError?: Array<EventAction
|
|
178
|
+
onError?: Array<EventAction<string & keyof TemplateEventPropsMap['Rive']['onError']>>
|
|
173
179
|
/* Event of Rive general event received */
|
|
174
|
-
onRiveGeneralEvent?: Array<
|
|
180
|
+
onRiveGeneralEvent?: Array<
|
|
181
|
+
EventAction<string & keyof TemplateEventPropsMap['Rive']['onRiveGeneralEvent']>
|
|
182
|
+
>
|
|
175
183
|
/* Event of Rive open-url event received */
|
|
176
|
-
onRiveOpenUrlEvent?: Array<
|
|
184
|
+
onRiveOpenUrlEvent?: Array<
|
|
185
|
+
EventAction<string & keyof TemplateEventPropsMap['Rive']['onRiveOpenUrlEvent']>
|
|
186
|
+
>
|
|
177
187
|
}
|
|
178
188
|
animation?: AnimationBasicEvents & {
|
|
179
189
|
onPlay?: Animation
|
|
@@ -187,7 +197,7 @@ Default property:
|
|
|
187
197
|
}
|
|
188
198
|
}
|
|
189
199
|
|
|
190
|
-
/* Rive
|
|
200
|
+
/* Render Rive (.riv) animations with state machine input control, text run updates, and artboard selection */
|
|
191
201
|
export type BrickRive = Brick &
|
|
192
202
|
BrickRiveDef & {
|
|
193
203
|
templateKey: 'BRICK_RIVE'
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
/* Auto generated by build script
|
|
1
|
+
/* Auto generated by build script
|
|
2
|
+
*
|
|
3
|
+
* Auto-advancing slideshow of child bricks with transition effects
|
|
4
|
+
*/
|
|
2
5
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
3
6
|
import type { Data, DataLink } from '../data'
|
|
4
7
|
import type { Animation, AnimationBasicEvents } from '../animation'
|
|
@@ -12,6 +15,7 @@ import type {
|
|
|
12
15
|
EventProperty,
|
|
13
16
|
} from '../common'
|
|
14
17
|
import type { BrickBasicProperty, BrickBasicEvents, BrickBasicEventsForItem } from '../brick-base'
|
|
18
|
+
import type { TemplateEventPropsMap } from '../../utils/event-props'
|
|
15
19
|
|
|
16
20
|
/* Jump to a specific index in the slideshow */
|
|
17
21
|
export type BrickSlideshowActionJumpToIndex = ActionWithParams & {
|
|
@@ -81,7 +85,7 @@ Default property:
|
|
|
81
85
|
property?: BrickBasicProperty & {
|
|
82
86
|
/* The time interval of show for each photo */
|
|
83
87
|
countdown?: number | DataLink
|
|
84
|
-
/* The slideshow media path list (File, URL)
|
|
88
|
+
/* The slideshow media path list (File, URL)
|
|
85
89
|
Each path object can override global photo/video settings.
|
|
86
90
|
Item-level properties take precedence over brick-level properties. */
|
|
87
91
|
paths?:
|
|
@@ -102,7 +106,7 @@ Default property:
|
|
|
102
106
|
}
|
|
103
107
|
>
|
|
104
108
|
| DataLink
|
|
105
|
-
/* Multiple slideshow media path lists to combine (Array of path arrays).
|
|
109
|
+
/* Multiple slideshow media path lists to combine (Array of path arrays).
|
|
106
110
|
All arrays are flattened and combined: [...paths, ...pathsList[0], ...pathsList[1], ...] */
|
|
107
111
|
pathsList?: Array<Array<any> | DataLink | DataLink> | DataLink
|
|
108
112
|
/* Loop the slideshow */
|
|
@@ -146,17 +150,23 @@ Default property:
|
|
|
146
150
|
}
|
|
147
151
|
events?: BrickBasicEvents & {
|
|
148
152
|
/* Event of the next slideshow on change start */
|
|
149
|
-
changeStart?: Array<
|
|
153
|
+
changeStart?: Array<
|
|
154
|
+
EventAction<string & keyof TemplateEventPropsMap['Slideshow']['changeStart']>
|
|
155
|
+
>
|
|
150
156
|
/* Event of the next slideshow on change end */
|
|
151
|
-
changeEnd?: Array<EventAction
|
|
157
|
+
changeEnd?: Array<EventAction<string & keyof TemplateEventPropsMap['Slideshow']['changeEnd']>>
|
|
152
158
|
/* Event on paths change */
|
|
153
|
-
contentChange?: Array<
|
|
159
|
+
contentChange?: Array<
|
|
160
|
+
EventAction<string & keyof TemplateEventPropsMap['Slideshow']['contentChange']>
|
|
161
|
+
>
|
|
154
162
|
/* Event on plays of paths are end */
|
|
155
|
-
roundEnd?: Array<EventAction
|
|
163
|
+
roundEnd?: Array<EventAction<string & keyof TemplateEventPropsMap['Slideshow']['roundEnd']>>
|
|
156
164
|
/* Event of the slideshow on load */
|
|
157
165
|
mediaOnLoad?: Array<EventAction>
|
|
158
166
|
/* Event of the slideshow media loading error */
|
|
159
|
-
mediaOnError?: Array<
|
|
167
|
+
mediaOnError?: Array<
|
|
168
|
+
EventAction<string & keyof TemplateEventPropsMap['Slideshow']['mediaOnError']>
|
|
169
|
+
>
|
|
160
170
|
}
|
|
161
171
|
animation?: AnimationBasicEvents & {
|
|
162
172
|
changeStart?: Animation
|
|
@@ -168,7 +178,7 @@ Default property:
|
|
|
168
178
|
}
|
|
169
179
|
}
|
|
170
180
|
|
|
171
|
-
/*
|
|
181
|
+
/* Auto-advancing slideshow of child bricks with transition effects */
|
|
172
182
|
export type BrickSlideshow = Brick &
|
|
173
183
|
BrickSlideshowDef & {
|
|
174
184
|
templateKey: 'BRICK_SLIDESHOW'
|
package/types/bricks/Svg.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
/* Auto generated by build script
|
|
1
|
+
/* Auto generated by build script
|
|
2
|
+
*
|
|
3
|
+
* SVG is an XML-based vector image format for 2D graphics
|
|
4
|
+
*/
|
|
2
5
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
3
6
|
import type { Data, DataLink } from '../data'
|
|
4
7
|
import type { Animation, AnimationBasicEvents } from '../animation'
|
|
@@ -12,6 +15,7 @@ import type {
|
|
|
12
15
|
EventProperty,
|
|
13
16
|
} from '../common'
|
|
14
17
|
import type { BrickBasicProperty, BrickBasicEvents, BrickBasicEventsForItem } from '../brick-base'
|
|
18
|
+
import type { TemplateEventPropsMap } from '../../utils/event-props'
|
|
15
19
|
|
|
16
20
|
interface BrickSvgDef {
|
|
17
21
|
/*
|
|
@@ -58,9 +62,9 @@ Default property:
|
|
|
58
62
|
}
|
|
59
63
|
outlets?: {
|
|
60
64
|
/* Brick is pressing */
|
|
61
|
-
brickPressing?: () => Data
|
|
65
|
+
brickPressing?: () => Data<boolean>
|
|
62
66
|
/* Brick is focusing (Use TV Device with controller) */
|
|
63
|
-
brickFocusing?: () => Data
|
|
67
|
+
brickFocusing?: () => Data<boolean>
|
|
64
68
|
}
|
|
65
69
|
animation?: AnimationBasicEvents & {
|
|
66
70
|
onPress?: Animation
|
package/types/bricks/Text.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
/* Auto generated by build script
|
|
1
|
+
/* Auto generated by build script
|
|
2
|
+
*
|
|
3
|
+
* Display styled text with font, color, alignment, and truncation controls
|
|
4
|
+
*/
|
|
2
5
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
3
6
|
import type { Data, DataLink } from '../data'
|
|
4
7
|
import type { Animation, AnimationBasicEvents } from '../animation'
|
|
@@ -12,6 +15,7 @@ import type {
|
|
|
12
15
|
EventProperty,
|
|
13
16
|
} from '../common'
|
|
14
17
|
import type { BrickBasicProperty, BrickBasicEvents, BrickBasicEventsForItem } from '../brick-base'
|
|
18
|
+
import type { TemplateEventPropsMap } from '../../utils/event-props'
|
|
15
19
|
|
|
16
20
|
interface BrickTextDef {
|
|
17
21
|
/*
|
|
@@ -105,9 +109,9 @@ Default property:
|
|
|
105
109
|
}
|
|
106
110
|
outlets?: {
|
|
107
111
|
/* Brick is pressing */
|
|
108
|
-
brickPressing?: () => Data
|
|
112
|
+
brickPressing?: () => Data<boolean>
|
|
109
113
|
/* Brick is focusing (Use TV Device with controller) */
|
|
110
|
-
brickFocusing?: () => Data
|
|
114
|
+
brickFocusing?: () => Data<boolean>
|
|
111
115
|
}
|
|
112
116
|
animation?: AnimationBasicEvents & {
|
|
113
117
|
onPress?: Animation
|
|
@@ -121,7 +125,7 @@ Default property:
|
|
|
121
125
|
}
|
|
122
126
|
}
|
|
123
127
|
|
|
124
|
-
/*
|
|
128
|
+
/* Display styled text with font, color, alignment, and truncation controls */
|
|
125
129
|
export type BrickText = Brick &
|
|
126
130
|
BrickTextDef & {
|
|
127
131
|
templateKey: 'BRICK_TEXT'
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
/* Auto generated by build script
|
|
1
|
+
/* Auto generated by build script
|
|
2
|
+
*
|
|
3
|
+
* Editable text input field with keyboard type, placeholder, and validation support
|
|
4
|
+
*/
|
|
2
5
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
3
6
|
import type { Data, DataLink } from '../data'
|
|
4
7
|
import type { Animation, AnimationBasicEvents } from '../animation'
|
|
@@ -12,6 +15,7 @@ import type {
|
|
|
12
15
|
EventProperty,
|
|
13
16
|
} from '../common'
|
|
14
17
|
import type { BrickBasicProperty, BrickBasicEvents, BrickBasicEventsForItem } from '../brick-base'
|
|
18
|
+
import type { TemplateEventPropsMap } from '../../utils/event-props'
|
|
15
19
|
|
|
16
20
|
/* Focus TextInput */
|
|
17
21
|
export type BrickTextInputActionFocus = Action & {
|
|
@@ -172,29 +176,35 @@ Default property:
|
|
|
172
176
|
/* Event of the TextInput is empty */
|
|
173
177
|
onEmpty?: Array<EventAction>
|
|
174
178
|
/* Event of the TextInput value change */
|
|
175
|
-
onChange?: Array<EventAction
|
|
179
|
+
onChange?: Array<EventAction<string & keyof TemplateEventPropsMap['TextInput']['onChange']>>
|
|
176
180
|
/* Event of the TextInput submit */
|
|
177
|
-
onSubmit?: Array<EventAction
|
|
181
|
+
onSubmit?: Array<EventAction<string & keyof TemplateEventPropsMap['TextInput']['onSubmit']>>
|
|
178
182
|
/* Event of the TextInput match regex (check every value change) */
|
|
179
|
-
onMatch?: Array<EventAction
|
|
183
|
+
onMatch?: Array<EventAction<string & keyof TemplateEventPropsMap['TextInput']['onMatch']>>
|
|
180
184
|
/* Event of the TextInput not match regex (check every value change) */
|
|
181
|
-
onNotMatch?: Array<EventAction
|
|
185
|
+
onNotMatch?: Array<EventAction<string & keyof TemplateEventPropsMap['TextInput']['onNotMatch']>>
|
|
182
186
|
/* Event of the TextInput not match regex (check every submit) */
|
|
183
|
-
onResultNotMatch?: Array<
|
|
187
|
+
onResultNotMatch?: Array<
|
|
188
|
+
EventAction<string & keyof TemplateEventPropsMap['TextInput']['onResultNotMatch']>
|
|
189
|
+
>
|
|
184
190
|
/* Event of the TextInput reach max length or match regex */
|
|
185
191
|
onFullFill?: Array<EventAction>
|
|
186
192
|
}
|
|
187
193
|
outlets?: {
|
|
188
194
|
/* The raw input */
|
|
189
|
-
rawInput?: () => Data
|
|
195
|
+
rawInput?: () => Data<any>
|
|
190
196
|
/* The regex result */
|
|
191
|
-
resultVariable?: () => Data
|
|
197
|
+
resultVariable?: () => Data<{ [key: string]: any }>
|
|
192
198
|
/* Last key in */
|
|
193
|
-
lastKey?: () => Data
|
|
199
|
+
lastKey?: () => Data<any>
|
|
194
200
|
/* Selection of the TextInput (start, end, text) */
|
|
195
|
-
selection?: () => Data
|
|
201
|
+
selection?: () => Data<{
|
|
202
|
+
start?: number
|
|
203
|
+
end?: number
|
|
204
|
+
text?: string
|
|
205
|
+
}>
|
|
196
206
|
/* Selection text of the TextInput */
|
|
197
|
-
selectionText?: () => Data
|
|
207
|
+
selectionText?: () => Data<string>
|
|
198
208
|
}
|
|
199
209
|
animation?: AnimationBasicEvents & {
|
|
200
210
|
onFocus?: Animation
|
|
@@ -209,7 +219,7 @@ Default property:
|
|
|
209
219
|
}
|
|
210
220
|
}
|
|
211
221
|
|
|
212
|
-
/*
|
|
222
|
+
/* Editable text input field with keyboard type, placeholder, and validation support */
|
|
213
223
|
export type BrickTextInput = Brick &
|
|
214
224
|
BrickTextInputDef & {
|
|
215
225
|
templateKey: 'BRICK_TEXT_INPUT'
|