@fugood/bricks-project 2.22.2 → 2.22.3

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.22.2",
3
+ "version": "2.22.3",
4
4
  "main": "index.ts",
5
5
  "scripts": {
6
6
  "build": "node scripts/build.js"
@@ -198,6 +198,8 @@ Default property:
198
198
  url?: () => Data
199
199
  /* Generated media error */
200
200
  error?: () => Data
201
+ /* Loading state */
202
+ loading?: () => Data
201
203
  }
202
204
  animation?: AnimationBasicEvents & {
203
205
  generativeMediaOnPress?: Animation
@@ -231,7 +233,7 @@ export type GenerativeMedia = Brick &
231
233
  | SwitchCondData
232
234
  | {
233
235
  __typename: 'SwitchCondInnerStateOutlet'
234
- outlet: 'brickPressing' | 'brickFocusing' | 'url' | 'error'
236
+ outlet: 'brickPressing' | 'brickFocusing' | 'url' | 'error' | 'loading'
235
237
  value: any
236
238
  }
237
239
  }>
@@ -75,7 +75,7 @@ Default property:
75
75
  /* The WebView content URL */
76
76
  url?: string | DataLink
77
77
  /* The request headers to load content */
78
- headers?: {} | DataLink
78
+ headers?: Record<string, string | DataLink> | DataLink
79
79
  /* The request UserAgent */
80
80
  userAgent?: string | DataLink
81
81
  /* The webview content HTML (Use `url` first) */
@@ -100,7 +100,7 @@ Default property:
100
100
  cacheEnabled?: boolean | DataLink
101
101
  /* Enable Geolocation */
102
102
  geolocationEnabled?: boolean | DataLink
103
- /* Enable Third Party Cooikies */
103
+ /* Enable Third Party Cookies */
104
104
  thirdPartyCookiesEnabled?: boolean | DataLink
105
105
  /* Enable JavaScript */
106
106
  javaScriptEnabled?: boolean | DataLink
@@ -31,10 +31,21 @@ Default property:
31
31
  >
32
32
  | DataLink
33
33
  }
34
- outlets?: {}
34
+ events?: {
35
+ /* Event triggered when a rule matches and canvas navigation occurs */
36
+ onNavigate?: Array<EventAction>
37
+ }
38
+ outlets?: {
39
+ /* Last matched trigger rule that caused canvas navigation */
40
+ lastMatchedRule?: () => Data
41
+ /* Index of the last matched rule in triggerList */
42
+ lastMatchedIndex?: () => Data
43
+ /* Total count of canvas navigations triggered by this generator */
44
+ navigationCount?: () => Data
45
+ }
35
46
  }
36
47
 
37
- /* Trigger change canvas by setup rules */
48
+ /* Trigger canvas navigation by setup rules */
38
49
  export type GeneratorCanvasMap = Generator &
39
50
  GeneratorCanvasMapDef & {
40
51
  templateKey: 'GENERATOR_CANVAS_MAP'
@@ -48,7 +59,7 @@ export type GeneratorCanvasMap = Generator &
48
59
  | SwitchCondData
49
60
  | {
50
61
  __typename: 'SwitchCondInnerStateOutlet'
51
- outlet: ''
62
+ outlet: 'lastMatchedRule' | 'lastMatchedIndex' | 'navigationCount'
52
63
  value: any
53
64
  }
54
65
  }>
@@ -15,6 +15,7 @@ Default property:
15
15
  {
16
16
  "enabled": true,
17
17
  "keyMap": {},
18
+ "keyOutletPrefer": "auto",
18
19
  "batchStopKeys": [
19
20
  13
20
21
  ],
@@ -24,15 +25,18 @@ Default property:
24
25
  property?: {
25
26
  /* Enable listening for input */
26
27
  enabled?: boolean | DataLink
27
- /* Key map to transform key or key code to the designated content (e.g. { 37: 'left' }) */
28
+ /* Key map to transform key or key code to the designated content
29
+ Example: { 37: 'left', 38: 'up', 39: 'right', 40: 'down', 'Enter': 'confirm' }
30
+ Supports both key codes (numbers) and key names (strings) as keys */
28
31
  keyMap?: {} | DataLink
29
32
  /* Key outlet preference use key code or key. */
30
33
  keyOutletPrefer?: 'auto' | 'key-code' | 'key' | DataLink
31
- /* Key or code to finish continuous input */
34
+ /* Key or code to finish batch input
35
+ Common values: 13 (Enter), 27 (Escape), 'Enter', 'Escape' */
32
36
  batchStopKeys?: Array<string | DataLink | number | DataLink | DataLink> | DataLink
33
- /* Debounce time (ms) to finish continuous input */
37
+ /* Debounce time (ms) to finish batch input */
34
38
  batchDebounce?: number | DataLink
35
- /* Maximum wait time (ms) to finish continuous input (default: unlimited) */
39
+ /* Maximum wait time (ms) to finish batch input (default: unlimited) */
36
40
  batchDebounceMaxWait?: number | DataLink
37
41
  }
38
42
  events?: {
@@ -40,7 +44,7 @@ Default property:
40
44
  onDown?: Array<EventAction>
41
45
  /* Event on key up */
42
46
  onUp?: Array<EventAction>
43
- /* Event on continuous input complete */
47
+ /* Event on batch input complete */
44
48
  onBatch?: Array<EventAction>
45
49
  }
46
50
  outlets?: {
@@ -52,7 +56,7 @@ Default property:
52
56
  lastKeyUp?: () => Data
53
57
  /* Modifier key information on last key release */
54
58
  lastKeyUpFlags?: () => Data
55
- /* Last continuous event */
59
+ /* Last batch event */
56
60
  lastBatchEvents?: () => Data
57
61
  }
58
62
  }
