@fugood/bricks-project 2.23.0-beta.10 → 2.23.0-beta.13

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fugood/bricks-project",
3
- "version": "2.23.0-beta.10",
3
+ "version": "2.23.0-beta.13",
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": "4730d37721047a7bba3a562e96a5efa665bf572f"
17
+ "gitHead": "fd06b4cd40166a0c5f840228cddb25b91f77605e"
18
18
  }
@@ -44,8 +44,8 @@ Default property:
44
44
  resizeMode?: 'contain' | 'cover' | 'stretch' | 'center' | 'repeat' | DataLink
45
45
  /* The API key for the generative media service */
46
46
  apiKey?: string | DataLink
47
- /* The AI provider to use for generation (openai, freepik, or deepai) */
48
- provider?: 'openai' | 'freepik-classic' | 'deepai' | DataLink
47
+ /* The AI provider to use for generation (openai, freepik-classic, deepai, or gemini) */
48
+ provider?: 'openai' | 'freepik-classic' | 'deepai' | 'gemini' | DataLink
49
49
  /* OpenAI image size (256x256, 512x512, 1024x1024, etc) */
50
50
  openaiSize?: '1024x1024' | '1024x1792' | '1792x1024' | DataLink
51
51
  /* OpenAI image style (vivid or natural) */
@@ -158,6 +158,8 @@ Default property:
158
158
  deepaiWidth?: number | DataLink
159
159
  /* DeepAI output image height */
160
160
  deepaiHeight?: number | DataLink
161
+ /* Gemini aspect ratio (1:1, 16:9, 9:16, 3:2, 2:3) */
162
+ geminiAspectRatio?: '1:1' | '16:9' | '9:16' | '3:2' | '2:3' | DataLink
161
163
  }
162
164
  events?: BrickBasicEvents & {
163
165
  /* Event of the brick press */
@@ -5058,6 +5058,7 @@ export type DataCommandSandboxGetReturnValue = DataCommand & {
5058
5058
  - coseVerify (cose.sign.verifySync from https://github.com/erdtman/COSE-JS)
5059
5059
  - fflate (Not support async, callback and stream)
5060
5060
  - iconv (Use iconv-lite)
5061
+ - OpenCC (Use opencc-js)
5061
5062
 
5062
5063
  Android: Running on the sandbox of Hermes engine
5063
5064
 
@@ -19,6 +19,11 @@ export type GeneratorIteratorActionPrevious = Action & {
19
19
  __actionName: 'GENERATOR_ITERATOR_PREVIOUS'
20
20
  }
21
21
 
22
+ /* Jump to the first iteration element */
23
+ export type GeneratorIteratorActionFirst = Action & {
24
+ __actionName: 'GENERATOR_ITERATOR_FIRST'
25
+ }
26
+
22
27
  /* Jump to the last iteration element (ignoring the loop setting) */
23
28
  export type GeneratorIteratorActionLast = Action & {
24
29
  __actionName: 'GENERATOR_ITERATOR_LAST'
@@ -39,13 +44,13 @@ Default property:
39
44
  }
40
45
  */
41
46
  property?: {
42
- /* Data source for iteration. If it's an Array, it will iterate through elements. If it's an Object, it will use Object.values() as data source. If it's a String, it will iterate through characters. If it's a Number, it represents count from 1 to N. */
47
+ /* Data source for iteration. If it's an Array, it will iterate through elements. If it's an Object, it will use Object.entries() to get key-value pairs. If it's a String, it will iterate through characters. If it's a Number, it represents count from 1 to N. */
43
48
  data?: any
44
49
  /* Starting element position */
45
50
  start?: number | DataLink
46
51
  /* Step size for each iteration */
47
52
  step?: number | DataLink
48
- /* Maximum number of iterations (can be set to -1 for unlimited) */
53
+ /* Maximum number of iterations (can be set to -1 for unlimited). When reached, further iteration actions will be silently ignored. */
49
54
  maxQuantity?: number | DataLink
50
55
  /* Whether to loop the iteration */
51
56
  loop?: boolean | DataLink
@@ -57,6 +62,8 @@ Default property:
57
62
  first?: Array<EventAction>
58
63
  /* Event triggered on the last iteration of a round */
59
64
  end?: Array<EventAction>
65
+ /* Event triggered when data type is invalid or unexpected */
66
+ error?: Array<EventAction>
60
67
  }
61
68
  outlets?: {
62
69
  /* Elements that have been iterated (including current one) */
@@ -396,7 +396,21 @@ export const templateEventPropsMap = {
396
396
  iterate: [
397
397
  'GENERATOR_ITERATOR_ITERATE_VALUE', // type: any
398
398
  'GENERATOR_ITERATOR_ITERATE_KEY', // type: any
399
- 'GENERATOR_ITERATOR_ITERATE_INDEX', // type: string
399
+ 'GENERATOR_ITERATOR_ITERATE_INDEX', // type: number
400
+ ],
401
+ first: [
402
+ 'GENERATOR_ITERATOR_ITERATE_VALUE', // type: any
403
+ 'GENERATOR_ITERATOR_ITERATE_KEY', // type: any
404
+ 'GENERATOR_ITERATOR_ITERATE_INDEX', // type: number
405
+ ],
406
+ end: [
407
+ 'GENERATOR_ITERATOR_ITERATE_VALUE', // type: any
408
+ 'GENERATOR_ITERATOR_ITERATE_KEY', // type: any
409
+ 'GENERATOR_ITERATOR_ITERATE_INDEX', // type: number
410
+ ],
411
+ error: [
412
+ 'GENERATOR_ITERATOR_ERROR_MESSAGE', // type: string
413
+ 'GENERATOR_ITERATOR_ERROR_DATA', // type: any
400
414
  ],
401
415
  },
402
416
  GENERATOR_WATCHDOG: {