@fugood/bricks-ctor 2.25.0-beta.6 → 2.25.0-beta.60
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/__tests__/config-diff.test.js +100 -0
- package/compile/__tests__/index.test.js +461 -0
- package/compile/__tests__/util.test.js +450 -0
- package/compile/action-name-map.ts +64 -0
- package/compile/config-diff.ts +155 -0
- package/compile/index.ts +668 -352
- package/compile/util.ts +134 -10
- package/package.json +7 -3
- package/skills/bricks-ctor/SKILL.md +23 -17
- package/skills/bricks-ctor/{rules → references}/animation.md +3 -2
- package/skills/bricks-ctor/{rules → references}/architecture-patterns.md +19 -0
- package/skills/bricks-ctor/{rules → references}/automations.md +11 -0
- package/skills/bricks-ctor/references/buttress.md +245 -0
- package/skills/bricks-ctor/references/data-calculation.md +252 -0
- package/skills/bricks-ctor/{rules → references}/media-flow.md +7 -0
- package/skills/bricks-ctor/references/simulator.md +132 -0
- package/skills/bricks-ctor/references/source-editing-tools.md +81 -0
- package/skills/bricks-ctor/references/verification-toolchain.md +200 -0
- package/skills/bricks-design/SKILL.md +150 -45
- package/skills/bricks-design/references/architecture-truths.md +132 -0
- package/skills/bricks-design/references/avoiding-complexity.md +91 -0
- package/skills/bricks-design/references/design-critique.md +195 -0
- package/skills/bricks-design/references/design-languages.md +265 -0
- package/skills/bricks-design/references/performance.md +116 -0
- package/skills/bricks-design/references/presentation-and-slideshow.md +137 -0
- package/skills/bricks-design/references/translating-inputs.md +152 -0
- package/skills/bricks-design/references/variations-and-tweaks.md +124 -0
- package/skills/bricks-design/references/when-the-brief-is-branded.md +284 -0
- package/skills/bricks-design/references/when-the-brief-is-vague.md +85 -0
- package/skills/bricks-design/references/workflow.md +134 -0
- package/skills/bricks-ux/SKILL.md +114 -0
- package/skills/bricks-ux/references/accessibility.md +162 -0
- package/skills/bricks-ux/references/flow-states.md +175 -0
- package/skills/bricks-ux/references/interaction-archetypes.md +189 -0
- package/skills/bricks-ux/references/monitoring-screens.md +153 -0
- package/skills/bricks-ux/references/pressable-composition.md +126 -0
- package/skills/bricks-ux/references/user-journey.md +168 -0
- package/skills/bricks-ux/references/ux-critique.md +256 -0
- package/tools/__tests__/_cli-error.test.ts +35 -0
- package/tools/__tests__/_mcp-config.test.ts +67 -0
- package/tools/__tests__/pull.test.ts +108 -0
- package/tools/_cli-error.ts +17 -0
- package/tools/_edits-log.ts +41 -0
- package/tools/_git-author.ts +10 -2
- package/tools/_last-pushed-commit.ts +28 -0
- package/tools/_mcp-config.ts +42 -0
- package/tools/_shell.ts +8 -1
- package/tools/deploy.ts +17 -6
- package/tools/mcp-env.ts +13 -0
- package/tools/mcp-server.ts +8 -0
- package/tools/mcp-tools/__tests__/data-calc-editing.test.js +516 -0
- package/tools/mcp-tools/__tests__/entry-editing.test.js +866 -0
- package/tools/mcp-tools/__tests__/huggingface.test.ts +49 -0
- package/tools/mcp-tools/__tests__/icons.test.ts +21 -0
- package/tools/mcp-tools/__tests__/mcp-env.test.js +19 -0
- package/tools/mcp-tools/_editing-helpers.ts +98 -0
- package/tools/mcp-tools/_verify.ts +50 -0
- package/tools/mcp-tools/compile.ts +21 -9
- package/tools/mcp-tools/data-calc-editing.ts +1311 -0
- package/tools/mcp-tools/entry-editing.ts +2297 -0
- package/tools/mcp-tools/huggingface.ts +23 -13
- package/tools/mcp-tools/icons.ts +23 -7
- package/tools/mcp-tools/media.ts +4 -1
- package/tools/postinstall.ts +95 -38
- package/tools/pull.ts +100 -23
- package/tools/push-config.ts +114 -0
- package/tools/{preview-main.mjs → simulator-main.mjs} +207 -12
- package/tools/simulator-preload.cjs +16 -0
- package/tools/{preview.ts → simulator.ts} +4 -4
- package/types/{animation.ts → animation.d.ts} +24 -8
- package/types/{automation.ts → automation.d.ts} +16 -20
- package/types/{brick-base.ts → brick-base.d.ts} +1 -1
- package/types/bricks/{Camera.ts → Camera.d.ts} +8 -8
- package/types/bricks/{Chart.ts → Chart.d.ts} +4 -4
- package/types/bricks/{GenerativeMedia.ts → GenerativeMedia.d.ts} +15 -15
- package/types/bricks/{Icon.ts → Icon.d.ts} +7 -7
- package/types/bricks/{Image.ts → Image.d.ts} +21 -9
- package/types/bricks/{Items.ts → Items.d.ts} +11 -7
- package/types/bricks/{Lottie.ts → Lottie.d.ts} +10 -10
- package/types/bricks/{Maps.ts → Maps.d.ts} +11 -11
- package/types/bricks/{QrCode.ts → QrCode.d.ts} +7 -7
- package/types/bricks/{Rect.ts → Rect.d.ts} +7 -7
- package/types/bricks/{RichText.ts → RichText.d.ts} +12 -9
- package/types/bricks/{Rive.ts → Rive.d.ts} +9 -9
- package/types/bricks/Scene3D.d.ts +676 -0
- package/types/bricks/{Sketch.ts → Sketch.d.ts} +10 -8
- package/types/bricks/{Slideshow.ts → Slideshow.d.ts} +7 -7
- package/types/bricks/{Svg.ts → Svg.d.ts} +7 -7
- package/types/bricks/{Text.ts → Text.d.ts} +9 -9
- package/types/bricks/{TextInput.ts → TextInput.d.ts} +10 -10
- package/types/bricks/{Video.ts → Video.d.ts} +80 -13
- package/types/bricks/{VideoStreaming.ts → VideoStreaming.d.ts} +10 -10
- package/types/bricks/{WebRtcStream.ts → WebRtcStream.d.ts} +1 -1
- package/types/bricks/{WebView.ts → WebView.d.ts} +4 -4
- package/types/bricks/{index.ts → index.d.ts} +1 -0
- package/types/{common.ts → common.d.ts} +3 -6
- package/types/data-calc-command/base.d.ts +57 -0
- package/types/data-calc-command/collection.d.ts +418 -0
- package/types/data-calc-command/color.d.ts +432 -0
- package/types/data-calc-command/constant.d.ts +50 -0
- package/types/data-calc-command/datetime.d.ts +147 -0
- package/types/data-calc-command/file.d.ts +129 -0
- package/types/data-calc-command/index.d.ts +13 -0
- package/types/data-calc-command/iteratee.d.ts +23 -0
- package/types/data-calc-command/logictype.d.ts +190 -0
- package/types/data-calc-command/math.d.ts +275 -0
- package/types/data-calc-command/object.d.ts +119 -0
- package/types/data-calc-command/sandbox.d.ts +66 -0
- package/types/data-calc-command/string.d.ts +407 -0
- package/types/{data-calc.ts → data-calc.d.ts} +1 -0
- package/types/{data.ts → data.d.ts} +4 -2
- package/types/generators/{Assistant.ts → Assistant.d.ts} +19 -0
- package/types/generators/{HttpServer.ts → HttpServer.d.ts} +56 -2
- package/types/generators/{LlmGgml.ts → LlmGgml.d.ts} +43 -1
- package/types/generators/{LlmMlx.ts → LlmMlx.d.ts} +1 -0
- package/types/generators/{RerankerGgml.ts → RerankerGgml.d.ts} +5 -1
- package/types/generators/{SoundRecorder.ts → SoundRecorder.d.ts} +10 -1
- package/types/generators/{SpeechToTextGgml.ts → SpeechToTextGgml.d.ts} +6 -1
- package/types/generators/{SttAppleBuiltin.ts → SttAppleBuiltin.d.ts} +27 -4
- package/types/generators/{ThermalPrinter.ts → ThermalPrinter.d.ts} +9 -7
- package/types/generators/{Tick.ts → Tick.d.ts} +1 -1
- package/types/generators/{VadGgml.ts → VadGgml.d.ts} +12 -2
- package/types/{subspace.ts → subspace.d.ts} +1 -1
- package/utils/__tests__/calc.test.js +25 -0
- package/utils/__tests__/id.test.js +154 -0
- package/utils/calc.ts +5 -1
- package/utils/data.ts +5 -7
- package/utils/event-props.ts +27 -1
- package/utils/id.ts +109 -56
- package/skills/bricks-ctor/rules/buttress.md +0 -156
- package/skills/bricks-ctor/rules/data-calculation.md +0 -209
- package/skills/bricks-design/LICENSE.txt +0 -180
- package/types/data-calc-command.ts +0 -7005
- /package/skills/bricks-ctor/{rules → references}/local-sync.md +0 -0
- /package/skills/bricks-ctor/{rules → references}/remote-data-bank.md +0 -0
- /package/skills/bricks-ctor/{rules → references}/standby-transition.md +0 -0
- /package/types/{canvas.ts → canvas.d.ts} +0 -0
- /package/types/{data-calc-script.ts → data-calc-script.d.ts} +0 -0
- /package/types/generators/{AlarmClock.ts → AlarmClock.d.ts} +0 -0
- /package/types/generators/{BleCentral.ts → BleCentral.d.ts} +0 -0
- /package/types/generators/{BlePeripheral.ts → BlePeripheral.d.ts} +0 -0
- /package/types/generators/{CanvasMap.ts → CanvasMap.d.ts} +0 -0
- /package/types/generators/{CastlesPay.ts → CastlesPay.d.ts} +0 -0
- /package/types/generators/{DataBank.ts → DataBank.d.ts} +0 -0
- /package/types/generators/{File.ts → File.d.ts} +0 -0
- /package/types/generators/{GraphQl.ts → GraphQl.d.ts} +0 -0
- /package/types/generators/{Http.ts → Http.d.ts} +0 -0
- /package/types/generators/{Information.ts → Information.d.ts} +0 -0
- /package/types/generators/{Intent.ts → Intent.d.ts} +0 -0
- /package/types/generators/{Iterator.ts → Iterator.d.ts} +0 -0
- /package/types/generators/{Keyboard.ts → Keyboard.d.ts} +0 -0
- /package/types/generators/{LlmAnthropicCompat.ts → LlmAnthropicCompat.d.ts} +0 -0
- /package/types/generators/{LlmAppleBuiltin.ts → LlmAppleBuiltin.d.ts} +0 -0
- /package/types/generators/{LlmMediaTekNeuroPilot.ts → LlmMediaTekNeuroPilot.d.ts} +0 -0
- /package/types/generators/{LlmOnnx.ts → LlmOnnx.d.ts} +0 -0
- /package/types/generators/{LlmOpenAiCompat.ts → LlmOpenAiCompat.d.ts} +0 -0
- /package/types/generators/{LlmQualcommAiEngine.ts → LlmQualcommAiEngine.d.ts} +0 -0
- /package/types/generators/{Mcp.ts → Mcp.d.ts} +0 -0
- /package/types/generators/{McpServer.ts → McpServer.d.ts} +0 -0
- /package/types/generators/{MediaFlow.ts → MediaFlow.d.ts} +0 -0
- /package/types/generators/{MqttBroker.ts → MqttBroker.d.ts} +0 -0
- /package/types/generators/{MqttClient.ts → MqttClient.d.ts} +0 -0
- /package/types/generators/{Question.ts → Question.d.ts} +0 -0
- /package/types/generators/{RealtimeTranscription.ts → RealtimeTranscription.d.ts} +0 -0
- /package/types/generators/{SerialPort.ts → SerialPort.d.ts} +0 -0
- /package/types/generators/{SoundPlayer.ts → SoundPlayer.d.ts} +0 -0
- /package/types/generators/{SpeechToTextOnnx.ts → SpeechToTextOnnx.d.ts} +0 -0
- /package/types/generators/{SpeechToTextPlatform.ts → SpeechToTextPlatform.d.ts} +0 -0
- /package/types/generators/{SqLite.ts → SqLite.d.ts} +0 -0
- /package/types/generators/{Step.ts → Step.d.ts} +0 -0
- /package/types/generators/{Tcp.ts → Tcp.d.ts} +0 -0
- /package/types/generators/{TcpServer.ts → TcpServer.d.ts} +0 -0
- /package/types/generators/{TextToSpeechAppleBuiltin.ts → TextToSpeechAppleBuiltin.d.ts} +0 -0
- /package/types/generators/{TextToSpeechGgml.ts → TextToSpeechGgml.d.ts} +0 -0
- /package/types/generators/{TextToSpeechOnnx.ts → TextToSpeechOnnx.d.ts} +0 -0
- /package/types/generators/{TextToSpeechOpenAiLike.ts → TextToSpeechOpenAiLike.d.ts} +0 -0
- /package/types/generators/{Udp.ts → Udp.d.ts} +0 -0
- /package/types/generators/{VadOnnx.ts → VadOnnx.d.ts} +0 -0
- /package/types/generators/{VadTraditional.ts → VadTraditional.d.ts} +0 -0
- /package/types/generators/{VectorStore.ts → VectorStore.d.ts} +0 -0
- /package/types/generators/{Watchdog.ts → Watchdog.d.ts} +0 -0
- /package/types/generators/{WebCrawler.ts → WebCrawler.d.ts} +0 -0
- /package/types/generators/{WebRtc.ts → WebRtc.d.ts} +0 -0
- /package/types/generators/{WebSocket.ts → WebSocket.d.ts} +0 -0
- /package/types/generators/{index.ts → index.d.ts} +0 -0
- /package/types/{index.ts → index.d.ts} +0 -0
- /package/types/{switch.ts → switch.d.ts} +0 -0
- /package/types/{system.ts → system.d.ts} +0 -0
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
6
6
|
import type { Data, DataLink } from '../data'
|
|
7
|
-
import type { Animation, AnimationBasicEvents } from '../animation'
|
|
7
|
+
import type { Animation, AnimationBasicEvents, AnimationOrGetter } from '../animation'
|
|
8
8
|
import type {
|
|
9
9
|
Brick,
|
|
10
10
|
EventAction,
|
|
@@ -191,9 +191,11 @@ Default property:
|
|
|
191
191
|
/* A stroke was just committed (drawn or added programmatically) */
|
|
192
192
|
onStrokeEnd?: Array<EventAction<string & keyof TemplateEventPropsMap['Sketch']['onStrokeEnd']>>
|
|
193
193
|
/* The canvas was cleared */
|
|
194
|
-
onClear?: Array<EventAction
|
|
194
|
+
onClear?: Array<EventAction<string & keyof TemplateEventPropsMap['Sketch']['onClear']>>
|
|
195
195
|
/* Sketch state changed (any commit, undo, redo, clear, or import) */
|
|
196
|
-
onStateChange?: Array<
|
|
196
|
+
onStateChange?: Array<
|
|
197
|
+
EventAction<string & keyof TemplateEventPropsMap['Sketch']['onStateChange']>
|
|
198
|
+
>
|
|
197
199
|
/* Active tool changed */
|
|
198
200
|
onToolChange?: Array<
|
|
199
201
|
EventAction<string & keyof TemplateEventPropsMap['Sketch']['onToolChange']>
|
|
@@ -223,11 +225,11 @@ Default property:
|
|
|
223
225
|
}>
|
|
224
226
|
}
|
|
225
227
|
animation?: AnimationBasicEvents & {
|
|
226
|
-
onStrokeEnd?:
|
|
227
|
-
onClear?:
|
|
228
|
-
onStateChange?:
|
|
229
|
-
onToolChange?:
|
|
230
|
-
onExportImage?:
|
|
228
|
+
onStrokeEnd?: AnimationOrGetter
|
|
229
|
+
onClear?: AnimationOrGetter
|
|
230
|
+
onStateChange?: AnimationOrGetter
|
|
231
|
+
onToolChange?: AnimationOrGetter
|
|
232
|
+
onExportImage?: AnimationOrGetter
|
|
231
233
|
}
|
|
232
234
|
}
|
|
233
235
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
6
6
|
import type { Data, DataLink } from '../data'
|
|
7
|
-
import type { Animation, AnimationBasicEvents } from '../animation'
|
|
7
|
+
import type { Animation, AnimationBasicEvents, AnimationOrGetter } from '../animation'
|
|
8
8
|
import type {
|
|
9
9
|
Brick,
|
|
10
10
|
EventAction,
|
|
@@ -169,12 +169,12 @@ Default property:
|
|
|
169
169
|
>
|
|
170
170
|
}
|
|
171
171
|
animation?: AnimationBasicEvents & {
|
|
172
|
-
changeStart?:
|
|
173
|
-
changeEnd?:
|
|
174
|
-
contentChange?:
|
|
175
|
-
roundEnd?:
|
|
176
|
-
mediaOnLoad?:
|
|
177
|
-
mediaOnError?:
|
|
172
|
+
changeStart?: AnimationOrGetter
|
|
173
|
+
changeEnd?: AnimationOrGetter
|
|
174
|
+
contentChange?: AnimationOrGetter
|
|
175
|
+
roundEnd?: AnimationOrGetter
|
|
176
|
+
mediaOnLoad?: AnimationOrGetter
|
|
177
|
+
mediaOnError?: AnimationOrGetter
|
|
178
178
|
}
|
|
179
179
|
}
|
|
180
180
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
6
6
|
import type { Data, DataLink } from '../data'
|
|
7
|
-
import type { Animation, AnimationBasicEvents } from '../animation'
|
|
7
|
+
import type { Animation, AnimationBasicEvents, AnimationOrGetter } from '../animation'
|
|
8
8
|
import type {
|
|
9
9
|
Brick,
|
|
10
10
|
EventAction,
|
|
@@ -67,12 +67,12 @@ Default property:
|
|
|
67
67
|
brickFocusing?: () => Data<boolean>
|
|
68
68
|
}
|
|
69
69
|
animation?: AnimationBasicEvents & {
|
|
70
|
-
onPress?:
|
|
71
|
-
onPressIn?:
|
|
72
|
-
onPressOut?:
|
|
73
|
-
onLongPress?:
|
|
74
|
-
onFocus?:
|
|
75
|
-
onBlur?:
|
|
70
|
+
onPress?: AnimationOrGetter
|
|
71
|
+
onPressIn?: AnimationOrGetter
|
|
72
|
+
onPressOut?: AnimationOrGetter
|
|
73
|
+
onLongPress?: AnimationOrGetter
|
|
74
|
+
onFocus?: AnimationOrGetter
|
|
75
|
+
onBlur?: AnimationOrGetter
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
6
6
|
import type { Data, DataLink } from '../data'
|
|
7
|
-
import type { Animation, AnimationBasicEvents } from '../animation'
|
|
7
|
+
import type { Animation, AnimationBasicEvents, AnimationOrGetter } from '../animation'
|
|
8
8
|
import type {
|
|
9
9
|
Brick,
|
|
10
10
|
EventAction,
|
|
@@ -114,14 +114,14 @@ Default property:
|
|
|
114
114
|
brickFocusing?: () => Data<boolean>
|
|
115
115
|
}
|
|
116
116
|
animation?: AnimationBasicEvents & {
|
|
117
|
-
onPress?:
|
|
118
|
-
onPressIn?:
|
|
119
|
-
onPressOut?:
|
|
120
|
-
onLongPress?:
|
|
121
|
-
onFocus?:
|
|
122
|
-
onBlur?:
|
|
123
|
-
beforeValueChange?:
|
|
124
|
-
valueChange?:
|
|
117
|
+
onPress?: AnimationOrGetter
|
|
118
|
+
onPressIn?: AnimationOrGetter
|
|
119
|
+
onPressOut?: AnimationOrGetter
|
|
120
|
+
onLongPress?: AnimationOrGetter
|
|
121
|
+
onFocus?: AnimationOrGetter
|
|
122
|
+
onBlur?: AnimationOrGetter
|
|
123
|
+
beforeValueChange?: AnimationOrGetter
|
|
124
|
+
valueChange?: AnimationOrGetter
|
|
125
125
|
}
|
|
126
126
|
}
|
|
127
127
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
6
6
|
import type { Data, DataLink } from '../data'
|
|
7
|
-
import type { Animation, AnimationBasicEvents } from '../animation'
|
|
7
|
+
import type { Animation, AnimationBasicEvents, AnimationOrGetter } from '../animation'
|
|
8
8
|
import type {
|
|
9
9
|
Brick,
|
|
10
10
|
EventAction,
|
|
@@ -207,15 +207,15 @@ Default property:
|
|
|
207
207
|
selectionText?: () => Data<string>
|
|
208
208
|
}
|
|
209
209
|
animation?: AnimationBasicEvents & {
|
|
210
|
-
onFocus?:
|
|
211
|
-
onBlur?:
|
|
212
|
-
onEmpty?:
|
|
213
|
-
onChange?:
|
|
214
|
-
onSubmit?:
|
|
215
|
-
onMatch?:
|
|
216
|
-
onNotMatch?:
|
|
217
|
-
onResultNotMatch?:
|
|
218
|
-
onFullFill?:
|
|
210
|
+
onFocus?: AnimationOrGetter
|
|
211
|
+
onBlur?: AnimationOrGetter
|
|
212
|
+
onEmpty?: AnimationOrGetter
|
|
213
|
+
onChange?: AnimationOrGetter
|
|
214
|
+
onSubmit?: AnimationOrGetter
|
|
215
|
+
onMatch?: AnimationOrGetter
|
|
216
|
+
onNotMatch?: AnimationOrGetter
|
|
217
|
+
onResultNotMatch?: AnimationOrGetter
|
|
218
|
+
onFullFill?: AnimationOrGetter
|
|
219
219
|
}
|
|
220
220
|
}
|
|
221
221
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
6
6
|
import type { Data, DataLink } from '../data'
|
|
7
|
-
import type { Animation, AnimationBasicEvents } from '../animation'
|
|
7
|
+
import type { Animation, AnimationBasicEvents, AnimationOrGetter } from '../animation'
|
|
8
8
|
import type {
|
|
9
9
|
Brick,
|
|
10
10
|
EventAction,
|
|
@@ -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 */
|
|
@@ -138,17 +203,19 @@ Default property:
|
|
|
138
203
|
brickFocusing?: () => Data<boolean>
|
|
139
204
|
}
|
|
140
205
|
animation?: AnimationBasicEvents & {
|
|
141
|
-
onPress?:
|
|
142
|
-
onPressIn?:
|
|
143
|
-
onPressOut?:
|
|
144
|
-
onLongPress?:
|
|
145
|
-
onFocus?:
|
|
146
|
-
onBlur?:
|
|
147
|
-
nextVideo?:
|
|
148
|
-
roundEnd?:
|
|
149
|
-
onLoad?:
|
|
150
|
-
onError?:
|
|
151
|
-
onProgress?:
|
|
206
|
+
onPress?: AnimationOrGetter
|
|
207
|
+
onPressIn?: AnimationOrGetter
|
|
208
|
+
onPressOut?: AnimationOrGetter
|
|
209
|
+
onLongPress?: AnimationOrGetter
|
|
210
|
+
onFocus?: AnimationOrGetter
|
|
211
|
+
onBlur?: AnimationOrGetter
|
|
212
|
+
nextVideo?: AnimationOrGetter
|
|
213
|
+
roundEnd?: AnimationOrGetter
|
|
214
|
+
onLoad?: AnimationOrGetter
|
|
215
|
+
onError?: AnimationOrGetter
|
|
216
|
+
onProgress?: AnimationOrGetter
|
|
217
|
+
subtitleCueEnter?: AnimationOrGetter
|
|
218
|
+
subtitleCueExit?: AnimationOrGetter
|
|
152
219
|
}
|
|
153
220
|
}
|
|
154
221
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
6
6
|
import type { Data, DataLink } from '../data'
|
|
7
|
-
import type { Animation, AnimationBasicEvents } from '../animation'
|
|
7
|
+
import type { Animation, AnimationBasicEvents, AnimationOrGetter } from '../animation'
|
|
8
8
|
import type {
|
|
9
9
|
Brick,
|
|
10
10
|
EventAction,
|
|
@@ -77,15 +77,15 @@ Default property:
|
|
|
77
77
|
brickFocusing?: () => Data<boolean>
|
|
78
78
|
}
|
|
79
79
|
animation?: AnimationBasicEvents & {
|
|
80
|
-
onPress?:
|
|
81
|
-
onPressIn?:
|
|
82
|
-
onPressOut?:
|
|
83
|
-
onLongPress?:
|
|
84
|
-
onFocus?:
|
|
85
|
-
onBlur?:
|
|
86
|
-
onEnd?:
|
|
87
|
-
onLoad?:
|
|
88
|
-
onError?:
|
|
80
|
+
onPress?: AnimationOrGetter
|
|
81
|
+
onPressIn?: AnimationOrGetter
|
|
82
|
+
onPressOut?: AnimationOrGetter
|
|
83
|
+
onLongPress?: AnimationOrGetter
|
|
84
|
+
onFocus?: AnimationOrGetter
|
|
85
|
+
onBlur?: AnimationOrGetter
|
|
86
|
+
onEnd?: AnimationOrGetter
|
|
87
|
+
onLoad?: AnimationOrGetter
|
|
88
|
+
onError?: AnimationOrGetter
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
6
6
|
import type { Data, DataLink } from '../data'
|
|
7
|
-
import type { Animation, AnimationBasicEvents } from '../animation'
|
|
7
|
+
import type { Animation, AnimationBasicEvents, AnimationOrGetter } from '../animation'
|
|
8
8
|
import type {
|
|
9
9
|
Brick,
|
|
10
10
|
EventAction,
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
6
6
|
import type { Data, DataLink } from '../data'
|
|
7
|
-
import type { Animation, AnimationBasicEvents } from '../animation'
|
|
7
|
+
import type { Animation, AnimationBasicEvents, AnimationOrGetter } from '../animation'
|
|
8
8
|
import type {
|
|
9
9
|
Brick,
|
|
10
10
|
EventAction,
|
|
@@ -139,9 +139,9 @@ Default property:
|
|
|
139
139
|
queryError?: () => Data<string>
|
|
140
140
|
}
|
|
141
141
|
animation?: AnimationBasicEvents & {
|
|
142
|
-
onLoad?:
|
|
143
|
-
onError?:
|
|
144
|
-
onMessage?:
|
|
142
|
+
onLoad?: AnimationOrGetter
|
|
143
|
+
onError?: AnimationOrGetter
|
|
144
|
+
onMessage?: AnimationOrGetter
|
|
145
145
|
}
|
|
146
146
|
}
|
|
147
147
|
|
|
@@ -12,16 +12,13 @@ export interface Brick {
|
|
|
12
12
|
description?: string
|
|
13
13
|
hideShortRef?: boolean
|
|
14
14
|
property?: {}
|
|
15
|
-
events
|
|
15
|
+
events?: {}
|
|
16
16
|
outlets?: {}
|
|
17
17
|
animation?: {}
|
|
18
18
|
switches?: Array<SwitchDef>
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
export
|
|
22
|
-
mainOnly = 'main-only',
|
|
23
|
-
minorOnly = 'minor-only',
|
|
24
|
-
}
|
|
21
|
+
export type LocalSyncStrategy = 'main-only' | 'minor-only'
|
|
25
22
|
|
|
26
23
|
export interface Generator {
|
|
27
24
|
__typename: 'Generator'
|
|
@@ -33,7 +30,7 @@ export interface Generator {
|
|
|
33
30
|
hideShortRef?: boolean
|
|
34
31
|
localSyncRunMode?: LocalSyncStrategy
|
|
35
32
|
property?: {}
|
|
36
|
-
events
|
|
33
|
+
events?: {}
|
|
37
34
|
outlets?: {}
|
|
38
35
|
switches?: Array<SwitchDef>
|
|
39
36
|
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/* Auto generated by build script */
|
|
2
|
+
import type { Data } from '../data'
|
|
3
|
+
import type { DataCalculation } from '../data-calc'
|
|
4
|
+
|
|
5
|
+
// Shared helpers — every generated DataCommand{Name} reuses these to describe
|
|
6
|
+
// its narrowed inputs/outputs, so the per-command files stay short.
|
|
7
|
+
export type DataCalcInput<K extends string = string, T = any> = {
|
|
8
|
+
key: K
|
|
9
|
+
source: (() => DataCalculationData | DataCommand) | T
|
|
10
|
+
sourceKey: string
|
|
11
|
+
trigger?: boolean
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export type DataCalcOutput<K extends string = string> = {
|
|
15
|
+
key: K
|
|
16
|
+
target: () => DataCalculationData | DataCommand
|
|
17
|
+
targetKey: string
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface DataCalculationData {
|
|
21
|
+
__typename: 'DataCalculationData'
|
|
22
|
+
title?: string
|
|
23
|
+
description?: string
|
|
24
|
+
hideShortRef?: boolean
|
|
25
|
+
data: () => Data
|
|
26
|
+
// 'change' is the only valid input port on a data node; the source must be
|
|
27
|
+
// another node (no inline literals), hence `never` for the second type arg.
|
|
28
|
+
inputs: Array<DataCalcInput<'change', never>>
|
|
29
|
+
outputs: Array<DataCalcOutput<'value'>>
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface DataCommand {
|
|
33
|
+
__typename: 'DataCommand'
|
|
34
|
+
__commandName: string
|
|
35
|
+
id: string
|
|
36
|
+
title?: string
|
|
37
|
+
description?: string
|
|
38
|
+
hideShortRef?: boolean
|
|
39
|
+
inputs: Array<DataCalcInput>
|
|
40
|
+
outputs: Array<DataCalcOutput>
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export type DataCalculationMap = DataCalculation & {
|
|
44
|
+
__typename: 'DataCalculationMap'
|
|
45
|
+
nodes: Array<DataCalculationData | DataCommand>
|
|
46
|
+
editorInfo: Array<{
|
|
47
|
+
node: DataCalculationData | DataCommand
|
|
48
|
+
position: { x: number; y: number }
|
|
49
|
+
points: Array<{
|
|
50
|
+
source: DataCalculationData | DataCommand
|
|
51
|
+
sourceOutputKey: string
|
|
52
|
+
target: DataCalculationData | DataCommand
|
|
53
|
+
targetInputKey: string
|
|
54
|
+
positions: Array<{ x: number; y: number }>
|
|
55
|
+
}>
|
|
56
|
+
}>
|
|
57
|
+
}
|