@fugood/bricks-ctor 2.25.0-beta.8 → 2.25.0-beta.80

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 (137) hide show
  1. package/package.json +4 -24
  2. package/tools/__tests__/legacy-forwarder.test.js +91 -0
  3. package/tools/_forward.ts +26 -0
  4. package/tools/deploy.ts +3 -164
  5. package/tools/mcp-server.ts +3 -27
  6. package/tools/postinstall.ts +3 -234
  7. package/tools/pull.ts +3 -121
  8. package/tools/push-config.ts +4 -0
  9. package/tools/simulator.ts +4 -0
  10. package/compile/__tests__/index.test.js +0 -115
  11. package/compile/action-name-map.ts +0 -1015
  12. package/compile/index.ts +0 -1458
  13. package/compile/util.ts +0 -358
  14. package/index.ts +0 -6
  15. package/skills/bricks-ctor/SKILL.md +0 -32
  16. package/skills/bricks-ctor/rules/animation.md +0 -160
  17. package/skills/bricks-ctor/rules/architecture-patterns.md +0 -69
  18. package/skills/bricks-ctor/rules/automations.md +0 -221
  19. package/skills/bricks-ctor/rules/buttress.md +0 -156
  20. package/skills/bricks-ctor/rules/data-calculation.md +0 -209
  21. package/skills/bricks-ctor/rules/local-sync.md +0 -129
  22. package/skills/bricks-ctor/rules/media-flow.md +0 -158
  23. package/skills/bricks-ctor/rules/remote-data-bank.md +0 -196
  24. package/skills/bricks-ctor/rules/standby-transition.md +0 -124
  25. package/skills/bricks-design/LICENSE.txt +0 -180
  26. package/skills/bricks-design/SKILL.md +0 -66
  27. package/skills/rive-marketplace/SKILL.md +0 -99
  28. package/tools/_git-author.ts +0 -29
  29. package/tools/_shell.ts +0 -173
  30. package/tools/icons/.gitattributes +0 -1
  31. package/tools/icons/fa6pro-glyphmap.json +0 -4686
  32. package/tools/icons/fa6pro-meta.json +0 -1
  33. package/tools/mcp-tools/compile.ts +0 -92
  34. package/tools/mcp-tools/huggingface.ts +0 -762
  35. package/tools/mcp-tools/icons.ts +0 -81
  36. package/tools/mcp-tools/lottie.ts +0 -102
  37. package/tools/mcp-tools/media.ts +0 -110
  38. package/tools/preview-main.mjs +0 -306
  39. package/tools/preview.ts +0 -150
  40. package/types/animation.ts +0 -111
  41. package/types/automation.ts +0 -235
  42. package/types/brick-base.ts +0 -80
  43. package/types/bricks/Camera.ts +0 -246
  44. package/types/bricks/Chart.ts +0 -372
  45. package/types/bricks/GenerativeMedia.ts +0 -290
  46. package/types/bricks/Icon.ts +0 -98
  47. package/types/bricks/Image.ts +0 -126
  48. package/types/bricks/Items.ts +0 -476
  49. package/types/bricks/Lottie.ts +0 -168
  50. package/types/bricks/Maps.ts +0 -262
  51. package/types/bricks/QrCode.ts +0 -117
  52. package/types/bricks/Rect.ts +0 -150
  53. package/types/bricks/RichText.ts +0 -128
  54. package/types/bricks/Rive.ts +0 -220
  55. package/types/bricks/Sketch.ts +0 -254
  56. package/types/bricks/Slideshow.ts +0 -201
  57. package/types/bricks/Svg.ts +0 -99
  58. package/types/bricks/Text.ts +0 -148
  59. package/types/bricks/TextInput.ts +0 -242
  60. package/types/bricks/Video.ts +0 -175
  61. package/types/bricks/VideoStreaming.ts +0 -112
  62. package/types/bricks/WebRtcStream.ts +0 -65
  63. package/types/bricks/WebView.ts +0 -168
  64. package/types/bricks/index.ts +0 -22
  65. package/types/canvas.ts +0 -82
  66. package/types/common.ts +0 -144
  67. package/types/data-calc-command.ts +0 -7005
  68. package/types/data-calc-script.ts +0 -21
  69. package/types/data-calc.ts +0 -11
  70. package/types/data.ts +0 -95
  71. package/types/generators/AlarmClock.ts +0 -110
  72. package/types/generators/Assistant.ts +0 -621
  73. package/types/generators/BleCentral.ts +0 -247
  74. package/types/generators/BlePeripheral.ts +0 -208
  75. package/types/generators/CanvasMap.ts +0 -74
  76. package/types/generators/CastlesPay.ts +0 -87
  77. package/types/generators/DataBank.ts +0 -160
  78. package/types/generators/File.ts +0 -432
  79. package/types/generators/GraphQl.ts +0 -132
  80. package/types/generators/Http.ts +0 -222
  81. package/types/generators/HttpServer.ts +0 -176
  82. package/types/generators/Information.ts +0 -103
  83. package/types/generators/Intent.ts +0 -168
  84. package/types/generators/Iterator.ts +0 -108
  85. package/types/generators/Keyboard.ts +0 -105
  86. package/types/generators/LlmAnthropicCompat.ts +0 -212
  87. package/types/generators/LlmAppleBuiltin.ts +0 -159
  88. package/types/generators/LlmGgml.ts +0 -861
  89. package/types/generators/LlmMediaTekNeuroPilot.ts +0 -235
  90. package/types/generators/LlmMlx.ts +0 -227
  91. package/types/generators/LlmOnnx.ts +0 -213
  92. package/types/generators/LlmOpenAiCompat.ts +0 -312
  93. package/types/generators/LlmQualcommAiEngine.ts +0 -247
  94. package/types/generators/Mcp.ts +0 -637
  95. package/types/generators/McpServer.ts +0 -289
  96. package/types/generators/MediaFlow.ts +0 -170
  97. package/types/generators/MqttBroker.ts +0 -141
  98. package/types/generators/MqttClient.ts +0 -141
  99. package/types/generators/Question.ts +0 -408
  100. package/types/generators/RealtimeTranscription.ts +0 -287
  101. package/types/generators/RerankerGgml.ts +0 -191
  102. package/types/generators/SerialPort.ts +0 -151
  103. package/types/generators/SoundPlayer.ts +0 -94
  104. package/types/generators/SoundRecorder.ts +0 -130
  105. package/types/generators/SpeechToTextGgml.ts +0 -419
  106. package/types/generators/SpeechToTextOnnx.ts +0 -236
  107. package/types/generators/SpeechToTextPlatform.ts +0 -85
  108. package/types/generators/SqLite.ts +0 -159
  109. package/types/generators/Step.ts +0 -107
  110. package/types/generators/SttAppleBuiltin.ts +0 -130
  111. package/types/generators/Tcp.ts +0 -126
  112. package/types/generators/TcpServer.ts +0 -147
  113. package/types/generators/TextToSpeechAppleBuiltin.ts +0 -127
  114. package/types/generators/TextToSpeechGgml.ts +0 -221
  115. package/types/generators/TextToSpeechOnnx.ts +0 -178
  116. package/types/generators/TextToSpeechOpenAiLike.ts +0 -121
  117. package/types/generators/ThermalPrinter.ts +0 -191
  118. package/types/generators/Tick.ts +0 -83
  119. package/types/generators/Udp.ts +0 -120
  120. package/types/generators/VadGgml.ts +0 -250
  121. package/types/generators/VadOnnx.ts +0 -231
  122. package/types/generators/VadTraditional.ts +0 -138
  123. package/types/generators/VectorStore.ts +0 -257
  124. package/types/generators/Watchdog.ts +0 -107
  125. package/types/generators/WebCrawler.ts +0 -103
  126. package/types/generators/WebRtc.ts +0 -181
  127. package/types/generators/WebSocket.ts +0 -148
  128. package/types/generators/index.ts +0 -57
  129. package/types/index.ts +0 -13
  130. package/types/subspace.ts +0 -60
  131. package/types/switch.ts +0 -51
  132. package/types/system.ts +0 -707
  133. package/utils/__tests__/id.test.js +0 -58
  134. package/utils/calc.ts +0 -126
  135. package/utils/data.ts +0 -497
  136. package/utils/event-props.ts +0 -886
  137. package/utils/id.ts +0 -80
