@fugood/bricks-project 2.25.0-beta.19 → 2.25.0-beta.20
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 +56 -0
- package/compile/index.ts +6 -2
- package/package.json +2 -2
- package/package.json.bak +2 -2
- 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 +7 -7
- package/types/bricks/Rive.ts +9 -9
- package/types/bricks/Scene3D.ts +596 -0
- 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/bricks/index.ts +1 -0
- package/types/data.ts +2 -0
- package/utils/event-props.ts +17 -0
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/bricks/index.ts
CHANGED
package/types/data.ts
CHANGED
package/utils/event-props.ts
CHANGED
|
@@ -146,6 +146,23 @@ export const templateEventPropsMap = {
|
|
|
146
146
|
onToolChange: { BRICK_SKETCH_TOOL: 'string' },
|
|
147
147
|
onExportImage: { BRICK_SKETCH_IMAGE_URI: 'string' },
|
|
148
148
|
},
|
|
149
|
+
Scene3D: {
|
|
150
|
+
onLoad: { BRICK_SCENE_3D_OBJECT_ID: 'string', BRICK_SCENE_3D_DURATION_MS: 'number' },
|
|
151
|
+
onLoadError: { BRICK_SCENE_3D_OBJECT_ID: 'string', BRICK_SCENE_3D_ERROR: 'string' },
|
|
152
|
+
onObjectClick: {
|
|
153
|
+
BRICK_SCENE_3D_OBJECT_ID: 'string',
|
|
154
|
+
BRICK_SCENE_3D_HIT_POINT: '{ x?: number y?: number z?: number }',
|
|
155
|
+
BRICK_SCENE_3D_HIT_DISTANCE: 'number',
|
|
156
|
+
},
|
|
157
|
+
onObjectHover: { BRICK_SCENE_3D_OBJECT_ID: 'string', BRICK_SCENE_3D_HOVER_ENTERED: 'boolean' },
|
|
158
|
+
onAnimationEnd: { BRICK_SCENE_3D_OBJECT_ID: 'string', BRICK_SCENE_3D_ANIMATION_NAME: 'string' },
|
|
159
|
+
onFrame: {
|
|
160
|
+
BRICK_SCENE_3D_FRAME_TIME: 'number',
|
|
161
|
+
BRICK_SCENE_3D_FRAME_DT: 'number',
|
|
162
|
+
BRICK_SCENE_3D_FPS: 'number',
|
|
163
|
+
},
|
|
164
|
+
onScriptError: { BRICK_SCENE_3D_ERROR: 'string', BRICK_SCENE_3D_PHASE: 'string' },
|
|
165
|
+
},
|
|
149
166
|
Tick: {
|
|
150
167
|
ticking: { GENERATOR_TICK_COUNTDOWN: 'number', GENERATOR_TICK_VALUE: 'any' },
|
|
151
168
|
completed: { GENERATOR_TICK_COUNTDOWN: 'number', GENERATOR_TICK_VALUE: 'any' },
|