@fugood/bricks-project 2.23.0-beta.43 → 2.23.0-beta.45

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.
@@ -304,6 +304,10 @@ export const templateActionNameMap = {
304
304
  maxDuration: 'BRICK_CAMERA_MAX_DURATION',
305
305
  maxFileSize: 'BRICK_CAMERA_MAX_FILE_SIZE',
306
306
  },
307
+ BRICK_CAMERA_FOCUS: {
308
+ focusX: 'BRICK_CAMERA_FOCUS_X',
309
+ focusY: 'BRICK_CAMERA_FOCUS_Y',
310
+ },
307
311
  },
308
312
 
309
313
  GENERATOR_FILE: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fugood/bricks-project",
3
- "version": "2.23.0-beta.43",
3
+ "version": "2.23.0-beta.45",
4
4
  "main": "index.ts",
5
5
  "scripts": {
6
6
  "build": "bun scripts/build.js"
@@ -14,5 +14,5 @@
14
14
  "lodash": "^4.17.4",
15
15
  "uuid": "^8.3.1"
16
16
  },
17
- "gitHead": "fcb007df8da241bb118f4ee086f65331a237a3c0"
17
+ "gitHead": "fa67a0c333ca6e372e7b7b01035d8e871b216b9f"
18
18
  }
@@ -77,12 +77,27 @@ export type BrickCameraActionStopRecord = Action & {
77
77
  __actionName: 'BRICK_CAMERA_STOP_RECORD'
78
78
  }
79
79
 
80
+ /* Focus the Camera at a specific point */
81
+ export type BrickCameraActionFocus = ActionWithParams & {
82
+ __actionName: 'BRICK_CAMERA_FOCUS'
83
+ params?: Array<
84
+ | {
85
+ input: 'focusX'
86
+ value?: number | DataLink | EventProperty
87
+ mapping?: string
88
+ }
89
+ | {
90
+ input: 'focusY'
91
+ value?: number | DataLink | EventProperty
92
+ mapping?: string
93
+ }
94
+ >
95
+ }
96
+
80
97
  interface BrickCameraDef {
81
98
  /*
82
99
  Default property:
83
100
  {
84
- "autoFocusEnabled": false,
85
- "focusDepth": 0.5,
86
101
  "type": "back",
87
102
  "flashMode": "off",
88
103
  "captureAudio": false,
@@ -92,12 +107,10 @@ Default property:
92
107
  }
93
108
  */
94
109
  property?: BrickBasicProperty & {
95
- /* Camera auto focus */
96
- autoFocusEnabled?: boolean | DataLink
97
- /* The auto focus feature of the camera to attempt to focus on the part of the image at this coordinate. */
98
- focusDepth?: number | DataLink
99
110
  /* Camera type (Ignore it if you are using external camera) */
100
111
  type?: 'back' | 'front' | DataLink
112
+ /* Enable or disable camera */
113
+ isActive?: boolean | DataLink
101
114
  /* Camera zoom */
102
115
  zoom?: number | DataLink
103
116
  /* Camera flash mode */
@@ -115,7 +128,7 @@ Default property:
115
128
  | 'incandescent'
116
129
  | 'fluorescent'
117
130
  | DataLink
118
- /* Enable face detection */
131
+ /* Enable face detection (Note: Barcode detection will be disabled when enabled) */
119
132
  faceDetectionEnabled?: boolean | DataLink
120
133
  /* Face detection event mode */
121
134
  faceDetectionEventMode?: 'when-detected' | 'interval' | DataLink
@@ -153,6 +166,8 @@ Default property:
153
166
  mountError?: Array<EventAction>
154
167
  }
155
168
  outlets?: {
169
+ /* Camera device and format information */
170
+ info?: () => Data
156
171
  /* Picture taken result */
157
172
  pictureTaken?: () => Data
158
173
  /* Record video result */
@@ -187,7 +202,7 @@ export type BrickCamera = Brick &
187
202
  | SwitchCondData
188
203
  | {
189
204
  __typename: 'SwitchCondInnerStateOutlet'
190
- outlet: 'pictureTaken' | 'recordVideo' | 'barcodeRead' | 'faceDetected'
205
+ outlet: 'info' | 'pictureTaken' | 'recordVideo' | 'barcodeRead' | 'faceDetected'
191
206
  value: any
192
207
  }
193
208
  }>
@@ -968,6 +968,7 @@ export const templateEventPropsMap = {
968
968
  'GENERATOR_ASSISTANT_LAST_MESSAGE', // type: object
969
969
  'GENERATOR_ASSISTANT_IS_ERROR', // type: bool
970
970
  'GENERATOR_ASSISTANT_FINISH_REASON', // type: string
971
+ 'GENERATOR_ASSISTANT_TRANSFORMED_MESSAGES', // type: array
971
972
  ],
972
973
  },
973
974
  GENERATOR_VECTOR_STORE: {