@fugood/bricks-project 2.25.0-beta.19 → 2.25.0-beta.21
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 +61 -0
- package/compile/index.ts +6 -2
- package/package.json +2 -2
- package/package.json.bak +2 -2
- package/tools/mcp-tools/compile.ts +2 -0
- 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/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/types/generators/LlmGgml.ts +37 -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
|
@@ -393,6 +393,31 @@ export type GeneratorLLMActionCompletion = ActionWithParams & {
|
|
|
393
393
|
value?: boolean | DataLink | EventProperty
|
|
394
394
|
mapping?: string
|
|
395
395
|
}
|
|
396
|
+
| {
|
|
397
|
+
input: 'mtpSpeculativeDecoding'
|
|
398
|
+
value?: boolean | DataLink | EventProperty
|
|
399
|
+
mapping?: string
|
|
400
|
+
}
|
|
401
|
+
| {
|
|
402
|
+
input: 'mtpDraftTokens'
|
|
403
|
+
value?: number | DataLink | EventProperty
|
|
404
|
+
mapping?: string
|
|
405
|
+
}
|
|
406
|
+
| {
|
|
407
|
+
input: 'mtpDraftMinTokens'
|
|
408
|
+
value?: number | DataLink | EventProperty
|
|
409
|
+
mapping?: string
|
|
410
|
+
}
|
|
411
|
+
| {
|
|
412
|
+
input: 'mtpDraftMinProbability'
|
|
413
|
+
value?: number | DataLink | EventProperty
|
|
414
|
+
mapping?: string
|
|
415
|
+
}
|
|
416
|
+
| {
|
|
417
|
+
input: 'mtpDraftSplitProbability'
|
|
418
|
+
value?: number | DataLink | EventProperty
|
|
419
|
+
mapping?: string
|
|
420
|
+
}
|
|
396
421
|
| {
|
|
397
422
|
input: 'functionCallEnabled'
|
|
398
423
|
value?: boolean | DataLink | EventProperty
|
|
@@ -465,6 +490,8 @@ Default property:
|
|
|
465
490
|
"cacheVType": "f16",
|
|
466
491
|
"ctxShift": true,
|
|
467
492
|
"cpuMoeLayers": 0,
|
|
493
|
+
"mtpSpeculativeDecoding": false,
|
|
494
|
+
"mtpDraftTokens": 3,
|
|
468
495
|
"transformScriptEnabled": false,
|
|
469
496
|
"transformScriptCode": "\/\* Global variable: inputs = { prompt, messages, variables }, members = { llmUtils } \*\/\nreturn inputs.prompt",
|
|
470
497
|
"transformScriptVariables": {},
|
|
@@ -575,6 +602,16 @@ Default property:
|
|
|
575
602
|
ctxShift?: boolean | DataLink
|
|
576
603
|
/* Number of layers to keep MoE weights on CPU */
|
|
577
604
|
cpuMoeLayers?: number | DataLink
|
|
605
|
+
/* Enable MTP speculative decoding for GGUF models that contain MTP / NextN layers */
|
|
606
|
+
mtpSpeculativeDecoding?: boolean | DataLink
|
|
607
|
+
/* Maximum number of MTP draft tokens */
|
|
608
|
+
mtpDraftTokens?: number | DataLink
|
|
609
|
+
/* Minimum number of MTP draft tokens */
|
|
610
|
+
mtpDraftMinTokens?: number | DataLink
|
|
611
|
+
/* Minimum probability for greedy MTP draft tokens */
|
|
612
|
+
mtpDraftMinProbability?: number | DataLink
|
|
613
|
+
/* Split probability for MTP speculative decoding */
|
|
614
|
+
mtpDraftSplitProbability?: number | DataLink
|
|
578
615
|
/* Enable Transform Script for processing the prompt */
|
|
579
616
|
transformScriptEnabled?: boolean | DataLink
|
|
580
617
|
/* Code of Transform Script */
|
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' },
|