@fugood/bricks-ctor 2.25.0-beta.60 → 2.25.0-beta.62
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 -28
- package/tools/__tests__/legacy-forwarder.test.js +91 -0
- package/tools/_forward.ts +26 -0
- package/tools/deploy.ts +3 -175
- package/tools/mcp-server.ts +3 -35
- package/tools/postinstall.ts +3 -291
- package/tools/pull.ts +3 -198
- package/tools/push-config.ts +3 -113
- package/tools/simulator.ts +3 -149
- package/compile/__tests__/config-diff.test.js +0 -100
- package/compile/__tests__/index.test.js +0 -461
- package/compile/__tests__/util.test.js +0 -450
- package/compile/action-name-map.ts +0 -1079
- package/compile/config-diff.ts +0 -155
- package/compile/index.ts +0 -1594
- package/compile/util.ts +0 -482
- package/index.ts +0 -6
- package/skills/bricks-ctor/SKILL.md +0 -38
- package/skills/bricks-ctor/references/animation.md +0 -160
- package/skills/bricks-ctor/references/architecture-patterns.md +0 -88
- package/skills/bricks-ctor/references/automations.md +0 -232
- package/skills/bricks-ctor/references/buttress.md +0 -245
- package/skills/bricks-ctor/references/data-calculation.md +0 -252
- package/skills/bricks-ctor/references/local-sync.md +0 -129
- package/skills/bricks-ctor/references/media-flow.md +0 -165
- package/skills/bricks-ctor/references/remote-data-bank.md +0 -196
- package/skills/bricks-ctor/references/simulator.md +0 -132
- package/skills/bricks-ctor/references/source-editing-tools.md +0 -81
- package/skills/bricks-ctor/references/standby-transition.md +0 -124
- package/skills/bricks-ctor/references/verification-toolchain.md +0 -200
- package/skills/bricks-design/SKILL.md +0 -171
- package/skills/bricks-design/references/architecture-truths.md +0 -132
- package/skills/bricks-design/references/avoiding-complexity.md +0 -91
- package/skills/bricks-design/references/design-critique.md +0 -195
- package/skills/bricks-design/references/design-languages.md +0 -265
- package/skills/bricks-design/references/performance.md +0 -116
- package/skills/bricks-design/references/presentation-and-slideshow.md +0 -137
- package/skills/bricks-design/references/translating-inputs.md +0 -152
- package/skills/bricks-design/references/variations-and-tweaks.md +0 -124
- package/skills/bricks-design/references/when-the-brief-is-branded.md +0 -284
- package/skills/bricks-design/references/when-the-brief-is-vague.md +0 -85
- package/skills/bricks-design/references/workflow.md +0 -134
- package/skills/bricks-ux/SKILL.md +0 -114
- package/skills/bricks-ux/references/accessibility.md +0 -162
- package/skills/bricks-ux/references/flow-states.md +0 -175
- package/skills/bricks-ux/references/interaction-archetypes.md +0 -189
- package/skills/bricks-ux/references/monitoring-screens.md +0 -153
- package/skills/bricks-ux/references/pressable-composition.md +0 -126
- package/skills/bricks-ux/references/user-journey.md +0 -168
- package/skills/bricks-ux/references/ux-critique.md +0 -256
- package/skills/rive-marketplace/SKILL.md +0 -99
- package/tools/__tests__/_cli-error.test.ts +0 -35
- package/tools/__tests__/_mcp-config.test.ts +0 -67
- package/tools/__tests__/pull.test.ts +0 -108
- package/tools/_cli-error.ts +0 -17
- package/tools/_edits-log.ts +0 -41
- package/tools/_git-author.ts +0 -37
- package/tools/_last-pushed-commit.ts +0 -28
- package/tools/_mcp-config.ts +0 -42
- package/tools/_shell.ts +0 -180
- 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-env.ts +0 -13
- package/tools/mcp-tools/__tests__/data-calc-editing.test.js +0 -516
- package/tools/mcp-tools/__tests__/entry-editing.test.js +0 -866
- package/tools/mcp-tools/__tests__/huggingface.test.ts +0 -49
- package/tools/mcp-tools/__tests__/icons.test.ts +0 -21
- package/tools/mcp-tools/__tests__/mcp-env.test.js +0 -19
- package/tools/mcp-tools/_editing-helpers.ts +0 -98
- package/tools/mcp-tools/_verify.ts +0 -50
- package/tools/mcp-tools/compile.ts +0 -104
- package/tools/mcp-tools/data-calc-editing.ts +0 -1311
- package/tools/mcp-tools/entry-editing.ts +0 -2297
- package/tools/mcp-tools/huggingface.ts +0 -772
- package/tools/mcp-tools/icons.ts +0 -97
- package/tools/mcp-tools/lottie.ts +0 -102
- package/tools/mcp-tools/media.ts +0 -113
- package/tools/simulator-main.mjs +0 -488
- package/tools/simulator-preload.cjs +0 -16
- package/types/animation.d.ts +0 -116
- package/types/automation.d.ts +0 -231
- package/types/brick-base.d.ts +0 -80
- package/types/bricks/Camera.d.ts +0 -246
- package/types/bricks/Chart.d.ts +0 -372
- package/types/bricks/GenerativeMedia.d.ts +0 -290
- package/types/bricks/Icon.d.ts +0 -98
- package/types/bricks/Image.d.ts +0 -126
- package/types/bricks/Items.d.ts +0 -480
- package/types/bricks/Lottie.d.ts +0 -168
- package/types/bricks/Maps.d.ts +0 -262
- package/types/bricks/QrCode.d.ts +0 -117
- package/types/bricks/Rect.d.ts +0 -150
- package/types/bricks/RichText.d.ts +0 -131
- package/types/bricks/Rive.d.ts +0 -220
- package/types/bricks/Scene3D.d.ts +0 -676
- package/types/bricks/Sketch.d.ts +0 -256
- package/types/bricks/Slideshow.d.ts +0 -201
- package/types/bricks/Svg.d.ts +0 -99
- package/types/bricks/Text.d.ts +0 -148
- package/types/bricks/TextInput.d.ts +0 -242
- package/types/bricks/Video.d.ts +0 -242
- package/types/bricks/VideoStreaming.d.ts +0 -112
- package/types/bricks/WebRtcStream.d.ts +0 -65
- package/types/bricks/WebView.d.ts +0 -168
- package/types/bricks/index.d.ts +0 -23
- package/types/canvas.d.ts +0 -82
- package/types/common.d.ts +0 -141
- package/types/data-calc-command/base.d.ts +0 -57
- package/types/data-calc-command/collection.d.ts +0 -418
- package/types/data-calc-command/color.d.ts +0 -432
- package/types/data-calc-command/constant.d.ts +0 -50
- package/types/data-calc-command/datetime.d.ts +0 -147
- package/types/data-calc-command/file.d.ts +0 -129
- package/types/data-calc-command/index.d.ts +0 -13
- package/types/data-calc-command/iteratee.d.ts +0 -23
- package/types/data-calc-command/logictype.d.ts +0 -190
- package/types/data-calc-command/math.d.ts +0 -275
- package/types/data-calc-command/object.d.ts +0 -119
- package/types/data-calc-command/sandbox.d.ts +0 -66
- package/types/data-calc-command/string.d.ts +0 -407
- package/types/data-calc-script.d.ts +0 -21
- package/types/data-calc.d.ts +0 -12
- package/types/data.d.ts +0 -97
- package/types/generators/AlarmClock.d.ts +0 -110
- package/types/generators/Assistant.d.ts +0 -640
- package/types/generators/BleCentral.d.ts +0 -247
- package/types/generators/BlePeripheral.d.ts +0 -208
- package/types/generators/CanvasMap.d.ts +0 -74
- package/types/generators/CastlesPay.d.ts +0 -87
- package/types/generators/DataBank.d.ts +0 -160
- package/types/generators/File.d.ts +0 -432
- package/types/generators/GraphQl.d.ts +0 -132
- package/types/generators/Http.d.ts +0 -222
- package/types/generators/HttpServer.d.ts +0 -230
- package/types/generators/Information.d.ts +0 -103
- package/types/generators/Intent.d.ts +0 -168
- package/types/generators/Iterator.d.ts +0 -108
- package/types/generators/Keyboard.d.ts +0 -105
- package/types/generators/LlmAnthropicCompat.d.ts +0 -212
- package/types/generators/LlmAppleBuiltin.d.ts +0 -159
- package/types/generators/LlmGgml.d.ts +0 -903
- package/types/generators/LlmMediaTekNeuroPilot.d.ts +0 -235
- package/types/generators/LlmMlx.d.ts +0 -228
- package/types/generators/LlmOnnx.d.ts +0 -213
- package/types/generators/LlmOpenAiCompat.d.ts +0 -312
- package/types/generators/LlmQualcommAiEngine.d.ts +0 -247
- package/types/generators/Mcp.d.ts +0 -637
- package/types/generators/McpServer.d.ts +0 -289
- package/types/generators/MediaFlow.d.ts +0 -170
- package/types/generators/MqttBroker.d.ts +0 -141
- package/types/generators/MqttClient.d.ts +0 -141
- package/types/generators/Question.d.ts +0 -408
- package/types/generators/RealtimeTranscription.d.ts +0 -287
- package/types/generators/RerankerGgml.d.ts +0 -195
- package/types/generators/SerialPort.d.ts +0 -151
- package/types/generators/SoundPlayer.d.ts +0 -94
- package/types/generators/SoundRecorder.d.ts +0 -139
- package/types/generators/SpeechToTextGgml.d.ts +0 -424
- package/types/generators/SpeechToTextOnnx.d.ts +0 -236
- package/types/generators/SpeechToTextPlatform.d.ts +0 -85
- package/types/generators/SqLite.d.ts +0 -159
- package/types/generators/Step.d.ts +0 -107
- package/types/generators/SttAppleBuiltin.d.ts +0 -153
- package/types/generators/Tcp.d.ts +0 -126
- package/types/generators/TcpServer.d.ts +0 -147
- package/types/generators/TextToSpeechAppleBuiltin.d.ts +0 -127
- package/types/generators/TextToSpeechGgml.d.ts +0 -221
- package/types/generators/TextToSpeechOnnx.d.ts +0 -178
- package/types/generators/TextToSpeechOpenAiLike.d.ts +0 -121
- package/types/generators/ThermalPrinter.d.ts +0 -193
- package/types/generators/Tick.d.ts +0 -83
- package/types/generators/Udp.d.ts +0 -120
- package/types/generators/VadGgml.d.ts +0 -260
- package/types/generators/VadOnnx.d.ts +0 -231
- package/types/generators/VadTraditional.d.ts +0 -138
- package/types/generators/VectorStore.d.ts +0 -257
- package/types/generators/Watchdog.d.ts +0 -107
- package/types/generators/WebCrawler.d.ts +0 -103
- package/types/generators/WebRtc.d.ts +0 -181
- package/types/generators/WebSocket.d.ts +0 -148
- package/types/generators/index.d.ts +0 -57
- package/types/index.d.ts +0 -13
- package/types/subspace.d.ts +0 -60
- package/types/switch.d.ts +0 -51
- package/types/system.d.ts +0 -707
- package/utils/__tests__/calc.test.js +0 -25
- package/utils/__tests__/id.test.js +0 -154
- package/utils/calc.ts +0 -130
- package/utils/data.ts +0 -495
- package/utils/event-props.ts +0 -912
- package/utils/id.ts +0 -133
package/types/bricks/Sketch.d.ts
DELETED
|
@@ -1,256 +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, AnimationOrGetter } 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<string & keyof TemplateEventPropsMap['Sketch']['onClear']>>
|
|
195
|
-
/* Sketch state changed (any commit, undo, redo, clear, or import) */
|
|
196
|
-
onStateChange?: Array<
|
|
197
|
-
EventAction<string & keyof TemplateEventPropsMap['Sketch']['onStateChange']>
|
|
198
|
-
>
|
|
199
|
-
/* Active tool changed */
|
|
200
|
-
onToolChange?: Array<
|
|
201
|
-
EventAction<string & keyof TemplateEventPropsMap['Sketch']['onToolChange']>
|
|
202
|
-
>
|
|
203
|
-
/* Image export finished */
|
|
204
|
-
onExportImage?: Array<
|
|
205
|
-
EventAction<string & keyof TemplateEventPropsMap['Sketch']['onExportImage']>
|
|
206
|
-
>
|
|
207
|
-
}
|
|
208
|
-
outlets?: {
|
|
209
|
-
/* Current sketch state (strokes, settings, undo/redo stacks) */
|
|
210
|
-
state?: () => Data<{
|
|
211
|
-
strokes?: any[]
|
|
212
|
-
undone?: any[]
|
|
213
|
-
settings?: { [key: string]: any }
|
|
214
|
-
[key: string]: any
|
|
215
|
-
}>
|
|
216
|
-
/* URI of the most recently exported image */
|
|
217
|
-
imageUri?: () => Data<string>
|
|
218
|
-
/* Most recently committed stroke (points, color, width) */
|
|
219
|
-
lastStroke?: () => Data<{
|
|
220
|
-
color?: string
|
|
221
|
-
width?: number
|
|
222
|
-
tool?: string
|
|
223
|
-
points?: any[]
|
|
224
|
-
[key: string]: any
|
|
225
|
-
}>
|
|
226
|
-
}
|
|
227
|
-
animation?: AnimationBasicEvents & {
|
|
228
|
-
onStrokeEnd?: AnimationOrGetter
|
|
229
|
-
onClear?: AnimationOrGetter
|
|
230
|
-
onStateChange?: AnimationOrGetter
|
|
231
|
-
onToolChange?: AnimationOrGetter
|
|
232
|
-
onExportImage?: AnimationOrGetter
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
/* Drawing canvas with undo/redo, import/export state, and image export */
|
|
237
|
-
export type BrickSketch = Brick &
|
|
238
|
-
BrickSketchDef & {
|
|
239
|
-
templateKey: 'BRICK_SKETCH'
|
|
240
|
-
switches?: Array<
|
|
241
|
-
SwitchDef &
|
|
242
|
-
BrickSketchDef & {
|
|
243
|
-
conds?: Array<{
|
|
244
|
-
method: '==' | '!=' | '>' | '<' | '>=' | '<='
|
|
245
|
-
cond:
|
|
246
|
-
| SwitchCondInnerStateCurrentCanvas
|
|
247
|
-
| SwitchCondData
|
|
248
|
-
| {
|
|
249
|
-
__typename: 'SwitchCondInnerStateOutlet'
|
|
250
|
-
outlet: 'state' | 'imageUri' | 'lastStroke'
|
|
251
|
-
value: any
|
|
252
|
-
}
|
|
253
|
-
}>
|
|
254
|
-
}
|
|
255
|
-
>
|
|
256
|
-
}
|
|
@@ -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, AnimationOrGetter } 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?: AnimationOrGetter
|
|
173
|
-
changeEnd?: AnimationOrGetter
|
|
174
|
-
contentChange?: AnimationOrGetter
|
|
175
|
-
roundEnd?: AnimationOrGetter
|
|
176
|
-
mediaOnLoad?: AnimationOrGetter
|
|
177
|
-
mediaOnError?: AnimationOrGetter
|
|
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
|
-
}
|
package/types/bricks/Svg.d.ts
DELETED
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
/* Auto generated by build script
|
|
2
|
-
*
|
|
3
|
-
* SVG is an XML-based vector image format for 2D graphics
|
|
4
|
-
*/
|
|
5
|
-
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
6
|
-
import type { Data, DataLink } from '../data'
|
|
7
|
-
import type { Animation, AnimationBasicEvents, AnimationOrGetter } 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 BrickSvgDef {
|
|
21
|
-
/*
|
|
22
|
-
Default property:
|
|
23
|
-
{
|
|
24
|
-
"source": "",
|
|
25
|
-
"uri": "",
|
|
26
|
-
"renderMode": "general"
|
|
27
|
-
}
|
|
28
|
-
*/
|
|
29
|
-
property?: BrickBasicProperty & {
|
|
30
|
-
/* The SVG XML content */
|
|
31
|
-
source?: string | DataLink
|
|
32
|
-
/* The svg source location (URL or LocalPath) */
|
|
33
|
-
uri?: string | DataLink
|
|
34
|
-
/* The checksum of file */
|
|
35
|
-
md5?: string | DataLink
|
|
36
|
-
/* The rules of replacing origin colour */
|
|
37
|
-
colorMapping?:
|
|
38
|
-
| Array<
|
|
39
|
-
| DataLink
|
|
40
|
-
| {
|
|
41
|
-
findItem?: string | DataLink
|
|
42
|
-
replaceItem?: string | DataLink
|
|
43
|
-
}
|
|
44
|
-
>
|
|
45
|
-
| DataLink
|
|
46
|
-
/* The render mode */
|
|
47
|
-
renderMode?: 'general' | 'legacy' | DataLink
|
|
48
|
-
}
|
|
49
|
-
events?: BrickBasicEvents & {
|
|
50
|
-
/* Event of the brick press */
|
|
51
|
-
onPress?: Array<EventAction>
|
|
52
|
-
/* Event of the brick press in */
|
|
53
|
-
onPressIn?: Array<EventAction>
|
|
54
|
-
/* Event of the brick press out */
|
|
55
|
-
onPressOut?: Array<EventAction>
|
|
56
|
-
/* Event of the brick long press */
|
|
57
|
-
onLongPress?: Array<EventAction>
|
|
58
|
-
/* Event of the brick focus (Use TV Device with controller) */
|
|
59
|
-
onFocus?: Array<EventAction>
|
|
60
|
-
/* Event of the brick blur (Use TV Device with controller) */
|
|
61
|
-
onBlur?: Array<EventAction>
|
|
62
|
-
}
|
|
63
|
-
outlets?: {
|
|
64
|
-
/* Brick is pressing */
|
|
65
|
-
brickPressing?: () => Data<boolean>
|
|
66
|
-
/* Brick is focusing (Use TV Device with controller) */
|
|
67
|
-
brickFocusing?: () => Data<boolean>
|
|
68
|
-
}
|
|
69
|
-
animation?: AnimationBasicEvents & {
|
|
70
|
-
onPress?: AnimationOrGetter
|
|
71
|
-
onPressIn?: AnimationOrGetter
|
|
72
|
-
onPressOut?: AnimationOrGetter
|
|
73
|
-
onLongPress?: AnimationOrGetter
|
|
74
|
-
onFocus?: AnimationOrGetter
|
|
75
|
-
onBlur?: AnimationOrGetter
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
/* SVG is an XML-based vector image format for 2D graphics */
|
|
80
|
-
export type BrickSvg = Brick &
|
|
81
|
-
BrickSvgDef & {
|
|
82
|
-
templateKey: 'BRICK_SVG'
|
|
83
|
-
switches?: Array<
|
|
84
|
-
SwitchDef &
|
|
85
|
-
BrickSvgDef & {
|
|
86
|
-
conds?: Array<{
|
|
87
|
-
method: '==' | '!=' | '>' | '<' | '>=' | '<='
|
|
88
|
-
cond:
|
|
89
|
-
| SwitchCondInnerStateCurrentCanvas
|
|
90
|
-
| SwitchCondData
|
|
91
|
-
| {
|
|
92
|
-
__typename: 'SwitchCondInnerStateOutlet'
|
|
93
|
-
outlet: 'brickPressing' | 'brickFocusing'
|
|
94
|
-
value: any
|
|
95
|
-
}
|
|
96
|
-
}>
|
|
97
|
-
}
|
|
98
|
-
>
|
|
99
|
-
}
|