@fugood/bricks-project 2.21.0-beta.39 → 2.21.0-beta.43

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.
@@ -433,11 +433,8 @@ export const templateActionNameMap = {
433
433
 
434
434
  GENERATOR_INFORMATION: {
435
435
  GENERATOR_INFORMATION_SHOW: {
436
- type: 'GENERATOR_INFORMATION_TYPE',
437
- title: 'GENERATOR_INFORMATION_TITLE',
438
- description: 'GENERATOR_INFORMATION_DESCRIPTION',
439
- extraInfo: 'GENERATOR_INFORMATION_EXTRA_INFO',
440
436
  displayLanguage: 'GENERATOR_INFORMATION_DISPLAY_LANGUAGE',
437
+ content: 'GENERATOR_INFORMATION_CONTENT',
441
438
  },
442
439
  },
443
440
  GENERATOR_INTENT: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fugood/bricks-project",
3
- "version": "2.21.0-beta.39",
3
+ "version": "2.21.0-beta.43",
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": "e98ea50719977cc6a99124aab6792f8ab7747a47"
16
+ "gitHead": "d66e64d1099f22f48df44cbf52295f57333b1a86"
17
17
  }
@@ -659,7 +659,47 @@ Default property:
659
659
  }
660
660
  >
661
661
  /* On upload complete */
662
- onUploadComplete?: Array<EventAction>
662
+ onUploadComplete?: Array<
663
+ EventAction & {
664
+ eventPropertyMapping?: {
665
+ id: {
666
+ type: 'string'
667
+ path: string
668
+ }
669
+ index: {
670
+ type: 'number'
671
+ path: string
672
+ }
673
+ path: {
674
+ type: 'string'
675
+ path: string
676
+ }
677
+ }
678
+ }
679
+ >
680
+ /* On upload all done */
681
+ onUploadAllComplete?: Array<
682
+ EventAction & {
683
+ eventPropertyMapping?: {
684
+ single: {
685
+ type: 'object'
686
+ path: string
687
+ }
688
+ singlePath: {
689
+ type: 'string'
690
+ path: string
691
+ }
692
+ list: {
693
+ type: 'array'
694
+ path: string
695
+ }
696
+ listPaths: {
697
+ type: 'array'
698
+ path: string
699
+ }
700
+ }
701
+ }
702
+ >
663
703
  /* On download progress */
664
704
  onDownloadProgress?: Array<
665
705
  EventAction & {
@@ -703,7 +743,47 @@ Default property:
703
743
  }
704
744
  >
705
745
  /* On download complete */
706
- onDownloadComplete?: Array<EventAction>
746
+ onDownloadComplete?: Array<
747
+ EventAction & {
748
+ eventPropertyMapping?: {
749
+ id: {
750
+ type: 'string'
751
+ path: string
752
+ }
753
+ index: {
754
+ type: 'number'
755
+ path: string
756
+ }
757
+ path: {
758
+ type: 'string'
759
+ path: string
760
+ }
761
+ }
762
+ }
763
+ >
764
+ /* On download all done */
765
+ onDownloadAllComplete?: Array<
766
+ EventAction & {
767
+ eventPropertyMapping?: {
768
+ single: {
769
+ type: 'object'
770
+ path: string
771
+ }
772
+ singlePath: {
773
+ type: 'string'
774
+ path: string
775
+ }
776
+ list: {
777
+ type: 'array'
778
+ path: string
779
+ }
780
+ listPaths: {
781
+ type: 'array'
782
+ path: string
783
+ }
784
+ }
785
+ }
786
+ >
707
787
  }
708
788
  outlets?: {
709
789
  /* File init error result will be stored in Data */
@@ -727,11 +807,11 @@ Default property:
727
807
  /* File upload progress result will be stored in Data */
728
808
  uploadProgress?: () => Data
729
809
  /* File upload complete result will be stored in Data */
730
- uploadComplete?: () => Data
810
+ uploadResult?: () => Data
731
811
  /* File download progress result will be stored in Data */
732
812
  downloadProgress?: () => Data
733
813
  /* File download complete result will be stored in Data */
734
- downloadComplete?: () => Data
814
+ downloadResult?: () => Data
735
815
  }
736
816
  }
737
817
 
@@ -760,9 +840,9 @@ export type GeneratorFile = Generator &
760
840
  | 'writeDetails'
761
841
  | 'writeError'
762
842
  | 'uploadProgress'
763
- | 'uploadComplete'
843
+ | 'uploadResult'
764
844
  | 'downloadProgress'
765
- | 'downloadComplete'
845
+ | 'downloadResult'
766
846
  value: any
