@fugood/bricks-project 2.21.0-beta.24 → 2.21.0-beta.26

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.
@@ -60,6 +60,22 @@ export const templateActionNameMap = {
60
60
  height: 'TAKE_SCREENSHOT_HEIGHT',
61
61
  saveProperty: 'TAKE_SCREENSHOT_SAVE_PROPERTY',
62
62
  },
63
+ CHANNEL_SUBSCRIBE: {
64
+ key: 'CHANNEL_SUBSCRIBE_KEY',
65
+ type: 'CHANNEL_SUBSCRIBE_TYPE',
66
+ livetime: 'CHANNEL_SUBSCRIBE_LIVETIME',
67
+ dataResult: 'CHANNEL_SUBSCRIBE_DATA_RESULT',
68
+ progressResult: 'CHANNEL_SUBSCRIBE_PROGRESS_RESULT',
69
+ errorResult: 'CHANNEL_SUBSCRIBE_ERROR_RESULT',
70
+ },
71
+ CHANNEL_UNSUBSCRIBE: {
72
+ keyMatch: 'CHANNEL_UNSUBSCRIBE_KEY_MATCH',
73
+ },
74
+ CHANNEL_PUBLISH: {
75
+ keyMatch: 'CHANNEL_PUBLISH_KEY_MATCH',
76
+ payloadType: 'CHANNEL_PUBLISH_PAYLOAD_TYPE',
77
+ payload: 'CHANNEL_PUBLISH_PAYLOAD',
78
+ },
63
79
  USE_SHARE_APPLICATION: {
64
80
  applicationId: 'APPLICATION_ID',
65
81
  releaseVersion: 'RELEASE_VERSION',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fugood/bricks-project",
3
- "version": "2.21.0-beta.24",
3
+ "version": "2.21.0-beta.26",
4
4
  "main": "index.ts",
5
5
  "scripts": {
6
6
  "build": "node scripts/build.js"
@@ -13,5 +13,5 @@
13
13
  "lodash": "^4.17.4",
14
14
  "uuid": "^8.3.1"
15
15
  },
16
- "gitHead": "279cda43b8e705467a5a1562f610331aae178e8a"
16
+ "gitHead": "7983dcaadfdfdc326a1376a65be42368f08abf96"
17
17
  }
package/types/bricks.ts CHANGED
@@ -772,7 +772,8 @@ interface BrickSvgDef {
772
772
  Default property:
773
773
  {
774
774
  "source": "",
775
- "uri": ""
775
+ "uri": "",
776
+ "renderMode": "general"
776
777
  }
777
778
  */
778
779
  property?: BrickBasicProperty & {
@@ -792,6 +793,8 @@ Default property:
792
793
  }
793
794
  >
794
795
  | DataLink
796
+ /* The render mode */
797
+ renderMode?: 'general' | 'legacy' | DataLink
795
798
  }
796
799
  events?: BrickBasicEvents & {
797
800
  /* Event of the brick press */
@@ -41,9 +41,35 @@ Default property:
41
41
  }
42
42
  events?: {
43
43
  /* Event for each tick start */
44
- ticking?: Array<EventAction>
44
+ ticking?: Array<
45
+ EventAction & {
46
+ eventPropertyMapping?: {
47
+ countdown: {
48
+ type: 'number'
49
+ path: string
50
+ }
51
+ value: {
52
+ type: 'any'
53
+ path: string
54
+ }
55
+ }
56
+ }
57
+ >
45
58
  /* Event for tick completed */
46
- completed?: Array<EventAction>
59
+ completed?: Array<
60
+ EventAction & {
61
+ eventPropertyMapping?: {
62
+ countdown: {
63
+ type: 'number'
64
+ path: string
65
+ }
66
+ value: {
67
+ type: 'any'
68
+ path: string
69
+ }
70
+ }
71
+ }
72
+ >
47
73
  }
48
74
  outlets?: {
49
75
  /* Result of each countdown change */
@@ -4054,193 +4080,6 @@ export type GeneratorBlePeripheral = Generator &
4054
4080
  >
4055
4081
  }
4056
4082
 
