@fugood/bricks-project 2.23.0-beta.5 → 2.23.0-beta.7

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.
@@ -553,6 +553,7 @@ export const templateActionNameMap = {
553
553
  prompt: 'GENERATOR_ONNX_LLM_PROMPT',
554
554
  chat: 'GENERATOR_ONNX_LLM_CHAT',
555
555
  images: 'GENERATOR_ONNX_LLM_IMAGES',
556
+ audios: 'GENERATOR_ONNX_LLM_AUDIOS',
556
557
  tools: 'GENERATOR_ONNX_LLM_TOOLS',
557
558
  toolChoice: 'GENERATOR_ONNX_LLM_TOOL_CHOICE',
558
559
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fugood/bricks-project",
3
- "version": "2.23.0-beta.5",
3
+ "version": "2.23.0-beta.7",
4
4
  "main": "index.ts",
5
5
  "scripts": {
6
6
  "build": "node scripts/build.js"
@@ -14,5 +14,5 @@
14
14
  "lodash": "^4.17.4",
15
15
  "uuid": "^8.3.1"
16
16
  },
17
- "gitHead": "e21c486d1adc6c02aa06847398a5444b21b6c746"
17
+ "gitHead": "7c3be998ca35559d375190e3fd29e9aea9eb4293"
18
18
  }
@@ -34,6 +34,26 @@ export type BrickSlideshowActionJumpToIndex = ActionWithParams & {
34
34
  >
35
35
  }
36
36
 
37
+ /* Play the slideshow (resume if paused) */
38
+ export type BrickSlideshowActionPlay = Action & {
39
+ __actionName: 'BRICK_SLIDESHOW_PLAY'
40
+ }
41
+
42
+ /* Pause the slideshow */
43
+ export type BrickSlideshowActionPause = Action & {
44
+ __actionName: 'BRICK_SLIDESHOW_PAUSE'
45
+ }
46
+
47
+ /* Go to next slide */
48
+ export type BrickSlideshowActionNext = Action & {
49
+ __actionName: 'BRICK_SLIDESHOW_NEXT'
50
+ }
51
+
52
+ /* Go to previous slide */
53
+ export type BrickSlideshowActionPrev = Action & {
54
+ __actionName: 'BRICK_SLIDESHOW_PREV'
55
+ }
56
+
37
57
  interface BrickSlideshowDef {
38
58
  /*
39
59
  Default property:
@@ -41,17 +61,28 @@ Default property:
41
61
  "countdown": 2000,
42
62
  "loop": true,
43
63
  "shuffle": false,
64
+ "photoResizeMode": "contain",
65
+ "photoLoadSystemIos": "auto",
66
+ "photoLoadSystemAndroid": "auto",
67
+ "videoResizeMode": "contain",
68
+ "videoAutoAspectRatio": false,
44
69
  "videoVolume": 100,
70
+ "videoMuted": false,
71
+ "videoRenderMode": "auto",
72
+ "fadeDuration": 0,
45
73
  "emptyViewText": "no available image item to show",
46
74
  "emptyViewTextSize": 44,
47
75
  "emptyViewTextColor": "#fff",
76
+ "enableBlurBackground": false,
48
77
  "blurBackgroundRadius": 8
49
78
  }
50
79
  */
51
80
  property?: BrickBasicProperty & {
52
81
  /* The time interval of show for each photo */
53
82
  countdown?: number | DataLink
54
- /* The slideshow media path list (File, URL) */
83
+ /* The slideshow media path list (File, URL)
84
+ Each path object can override global photo/video settings.
85
+ Item-level properties take precedence over brick-level properties. */
55
86
  paths?:
56
87
  | Array<
57
88
  | DataLink
@@ -70,7 +101,8 @@ Default property:
70
101
  }
71
102
  >
72
103
  | DataLink
73
- /* Multiple slideshow media path lists to combine (Array of path arrays) */
104
+ /* Multiple slideshow media path lists to combine (Array of path arrays).
105
+ All arrays are flattened and combined: [...paths, ...pathsList[0], ...pathsList[1], ...] */
74
106
  pathsList?: Array<Array<any> | DataLink | DataLink> | DataLink
75
107
  /* Loop the slideshow */
76
108
  loop?: boolean | DataLink
@@ -122,6 +154,8 @@ Default property:
122
154
  roundEnd?: Array<EventAction>
123
155
  /* Event of the slideshow on load */
124
156
  mediaOnLoad?: Array<EventAction>
157
+ /* Event of the slideshow media loading error */
158
+ mediaOnError?: Array<EventAction>
125
159
  }
126
160
  animation?: AnimationBasicEvents & {
127
161
  changeStart?: Animation
@@ -129,6 +163,7 @@ Default property:
129
163
  contentChange?: Animation
130
164
  roundEnd?: Animation
131
165
  mediaOnLoad?: Animation
166
+ mediaOnError?: Animation
132
167
  }
133
168
  }
134
169
 
@@ -33,6 +33,11 @@ export type GeneratorOnnxLLMActionInfer = ActionWithParams & {
33
33
  value?: Array<any> | DataLink | EventProperty
34
34
  mapping?: string
35
35
  }
36
+ | {
37
+ input: 'audios'
38
+ value?: Array<any> | DataLink | EventProperty
39
+ mapping?: string
40
+ }
36
41
  | {
37
42
  input: 'tools'
38
43
  value?: Array<any> | DataLink | EventProperty
@@ -99,6 +104,8 @@ Default property:
99
104
  messages?: Array<DataLink | {}> | DataLink
100
105
  /* Images with message to inference */
101
106
  images?: Array<string | DataLink> | DataLink
107
+ /* Audios with message to inference */
108
+ audios?: Array<string | DataLink> | DataLink
102
109
  /* Tool call parser */
103
110
  toolCallParser?: 'llama3_json' | 'mistral' | 'hermes' | 'internlm' | 'phi4' | DataLink
104
111
  /* Tools for chat mode using OpenAI-compatible function calling format
@@ -55,6 +55,11 @@ export const templateEventPropsMap = {
55
55
  'BRICK_SLIDESHOW_PAYLOAD_VALUE', // type: number
56
56
  'BRICK_SLIDESHOW_ORIGINAL_INDEX', // type: number
57
57
  ],
58
+ mediaOnError: [
59
+ 'BRICK_SLIDESHOW_ERROR_MESSAGE', // type: string
60
+ 'BRICK_SLIDESHOW_ERROR_URL', // type: string
61
+ 'BRICK_SLIDESHOW_ERROR_INDEX', // type: number
62
+ ],
58
63
  },
59
64
  BRICK_CHART: {
60
65
  onPress: [