@@ -1,290 +0,0 @@
1
- /* Auto generated by build script
2
- *
3
- * Generative Media brick - Generate images and videos using AI
4
- */
5
- import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
6
- import type { Data, DataLink } from '../data'
7
- import type { Animation, AnimationBasicEvents } from '../animation'
8
- import type {
9
- Brick,
10
- EventAction,
11
- EventActionForItem,
12
- ActionWithDataParams,
13
- ActionWithParams,
14
- Action,
15
- EventProperty,
16
- } from '../common'
17
- import type { BrickBasicProperty, BrickBasicEvents, BrickBasicEventsForItem } from '../brick-base'
18
- import type { TemplateEventPropsMap } from '../../utils/event-props'
19
-
20
- interface GenerativeMediaDef {
21
- /*
22
- Default property:
23
- {
24
- "enableCache": true,
25
- "type": "image",
26
- "resizeMode": "cover",
27
- "provider": "openai",
28
- "openaiModel": "dall-e-3",
29
- "freepikClassicImageSize": "square_1_1",
30
- "geminiVeoModel": "veo-3.1-generate-preview",
31
- "geminiVeoResolution": "720p",
32
- "geminiVeoDuration": 8
33
- }
34
- */
35
- property?: BrickBasicProperty & {
36
- /* The text prompt to generate media from */
37
- prompt?: string | DataLink
38
- /* Enable cache */
39
- enableCache?: boolean | DataLink
40
- /* The type of media to generate (image or video) */
41
- type?: 'image' | 'video' | DataLink
42
- /* Default image to display when no generated image is available */
43
- defaultImage?: string | DataLink
44
- /* The hash of the default image */
45
- defaultImageHash?: string | DataLink
46
- /* The type of the default image hash */
47
- defaultImageHashType?: 'md5' | 'sha1' | 'sha256' | DataLink
48
- /* The Lottie animation to show while generating */
49
- loadingAnimation?: string | DataLink
50
- /* The Lottie animation to show when an error occurs */
51
- errorAnimation?: string | DataLink
52
- /* The resize mode for the generated media */
53
- resizeMode?: 'contain' | 'cover' | 'stretch' | 'center' | 'repeat' | DataLink
54
- /* The API key for the generative media service */
55
- apiKey?: string | DataLink
56
- /* The AI provider to use for generation (openai, freepik-classic, deepai, or gemini) */
57
- provider?: 'openai' | 'freepik-classic' | 'deepai' | 'gemini' | DataLink
58
- /* OpenAI model to use for image generation */
59
- openaiModel?: 'dall-e-3' | 'gpt-image-1.5' | 'gpt-image-2' | DataLink
60
- /* OpenAI image size. DALL-E 3 uses 1024x1024, 1024x1792, or 1792x1024; GPT Image models use 1024x1024, 1024x1536, 1536x1024, auto, and GPT Image 2 supports larger listed sizes. */
61
- openaiSize?:
62
- | '1024x1024'
63
- | '1024x1792'
64
- | '1792x1024'
65
- | '1024x1536'
66
- | '1536x1024'
67
- | '2048x2048'
68
- | '2048x1152'
69
- | '3840x2160'
70
- | '2160x3840'
71
- | 'auto'
72
- | DataLink
73
- /* OpenAI image style for DALL-E 3 (vivid or natural) */
74
- openaiStyle?: 'vivid' | 'natural' | DataLink
75
- /* OpenAI image quality. DALL-E 3 uses standard or hd; GPT Image models use low, medium, high, or auto. */
76
- openaiQuality?: 'standard' | 'hd' | 'low' | 'medium' | 'high' | 'auto' | DataLink
77
- /* Freepik image size */
78
- freepikClassicImageSize?:
79
- | 'square_1_1'
80
- | 'classic_4_3'
81
- | 'traditional_3_4'
82
- | 'widescreen_16_9'
83
- | 'social_story_9_16'
84
- | 'smartphone_horizontal_20_9'
85
- | 'smartphone_vertical_9_20'
86
- | 'standard_3_2'
87
- | 'portrait_2_3'
88
- | 'horizontal_2_1'
89
- | 'vertical_1_2'
90
- | 'social_5_4'
91
- | 'social_post_4_5'
92
- | DataLink
93
- /* Freepik image style */
94
- freepikClassicStyle?:
95
- | 'photo'
96
- | 'digital-art'
97
- | '3d'
98
- | 'painting'
99
- | 'low-poly'
100
- | 'pixel-art'
101
- | 'anime'
102
- | 'cyberpunk'
103
- | 'comic'
104
- | 'vintage'
105
- | 'cartoon'
106
- | 'vector'
107
- | 'studio-shot'
108
- | 'dark'
109
- | 'sketch'
110
- | 'mockup'
111
- | '2000s-pone'
112
- | '70s-vibe'
113
- | 'watercolor'
114
- | 'art-nouveau'
115
- | 'origami'
116
- | 'surreal'
117
- | 'fantasy'
118
- | 'traditional-japan'
119
- | DataLink
120
- /* Freepik color scheme */
121
- freepikClassicStyleColor?:
122
- | 'b&w'
123
- | 'pastel'
124
- | 'sepia'
125
- | 'dramatic'
126
- | 'vibrant'
127
- | 'orange&teal'
128
- | 'film-filter'
129
- | 'split'
130
- | 'electric'
131
- | 'pastel-pink'
132
- | 'gold-glow'
133
- | 'autumn'
134
- | 'muted-green'
135
- | 'deep-teal'
136
- | 'duotone'
137
- | 'terracotta&teal'
138
- | 'red&blue'
139
- | 'cold-neon'
140
- | 'burgundy&blue'
141
- | DataLink
142
- /* Freepik lighting style */
143
- freepikClassicStyleLighting?:
144
- | 'studio'
145
- | 'warm'
146
- | 'cinematic'
147
- | 'volumetric'
148
- | 'golden-hour'
149
- | 'long-exposure'
150
- | 'cold'
151
- | 'iridescent'
152
- | 'dramatic'
153
- | 'hardlight'
154
- | 'redscale'
155
- | 'indoor-light'
156
- | DataLink
157
- /* Freepik framing style */
158
- freepikClassicStyleFraming?:
159
- | 'portrait'
160
- | 'macro'
161
- | 'panoramic'
162
- | 'aerial-view'
163
- | 'close-up'
164
- | 'cinematic'
165
- | 'high-angle'
166
- | 'low-angle'
167
- | 'symmetry'
168
- | 'fish-eye'
169
- | 'first-person'
170
- | DataLink
171
- /* Freepik guidance scale (level of fidelity to prompt) */
172
- freepikClassicGuidanceScale?: number | DataLink
173
- /* Freepik negative prompt (attributes to avoid) */
174
- freepikClassicNegativePrompt?: string | DataLink
175
- /* DeepAI negative prompt (attributes to avoid) */
176
- deepaiNegativePrompt?: string | DataLink
177
- /* DeepAI image generator version */
178
- deepaiImageGeneratorVersion?: 'standard' | 'hd' | DataLink
179
- /* DeepAI output image width */
180
- deepaiWidth?: number | DataLink
181
- /* DeepAI output image height */
182
- deepaiHeight?: number | DataLink
183
- /* Gemini aspect ratio (1:1, 16:9, 9:16, 3:2, 2:3) */
184
- geminiAspectRatio?: '1:1' | '16:9' | '9:16' | '3:2' | '2:3' | DataLink
185
- /* Gemini model to use for image generation */
186
- geminiModel?: 'gemini-2.5-flash-image' | 'gemini-3-pro-image-preview' | DataLink
187
- /* Gemini Veo model to use for video generation */
188
- geminiVeoModel?: 'veo-3.1-generate-preview' | 'veo-3.1-fast-generate-preview' | DataLink
189
- /* Gemini Veo video resolution (720p or 1080p) */
190
- geminiVeoResolution?: '720p' | '1080p' | DataLink
191
- /* Gemini Veo video duration in seconds (4, 6, 8) */
192
- geminiVeoDuration?: 4 | 6 | 8 | DataLink
193
- /* Gemini Veo negative prompt (attributes to avoid) */
194
- geminiVeoNegativePrompt?: string | DataLink
195
- /* Gemini Veo person generation control */
196
- geminiVeoPersonGeneration?: 'allow_all' | 'allow_adult' | DataLink
197
- }
198
- events?: BrickBasicEvents & {
199
- /* Event of the brick press */
200
- generativeMediaOnPress?: Array<EventAction>
201
- /* Event of the brick press in */
202
- generativeMediaOnPressIn?: Array<EventAction>
203
- /* Event of the brick press out */
204
- generativeMediaOnPressOut?: Array<EventAction>
205
- /* Event of the brick long press */
206
- generativeMediaOnLongPress?: Array<EventAction>
207
- /* Event of the brick focus (Use TV Device with controller) */
208
- generativeMediaOnFocus?: Array<EventAction>
209
- /* Event of the brick blur (Use TV Device with controller) */
210
- generativeMediaOnBlur?: Array<EventAction>
211
- /* Event when media generation succeeds */
212
- onSuccess?: Array<
213
- EventAction<string & keyof TemplateEventPropsMap['GenerativeMedia']['onSuccess']>
214
- >
215
- /* Event when media generation fails */
216
- onError?: Array<EventAction<string & keyof TemplateEventPropsMap['GenerativeMedia']['onError']>>
217
- /* Event when media prompt request starts */
218
- promptStart?: Array<
219
- EventAction<string & keyof TemplateEventPropsMap['GenerativeMedia']['promptStart']>
220
- >
221
- /* Event when media prompt request succeeds */
222
- promptSuccess?: Array<
223
- EventAction<string & keyof TemplateEventPropsMap['GenerativeMedia']['promptSuccess']>
224
- >
225
- /* Event when media prompt request fails */
226
- promptError?: Array<
227
- EventAction<string & keyof TemplateEventPropsMap['GenerativeMedia']['promptError']>
228
- >
229
- /* Event when media loading starts */
230
- loadStart?: Array<EventAction>
231
- /* Event when media loading succeeds */
232
- loadSuccess?: Array<
233
- EventAction<string & keyof TemplateEventPropsMap['GenerativeMedia']['loadSuccess']>
234
- >
235
- /* Event when media loading fails */
236
- loadError?: Array<
237
- EventAction<string & keyof TemplateEventPropsMap['GenerativeMedia']['loadError']>
238
- >
239
- }
240
- outlets?: {
241
- /* Brick is pressing */
242
- brickPressing?: () => Data<boolean>
243
- /* Brick is focusing (Use TV Device with controller) */
244
- brickFocusing?: () => Data<boolean>
245
- /* Generated media URL */
246
- url?: () => Data<string>
247
- /* Generated media error */
248
- error?: () => Data<string>
249
- /* Loading state */
250
- loading?: () => Data<boolean>
251
- }
252
- animation?: AnimationBasicEvents & {
253
- generativeMediaOnPress?: Animation
254
- generativeMediaOnPressIn?: Animation
255
- generativeMediaOnPressOut?: Animation
256
- generativeMediaOnLongPress?: Animation
257
- generativeMediaOnFocus?: Animation
258
- generativeMediaOnBlur?: Animation
259
- onSuccess?: Animation
260
- onError?: Animation
261
- promptStart?: Animation
262
- promptSuccess?: Animation
263
- promptError?: Animation
264
- loadStart?: Animation
265
- loadSuccess?: Animation
266
- loadError?: Animation
267
- }
268
- }
269
-
270
- /* Generative Media brick - Generate images and videos using AI */
271
- export type GenerativeMedia = Brick &
272
- GenerativeMediaDef & {
273
- templateKey: 'BRICK_GENERATIVE_MEDIA'
274
- switches?: Array<
275
- SwitchDef &
276
- GenerativeMediaDef & {
277
- conds?: Array<{
278
- method: '==' | '!=' | '>' | '<' | '>=' | '<='
279
- cond:
280
- | SwitchCondInnerStateCurrentCanvas
281
- | SwitchCondData
282
- | {
283
- __typename: 'SwitchCondInnerStateOutlet'
284
- outlet: 'brickPressing' | 'brickFocusing' | 'url' | 'error' | 'loading'
285
- value: any
286
- }
287
- }>
288
- }
289
- >
290
- }
@@ -1,98 +0,0 @@
1
- /* Auto generated by build script
2
- *
3
- * Display Font Awesome 6 Pro icons. Supports Solid, Regular, Light, Duotone, Thin, Brands, and Sharp styles
4
- */
5
- import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
6
- import type { Data, DataLink } from '../data'
7
- import type { Animation, AnimationBasicEvents } from '../animation'
8
- import type {
9
- Brick,
10
- EventAction,
11
- EventActionForItem,
12
- ActionWithDataParams,
13
- ActionWithParams,
14
- Action,
15
- EventProperty,
16
- } from '../common'
17
- import type { BrickBasicProperty, BrickBasicEvents, BrickBasicEventsForItem } from '../brick-base'
18
- import type { TemplateEventPropsMap } from '../../utils/event-props'
19
-
20
- interface BrickIconDef {
21
- /*
22
- Default property:
23
- {}
24
- */
25
- property?: BrickBasicProperty & {
26
- /* Select icon */
27
- icon?:
28
- | DataLink
29
- | {
30
- type?:
31
- | 'solid'
32
- | 'regular'
33
- | 'light'
34
- | 'duotone'
35
- | 'thin'
36
- | 'brands'
37
- | 'sharpSolid'
38
- | 'sharpLight'
39
- | 'sharpRegular'
40
- | DataLink
41
- name?: string | DataLink
42
- }
43
- /* Icon main color */
44
- color?: string | DataLink
45
- /* Icon secondary color (For Duotone type) */
46
- secondaryColor?: string | DataLink
47
- }
48
- events?: BrickBasicEvents & {
49
- /* Event of the brick press */
50
- onPress?: Array<EventAction>
51
- /* Event of the brick press in */
52
- onPressIn?: Array<EventAction>
53
- /* Event of the brick press out */
54
- onPressOut?: Array<EventAction>
55
- /* Event of the brick long press */
56
- onLongPress?: Array<EventAction>
57
- /* Event of the brick focus (Use TV Device with controller) */
58
- onFocus?: Array<EventAction>
59
- /* Event of the brick blur (Use TV Device with controller) */
60
- onBlur?: Array<EventAction>
61
- }
62
- outlets?: {
63
- /* Brick is pressing */
64
- brickPressing?: () => Data<boolean>
65
- /* Brick is focusing (Use TV Device with controller) */
66
- brickFocusing?: () => Data<boolean>
67
- }
68
- animation?: AnimationBasicEvents & {
69
- onPress?: Animation
70
- onPressIn?: Animation
71
- onPressOut?: Animation
72
- onLongPress?: Animation
73
- onFocus?: Animation
74
- onBlur?: Animation
75
- }
76
- }
77
-
78
- /* Display Font Awesome 6 Pro icons. Supports Solid, Regular, Light, Duotone, Thin, Brands, and Sharp styles */
79
- export type BrickIcon = Brick &
80
- BrickIconDef & {
81
- templateKey: 'BRICK_ICON'
82
- switches?: Array<
83
- SwitchDef &
84
- BrickIconDef & {
85
- conds?: Array<{
86
- method: '==' | '!=' | '>' | '<' | '>=' | '<='
87
- cond:
88
- | SwitchCondInnerStateCurrentCanvas
89
- | SwitchCondData
90
- | {
91
- __typename: 'SwitchCondInnerStateOutlet'
92
- outlet: 'brickPressing' | 'brickFocusing'
93
- value: any
94
- }
95
- }>
96
- }
97
- >
98
- }
@@ -1,126 +0,0 @@
1
- /* Auto generated by build script
2
- *
3
- * Display images from URL or local assets with resize modes and caching
4
- */
5
- import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
6
- import type { Data, DataLink } from '../data'
7
- import type { Animation, AnimationBasicEvents } from '../animation'
8
- import type {
9
- Brick,
10
- EventAction,
11
- EventActionForItem,
12
- ActionWithDataParams,
13
- ActionWithParams,
14
- Action,
15
- EventProperty,
16
- } from '../common'
17
- import type { BrickBasicProperty, BrickBasicEvents, BrickBasicEventsForItem } from '../brick-base'
18
- import type { TemplateEventPropsMap } from '../../utils/event-props'
19
-
20
- interface BrickImageDef {
21
- /*
22
- Default property:
23
- {
24
- "path": "",
25
- "templateType": "${}",
26
- "fadeDuration": 0,
27
- "blurBackgroundRadius": 8,
28
- "imageFilterEnabled": false,
29
- "imageFilterBlur": 0,
30
- "imageFilterBlurMode": "clamp",
31
- "imageFilterColorMatrix": [],
32
- "loadSystemIos": "auto",
33
- "loadSystemAndroid": "auto"
34
- }
35
- */
36
- property?: BrickBasicProperty & {
37
- /* The image resize mode */
38
- resizeMode?: 'contain' | 'cover' | 'stretch' | 'center' | 'repeat' | DataLink
39
- /* The image file path (File, URL) */
40
- path?: string | DataLink
41
- /* Data to be used in the path template (e.g. `https://example.com/${id}.png`). Supports nested data, such as `${user.avatar}`. */
42
- templateData?: {} | DataLink
43
- /* The path template type */
44
- templateType?: '${}' | '{{}}' | DataLink
45
- /* The checksum of file */
46
- md5?: string | DataLink
47
- /* The image fade duration */
48
- fadeDuration?: number | DataLink
49
- /* The image avatar mode */
50
- avatar?: boolean | DataLink
51
- /* The image fixed width with `avatar` */
52
- width?: number | DataLink
53
- /* Add blurred image at background if photo is not full */
54
- enableBlurBackground?: boolean | DataLink
55
- /* The blur radius of the blur filter added to the image background */
56
- blurBackgroundRadius?: number | DataLink
57
- /* Enable Skia image filters. When disabled, Image uses the normal platform image renderer. */
58
- imageFilterEnabled?: boolean | DataLink
59
- /* Blur amount for the Skia image filter. */
60
- imageFilterBlur?: number | DataLink
61
- /* Tile mode for the Skia blur image filter. */
62
- imageFilterBlurMode?: 'clamp' | 'decal' | 'repeat' | 'mirror' | DataLink
63
- /* Optional 4x5 color matrix for the Skia image filter. Provide 20 numbers. */
64
- imageFilterColorMatrix?: Array<number | DataLink> | DataLink
65
- /* [iOS] The use priority of image loading system (Auto: sdwebimage, fallback to default if failed) */
66
- loadSystemIos?: 'auto' | 'sdwebimage' | 'default' | DataLink
67
- /* [Android] The use priority of image loading system (Auto: glide, fallback to fresco if failed) */
68
- loadSystemAndroid?: 'auto' | 'glide' | 'fresco' | DataLink
69
- }
70
- events?: BrickBasicEvents & {
71
- /* Event of the brick press */
72
- onPress?: Array<EventAction>
73
- /* Event of the brick press in */
74
- onPressIn?: Array<EventAction>
75
- /* Event of the brick press out */
76
- onPressOut?: Array<EventAction>
77
- /* Event of the brick long press */
78
- onLongPress?: Array<EventAction>
79
- /* Event of the brick focus (Use TV Device with controller) */
80
- onFocus?: Array<EventAction>
81
- /* Event of the brick blur (Use TV Device with controller) */
82
- onBlur?: Array<EventAction>
83
- /* Event of the image on load */
84
- onLoad?: Array<EventAction>
85
- /* Event of the image on error */
86
- onError?: Array<EventAction<string & keyof TemplateEventPropsMap['Image']['onError']>>
87
- }
88
- outlets?: {
89
- /* Brick is pressing */
90
- brickPressing?: () => Data<boolean>
91
- /* Brick is focusing (Use TV Device with controller) */
92
- brickFocusing?: () => Data<boolean>
93
- }
94
- animation?: AnimationBasicEvents & {
95
- onPress?: Animation
96
- onPressIn?: Animation
97
- onPressOut?: Animation
98
- onLongPress?: Animation
99
- onFocus?: Animation
100
- onBlur?: Animation
101
- onLoad?: Animation
102
- onError?: Animation
103
- }
104
- }
105
-
106
- /* Display images from URL or local assets with resize modes and caching */
107
- export type BrickImage = Brick &
108
- BrickImageDef & {
109
- templateKey: 'BRICK_IMAGE'
110
- switches?: Array<
111
- SwitchDef &
112
- BrickImageDef & {
113
- conds?: Array<{
114
- method: '==' | '!=' | '>' | '<' | '>=' | '<='
115
- cond:
116
- | SwitchCondInnerStateCurrentCanvas
117
- | SwitchCondData
118
- | {
119
- __typename: 'SwitchCondInnerStateOutlet'
120
- outlet: 'brickPressing' | 'brickFocusing'
121
- value: any
122
- }
123
- }>
124
- }
125
- >
126
- }