4057
- /* Start inquire */
4058
- export type GeneratorPromptActionStart = Action & {
4059
- __actionName: 'GENERATOR_PROMPT_START'
4060
- }
4061
-
4062
- /* Stop inquire */
4063
- export type GeneratorPromptActionStop = Action & {
4064
- __actionName: 'GENERATOR_PROMPT_STOP'
4065
- }
4066
-
4067
- /* Pause inquire */
4068
- export type GeneratorPromptActionPause = Action & {
4069
- __actionName: 'GENERATOR_PROMPT_PAUSE'
4070
- }
4071
-
4072
- interface GeneratorPromptDef {
4073
- /*
4074
- Default property:
4075
- {
4076
- "showClose": true,
4077
- "yesBtnText": "Yes",
4078
- "noBtnText": "No",
4079
- "titleFontSize": 4,
4080
- "messageFontSize": 2,
4081
- "fieldFontSize": 2,
4082
- "fieldRadius": 0
4083
- }
4084
- */
4085
- property?: {
4086
- /* Inquirer schema
4087
- `key`: Field key (unique)
4088
- `title`: Field title
4089
- `description`: Field description
4090
- `kind`: Field type
4091
- `options`: Field options (for `select` and `multi-select`)
4092
- `placeholder`: Field placeholder text
4093
- `defaultValue`: Field default value
4094
- `required`: Is field required
4095
- `max`: Field maximum value (for `number` and `slider`)
4096
- `min`: Field minimum value (for `number` and `slider`)
4097
- `step`: Field step value (for `number` and `slider`)
4098
- `invalidMessage`: Invalid message if input value is invalid */
4099
- schema?:
4100
- | Array<
4101
- | DataLink
4102
- | {
4103
- key?: string | DataLink
4104
- title?: string | DataLink
4105
- description?: string | DataLink
4106
- kind?:
4107
- | 'number'
4108
- | 'text'
4109
- | 'phone'
4110
- | 'email'
4111
- | 'color'
4112
- | 'uri'
4113
- | 'select'
4114
- | 'multi-select'
4115
- | 'yesno'
4116
- | DataLink
4117
- options?:
4118
- | Array<
4119
- | DataLink
4120
- | {
4121
- value?: string | DataLink
4122
- image?: string | DataLink
4123
- label?: string | DataLink
4124
- }
4125
- >
4126
- | DataLink
4127
- placeholder?: string | DataLink
4128
- defaultValue?:
4129
- | string
4130
- | DataLink
4131
- | number
4132
- | DataLink
4133
- | boolean
4134
- | DataLink
4135
- | Array<string | DataLink>
4136
- | DataLink
4137
- | DataLink
4138
- required?: boolean | DataLink
4139
- max?: number | DataLink
4140
- min?: number | DataLink
4141
- step?: number | DataLink
4142
- invalidMessage?: string | DataLink
4143
- }
4144
- >
4145
- | DataLink
4146
- /* Show close button */
4147
- showClose?: boolean | DataLink
4148
- /* Completed message */
4149
- completedMessage?: string | DataLink
4150
- /* "Yes" button text */
4151
- yesBtnText?: string | DataLink
4152
- /* "No" button text */
4153
- noBtnText?: string | DataLink
4154
- /* Background color */
4155
- backgroundColor?: string | DataLink
4156
- /* Main color (for title and button) */
4157
- mainColor?: string | DataLink
4158
- /* Second color (for description) */
4159
- secondColor?: string | DataLink
4160
- /* Field active color */
4161
- fieldCheckedColor?: string | DataLink
4162
- /* Field unactive color */
4163
- fieldUncheckedColor?: string | DataLink
4164
- /* Field background color */
4165
- fieldBackgroundColor?: string | DataLink
4166
- /* Field border color */
4167
- fieldBorderColor?: string | DataLink
4168
- /* Field text color */
4169
- fieldTextColor?: string | DataLink
4170
- /* Field placeholder color */
4171
- fieldPlaceholderColor?: string | DataLink
4172
- /* Warn color */
4173
- warnColor?: string | DataLink
4174
- /* Error color */
4175
- errorColor?: string | DataLink
4176
- /* Title font size */
4177
- titleFontSize?: number | DataLink
4178
- /* Message font size */
4179
- messageFontSize?: number | DataLink
4180
- /* Field font size */
4181
- fieldFontSize?: number | DataLink
4182
- /* Field radius */
4183
- fieldRadius?: number | DataLink
4184
- }
4185
- events?: {
4186
- /* Event of go next */
4187
- onNextQuestion?: Array<EventAction>
4188
- /* Event of go back */
4189
- onBackQuestion?: Array<EventAction>
4190
- /* Event of change question */
4191
- onQuestionChange?: Array<EventAction>
4192
- /* Event of prompt paused */
4193
- onPause?: Array<EventAction>
4194
- /* Event of warning showed */
4195
- onWarning?: Array<EventAction>
4196
- /* Event of completed inquire */
4197
- onCompleted?: Array<EventAction>
4198
- /* Event of error occured */
4199
- onError?: Array<
4200
- EventAction & {
4201
- eventPropertyMapping?: {
4202
- errorMessage: {
4203
- type: 'string'
4204
- path: string
4205
- }
4206
- }
4207
- }
4208
- >
4209
- }
4210
- outlets?: {
4211
- /* Result data */
4212
- data?: () => Data
4213
- /* Currnet question */
4214
- currectKey?: () => Data
4215
- /* Currnet input value */
4216
- currectValue?: () => Data
4217
- /* Error message */
4218
- errorMessage?: () => Data
4219
- }
4220
- }
4221
-
4222
- /* Inquiry prompts */
4223
- export type GeneratorPrompt = Generator &
4224
- GeneratorPromptDef & {
4225
- templateKey: 'GENERATOR_PROMPT'
4226
- switches: Array<
4227
- SwitchDef &
4228
- GeneratorPromptDef & {
4229
- conds?: Array<{
4230
- method: '==' | '!=' | '>' | '<' | '>=' | '<='
4231
- cond:
4232
- | SwitchCondInnerStateCurrentCanvas
4233
- | SwitchCondData
4234
- | {
4235
- __typename: 'SwitchCondInnerStateOutlet'
4236
- outlet: 'data' | 'currectKey' | 'currectValue' | 'errorMessage'
4237
- value: any
4238
- }
4239
- }>
4240
- }
4241
- >
4242
- }
4243
-
4244
4083
  /* Start inquire */