767
847
  }
768
848
  }>
@@ -4230,6 +4310,9 @@ Default property:
4230
4310
  >
4231
4311
  | DataLink
4232
4312
  multiple?: boolean | DataLink
4313
+ required?: boolean | DataLink
4314
+ maximum?: number | DataLink
4315
+ minimum?: number | DataLink
4233
4316
  }
4234
4317
  >
4235
4318
  | DataLink
@@ -4277,6 +4360,8 @@ Default property:
4277
4360
  bannerImage?: string | DataLink
4278
4361
  /* Banner image md5 */
4279
4362
  bannerImageMd5?: string | DataLink
4363
+ /* Show AI transcribe tip on the bottom of the modal */
4364
+ aiTranscribeTip?: boolean | DataLink
4280
4365
  /* Show close button */
4281
4366
  showClose?: boolean | DataLink
4282
4367
  /* Show back button */
@@ -4293,6 +4378,10 @@ Default property:
4293
4378
  doneButtonText?: string | DataLink
4294
4379
  /* Select columns */
4295
4380
  selectColumns?: number | DataLink
4381
+ /* Fixed model width, default is auto */
4382
+ fixedModelWidth?: number | DataLink
4383
+ /* Fixed model height, default is auto */
4384
+ fixedModelHeight?: number | DataLink
4296
4385
  /* Size factor */
4297
4386
  sizeFactor?: number | DataLink
4298
4387
  /* Background color */
@@ -4396,30 +4485,15 @@ export type GeneratorInformationActionShow = ActionWithParams & {
4396
4485
  __actionName: 'GENERATOR_INFORMATION_SHOW'
4397
4486
  params?: Array<
4398
4487
  | {
4399
- input: 'type'
4400
- value?: string | DataLink
4401
- mapping?: string
4402
- }
4403
- | {
4404
- input: 'title'
4405
- value?: string | DataLink
4406
- mapping?: string
4407
- }
4408
- | {
4409
- input: 'description'
4488
+ input: 'displayLanguage'
4410
4489
  value?: string | DataLink
4411
4490
  mapping?: string
4412
4491
  }
4413
4492
  | {
4414
- input: 'extraInfo'
4493
+ input: 'content'
4415
4494
  value?: {} | DataLink
4416
4495
  mapping?: string
4417
4496
  }
4418
- | {
4419
- input: 'displayLanguage'
4420
- value?: string | DataLink
4421
- mapping?: string
4422
- }
4423
4497
  >
4424
4498
  }
4425
4499
 