@@ -29,7 +29,7 @@ Default property:
29
29
  init?: boolean | DataLink
30
30
  /* URL of crawler request */
31
31
  url?: string | DataLink
32
- /* Timeout of crawler request
32
+ /* Method of crawler request
33
33
 
34
34
  Platform not supported for `webview`: tvOS, Desktop, Web */
35
35
  method?: 'webview' | 'http' | DataLink
package/utils/data.ts CHANGED
@@ -79,6 +79,7 @@ type SystemDataName =
79
79
  | 'systemOpenAIApiKey'
80
80
  | 'systemAnthropicApiKey'
81
81
  | 'systemGeminiApiKey'
82
+ | 'ggmlBackendDevices'
82
83
 
83
84
  type SystemDataInfo = {
84
85
  name: SystemDataName
@@ -468,6 +469,15 @@ export const systemDataList: Array<SystemDataInfo> = [
468
469
  type: 'string',
469
470
  value: '',
470
471
  },
472
+ {
473
+ name: 'ggmlBackendDevices',
474
+ id: 'PROPERTY_BANK_DATA_NODE_9e8f7a6b-5c4d-3e2f-1a0b-9c8d7e6f5a4b',
475
+ title: 'SYSTEM: GGML Backend Devices',
476
+ description: 'Available GGML backend devices with supported generators',
477
+ schema: { type: 'object', allowNewItem: false, allowCustomProperty: false },
478
+ type: 'array',
479
+ value: [],
480
+ },
471
481
  ]
472
482
 
473
483
  export const useSystemData = (name: SystemDataName): Data => {
@@ -251,7 +251,7 @@ export const templateEventPropsMap = {
251
251
  'GENERATOR_ALARM_CLOCK_CURRENT_TIME', // type: string
252
252
  'GENERATOR_ALARM_CLOCK_CURRENT_TIMESTAMP', // type: number
253
253
  'GENERATOR_ALARM_CLOCK_REASON', // type: string
254
- 'GENERATOR_ALARM_CLOCK_MAX_TRIGS', // type: nummber
254
+ 'GENERATOR_ALARM_CLOCK_MAX_TRIGS', // type: number
255
255
  'GENERATOR_ALARM_CLOCK_STOP_AT', // type: string
256
256
  ],
257
257
  },
@@ -388,7 +388,16 @@ export const templateEventPropsMap = {
388
388
  'GENERATOR_WEB_SOCKET_MESSAGE', // type: any
389
389
  ],
390
390
  },
391
-
391
+ GENERATOR_CANVAS_MAP: {
392
+ onNavigate: [
393
+ 'GENERATOR_CANVAS_MAP_MATCHED_RULE', // type: object
394
+ 'GENERATOR_CANVAS_MAP_MATCHED_INDEX', // type: number
395
+ 'GENERATOR_CANVAS_MAP_TARGET_CANVAS_ID', // type: string
396
+ 'GENERATOR_CANVAS_MAP_TARGET_CANVAS_TITLE_LIKE', // type: string
397
+ 'GENERATOR_CANVAS_MAP_PROPERTY_VALUE', // type: any
398
+ 'GENERATOR_CANVAS_MAP_PREVIOUS_VALUE', // type: any
399
+ ],
400
+ },
392
401
  GENERATOR_STEP: {
393
402
  onStep: [
394
403
  'GENERATOR_STEP_PAYLOAD', // type: string