@fugood/bricks-project 2.24.4 → 2.24.5
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/action-name-map.ts +5 -0
- package/compile/index.ts +8 -4
- package/package.json +2 -2
- package/package.json.bak +2 -2
- package/skills/bricks-ctor/SKILL.md +2 -2
- package/skills/bricks-ctor/rules/architecture-patterns.md +12 -0
- package/skills/bricks-ctor/rules/automations.md +11 -0
- package/skills/bricks-ctor/rules/data-calculation.md +5 -5
- package/skills/bricks-ctor/rules/verification-toolchain.md +16 -9
- package/skills/bricks-design/SKILL.md +2 -2
- package/skills/bricks-design/references/architecture-truths.md +10 -3
- package/skills/bricks-design/references/variations-and-tweaks.md +1 -1
- package/tools/_shell.ts +8 -1
- package/tools/mcp-tools/compile.ts +17 -7
- package/tools/mcp-tools/media.ts +4 -1
- package/types/animation.ts +8 -3
- package/types/brick-base.ts +1 -1
- package/types/bricks/Camera.ts +8 -8
- package/types/bricks/Chart.ts +4 -4
- package/types/bricks/GenerativeMedia.ts +15 -15
- package/types/bricks/Icon.ts +7 -7
- package/types/bricks/Image.ts +9 -9
- package/types/bricks/Items.ts +7 -7
- package/types/bricks/Lottie.ts +10 -10
- package/types/bricks/Maps.ts +11 -11
- package/types/bricks/QrCode.ts +7 -7
- package/types/bricks/Rect.ts +7 -7
- package/types/bricks/RichText.ts +12 -9
- package/types/bricks/Rive.ts +9 -9
- package/types/bricks/Sketch.ts +6 -6
- package/types/bricks/Slideshow.ts +7 -7
- package/types/bricks/Svg.ts +7 -7
- package/types/bricks/Text.ts +9 -9
- package/types/bricks/TextInput.ts +10 -10
- package/types/bricks/Video.ts +12 -12
- package/types/bricks/VideoStreaming.ts +10 -10
- package/types/bricks/WebRtcStream.ts +1 -1
- package/types/bricks/WebView.ts +4 -4
- package/types/common.ts +2 -2
- package/types/data-calc-command/base.ts +57 -0
- package/types/data-calc-command/collection.ts +418 -0
- package/types/data-calc-command/color.ts +432 -0
- package/types/data-calc-command/constant.ts +50 -0
- package/types/data-calc-command/datetime.ts +147 -0
- package/types/data-calc-command/file.ts +129 -0
- package/types/data-calc-command/index.ts +13 -0
- package/types/data-calc-command/iteratee.ts +23 -0
- package/types/data-calc-command/logictype.ts +190 -0
- package/types/data-calc-command/math.ts +275 -0
- package/types/data-calc-command/object.ts +119 -0
- package/types/data-calc-command/sandbox.ts +58 -0
- package/types/data-calc-command/string.ts +407 -0
- package/types/data.ts +1 -1
- package/types/generators/LlmGgml.ts +37 -0
- package/utils/data.ts +1 -1
- package/utils/id.ts +78 -27
- package/types/data-calc-command.ts +0 -7005
package/types/bricks/Lottie.ts
CHANGED
|
@@ -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,
|
|
@@ -133,15 +133,15 @@ Default property:
|
|
|
133
133
|
brickFocusing?: () => Data<boolean>
|
|
134
134
|
}
|
|
135
135
|
animation?: AnimationBasicEvents & {
|
|
136
|
-
onPress?:
|
|
137
|
-
onPressIn?:
|
|
138
|
-
onPressOut?:
|
|
139
|
-
onLongPress?:
|
|
140
|
-
onFocus?:
|
|
141
|
-
onBlur?:
|
|
142
|
-
onAnimationFinish?:
|
|
143
|
-
onAnimationFailure?:
|
|
144
|
-
onAnimationLoop?:
|
|
136
|
+
onPress?: AnimationOrGetter
|
|
137
|
+
onPressIn?: AnimationOrGetter
|
|
138
|
+
onPressOut?: AnimationOrGetter
|
|
139
|
+
onLongPress?: AnimationOrGetter
|
|
140
|
+
onFocus?: AnimationOrGetter
|
|
141
|
+
onBlur?: AnimationOrGetter
|
|
142
|
+
onAnimationFinish?: AnimationOrGetter
|
|
143
|
+
onAnimationFailure?: AnimationOrGetter
|
|
144
|
+
onAnimationLoop?: AnimationOrGetter
|
|
145
145
|
}
|
|
146
146
|
}
|
|
147
147
|
|
package/types/bricks/Maps.ts
CHANGED
|
@@ -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,
|
|
@@ -226,16 +226,16 @@ Default property:
|
|
|
226
226
|
brickFocusing?: () => Data<boolean>
|
|
227
227
|
}
|
|
228
228
|
animation?: AnimationBasicEvents & {
|
|
229
|
-
onPress?:
|
|
230
|
-
onPressIn?:
|
|
231
|
-
onPressOut?:
|
|
232
|
-
onLongPress?:
|
|
233
|
-
onFocus?:
|
|
234
|
-
onBlur?:
|
|
235
|
-
onMarkerPress?:
|
|
236
|
-
onMapPress?:
|
|
237
|
-
onRegionChange?:
|
|
238
|
-
onReady?:
|
|
229
|
+
onPress?: AnimationOrGetter
|
|
230
|
+
onPressIn?: AnimationOrGetter
|
|
231
|
+
onPressOut?: AnimationOrGetter
|
|
232
|
+
onLongPress?: AnimationOrGetter
|
|
233
|
+
onFocus?: AnimationOrGetter
|
|
234
|
+
onBlur?: AnimationOrGetter
|
|
235
|
+
onMarkerPress?: AnimationOrGetter
|
|
236
|
+
onMapPress?: AnimationOrGetter
|
|
237
|
+
onRegionChange?: AnimationOrGetter
|
|
238
|
+
onReady?: AnimationOrGetter
|
|
239
239
|
}
|
|
240
240
|
}
|
|
241
241
|
|
package/types/bricks/QrCode.ts
CHANGED
|
@@ -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,
|
|
@@ -85,12 +85,12 @@ Default property:
|
|
|
85
85
|
brickFocusing?: () => Data<boolean>
|
|
86
86
|
}
|
|
87
87
|
animation?: AnimationBasicEvents & {
|
|
88
|
-
onPress?:
|
|
89
|
-
onPressIn?:
|
|
90
|
-
onPressOut?:
|
|
91
|
-
onLongPress?:
|
|
92
|
-
onFocus?:
|
|
93
|
-
onBlur?:
|
|
88
|
+
onPress?: AnimationOrGetter
|
|
89
|
+
onPressIn?: AnimationOrGetter
|
|
90
|
+
onPressOut?: AnimationOrGetter
|
|
91
|
+
onLongPress?: AnimationOrGetter
|
|
92
|
+
onFocus?: AnimationOrGetter
|
|
93
|
+
onBlur?: AnimationOrGetter
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
96
|
|
package/types/bricks/Rect.ts
CHANGED
|
@@ -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,
|
|
@@ -118,12 +118,12 @@ Default property:
|
|
|
118
118
|
brickFocusing?: () => Data<boolean>
|
|
119
119
|
}
|
|
120
120
|
animation?: AnimationBasicEvents & {
|
|
121
|
-
onPress?:
|
|
122
|
-
onPressIn?:
|
|
123
|
-
onPressOut?:
|
|
124
|
-
onLongPress?:
|
|
125
|
-
onFocus?:
|
|
126
|
-
onBlur?:
|
|
121
|
+
onPress?: AnimationOrGetter
|
|
122
|
+
onPressIn?: AnimationOrGetter
|
|
123
|
+
onPressOut?: AnimationOrGetter
|
|
124
|
+
onLongPress?: AnimationOrGetter
|
|
125
|
+
onFocus?: AnimationOrGetter
|
|
126
|
+
onBlur?: AnimationOrGetter
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
129
|
|
package/types/bricks/RichText.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/* Auto generated by build script
|
|
2
2
|
*
|
|
3
|
-
* Rich text with HTML content rendering, multiple fonts, colors, heading levels (h1-h6), and inline images
|
|
3
|
+
* Rich text with HTML or Markdown content rendering, multiple fonts, colors, heading levels (h1-h6), and inline images
|
|
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,
|
|
@@ -23,6 +23,7 @@ Default property:
|
|
|
23
23
|
{
|
|
24
24
|
"content": "",
|
|
25
25
|
"renderImage": false,
|
|
26
|
+
"renderMarkdown": false,
|
|
26
27
|
"color": "#000",
|
|
27
28
|
"fontWeight": "normal",
|
|
28
29
|
"fontStyle": "normal",
|
|
@@ -42,6 +43,8 @@ Default property:
|
|
|
42
43
|
content?: string | DataLink
|
|
43
44
|
/* Render Image */
|
|
44
45
|
renderImage?: boolean | DataLink
|
|
46
|
+
/* Treat content as Markdown (converted to HTML before rendering) */
|
|
47
|
+
renderMarkdown?: boolean | DataLink
|
|
45
48
|
/* The text color */
|
|
46
49
|
color?: string | DataLink
|
|
47
50
|
/* Specifies font weight. The values 'normal' and are supported for most fonts. Not all fonts have a variant for each of the numeric values, in that case the closest one is chosen. */
|
|
@@ -96,16 +99,16 @@ Default property:
|
|
|
96
99
|
brickFocusing?: () => Data<boolean>
|
|
97
100
|
}
|
|
98
101
|
animation?: AnimationBasicEvents & {
|
|
99
|
-
onPress?:
|
|
100
|
-
onPressIn?:
|
|
101
|
-
onPressOut?:
|
|
102
|
-
onLongPress?:
|
|
103
|
-
onFocus?:
|
|
104
|
-
onBlur?:
|
|
102
|
+
onPress?: AnimationOrGetter
|
|
103
|
+
onPressIn?: AnimationOrGetter
|
|
104
|
+
onPressOut?: AnimationOrGetter
|
|
105
|
+
onLongPress?: AnimationOrGetter
|
|
106
|
+
onFocus?: AnimationOrGetter
|
|
107
|
+
onBlur?: AnimationOrGetter
|
|
105
108
|
}
|
|
106
109
|
}
|
|
107
110
|
|
|
108
|
-
/* Rich text with HTML content rendering, multiple fonts, colors, heading levels (h1-h6), and inline images */
|
|
111
|
+
/* Rich text with HTML or Markdown content rendering, multiple fonts, colors, heading levels (h1-h6), and inline images */
|
|
109
112
|
export type BrickRichText = Brick &
|
|
110
113
|
BrickRichTextDef & {
|
|
111
114
|
templateKey: 'BRICK_RICH_TEXT'
|
package/types/bricks/Rive.ts
CHANGED
|
@@ -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,
|
|
@@ -186,14 +186,14 @@ Default property:
|
|
|
186
186
|
>
|
|
187
187
|
}
|
|
188
188
|
animation?: AnimationBasicEvents & {
|
|
189
|
-
onPlay?:
|
|
190
|
-
onPause?:
|
|
191
|
-
onStop?:
|
|
192
|
-
onLoopEnd?:
|
|
193
|
-
onStateChanged?:
|
|
194
|
-
onError?:
|
|
195
|
-
onRiveGeneralEvent?:
|
|
196
|
-
onRiveOpenUrlEvent?:
|
|
189
|
+
onPlay?: AnimationOrGetter
|
|
190
|
+
onPause?: AnimationOrGetter
|
|
191
|
+
onStop?: AnimationOrGetter
|
|
192
|
+
onLoopEnd?: AnimationOrGetter
|
|
193
|
+
onStateChanged?: AnimationOrGetter
|
|
194
|
+
onError?: AnimationOrGetter
|
|
195
|
+
onRiveGeneralEvent?: AnimationOrGetter
|
|
196
|
+
onRiveOpenUrlEvent?: AnimationOrGetter
|
|
197
197
|
}
|
|
198
198
|
}
|
|
199
199
|
|
package/types/bricks/Sketch.ts
CHANGED
|
@@ -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,
|
|
@@ -223,11 +223,11 @@ Default property:
|
|
|
223
223
|
}>
|
|
224
224
|
}
|
|
225
225
|
animation?: AnimationBasicEvents & {
|
|
226
|
-
onStrokeEnd?:
|
|
227
|
-
onClear?:
|
|
228
|
-
onStateChange?:
|
|
229
|
-
onToolChange?:
|
|
230
|
-
onExportImage?:
|
|
226
|
+
onStrokeEnd?: AnimationOrGetter
|
|
227
|
+
onClear?: AnimationOrGetter
|
|
228
|
+
onStateChange?: AnimationOrGetter
|
|
229
|
+
onToolChange?: AnimationOrGetter
|
|
230
|
+
onExportImage?: AnimationOrGetter
|
|
231
231
|
}
|
|
232
232
|
}
|
|
233
233
|
|
|
@@ -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
|
|
package/types/bricks/Svg.ts
CHANGED
|
@@ -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
|
|
package/types/bricks/Text.ts
CHANGED
|
@@ -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
|
|
package/types/bricks/Video.ts
CHANGED
|
@@ -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,
|
|
@@ -138,17 +138,17 @@ Default property:
|
|
|
138
138
|
brickFocusing?: () => Data<boolean>
|
|
139
139
|
}
|
|
140
140
|
animation?: AnimationBasicEvents & {
|
|
141
|
-
onPress?:
|
|
142
|
-
onPressIn?:
|
|
143
|
-
onPressOut?:
|
|
144
|
-
onLongPress?:
|
|
145
|
-
onFocus?:
|
|
146
|
-
onBlur?:
|
|
147
|
-
nextVideo?:
|
|
148
|
-
roundEnd?:
|
|
149
|
-
onLoad?:
|
|
150
|
-
onError?:
|
|
151
|
-
onProgress?:
|
|
141
|
+
onPress?: AnimationOrGetter
|
|
142
|
+
onPressIn?: AnimationOrGetter
|
|
143
|
+
onPressOut?: AnimationOrGetter
|
|
144
|
+
onLongPress?: AnimationOrGetter
|
|
145
|
+
onFocus?: AnimationOrGetter
|
|
146
|
+
onBlur?: AnimationOrGetter
|
|
147
|
+
nextVideo?: AnimationOrGetter
|
|
148
|
+
roundEnd?: AnimationOrGetter
|
|
149
|
+
onLoad?: AnimationOrGetter
|
|
150
|
+
onError?: AnimationOrGetter
|
|
151
|
+
onProgress?: AnimationOrGetter
|
|
152
152
|
}
|
|
153
153
|
}
|
|
154
154
|
|
|
@@ -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,
|
package/types/bricks/WebView.ts
CHANGED
|
@@ -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
|
|
package/types/common.ts
CHANGED
|
@@ -12,7 +12,7 @@ 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>
|
|
@@ -33,7 +33,7 @@ export interface Generator {
|
|
|
33
33
|
hideShortRef?: boolean
|
|
34
34
|
localSyncRunMode?: LocalSyncStrategy
|
|
35
35
|
property?: {}
|
|
36
|
-
events
|
|
36
|
+
events?: {}
|
|
37
37
|
outlets?: {}
|
|
38
38
|
switches?: Array<SwitchDef>
|
|
39
39
|
}
|
|
@@ -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
|
+
}
|