@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
package/types/bricks/Rive.ts
DELETED
|
@@ -1,220 +0,0 @@
|
|
|
1
|
-
/* Auto generated by build script
|
|
2
|
-
*
|
|
3
|
-
* Render Rive (.riv) animations with state machine input control, text run updates, and artboard selection
|
|
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
|
-
/* Play animation */
|
|
21
|
-
export type BrickRiveActionPlay = ActionWithParams & {
|
|
22
|
-
__actionName: 'BRICK_RIVE_PLAY'
|
|
23
|
-
params?: Array<
|
|
24
|
-
| {
|
|
25
|
-
input: 'animationName'
|
|
26
|
-
value?: string | DataLink | EventProperty
|
|
27
|
-
mapping?: string
|
|
28
|
-
}
|
|
29
|
-
| {
|
|
30
|
-
input: 'loop'
|
|
31
|
-
value?: 'auto' | 'oneShot' | 'loop' | 'pingPong' | DataLink | EventProperty
|
|
32
|
-
mapping?: string
|
|
33
|
-
}
|
|
34
|
-
| {
|
|
35
|
-
input: 'direction'
|
|
36
|
-
value?: 'auto' | 'backwards' | 'forwards' | DataLink | EventProperty
|
|
37
|
-
mapping?: string
|
|
38
|
-
}
|
|
39
|
-
| {
|
|
40
|
-
input: 'isStateMachine'
|
|
41
|
-
value?: boolean | DataLink | EventProperty
|
|
42
|
-
mapping?: string
|
|
43
|
-
}
|
|
44
|
-
>
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
/* Pause animation */
|
|
48
|
-
export type BrickRiveActionPause = Action & {
|
|
49
|
-
__actionName: 'BRICK_RIVE_PAUSE'
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
/* Stop animation */
|
|
53
|
-
export type BrickRiveActionStop = Action & {
|
|
54
|
-
__actionName: 'BRICK_RIVE_STOP'
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
/* Reset animation */
|
|
58
|
-
export type BrickRiveActionReset = Action & {
|
|
59
|
-
__actionName: 'BRICK_RIVE_RESET'
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
/* Fire state */
|
|
63
|
-
export type BrickRiveActionFireState = ActionWithParams & {
|
|
64
|
-
__actionName: 'BRICK_RIVE_FIRE_STATE'
|
|
65
|
-
params?: Array<
|
|
66
|
-
| {
|
|
67
|
-
input: 'stateMachineName'
|
|
68
|
-
value?: string | DataLink | EventProperty
|
|
69
|
-
mapping?: string
|
|
70
|
-
}
|
|
71
|
-
| {
|
|
72
|
-
input: 'inputName'
|
|
73
|
-
value?: string | DataLink | EventProperty
|
|
74
|
-
mapping?: string
|
|
75
|
-
}
|
|
76
|
-
>
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
/* Set input state */
|
|
80
|
-
export type BrickRiveActionSetInputState = ActionWithParams & {
|
|
81
|
-
__actionName: 'BRICK_RIVE_SET_INPUT_STATE'
|
|
82
|
-
params?: Array<
|
|
83
|
-
| {
|
|
84
|
-
input: 'stateMachineName'
|
|
85
|
-
value?: string | DataLink | EventProperty
|
|
86
|
-
mapping?: string
|
|
87
|
-
}
|
|
88
|
-
| {
|
|
89
|
-
input: 'inputName'
|
|
90
|
-
value?: string | DataLink | EventProperty
|
|
91
|
-
mapping?: string
|
|
92
|
-
}
|
|
93
|
-
| {
|
|
94
|
-
input: 'value'
|
|
95
|
-
value?: any | EventProperty
|
|
96
|
-
mapping?: string
|
|
97
|
-
}
|
|
98
|
-
>
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
/* Set text run value. Text Run name need to defined as unique name in Rive file. (Ref: https://rive.app/community/doc/text/docn2E6y1lXo) */
|
|
102
|
-
export type BrickRiveActionSetTextRunValue = ActionWithParams & {
|
|
103
|
-
__actionName: 'BRICK_RIVE_SET_TEXT_RUN_VALUE'
|
|
104
|
-
params?: Array<
|
|
105
|
-
| {
|
|
106
|
-
input: 'textRunName'
|
|
107
|
-
value?: string | DataLink | EventProperty
|
|
108
|
-
mapping?: string
|
|
109
|
-
}
|
|
110
|
-
| {
|
|
111
|
-
input: 'value'
|
|
112
|
-
value?: any | EventProperty
|
|
113
|
-
mapping?: string
|
|
114
|
-
}
|
|
115
|
-
>
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
interface BrickRiveDef {
|
|
119
|
-
/*
|
|
120
|
-
Default property:
|
|
121
|
-
{
|
|
122
|
-
"autoplay": true,
|
|
123
|
-
"alignment": "center",
|
|
124
|
-
"fit": "contain"
|
|
125
|
-
}
|
|
126
|
-
*/
|
|
127
|
-
property?: BrickBasicProperty & {
|
|
128
|
-
/* Rive file url */
|
|
129
|
-
url?: string | DataLink
|
|
130
|
-
/* The checksum of `url` */
|
|
131
|
-
md5?: string | DataLink
|
|
132
|
-
/* Autoplay the animation */
|
|
133
|
-
autoplay?: boolean | DataLink
|
|
134
|
-
/* Alignment of the animation */
|
|
135
|
-
alignment?:
|
|
136
|
-
| 'topLeft'
|
|
137
|
-
| 'topCenter'
|
|
138
|
-
| 'topRight'
|
|
139
|
-
| 'centerLeft'
|
|
140
|
-
| 'center'
|
|
141
|
-
| 'centerRight'
|
|
142
|
-
| 'bottomLeft'
|
|
143
|
-
| 'bottomCenter'
|
|
144
|
-
| 'bottomRight'
|
|
145
|
-
| DataLink
|
|
146
|
-
/* Fit mode of the animation */
|
|
147
|
-
fit?:
|
|
148
|
-
| 'cover'
|
|
149
|
-
| 'contain'
|
|
150
|
-
| 'fill'
|
|
151
|
-
| 'fitWidth'
|
|
152
|
-
| 'fitHeight'
|
|
153
|
-
| 'none'
|
|
154
|
-
| 'scaleDown'
|
|
155
|
-
| 'layout'
|
|
156
|
-
| DataLink
|
|
157
|
-
/* Artboard name */
|
|
158
|
-
artboardName?: string | DataLink
|
|
159
|
-
/* Animation name */
|
|
160
|
-
animationName?: string | DataLink
|
|
161
|
-
/* State machine name */
|
|
162
|
-
stateMachineName?: string | DataLink
|
|
163
|
-
}
|
|
164
|
-
events?: BrickBasicEvents & {
|
|
165
|
-
/* Event of animation play */
|
|
166
|
-
onPlay?: Array<EventAction<string & keyof TemplateEventPropsMap['Rive']['onPlay']>>
|
|
167
|
-
/* Event of animation pause */
|
|
168
|
-
onPause?: Array<EventAction<string & keyof TemplateEventPropsMap['Rive']['onPause']>>
|
|
169
|
-
/* Event of animation stop */
|
|
170
|
-
onStop?: Array<EventAction<string & keyof TemplateEventPropsMap['Rive']['onStop']>>
|
|
171
|
-
/* Event of animation loop end */
|
|
172
|
-
onLoopEnd?: Array<EventAction<string & keyof TemplateEventPropsMap['Rive']['onLoopEnd']>>
|
|
173
|
-
/* Event of state changed */
|
|
174
|
-
onStateChanged?: Array<
|
|
175
|
-
EventAction<string & keyof TemplateEventPropsMap['Rive']['onStateChanged']>
|
|
176
|
-
>
|
|
177
|
-
/* Event of error */
|
|
178
|
-
onError?: Array<EventAction<string & keyof TemplateEventPropsMap['Rive']['onError']>>
|
|
179
|
-
/* Event of Rive general event received */
|
|
180
|
-
onRiveGeneralEvent?: Array<
|
|
181
|
-
EventAction<string & keyof TemplateEventPropsMap['Rive']['onRiveGeneralEvent']>
|
|
182
|
-
>
|
|
183
|
-
/* Event of Rive open-url event received */
|
|
184
|
-
onRiveOpenUrlEvent?: Array<
|
|
185
|
-
EventAction<string & keyof TemplateEventPropsMap['Rive']['onRiveOpenUrlEvent']>
|
|
186
|
-
>
|
|
187
|
-
}
|
|
188
|
-
animation?: AnimationBasicEvents & {
|
|
189
|
-
onPlay?: Animation
|
|
190
|
-
onPause?: Animation
|
|
191
|
-
onStop?: Animation
|
|
192
|
-
onLoopEnd?: Animation
|
|
193
|
-
onStateChanged?: Animation
|
|
194
|
-
onError?: Animation
|
|
195
|
-
onRiveGeneralEvent?: Animation
|
|
196
|
-
onRiveOpenUrlEvent?: Animation
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
/* Render Rive (.riv) animations with state machine input control, text run updates, and artboard selection */
|
|
201
|
-
export type BrickRive = Brick &
|
|
202
|
-
BrickRiveDef & {
|
|
203
|
-
templateKey: 'BRICK_RIVE'
|
|
204
|
-
switches?: Array<
|
|
205
|
-
SwitchDef &
|
|
206
|
-
BrickRiveDef & {
|
|
207
|
-
conds?: Array<{
|
|
208
|
-
method: '==' | '!=' | '>' | '<' | '>=' | '<='
|
|
209
|
-
cond:
|
|
210
|
-
| SwitchCondInnerStateCurrentCanvas
|
|
211
|
-
| SwitchCondData
|
|
212
|
-
| {
|
|
213
|
-
__typename: 'SwitchCondInnerStateOutlet'
|
|
214
|
-
outlet: ''
|
|
215
|
-
value: any
|
|
216
|
-
}
|
|
217
|
-
}>
|
|
218
|
-
}
|
|
219
|
-
>
|
|
220
|
-
}
|
package/types/bricks/Sketch.ts
DELETED
|
@@ -1,254 +0,0 @@
|
|
|
1
|
-
/* Auto generated by build script
|
|
2
|
-
*
|
|
3
|
-
* Drawing canvas with undo/redo, import/export state, and image export
|
|
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
|
-
/* Undo the last stroke */
|
|
21
|
-
export type BrickSketchActionUndo = Action & {
|
|
22
|
-
__actionName: 'BRICK_SKETCH_UNDO'
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
/* Redo the last undone stroke */
|
|
26
|
-
export type BrickSketchActionRedo = Action & {
|
|
27
|
-
__actionName: 'BRICK_SKETCH_REDO'
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/* Clear all strokes from the canvas */
|
|
31
|
-
export type BrickSketchActionClear = Action & {
|
|
32
|
-
__actionName: 'BRICK_SKETCH_CLEAR'
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/* Set the active tool */
|
|
36
|
-
export type BrickSketchActionSetTool = ActionWithParams & {
|
|
37
|
-
__actionName: 'BRICK_SKETCH_SET_TOOL'
|
|
38
|
-
params?: Array<{
|
|
39
|
-
input: 'tool'
|
|
40
|
-
value?: 'pen' | 'eraser' | DataLink | EventProperty
|
|
41
|
-
mapping?: string
|
|
42
|
-
}>
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
/* Set the stroke color */
|
|
46
|
-
export type BrickSketchActionSetColor = ActionWithParams & {
|
|
47
|
-
__actionName: 'BRICK_SKETCH_SET_COLOR'
|
|
48
|
-
params?: Array<{
|
|
49
|
-
input: 'color'
|
|
50
|
-
value?: string | DataLink | EventProperty
|
|
51
|
-
mapping?: string
|
|
52
|
-
}>
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
/* Set the stroke width (px) */
|
|
56
|
-
export type BrickSketchActionSetStrokeWidth = ActionWithParams & {
|
|
57
|
-
__actionName: 'BRICK_SKETCH_SET_STROKE_WIDTH'
|
|
58
|
-
params?: Array<{
|
|
59
|
-
input: 'strokeWidth'
|
|
60
|
-
value?: number | DataLink | EventProperty
|
|
61
|
-
mapping?: string
|
|
62
|
-
}>
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
/* Import sketch state (JSON string from a previous export) */
|
|
66
|
-
export type BrickSketchActionImportState = ActionWithParams & {
|
|
67
|
-
__actionName: 'BRICK_SKETCH_IMPORT_STATE'
|
|
68
|
-
params?: Array<{
|
|
69
|
-
input: 'stateJson'
|
|
70
|
-
value?: string | DataLink | EventProperty
|
|
71
|
-
mapping?: string
|
|
72
|
-
}>
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
/* Export the current sketch state to the BRICK_SKETCH_STATE outlet */
|
|
76
|
-
export type BrickSketchActionExportState = Action & {
|
|
77
|
-
__actionName: 'BRICK_SKETCH_EXPORT_STATE'
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
/* Export the canvas as an image (file URI emitted to BRICK_SKETCH_IMAGE_URI) */
|
|
81
|
-
export type BrickSketchActionExportImage = ActionWithParams & {
|
|
82
|
-
__actionName: 'BRICK_SKETCH_EXPORT_IMAGE'
|
|
83
|
-
params?: Array<
|
|
84
|
-
| {
|
|
85
|
-
input: 'imageFormat'
|
|
86
|
-
value?: 'png' | 'jpeg' | DataLink | EventProperty
|
|
87
|
-
mapping?: string
|
|
88
|
-
}
|
|
89
|
-
| {
|
|
90
|
-
input: 'imageQuality'
|
|
91
|
-
value?: number | DataLink | EventProperty
|
|
92
|
-
mapping?: string
|
|
93
|
-
}
|
|
94
|
-
>
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
/* Add a stroke programmatically */
|
|
98
|
-
export type BrickSketchActionAddStroke = ActionWithParams & {
|
|
99
|
-
__actionName: 'BRICK_SKETCH_ADD_STROKE'
|
|
100
|
-
params?: Array<
|
|
101
|
-
| {
|
|
102
|
-
input: 'strokePoints'
|
|
103
|
-
value?: any | EventProperty
|
|
104
|
-
mapping?: string
|
|
105
|
-
}
|
|
106
|
-
| {
|
|
107
|
-
input: 'strokeColor'
|
|
108
|
-
value?: string | DataLink | EventProperty
|
|
109
|
-
mapping?: string
|
|
110
|
-
}
|
|
111
|
-
| {
|
|
112
|
-
input: 'strokeWidth'
|
|
113
|
-
value?: number | DataLink | EventProperty
|
|
114
|
-
mapping?: string
|
|
115
|
-
}
|
|
116
|
-
>
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
interface BrickSketchDef {
|
|
120
|
-
/*
|
|
121
|
-
Default property:
|
|
122
|
-
{
|
|
123
|
-
"tool": "pen",
|
|
124
|
-
"strokeColor": "#000000",
|
|
125
|
-
"strokeWidth": 3,
|
|
126
|
-
"pressureSensitive": true,
|
|
127
|
-
"layoutType": "cover",
|
|
128
|
-
"scale": 1,
|
|
129
|
-
"mode": "pen",
|
|
130
|
-
"theme": "auto",
|
|
131
|
-
"backgroundPattern": "dot",
|
|
132
|
-
"hideToolbar": false,
|
|
133
|
-
"hideUndo": false,
|
|
134
|
-
"hideRedo": false,
|
|
135
|
-
"hidePencilTool": false,
|
|
136
|
-
"hideColorPicker": false,
|
|
137
|
-
"hideThickness": false,
|
|
138
|
-
"availableColors": [
|
|
139
|
-
"#000000",
|
|
140
|
-
"#ffffff",
|
|
141
|
-
"#e53935",
|
|
142
|
-
"#fb8c00",
|
|
143
|
-
"#fdd835",
|
|
144
|
-
"#43a047",
|
|
145
|
-
"#1e88e5",
|
|
146
|
-
"#8e24aa"
|
|
147
|
-
]
|
|
148
|
-
}
|
|
149
|
-
*/
|
|
150
|
-
property?: BrickBasicProperty & {
|
|
151
|
-
/* Initial sketch state to load on mount (object or JSON string from a previous export). When `BRICK_SKETCH_STATE` outlet feeds the same value back via binding, the echo is detected and ignored to avoid an update loop. */
|
|
152
|
-
initialState?: string | DataLink | DataLink | {} | DataLink
|
|
153
|
-
/* Drawing tool */
|
|
154
|
-
tool?: 'pen' | 'eraser' | DataLink
|
|
155
|
-
/* Stroke color */
|
|
156
|
-
strokeColor?: string | DataLink
|
|
157
|
-
/* Stroke width (px) */
|
|
158
|
-
strokeWidth?: number | DataLink
|
|
159
|
-
/* Vary stroke width by pen pressure */
|
|
160
|
-
pressureSensitive?: boolean | DataLink
|
|
161
|
-
/* Canvas layout. `cover` fits the brick frame; `extend` lets the canvas grow with content */
|
|
162
|
-
layoutType?: 'cover' | 'extend' | DataLink
|
|
163
|
-
/* Canvas resolution scale (device-pixel multiplier) */
|
|
164
|
-
scale?: number | DataLink
|
|
165
|
-
/* Interaction mode. `pen` = drawing (scroll disabled), `scroll` = scroll/pan (drawing disabled) */
|
|
166
|
-
mode?: 'pen' | 'scroll' | DataLink
|
|
167
|
-
/* Toolbar/UI theme. `auto` follows the system color scheme; `light`/`dark` force the palette. */
|
|
168
|
-
theme?: 'auto' | 'light' | 'dark' | DataLink
|
|
169
|
-
/* Background color of the canvas */
|
|
170
|
-
backgroundColor?: string | DataLink
|
|
171
|
-
/* Background image URL (covers the canvas; rendered behind strokes) */
|
|
172
|
-
backgroundImage?: string | DataLink
|
|
173
|
-
/* Decorative background pattern when no background image is provided */
|
|
174
|
-
backgroundPattern?: 'dot' | 'grid' | 'none' | DataLink
|
|
175
|
-
/* Hide the entire built-in toolbar */
|
|
176
|
-
hideToolbar?: boolean | DataLink
|
|
177
|
-
/* Hide the undo button in the toolbar */
|
|
178
|
-
hideUndo?: boolean | DataLink
|
|
179
|
-
/* Hide the redo button in the toolbar */
|
|
180
|
-
hideRedo?: boolean | DataLink
|
|
181
|
-
/* Hide the pen/eraser tool toggle */
|
|
182
|
-
hidePencilTool?: boolean | DataLink
|
|
183
|
-
/* Hide the color picker */
|
|
184
|
-
hideColorPicker?: boolean | DataLink
|
|
185
|
-
/* Hide the stroke thickness slider */
|
|
186
|
-
hideThickness?: boolean | DataLink
|
|
187
|
-
/* Colors shown in the built-in color picker */
|
|
188
|
-
availableColors?: Array<string | DataLink> | DataLink
|
|
189
|
-
}
|
|
190
|
-
events?: BrickBasicEvents & {
|
|
191
|
-
/* A stroke was just committed (drawn or added programmatically) */
|
|
192
|
-
onStrokeEnd?: Array<EventAction<string & keyof TemplateEventPropsMap['Sketch']['onStrokeEnd']>>
|
|
193
|
-
/* The canvas was cleared */
|
|
194
|
-
onClear?: Array<EventAction>
|
|
195
|
-
/* Sketch state changed (any commit, undo, redo, clear, or import) */
|
|
196
|
-
onStateChange?: Array<EventAction>
|
|
197
|
-
/* Active tool changed */
|
|
198
|
-
onToolChange?: Array<
|
|
199
|
-
EventAction<string & keyof TemplateEventPropsMap['Sketch']['onToolChange']>
|
|
200
|
-
>
|
|
201
|
-
/* Image export finished */
|
|
202
|
-
onExportImage?: Array<
|
|
203
|
-
EventAction<string & keyof TemplateEventPropsMap['Sketch']['onExportImage']>
|
|
204
|
-
>
|
|
205
|
-
}
|
|
206
|
-
outlets?: {
|
|
207
|
-
/* Current sketch state (strokes, settings, undo/redo stacks) */
|
|
208
|
-
state?: () => Data<{
|
|
209
|
-
strokes?: any[]
|
|
210
|
-
undone?: any[]
|
|
211
|
-
settings?: { [key: string]: any }
|
|
212
|
-
[key: string]: any
|
|
213
|
-
}>
|
|
214
|
-
/* URI of the most recently exported image */
|
|
215
|
-
imageUri?: () => Data<string>
|
|
216
|
-
/* Most recently committed stroke (points, color, width) */
|
|
217
|
-
lastStroke?: () => Data<{
|
|
218
|
-
color?: string
|
|
219
|
-
width?: number
|
|
220
|
-
tool?: string
|
|
221
|
-
points?: any[]
|
|
222
|
-
[key: string]: any
|
|
223
|
-
}>
|
|
224
|
-
}
|
|
225
|
-
animation?: AnimationBasicEvents & {
|
|
226
|
-
onStrokeEnd?: Animation
|
|
227
|
-
onClear?: Animation
|
|
228
|
-
onStateChange?: Animation
|
|
229
|
-
onToolChange?: Animation
|
|
230
|
-
onExportImage?: Animation
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
/* Drawing canvas with undo/redo, import/export state, and image export */
|
|
235
|
-
export type BrickSketch = Brick &
|
|
236
|
-
BrickSketchDef & {
|
|
237
|
-
templateKey: 'BRICK_SKETCH'
|
|
238
|
-
switches?: Array<
|
|
239
|
-
SwitchDef &
|
|
240
|
-
BrickSketchDef & {
|
|
241
|
-
conds?: Array<{
|
|
242
|
-
method: '==' | '!=' | '>' | '<' | '>=' | '<='
|
|
243
|
-
cond:
|
|
244
|
-
| SwitchCondInnerStateCurrentCanvas
|
|
245
|
-
| SwitchCondData
|
|
246
|
-
| {
|
|
247
|
-
__typename: 'SwitchCondInnerStateOutlet'
|
|
248
|
-
outlet: 'state' | 'imageUri' | 'lastStroke'
|
|
249
|
-
value: any
|
|
250
|
-
}
|
|
251
|
-
}>
|
|
252
|
-
}
|
|
253
|
-
>
|
|
254
|
-
}
|
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
/* Auto generated by build script
|
|
2
|
-
*
|
|
3
|
-
* Auto-advancing slideshow of child bricks with transition effects
|
|
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
|
-
/* Jump to a specific index in the slideshow */
|
|
21
|
-
export type BrickSlideshowActionJumpToIndex = ActionWithParams & {
|
|
22
|
-
__actionName: 'BRICK_SLIDESHOW_JUMP_TO_INDEX'
|
|
23
|
-
params?: Array<
|
|
24
|
-
| {
|
|
25
|
-
input: 'index'
|
|
26
|
-
value?: number | DataLink | EventProperty
|
|
27
|
-
mapping?: string
|
|
28
|
-
}
|
|
29
|
-
| {
|
|
30
|
-
input: 'reset'
|
|
31
|
-
value?: boolean | DataLink | EventProperty
|
|
32
|
-
mapping?: string
|
|
33
|
-
}
|
|
34
|
-
| {
|
|
35
|
-
input: 'shuffle'
|
|
36
|
-
value?: boolean | DataLink | EventProperty
|
|
37
|
-
mapping?: string
|
|
38
|
-
}
|
|
39
|
-
>
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
/* Play the slideshow (resume if paused) */
|
|
43
|
-
export type BrickSlideshowActionPlay = Action & {
|
|
44
|
-
__actionName: 'BRICK_SLIDESHOW_PLAY'
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
/* Pause the slideshow */
|
|
48
|
-
export type BrickSlideshowActionPause = Action & {
|
|
49
|
-
__actionName: 'BRICK_SLIDESHOW_PAUSE'
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
/* Go to next slide */
|
|
53
|
-
export type BrickSlideshowActionNext = Action & {
|
|
54
|
-
__actionName: 'BRICK_SLIDESHOW_NEXT'
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
/* Go to previous slide */
|
|
58
|
-
export type BrickSlideshowActionPrev = Action & {
|
|
59
|
-
__actionName: 'BRICK_SLIDESHOW_PREV'
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
interface BrickSlideshowDef {
|
|
63
|
-
/*
|
|
64
|
-
Default property:
|
|
65
|
-
{
|
|
66
|
-
"countdown": 2000,
|
|
67
|
-
"loop": true,
|
|
68
|
-
"shuffle": false,
|
|
69
|
-
"photoResizeMode": "contain",
|
|
70
|
-
"photoLoadSystemIos": "auto",
|
|
71
|
-
"photoLoadSystemAndroid": "auto",
|
|
72
|
-
"videoResizeMode": "contain",
|
|
73
|
-
"videoAutoAspectRatio": false,
|
|
74
|
-
"videoVolume": 100,
|
|
75
|
-
"videoMuted": false,
|
|
76
|
-
"videoRenderMode": "auto",
|
|
77
|
-
"fadeDuration": 0,
|
|
78
|
-
"emptyViewText": "no available image item to show",
|
|
79
|
-
"emptyViewTextSize": 44,
|
|
80
|
-
"emptyViewTextColor": "#fff",
|
|
81
|
-
"enableBlurBackground": false,
|
|
82
|
-
"blurBackgroundRadius": 8
|
|
83
|
-
}
|
|
84
|
-
*/
|
|
85
|
-
property?: BrickBasicProperty & {
|
|
86
|
-
/* The time interval of show for each photo */
|
|
87
|
-
countdown?: number | DataLink
|
|
88
|
-
/* The slideshow media path list (File, URL)
|
|
89
|
-
Each path object can override global photo/video settings.
|
|
90
|
-
Item-level properties take precedence over brick-level properties. */
|
|
91
|
-
paths?:
|
|
92
|
-
| Array<
|
|
93
|
-
| DataLink
|
|
94
|
-
| {
|
|
95
|
-
url?: string | DataLink
|
|
96
|
-
mediaType?: 'video' | 'video-streaming' | 'photo' | DataLink
|
|
97
|
-
photoResizeMode?: 'contain' | 'cover' | 'stretch' | 'center' | 'repeat' | DataLink
|
|
98
|
-
photoLoadSystemIos?: 'auto' | 'sdwebimage' | 'default' | DataLink
|
|
99
|
-
photoLoadSystemAndroid?: 'auto' | 'glide' | 'fresco' | DataLink
|
|
100
|
-
videoResizeMode?: 'contain' | 'cover' | 'stretch' | DataLink
|
|
101
|
-
videoAutoAspectRatio?: boolean | DataLink
|
|
102
|
-
videoAspectRatio?: string | DataLink
|
|
103
|
-
videoVolume?: number | DataLink
|
|
104
|
-
videoMuted?: boolean | DataLink
|
|
105
|
-
videoRenderMode?: 'auto' | 'texture' | 'surface' | DataLink
|
|
106
|
-
}
|
|
107
|
-
>
|
|
108
|
-
| DataLink
|
|
109
|
-
/* Multiple slideshow media path lists to combine (Array of path arrays).
|
|
110
|
-
All arrays are flattened and combined: [...paths, ...pathsList[0], ...pathsList[1], ...] */
|
|
111
|
-
pathsList?: Array<Array<any> | DataLink | DataLink> | DataLink
|
|
112
|
-
/* Loop the slideshow */
|
|
113
|
-
loop?: boolean | DataLink
|
|
114
|
-
/* Shuffle the slideshow */
|
|
115
|
-
shuffle?: boolean | DataLink
|
|
116
|
-
/* Slideshow Photo resize mode */
|
|
117
|
-
photoResizeMode?: 'contain' | 'cover' | 'stretch' | 'center' | 'repeat' | DataLink
|
|
118
|
-
/* [iOS] The use priority of image loading system (Auto: sdwebimage, fallback to default if failed) */
|
|
119
|
-
photoLoadSystemIos?: 'auto' | 'sdwebimage' | 'default' | DataLink
|
|
120
|
-
/* [Android] The use priority of image loading system (Auto: glide, fallback to fresco if failed) */
|
|
121
|
-
photoLoadSystemAndroid?: 'auto' | 'glide' | 'fresco' | DataLink
|
|
122
|
-
/* Slideshow Video resize mode */
|
|
123
|
-
videoResizeMode?: 'contain' | 'cover' | 'stretch' | DataLink
|
|
124
|
-
/* Video Auto Aspect Ratio for use Video Streaming */
|
|
125
|
-
videoAutoAspectRatio?: boolean | DataLink
|
|
126
|
-
/* Video Aspect Ratio for use Video Streaming */
|
|
127
|
-
videoAspectRatio?: string | DataLink
|
|
128
|
-
/* Video Volume */
|
|
129
|
-
videoVolume?: number | DataLink
|
|
130
|
-
/* Video Muted */
|
|
131
|
-
videoMuted?: boolean | DataLink
|
|
132
|
-
/* [Android only] 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 */
|
|
133
|
-
videoRenderMode?: 'auto' | 'texture' | 'surface' | DataLink
|
|
134
|
-
/* The photo fade duration */
|
|
135
|
-
fadeDuration?: number | DataLink
|
|
136
|
-
/* Show text content if path list is empty */
|
|
137
|
-
emptyViewText?: string | DataLink
|
|
138
|
-
/* The font size of shown text content if path list is empty */
|
|
139
|
-
emptyViewTextSize?: number | DataLink
|
|
140
|
-
/* The color of shown text content if path list is empty */
|
|
141
|
-
emptyViewTextColor?: string | DataLink
|
|
142
|
-
/* Show emptyViewText when timeout and paths is empty */
|
|
143
|
-
emptyViewTimeout?: number | DataLink
|
|
144
|
-
/* The blur radius of the blur filter added to the image */
|
|
145
|
-
blurRadius?: number | DataLink
|
|
146
|
-
/* Add blurred image at background if photo is not full */
|
|
147
|
-
enableBlurBackground?: boolean | DataLink
|
|
148
|
-
/* The blur radius of the blur filter added to the image background */
|
|
149
|
-
blurBackgroundRadius?: number | DataLink
|
|
150
|
-
}
|
|
151
|
-
events?: BrickBasicEvents & {
|
|
152
|
-
/* Event of the next slideshow on change start */
|
|
153
|
-
changeStart?: Array<
|
|
154
|
-
EventAction<string & keyof TemplateEventPropsMap['Slideshow']['changeStart']>
|
|
155
|
-
>
|
|
156
|
-
/* Event of the next slideshow on change end */
|
|
157
|
-
changeEnd?: Array<EventAction<string & keyof TemplateEventPropsMap['Slideshow']['changeEnd']>>
|
|
158
|
-
/* Event on paths change */
|
|
159
|
-
contentChange?: Array<
|
|
160
|
-
EventAction<string & keyof TemplateEventPropsMap['Slideshow']['contentChange']>
|
|
161
|
-
>
|
|
162
|
-
/* Event on plays of paths are end */
|
|
163
|
-
roundEnd?: Array<EventAction<string & keyof TemplateEventPropsMap['Slideshow']['roundEnd']>>
|
|
164
|
-
/* Event of the slideshow on load */
|
|
165
|
-
mediaOnLoad?: Array<EventAction>
|
|
166
|
-
/* Event of the slideshow media loading error */
|
|
167
|
-
mediaOnError?: Array<
|
|
168
|
-
EventAction<string & keyof TemplateEventPropsMap['Slideshow']['mediaOnError']>
|
|
169
|
-
>
|
|
170
|
-
}
|
|
171
|
-
animation?: AnimationBasicEvents & {
|
|
172
|
-
changeStart?: Animation
|
|
173
|
-
changeEnd?: Animation
|
|
174
|
-
contentChange?: Animation
|
|
175
|
-
roundEnd?: Animation
|
|
176
|
-
mediaOnLoad?: Animation
|
|
177
|
-
mediaOnError?: Animation
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
/* Auto-advancing slideshow of child bricks with transition effects */
|
|
182
|
-
export type BrickSlideshow = Brick &
|
|
183
|
-
BrickSlideshowDef & {
|
|
184
|
-
templateKey: 'BRICK_SLIDESHOW'
|
|
185
|
-
switches?: Array<
|
|
186
|
-
SwitchDef &
|
|
187
|
-
BrickSlideshowDef & {
|
|
188
|
-
conds?: Array<{
|
|
189
|
-
method: '==' | '!=' | '>' | '<' | '>=' | '<='
|
|
190
|
-
cond:
|
|
191
|
-
| SwitchCondInnerStateCurrentCanvas
|
|
192
|
-
| SwitchCondData
|
|
193
|
-
| {
|
|
194
|
-
__typename: 'SwitchCondInnerStateOutlet'
|
|
195
|
-
outlet: ''
|
|
196
|
-
value: any
|
|
197
|
-
}
|
|
198
|
-
}>
|
|
199
|
-
}
|
|
200
|
-
>
|
|
201
|
-
}
|