@fugood/bricks-ctor 2.25.0-beta.6 → 2.25.0-beta.61
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/package.json +4 -24
- package/tools/deploy.ts +19 -165
- package/tools/mcp-server.ts +17 -26
- package/tools/postinstall.ts +21 -235
- package/tools/pull.ts +18 -121
- package/tools/push-config.ts +19 -0
- package/tools/simulator.ts +21 -0
- package/compile/action-name-map.ts +0 -1015
- package/compile/index.ts +0 -1278
- package/compile/util.ts +0 -358
- package/index.ts +0 -6
- package/skills/bricks-ctor/SKILL.md +0 -32
- package/skills/bricks-ctor/rules/animation.md +0 -159
- package/skills/bricks-ctor/rules/architecture-patterns.md +0 -69
- package/skills/bricks-ctor/rules/automations.md +0 -221
- package/skills/bricks-ctor/rules/buttress.md +0 -156
- package/skills/bricks-ctor/rules/data-calculation.md +0 -209
- package/skills/bricks-ctor/rules/local-sync.md +0 -129
- package/skills/bricks-ctor/rules/media-flow.md +0 -158
- package/skills/bricks-ctor/rules/remote-data-bank.md +0 -196
- package/skills/bricks-ctor/rules/standby-transition.md +0 -124
- package/skills/bricks-design/LICENSE.txt +0 -180
- package/skills/bricks-design/SKILL.md +0 -66
- package/skills/rive-marketplace/SKILL.md +0 -99
- package/tools/_git-author.ts +0 -29
- package/tools/_shell.ts +0 -173
- package/tools/icons/.gitattributes +0 -1
- package/tools/icons/fa6pro-glyphmap.json +0 -4686
- package/tools/icons/fa6pro-meta.json +0 -1
- package/tools/mcp-tools/compile.ts +0 -92
- package/tools/mcp-tools/huggingface.ts +0 -762
- package/tools/mcp-tools/icons.ts +0 -81
- package/tools/mcp-tools/lottie.ts +0 -102
- package/tools/mcp-tools/media.ts +0 -110
- package/tools/preview-main.mjs +0 -293
- package/tools/preview.ts +0 -150
- package/types/animation.ts +0 -100
- package/types/automation.ts +0 -235
- package/types/brick-base.ts +0 -80
- package/types/bricks/Camera.ts +0 -246
- package/types/bricks/Chart.ts +0 -372
- package/types/bricks/GenerativeMedia.ts +0 -290
- package/types/bricks/Icon.ts +0 -98
- package/types/bricks/Image.ts +0 -114
- package/types/bricks/Items.ts +0 -476
- package/types/bricks/Lottie.ts +0 -168
- package/types/bricks/Maps.ts +0 -262
- package/types/bricks/QrCode.ts +0 -117
- package/types/bricks/Rect.ts +0 -150
- package/types/bricks/RichText.ts +0 -128
- package/types/bricks/Rive.ts +0 -220
- package/types/bricks/Sketch.ts +0 -254
- package/types/bricks/Slideshow.ts +0 -201
- package/types/bricks/Svg.ts +0 -99
- package/types/bricks/Text.ts +0 -148
- package/types/bricks/TextInput.ts +0 -242
- package/types/bricks/Video.ts +0 -175
- package/types/bricks/VideoStreaming.ts +0 -112
- package/types/bricks/WebRtcStream.ts +0 -65
- package/types/bricks/WebView.ts +0 -168
- package/types/bricks/index.ts +0 -22
- package/types/canvas.ts +0 -82
- package/types/common.ts +0 -144
- package/types/data-calc-command.ts +0 -7005
- package/types/data-calc-script.ts +0 -21
- package/types/data-calc.ts +0 -11
- package/types/data.ts +0 -95
- package/types/generators/AlarmClock.ts +0 -110
- package/types/generators/Assistant.ts +0 -621
- package/types/generators/BleCentral.ts +0 -247
- package/types/generators/BlePeripheral.ts +0 -208
- package/types/generators/CanvasMap.ts +0 -74
- package/types/generators/CastlesPay.ts +0 -87
- package/types/generators/DataBank.ts +0 -160
- package/types/generators/File.ts +0 -432
- package/types/generators/GraphQl.ts +0 -132
- package/types/generators/Http.ts +0 -222
- package/types/generators/HttpServer.ts +0 -176
- package/types/generators/Information.ts +0 -103
- package/types/generators/Intent.ts +0 -168
- package/types/generators/Iterator.ts +0 -108
- package/types/generators/Keyboard.ts +0 -105
- package/types/generators/LlmAnthropicCompat.ts +0 -212
- package/types/generators/LlmAppleBuiltin.ts +0 -159
- package/types/generators/LlmGgml.ts +0 -861
- package/types/generators/LlmMediaTekNeuroPilot.ts +0 -235
- package/types/generators/LlmMlx.ts +0 -227
- package/types/generators/LlmOnnx.ts +0 -213
- package/types/generators/LlmOpenAiCompat.ts +0 -312
- package/types/generators/LlmQualcommAiEngine.ts +0 -247
- package/types/generators/Mcp.ts +0 -637
- package/types/generators/McpServer.ts +0 -289
- package/types/generators/MediaFlow.ts +0 -170
- package/types/generators/MqttBroker.ts +0 -141
- package/types/generators/MqttClient.ts +0 -141
- package/types/generators/Question.ts +0 -408
- package/types/generators/RealtimeTranscription.ts +0 -287
- package/types/generators/RerankerGgml.ts +0 -191
- package/types/generators/SerialPort.ts +0 -151
- package/types/generators/SoundPlayer.ts +0 -94
- package/types/generators/SoundRecorder.ts +0 -130
- package/types/generators/SpeechToTextGgml.ts +0 -419
- package/types/generators/SpeechToTextOnnx.ts +0 -236
- package/types/generators/SpeechToTextPlatform.ts +0 -85
- package/types/generators/SqLite.ts +0 -159
- package/types/generators/Step.ts +0 -107
- package/types/generators/SttAppleBuiltin.ts +0 -130
- package/types/generators/Tcp.ts +0 -126
- package/types/generators/TcpServer.ts +0 -147
- package/types/generators/TextToSpeechAppleBuiltin.ts +0 -127
- package/types/generators/TextToSpeechGgml.ts +0 -221
- package/types/generators/TextToSpeechOnnx.ts +0 -178
- package/types/generators/TextToSpeechOpenAiLike.ts +0 -121
- package/types/generators/ThermalPrinter.ts +0 -191
- package/types/generators/Tick.ts +0 -83
- package/types/generators/Udp.ts +0 -120
- package/types/generators/VadGgml.ts +0 -250
- package/types/generators/VadOnnx.ts +0 -231
- package/types/generators/VadTraditional.ts +0 -138
- package/types/generators/VectorStore.ts +0 -257
- package/types/generators/Watchdog.ts +0 -107
- package/types/generators/WebCrawler.ts +0 -103
- package/types/generators/WebRtc.ts +0 -181
- package/types/generators/WebSocket.ts +0 -148
- package/types/generators/index.ts +0 -57
- package/types/index.ts +0 -13
- package/types/subspace.ts +0 -60
- package/types/switch.ts +0 -51
- package/types/system.ts +0 -707
- package/utils/calc.ts +0 -126
- package/utils/data.ts +0 -497
- package/utils/event-props.ts +0 -886
- 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
|
-
}
|
package/types/bricks/Icon.ts
DELETED
|
@@ -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
|
-
}
|
package/types/bricks/Image.ts
DELETED
|
@@ -1,114 +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
|
-
"loadSystemIos": "auto",
|
|
29
|
-
"loadSystemAndroid": "auto"
|
|
30
|
-
}
|
|
31
|
-
*/
|
|
32
|
-
property?: BrickBasicProperty & {
|
|
33
|
-
/* The image resize mode */
|
|
34
|
-
resizeMode?: 'contain' | 'cover' | 'stretch' | 'center' | 'repeat' | DataLink
|
|
35
|
-
/* The image file path (File, URL) */
|
|
36
|
-
path?: string | DataLink
|
|
37
|
-
/* Data to be used in the path template (e.g. `https://example.com/${id}.png`). Supports nested data, such as `${user.avatar}`. */
|
|
38
|
-
templateData?: {} | DataLink
|
|
39
|
-
/* The path template type */
|
|
40
|
-
templateType?: '${}' | '{{}}' | DataLink
|
|
41
|
-
/* The checksum of file */
|
|
42
|
-
md5?: string | DataLink
|
|
43
|
-
/* The image fade duration */
|
|
44
|
-
fadeDuration?: number | DataLink
|
|
45
|
-
/* The image avatar mode */
|
|
46
|
-
avatar?: boolean | DataLink
|
|
47
|
-
/* The image fixed width with `avatar` */
|
|
48
|
-
width?: number | DataLink
|
|
49
|
-
/* Add blurred image at background if photo is not full */
|
|
50
|
-
enableBlurBackground?: boolean | DataLink
|
|
51
|
-
/* The blur radius of the blur filter added to the image background */
|
|
52
|
-
blurBackgroundRadius?: number | DataLink
|
|
53
|
-
/* [iOS] The use priority of image loading system (Auto: sdwebimage, fallback to default if failed) */
|
|
54
|
-
loadSystemIos?: 'auto' | 'sdwebimage' | 'default' | DataLink
|
|
55
|
-
/* [Android] The use priority of image loading system (Auto: glide, fallback to fresco if failed) */
|
|
56
|
-
loadSystemAndroid?: 'auto' | 'glide' | 'fresco' | DataLink
|
|
57
|
-
}
|
|
58
|
-
events?: BrickBasicEvents & {
|
|
59
|
-
/* Event of the brick press */
|
|
60
|
-
onPress?: Array<EventAction>
|
|
61
|
-
/* Event of the brick press in */
|
|
62
|
-
onPressIn?: Array<EventAction>
|
|
63
|
-
/* Event of the brick press out */
|
|
64
|
-
onPressOut?: Array<EventAction>
|
|
65
|
-
/* Event of the brick long press */
|
|
66
|
-
onLongPress?: Array<EventAction>
|
|
67
|
-
/* Event of the brick focus (Use TV Device with controller) */
|
|
68
|
-
onFocus?: Array<EventAction>
|
|
69
|
-
/* Event of the brick blur (Use TV Device with controller) */
|
|
70
|
-
onBlur?: Array<EventAction>
|
|
71
|
-
/* Event of the image on load */
|
|
72
|
-
onLoad?: Array<EventAction>
|
|
73
|
-
/* Event of the image on error */
|
|
74
|
-
onError?: Array<EventAction<string & keyof TemplateEventPropsMap['Image']['onError']>>
|
|
75
|
-
}
|
|
76
|
-
outlets?: {
|
|
77
|
-
/* Brick is pressing */
|
|
78
|
-
brickPressing?: () => Data<boolean>
|
|
79
|
-
/* Brick is focusing (Use TV Device with controller) */
|
|
80
|
-
brickFocusing?: () => Data<boolean>
|
|
81
|
-
}
|
|
82
|
-
animation?: AnimationBasicEvents & {
|
|
83
|
-
onPress?: Animation
|
|
84
|
-
onPressIn?: Animation
|
|
85
|
-
onPressOut?: Animation
|
|
86
|
-
onLongPress?: Animation
|
|
87
|
-
onFocus?: Animation
|
|
88
|
-
onBlur?: Animation
|
|
89
|
-
onLoad?: Animation
|
|
90
|
-
onError?: Animation
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
/* Display images from URL or local assets with resize modes and caching */
|
|
95
|
-
export type BrickImage = Brick &
|
|
96
|
-
BrickImageDef & {
|
|
97
|
-
templateKey: 'BRICK_IMAGE'
|
|
98
|
-
switches?: Array<
|
|
99
|
-
SwitchDef &
|
|
100
|
-
BrickImageDef & {
|
|
101
|
-
conds?: Array<{
|
|
102
|
-
method: '==' | '!=' | '>' | '<' | '>=' | '<='
|
|
103
|
-
cond:
|
|
104
|
-
| SwitchCondInnerStateCurrentCanvas
|
|
105
|
-
| SwitchCondData
|
|
106
|
-
| {
|
|
107
|
-
__typename: 'SwitchCondInnerStateOutlet'
|
|
108
|
-
outlet: 'brickPressing' | 'brickFocusing'
|
|
109
|
-
value: any
|
|
110
|
-
}
|
|
111
|
-
}>
|
|
112
|
-
}
|
|
113
|
-
>
|
|
114
|
-
}
|