@fugood/bricks-project 2.24.10 → 2.24.12
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/index.ts +12 -1
- package/package.json +2 -2
- package/package.json.bak +2 -2
- package/skills/bricks-ctor/SKILL.md +1 -0
- package/skills/bricks-ctor/references/fonts.md +322 -0
- package/skills/bricks-ctor/references/media-flow.md +7 -0
- package/skills/bricks-ctor/references/verification-toolchain.md +9 -0
- package/skills/bricks-design/SKILL.md +9 -7
- package/skills/bricks-design/references/design-critique.md +8 -8
- package/skills/bricks-design/references/design-languages.md +24 -18
- package/skills/bricks-design/references/design-md.md +225 -0
- package/skills/bricks-design/references/translating-inputs.md +9 -2
- package/skills/bricks-design/references/variations-and-tweaks.md +1 -1
- package/skills/bricks-design/references/when-the-brief-is-branded.md +29 -30
- package/skills/bricks-design/references/workflow.md +13 -17
- package/tools/mcp-tools/compile.ts +2 -0
- package/tools/mcp-tools/simulator-guidance.ts +31 -0
- package/types/bricks/Items.d.ts +4 -0
- package/types/bricks/Text.d.ts +9 -1
- package/types/bricks/TextInput.d.ts +1 -1
- package/types/bricks/Video.d.ts +68 -1
- package/types/generators/Http.d.ts +6 -1
- package/types/generators/LlmAppleBuiltin.d.ts +4 -4
- package/utils/event-props.ts +15 -1
package/types/bricks/Video.d.ts
CHANGED
|
@@ -63,7 +63,13 @@ Default property:
|
|
|
63
63
|
"muted": false,
|
|
64
64
|
"progressUpdateInterval": 1000,
|
|
65
65
|
"replayTimeout": 500,
|
|
66
|
-
"renderMode": "auto"
|
|
66
|
+
"renderMode": "auto",
|
|
67
|
+
"showSubtitles": true,
|
|
68
|
+
"subtitleColor": "#FFFFFF",
|
|
69
|
+
"subtitleBackgroundColor": "rgba(0, 0, 0, 0.6)",
|
|
70
|
+
"subtitleFontSize": 2,
|
|
71
|
+
"subtitlePosition": "bottom",
|
|
72
|
+
"subtitleTextAlign": "center"
|
|
67
73
|
}
|
|
68
74
|
*/
|
|
69
75
|
property?: BrickBasicProperty & {
|
|
@@ -106,6 +112,57 @@ Default property:
|
|
|
106
112
|
replayTimeout?: number | DataLink
|
|
107
113
|
/* Use what view type for render video (Auto / Texture or Surface). Notice: Although using surface has better performance, it also affects the Animation & Standby Transition used by itself */
|
|
108
114
|
renderMode?: 'auto' | 'texture' | 'surface' | DataLink
|
|
115
|
+
/* The subtitle file path list or single path (SRT/WebVTT), index-matched to the video path. Used when no inline subtitles are set for that video. */
|
|
116
|
+
subtitlePath?:
|
|
117
|
+
| string
|
|
118
|
+
| DataLink
|
|
119
|
+
| DataLink
|
|
120
|
+
| {
|
|
121
|
+
url?: string | DataLink
|
|
122
|
+
}
|
|
123
|
+
| Array<
|
|
124
|
+
| DataLink
|
|
125
|
+
| {
|
|
126
|
+
url?: string | DataLink
|
|
127
|
+
}
|
|
128
|
+
| string
|
|
129
|
+
| DataLink
|
|
130
|
+
| DataLink
|
|
131
|
+
>
|
|
132
|
+
| DataLink
|
|
133
|
+
| DataLink
|
|
134
|
+
/* Inline subtitles per video, index-matched to the video path: each entry holds a `cues` list of { start, end, text } (start/end in seconds). Takes precedence over the subtitle file for that video. */
|
|
135
|
+
subtitles?:
|
|
136
|
+
| Array<
|
|
137
|
+
| DataLink
|
|
138
|
+
| {
|
|
139
|
+
cues?:
|
|
140
|
+
| Array<
|
|
141
|
+
| DataLink
|
|
142
|
+
| {
|
|
143
|
+
start?: number | DataLink
|
|
144
|
+
end?: number | DataLink
|
|
145
|
+
text?: string | DataLink
|
|
146
|
+
}
|
|
147
|
+
>
|
|
148
|
+
| DataLink
|
|
149
|
+
}
|
|
150
|
+
>
|
|
151
|
+
| DataLink
|
|
152
|
+
/* Render the subtitle overlay. Turn off to only trigger subtitle events without rendering text */
|
|
153
|
+
showSubtitles?: boolean | DataLink
|
|
154
|
+
/* Subtitle text color */
|
|
155
|
+
subtitleColor?: string | DataLink
|
|
156
|
+
/* Subtitle background color */
|
|
157
|
+
subtitleBackgroundColor?: string | DataLink
|
|
158
|
+
/* Subtitle font size, in grid units (same as Brick Text) */
|
|
159
|
+
subtitleFontSize?: number | DataLink
|
|
160
|
+
/* Subtitle font family */
|
|
161
|
+
subtitleFontFamily?: string | DataLink
|
|
162
|
+
/* Subtitle vertical position */
|
|
163
|
+
subtitlePosition?: 'bottom' | 'top' | DataLink
|
|
164
|
+
/* Subtitle text alignment */
|
|
165
|
+
subtitleTextAlign?: 'left' | 'center' | 'right' | DataLink
|
|
109
166
|
}
|
|
110
167
|
events?: BrickBasicEvents & {
|
|
111
168
|
/* Event of the brick press */
|
|
@@ -130,6 +187,14 @@ Default property:
|
|
|
130
187
|
onError?: Array<EventAction>
|
|
131
188
|
/* Event of the video progress interval */
|
|
132
189
|
onProgress?: Array<EventAction<string & keyof TemplateEventPropsMap['Video']['onProgress']>>
|
|
190
|
+
/* Event when a subtitle cue starts (appears) during playback */
|
|
191
|
+
subtitleCueEnter?: Array<
|
|
192
|
+
EventAction<string & keyof TemplateEventPropsMap['Video']['subtitleCueEnter']>
|
|
193
|
+
>
|
|
194
|
+
/* Event when a subtitle cue ends (disappears) during playback */
|
|
195
|
+
subtitleCueExit?: Array<
|
|
196
|
+
EventAction<string & keyof TemplateEventPropsMap['Video']['subtitleCueExit']>
|
|
197
|
+
>
|
|
133
198
|
}
|
|
134
199
|
outlets?: {
|
|
135
200
|
/* Brick is pressing */
|
|
@@ -149,6 +214,8 @@ Default property:
|
|
|
149
214
|
onLoad?: AnimationOrGetter
|
|
150
215
|
onError?: AnimationOrGetter
|
|
151
216
|
onProgress?: AnimationOrGetter
|
|
217
|
+
subtitleCueEnter?: AnimationOrGetter
|
|
218
|
+
subtitleCueExit?: AnimationOrGetter
|
|
152
219
|
}
|
|
153
220
|
}
|
|
154
221
|
|
|
@@ -157,7 +157,12 @@ Default property:
|
|
|
157
157
|
/* Event name to listen on SSE */
|
|
158
158
|
eventName?: string | DataLink | Array<string | DataLink> | DataLink | DataLink
|
|
159
159
|
}
|
|
160
|
-
events?: {
|
|
160
|
+
events?: {
|
|
161
|
+
/* Event triggered when the HTTP request receives a response */
|
|
162
|
+
onResponse?: Array<EventAction<string & keyof TemplateEventPropsMap['Http']['onResponse']>>
|
|
163
|
+
/* Event triggered when the HTTP request or SSE stream reports an error */
|
|
164
|
+
onError?: Array<EventAction<string & keyof TemplateEventPropsMap['Http']['onError']>>
|
|
165
|
+
}
|
|
161
166
|
outlets?: {
|
|
162
167
|
/* Response for HTTP request */
|
|
163
168
|
response?: () => Data<string | { [key: string]: any }>
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/* Auto generated by build script
|
|
2
2
|
*
|
|
3
|
-
* LLM inference using Apple Intelligence on iOS
|
|
3
|
+
* LLM inference using Apple Intelligence on iOS 26+
|
|
4
4
|
*
|
|
5
5
|
* ## Features
|
|
6
6
|
* - Native Apple Intelligence integration
|
|
7
7
|
* - No model download required
|
|
8
8
|
* - Privacy-focused on-device processing
|
|
9
9
|
* - Optimized for Apple Silicon
|
|
10
|
-
* - Requires iOS 26+
|
|
10
|
+
* - Requires iOS 26+
|
|
11
11
|
*/
|
|
12
12
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
13
13
|
import type { Data, DataLink } from '../data'
|
|
@@ -125,14 +125,14 @@ Default property:
|
|
|
125
125
|
}
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
-
/* LLM inference using Apple Intelligence on iOS
|
|
128
|
+
/* LLM inference using Apple Intelligence on iOS 26+
|
|
129
129
|
|
|
130
130
|
## Features
|
|
131
131
|
- Native Apple Intelligence integration
|
|
132
132
|
- No model download required
|
|
133
133
|
- Privacy-focused on-device processing
|
|
134
134
|
- Optimized for Apple Silicon
|
|
135
|
-
- Requires iOS 26+
|
|
135
|
+
- Requires iOS 26+ */
|
|
136
136
|
export type GeneratorAppleLLM = Generator &
|
|
137
137
|
GeneratorAppleLLMDef & {
|
|
138
138
|
templateKey: 'GENERATOR_APPLE_LLM'
|
package/utils/event-props.ts
CHANGED
|
@@ -16,6 +16,13 @@ export const templateEventPropsMap = {
|
|
|
16
16
|
Video: {
|
|
17
17
|
nextVideo: { BRICK_VIDEO_NEXT_INDEX: 'number' },
|
|
18
18
|
onProgress: { BRICK_VIDEO_CURRENT_TIME: 'number', BRICK_VIDEO_PLAYABLE_DURATION: 'number' },
|
|
19
|
+
subtitleCueEnter: {
|
|
20
|
+
BRICK_VIDEO_SUBTITLE_TEXT: 'string',
|
|
21
|
+
BRICK_VIDEO_SUBTITLE_INDEX: 'number',
|
|
22
|
+
BRICK_VIDEO_SUBTITLE_START: 'number',
|
|
23
|
+
BRICK_VIDEO_SUBTITLE_END: 'number',
|
|
24
|
+
},
|
|
25
|
+
subtitleCueExit: { BRICK_VIDEO_SUBTITLE_TEXT: 'string', BRICK_VIDEO_SUBTITLE_INDEX: 'number' },
|
|
19
26
|
},
|
|
20
27
|
VideoStreaming: {},
|
|
21
28
|
Qrcode: {},
|
|
@@ -269,7 +276,14 @@ export const templateEventPropsMap = {
|
|
|
269
276
|
subscribeDataOnConnectError: { GENERATOR_DATA_BANK_ERROR: '{ [key: string]: any }' },
|
|
270
277
|
},
|
|
271
278
|
Graphql: { subscriptionOnConnectionError: { GENERATOR_GRAPHQL_ERROR: '{ [key: string]: any }' } },
|
|
272
|
-
Http: {
|
|
279
|
+
Http: {
|
|
280
|
+
onResponse: {
|
|
281
|
+
GENERATOR_HTTP_RESPONSE: 'any',
|
|
282
|
+
GENERATOR_HTTP_RESPONSE_DETAILS:
|
|
283
|
+
'{ ok?: boolean redirected?: boolean type?: string status?: number statusText?: string headers?: { [key: string]: any } body?: any event?: string id?: string data?: any [key: string]: any }',
|
|
284
|
+
},
|
|
285
|
+
onError: { GENERATOR_HTTP_ERROR: 'string' },
|
|
286
|
+
},
|
|
273
287
|
SoundPlayer: { onLoadError: { GENERATOR_SOUND_PLAYER_ERROR: 'string' } },
|
|
274
288
|
Keyboard: {
|
|
275
289
|
onDown: {
|