@@ -4439,15 +4513,21 @@ Default property:
4439
4513
  property?: {
4440
4514
  /* Modal mode */
4441
4515
  modalMode?: 'root' | 'in-subspace' | DataLink
4442
- /* Information type */
4443
- type?: 'loading' | 'info' | 'warning' | 'success' | 'queue-number' | DataLink
4444
- /* Title */
4445
- title?: string | DataLink
4446
- /* Description */
4447
- description?: string | DataLink
4448
- /* Extra information
4449
- `queue-number`: { number: string, labelTitle: string, note: string } */
4450
- extraInfo?: {} | DataLink
4516
+ /* Information contents */
4517
+ content?:
4518
+ | DataLink
4519
+ | {
4520
+ type?: 'loading' | 'info' | 'warning' | 'success' | 'queue-number' | DataLink
4521
+ title?: string | DataLink
4522
+ description?: string | DataLink
4523
+ queueNumberLabel?:
4524
+ | DataLink
4525
+ | {
4526
+ number?: string | DataLink
4527
+ labelTitle?: string | DataLink
4528
+ note?: string | DataLink
4529
+ }
4530
+ }
4451
4531
  /* Display language */
4452
4532
  displayLanguage?: string | DataLink
4453
4533
  /* Background color */
@@ -5328,7 +5408,6 @@ Default property:
5328
5408
  {
5329
5409
  "model": "BricksDisplay/vits-eng",
5330
5410
  "modelType": "auto",
5331
- "quantized": false,
5332
5411
  "vocoderModel": "speecht5_hifigan",
5333
5412
  "outputType": "play",
5334
5413
  "cacheGenerated": true,
@@ -5364,8 +5443,20 @@ Default property:
5364
5443
  | DataLink
5365
5444
  /* Model type */
5366
5445
  modelType?: 'auto' | 'vits' | 'bert_vits2' | 'speecht5' | DataLink
5367
- /* Load quantized model */
5446
+ /* Load quantized model (deprecated, use `quantizeType` instead) */
5368
5447
  quantized?: boolean | DataLink
5448
+ /* Quantize type */
5449
+ quantizeType?:
5450
+ | 'auto'
5451
+ | 'none'
5452
+ | 'fp16'
5453
+ | 'q8'
5454
+ | 'int8'
5455
+ | 'uint8'
5456
+ | 'q4'
5457
+ | 'bnb4'
5458
+ | 'q4f16'
5459
+ | DataLink
5369
5460
  /* Custom model name
5370
5461
  Choose model from https://huggingface.co/models?pipeline_tag=text-to-audio&library=transformers.js */
5371
5462
  customModel?: string | DataLink
@@ -5500,7 +5591,6 @@ Default property:
5500
5591
  {
5501
5592
  "model": "BricksDisplay/phi-1_5-q4",
5502
5593
  "modelType": "auto",
5503
- "quantized": true,
5504
5594
  "maxNewTokens": 256,
5505
5595
  "temperature": 0.7,
5506
5596
  "topK": 50,
@@ -5578,8 +5668,20 @@ Default property:
5578
5668
  | 'stablelm'
5579
5669
  | 'gemma'
5580
5670
  | DataLink
5581
- /* Load quantized model */
5671
+ /* Load quantized model (deprecated, use `quantizeType` instead) */
5582
5672
  quantized?: boolean | DataLink
5673
+ /* Quantize type */
5674
+ quantizeType?:
5675
+ | 'auto'
5676
+ | 'none'
5677
+ | 'fp16'
5678
+ | 'q8'
5679
+ | 'int8'
5680
+ | 'uint8'
5681
+ | 'q4'
5682
+ | 'bnb4'
5683
+ | 'q4f16'
5684
+ | DataLink
5583
5685
  /* Custom model name
5584
5686
  Choose model from https://huggingface.co/models?pipeline_tag=text2text-generation&library=transformers.js
5585
5687
  or https://huggingface.co/models?pipeline_tag=text-generation&library=transformers.js&sort=trending */
@@ -5703,7 +5805,6 @@ Default property:
5703
5805
  {
5704
5806
  "model": "whisper-base",
5705
5807
  "modelType": "auto",
5706
- "quantized": true,
5707
5808
  "returnTimestamps": "none",
5708
5809
  "executionMode": "sequential"
5709
5810
  }
@@ -5731,8 +5832,20 @@ Default property:
5731
5832
  | DataLink
5732
5833
  /* Model type */
5733
5834
  modelType?: 'auto' | 'whisper' | 'hubert' | 'wav2vec2' | 'wav2vec2-bert' | DataLink
5734
- /* Load quantized model */
5835
+ /* Load quantized model (deprecated, use `quantizeType` instead) */
5735
5836
  quantized?: boolean | DataLink
5837
+ /* Quantize type */
5838
+ quantizeType?:
5839
+ | 'auto'
5840
+ | 'none'
5841
+ | 'fp16'
5842
+ | 'q8'
5843
+ | 'int8'
5844
+ | 'uint8'
5845
+ | 'q4'
5846
+ | 'bnb4'
5847
+ | 'q4f16'
5848
+ | DataLink
5736
5849
  /* Custom model name
5737
5850
  Choose model from https://huggingface.co/models?pipeline_tag=automatic-speech-recognition&library=transformers.js */
5738
5851
  customModel?: string | DataLink
package/types/system.ts CHANGED
@@ -3,12 +3,7 @@ import type { Animation } from './animation'
3
3
  import type { Canvas } from './canvas'
4
4
  import type { Data, DataLink } from './data'
5
5
 
6
- /* Change Data value */
7
- export type SystemActionPropertyBank = ActionWithDataParams & {
8
- __actionName: 'PROPERTY_BANK'
9
- }
10
-
11
- /* Change Data value with expression */
6
+ /* Change Data value with script expression */
12
7
  export type SystemActionPropertyBankExpression = ActionWithParams & {
13
8
  __actionName: 'PROPERTY_BANK_EXPRESSION'
14
9
  params?: Array<
@@ -40,6 +35,11 @@ export type SystemActionPropertyBankExpression = ActionWithParams & {
40
35
  >
41
36
  }
42
37
 
38
+ /* Change Data value */
39
+ export type SystemActionPropertyBank = ActionWithDataParams & {
40
+ __actionName: 'PROPERTY_BANK'
41
+ }
42
+
43
43
  /* Trigger Data calculation flow without value change */
44
44
  export type SystemActionPropertyBankCommand = ActionWithDataParams & {
45
45
  __actionName: 'PROPERTY_BANK_COMMAND'