4245
4084
  export type GeneratorQuestionActionStart = Action & {
4246
4085
  __actionName: 'GENERATOR_QUESTION_START'
@@ -6421,6 +6260,8 @@ Default property:
6421
6260
  "gpuLayers": 0,
6422
6261
  "useMlock": true,
6423
6262
  "useMmap": true,
6263
+ "cacheKType": "f16",
6264
+ "cacheVType": "f16",
6424
6265
  "transformScriptEnabled": false,
6425
6266
  "transformScriptCode": "\/\* Global variable: inputs = { prompt, messages, variables } \*\/\nreturn inputs.prompt",
6426
6267
  "transformScriptVariables": {},
@@ -6486,6 +6327,12 @@ Default property:
6486
6327
  useMlock?: boolean | DataLink
6487
6328
  /* Use mmap */
6488
6329
  useMmap?: boolean | DataLink
6330
+ /* Use Flash Attention for inference (Recommended with GPU enabled) */
6331
+ useFlashAttn?: boolean | DataLink
6332
+ /* KV cache data type for the K (Default: f16) */
6333
+ cacheKType?: 'f16' | 'f32' | 'q8_0' | 'q4_0' | 'q4_1' | 'iq4_nl' | 'q5_0' | 'q5_1' | DataLink
6334
+ /* KV cache data type for the V (Default: f16) */
6335
+ cacheVType?: 'f16' | 'f32' | 'q8_0' | 'q4_0' | 'q4_1' | 'iq4_nl' | 'q5_0' | 'q5_1' | DataLink
6489
6336
  /* Enable Transform Script for processing the prompt */
6490
6337
  transformScriptEnabled?: boolean | DataLink
6491
6338
  /* Code of Transform Script */
package/types/system.ts CHANGED
@@ -279,6 +279,75 @@ export type SystemActionTakeScreenshot = ActionWithParams & {
279
279
  >
280
280
  }
281
281
 
282
+ /* Subscribe to a channel for data update */
283
+ export type SystemActionChannelSubscribe = ActionWithParams & {
284
+ __actionName: 'CHANNEL_SUBSCRIBE'
285
+ params?: Array<
286
+ | {
287
+ input: 'key'
288
+ value?: string | DataLink
289
+ mapping?: string
290
+ }
291
+ | {
292
+ input: 'type'
293
+ value?: 'on' | 'once' | DataLink
294
+ mapping?: string
295
+ }
296
+ | {
297
+ input: 'livetime'
298
+ value?: number | DataLink
299
+ mapping?: string
300
+ }
301
+ | {
302
+ input: 'dataResult'
303
+ value?: string | DataLink | (() => Data)
304
+ mapping?: string
305
+ }
306
+ | {
307
+ input: 'progressResult'
308
+ value?: string | DataLink | (() => Data)
309
+ mapping?: string
310
+ }
311
+ | {
312
+ input: 'errorResult'
313
+ value?: string | DataLink | (() => Data)
314
+ mapping?: string
315
+ }
316
+ >
317
+ }
318
+
319
+ /* Unsubscribe from a channel */
320
+ export type SystemActionChannelUnsubscribe = ActionWithParams & {
321
+ __actionName: 'CHANNEL_UNSUBSCRIBE'
322
+ params?: Array<{
323
+ input: 'keyMatch'
324
+ value?: string | DataLink
325
+ mapping?: string
326
+ }>
327
+ }
328
+
329
+ /* Publish data to a channel */
330
+ export type SystemActionChannelPublish = ActionWithParams & {
331
+ __actionName: 'CHANNEL_PUBLISH'
332
+ params?: Array<
333
+ | {
334
+ input: 'keyMatch'
335
+ value?: string | DataLink
336
+ mapping?: string
337
+ }
338
+ | {
339
+ input: 'payloadType'
340
+ value?: 'result' | 'progress' | 'error' | DataLink
341
+ mapping?: string
342
+ }
343
+ | {
344
+ input: 'payload'
345
+ value?: string | DataLink
346
+ mapping?: string
347
+ }
348
+ >
349
+ }
350
+
282
351
  /* [Internal] Use a shared application */
283
352
  export type SystemActionUseShareApplication = ActionWithParams & {
284
353
  __actionName: 'USE_SHARE_APPLICATION'