@fugood/bricks-project 2.25.0-beta.19 → 2.25.0-beta.21

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.
@@ -350,6 +350,62 @@ export const templateActionNameMap = {
350
350
  strokeWidth: 'BRICK_SKETCH_STROKE_WIDTH',
351
351
  },
352
352
  },
353
+ BRICK_SCENE_3D: {
354
+ BRICK_SCENE_3D_ADD_OBJECT: {
355
+ objectId: 'BRICK_SCENE_3D_OBJECT_ID',
356
+ objectType: 'BRICK_SCENE_3D_OBJECT_TYPE',
357
+ objectUrl: 'BRICK_SCENE_3D_OBJECT_URL',
358
+ objectMd5: 'BRICK_SCENE_3D_OBJECT_MD5',
359
+ objectPosition: 'BRICK_SCENE_3D_OBJECT_POSITION',
360
+ objectRotation: 'BRICK_SCENE_3D_OBJECT_ROTATION',
361
+ objectScale: 'BRICK_SCENE_3D_OBJECT_SCALE',
362
+ objectColor: 'BRICK_SCENE_3D_OBJECT_COLOR',
363
+ },
364
+ BRICK_SCENE_3D_REMOVE_OBJECT: {
365
+ objectId: 'BRICK_SCENE_3D_OBJECT_ID',
366
+ },
367
+ BRICK_SCENE_3D_UPDATE_OBJECT: {
368
+ objectId: 'BRICK_SCENE_3D_OBJECT_ID',
369
+ objectPosition: 'BRICK_SCENE_3D_OBJECT_POSITION',
370
+ objectRotation: 'BRICK_SCENE_3D_OBJECT_ROTATION',
371
+ objectScale: 'BRICK_SCENE_3D_OBJECT_SCALE',
372
+ objectVisible: 'BRICK_SCENE_3D_OBJECT_VISIBLE',
373
+ objectColor: 'BRICK_SCENE_3D_OBJECT_COLOR',
374
+ },
375
+ BRICK_SCENE_3D_SET_CAMERA: {
376
+ cameraPosition: 'BRICK_SCENE_3D_CAMERA_POSITION',
377
+ cameraTarget: 'BRICK_SCENE_3D_CAMERA_TARGET',
378
+ cameraFov: 'BRICK_SCENE_3D_CAMERA_FOV',
379
+ cameraAnimateMs: 'BRICK_SCENE_3D_CAMERA_ANIMATE_MS',
380
+ },
381
+ BRICK_SCENE_3D_LOOK_AT: {
382
+ objectId: 'BRICK_SCENE_3D_OBJECT_ID',
383
+ },
384
+ BRICK_SCENE_3D_PLAY_ANIMATION: {
385
+ objectId: 'BRICK_SCENE_3D_OBJECT_ID',
386
+ animationName: 'BRICK_SCENE_3D_ANIMATION_NAME',
387
+ animationLoop: 'BRICK_SCENE_3D_ANIMATION_LOOP',
388
+ animationSpeed: 'BRICK_SCENE_3D_ANIMATION_SPEED',
389
+ },
390
+ BRICK_SCENE_3D_STOP_ANIMATION: {
391
+ objectId: 'BRICK_SCENE_3D_OBJECT_ID',
392
+ animationName: 'BRICK_SCENE_3D_ANIMATION_NAME',
393
+ },
394
+ BRICK_SCENE_3D_SET_BACKGROUND: {
395
+ backgroundColor: 'BRICK_SCENE_3D_BACKGROUND_COLOR',
396
+ backgroundHdrUrl: 'BRICK_SCENE_3D_BACKGROUND_HDR_URL',
397
+ backgroundMd5: 'BRICK_SCENE_3D_BACKGROUND_MD5',
398
+ },
399
+ BRICK_SCENE_3D_SET_CONTROLS: {
400
+ controlsEnabled: 'BRICK_SCENE_3D_CONTROLS_ENABLED',
401
+ controlsAutoRotate: 'BRICK_SCENE_3D_CONTROLS_AUTO_ROTATE',
402
+ controlsAutoRotateSpeed: 'BRICK_SCENE_3D_CONTROLS_AUTO_ROTATE_SPEED',
403
+ },
404
+ BRICK_SCENE_3D_SCREENSHOT: {
405
+ screenshotFormat: 'BRICK_SCENE_3D_SCREENSHOT_FORMAT',
406
+ screenshotQuality: 'BRICK_SCENE_3D_SCREENSHOT_QUALITY',
407
+ },
408
+ },
353
409
 
354
410
  GENERATOR_FILE: {
355
411
  GENERATOR_FILE_READ_CONTENT: {
@@ -782,6 +838,11 @@ export const templateActionNameMap = {
782
838
  seed: 'GENERATOR_LLM_SEED',
783
839
  typicalP: 'GENERATOR_LLM_TYPICAL_P',
784
840
  ignoreEos: 'GENERATOR_LLM_IGNORE_EOS',
841
+ mtpSpeculativeDecoding: 'GENERATOR_LLM_MTP_SPECULATIVE_DECODING',
842
+ mtpDraftTokens: 'GENERATOR_LLM_MTP_DRAFT_TOKENS',
843
+ mtpDraftMinTokens: 'GENERATOR_LLM_MTP_DRAFT_MIN_TOKENS',
844
+ mtpDraftMinProbability: 'GENERATOR_LLM_MTP_DRAFT_MIN_PROBABILITY',
845
+ mtpDraftSplitProbability: 'GENERATOR_LLM_MTP_DRAFT_SPLIT_PROBABILITY',
785
846
  functionCallEnabled: 'GENERATOR_LLM_FUNCTION_CALL_ENABLED',
786
847
  functionCallSchema: 'GENERATOR_LLM_FUNCTION_CALL_SCHEMA',
787
848
  },
package/compile/index.ts CHANGED
@@ -154,11 +154,13 @@ const basicAnimationEvents = ['show', 'standby', 'breatheStart']
154
154
 
155
155
  const compileAnimations = (
156
156
  templateKey: string,
157
- animations: { [key: string]: Animation },
157
+ animations: { [key: string]: Animation | (() => Animation) },
158
158
  errorReference: string,
159
159
  ) =>
160
160
  Object.entries(animations).reduce((acc, [key, animation]) => {
161
- const animationId = assertEntryId(animation?.id, 'ANIMATION', errorReference)
161
+ // Animation events accept either a direct Animation or a getter; unwrap.
162
+ const resolved = typeof animation === 'function' ? animation() : animation
163
+ const animationId = assertEntryId(resolved?.id, 'ANIMATION', errorReference)
162
164
  acc[convertEventKey(basicAnimationEvents.includes(key) ? 'BRICK' : templateKey, key)] =
163
165
  `ANIMATION#${animationId}`
164
166
  return acc
@@ -483,6 +485,8 @@ const preloadTypes = [
483
485
  'ggml-model-asset',
484
486
  'gguf-model-asset',
485
487
  'binary-asset',
488
+ 'mlx-model-asset',
489
+ 'scene3d-objects',
486
490
  ]
487
491
 
488
492
  const compileKind = (kind: Data['kind']) => {
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@fugood/bricks-project",
3
- "version": "2.25.0-beta.19",
3
+ "version": "2.25.0-beta.21",
4
4
  "main": "index.ts",
5
5
  "scripts": {
6
6
  "typecheck": "tsc --noEmit",
7
7
  "build": "bun scripts/build.js"
8
8
  },
9
9
  "dependencies": {
10
- "@fugood/bricks-cli": "^2.25.0-beta.19",
10
+ "@fugood/bricks-cli": "^2.25.0-beta.21",
11
11
  "@huggingface/gguf": "^0.3.2",
12
12
  "@iarna/toml": "^3.0.0",
13
13
  "@modelcontextprotocol/sdk": "^1.15.0",
package/package.json.bak CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@fugood/bricks-ctor",
3
- "version": "2.25.0-beta.19",
3
+ "version": "2.25.0-beta.21",
4
4
  "main": "index.ts",
5
5
  "scripts": {
6
6
  "typecheck": "tsc --noEmit",
7
7
  "build": "bun scripts/build.js"
8
8
  },
9
9
  "dependencies": {
10
- "@fugood/bricks-cli": "^2.25.0-beta.19",
10
+ "@fugood/bricks-cli": "^2.25.0-beta.21",
11
11
  "@huggingface/gguf": "^0.3.2",
12
12
  "@iarna/toml": "^3.0.0",
13
13
  "@modelcontextprotocol/sdk": "^1.15.0",
@@ -19,6 +19,8 @@ export function register(server: McpServer, projectDir: string) {
19
19
  }
20
20
  })
21
21
 
22
+ if (process.env.BRICKS_CTOR_MCP_DISABLE_PREVIEW === '1') return
23
+
22
24
  server.tool(
23
25
  'preview',
24
26
  {
@@ -104,8 +104,13 @@ export interface AnimationComposeDef {
104
104
 
105
105
  export type Animation = AnimationDef | AnimationComposeDef
106
106
 
107
+ // Animation event handlers accept either a direct Animation or a getter that
108
+ // returns one. The getter form is useful for lazy/forward references between
109
+ // animations defined across files.
110
+ export type AnimationOrGetter = Animation | (() => Animation)
111
+
107
112
  export interface AnimationBasicEvents {
108
- showStart?: Animation
109
- standby?: Animation
110
- breatheStart?: Animation
113
+ showStart?: AnimationOrGetter
114
+ standby?: AnimationOrGetter
115
+ breatheStart?: AnimationOrGetter
111
116
  }
@@ -1,7 +1,7 @@
1
1
  /* Auto generated by build script */
2
2
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from './switch'
3
3
  import type { Data, DataLink } from './data'
4
- import type { Animation, AnimationBasicEvents } from './animation'
4
+ import type { Animation, AnimationBasicEvents, AnimationOrGetter } from './animation'
5
5
  import type {
6
6
  Brick,
7
7
  EventAction,
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
6
6
  import type { Data, DataLink } from '../data'
7
- import type { Animation, AnimationBasicEvents } from '../animation'
7
+ import type { Animation, AnimationBasicEvents, AnimationOrGetter } from '../animation'
8
8
  import type {
9
9
  Brick,
10
10
  EventAction,
@@ -213,13 +213,13 @@ Default property:
213
213
  faceDetected?: () => Data<Array<{ [key: string]: any }>>
214
214
  }
215
215
  animation?: AnimationBasicEvents & {
216
- stateChange?: Animation
217
- recordStart?: Animation
218
- recordEnd?: Animation
219
- barcodeRead?: Animation
220
- pictureTaken?: Animation
221
- recordFinish?: Animation
222
- mountError?: Animation
216
+ stateChange?: AnimationOrGetter
217
+ recordStart?: AnimationOrGetter
218
+ recordEnd?: AnimationOrGetter
219
+ barcodeRead?: AnimationOrGetter
220
+ pictureTaken?: AnimationOrGetter
221
+ recordFinish?: AnimationOrGetter
222
+ mountError?: AnimationOrGetter
223
223
  }
224
224
  }
225
225
 
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
6
6
  import type { Data, DataLink } from '../data'
7
- import type { Animation, AnimationBasicEvents } from '../animation'
7
+ import type { Animation, AnimationBasicEvents, AnimationOrGetter } from '../animation'
8
8
  import type {
9
9
  Brick,
10
10
  EventAction,
@@ -343,9 +343,9 @@ Default property:
343
343
  >
344
344
  }
345
345
  animation?: AnimationBasicEvents & {
346
- onRender?: Animation
347
- onPress?: Animation
348
- onLegendSelectChanged?: Animation
346
+ onRender?: AnimationOrGetter
347
+ onPress?: AnimationOrGetter
348
+ onLegendSelectChanged?: AnimationOrGetter
349
349
  }
350
350
  }
351
351
 
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
6
6
  import type { Data, DataLink } from '../data'
7
- import type { Animation, AnimationBasicEvents } from '../animation'
7
+ import type { Animation, AnimationBasicEvents, AnimationOrGetter } from '../animation'
8
8
  import type {
9
9
  Brick,
10
10
  EventAction,
@@ -250,20 +250,20 @@ Default property:
250
250
  loading?: () => Data<boolean>
251
251
  }
252
252
  animation?: AnimationBasicEvents & {
253
- generativeMediaOnPress?: Animation
254
- generativeMediaOnPressIn?: Animation
255
- generativeMediaOnPressOut?: Animation
256
- generativeMediaOnLongPress?: Animation
257
- generativeMediaOnFocus?: Animation
258
- generativeMediaOnBlur?: Animation
259
- onSuccess?: Animation
260
- onError?: Animation
261
- promptStart?: Animation
262
- promptSuccess?: Animation
263
- promptError?: Animation
264
- loadStart?: Animation
265
- loadSuccess?: Animation
266
- loadError?: Animation
253
+ generativeMediaOnPress?: AnimationOrGetter
254
+ generativeMediaOnPressIn?: AnimationOrGetter
255
+ generativeMediaOnPressOut?: AnimationOrGetter
256
+ generativeMediaOnLongPress?: AnimationOrGetter
257
+ generativeMediaOnFocus?: AnimationOrGetter
258
+ generativeMediaOnBlur?: AnimationOrGetter
259
+ onSuccess?: AnimationOrGetter
260
+ onError?: AnimationOrGetter
261
+ promptStart?: AnimationOrGetter
262
+ promptSuccess?: AnimationOrGetter
263
+ promptError?: AnimationOrGetter
264
+ loadStart?: AnimationOrGetter
265
+ loadSuccess?: AnimationOrGetter
266
+ loadError?: AnimationOrGetter
267
267
  }
268
268
  }
269
269
 
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
6
6
  import type { Data, DataLink } from '../data'
7
- import type { Animation, AnimationBasicEvents } from '../animation'
7
+ import type { Animation, AnimationBasicEvents, AnimationOrGetter } from '../animation'
8
8
  import type {
9
9
  Brick,
10
10
  EventAction,
@@ -66,12 +66,12 @@ Default property:
66
66
  brickFocusing?: () => Data<boolean>
67
67
  }
68
68
  animation?: AnimationBasicEvents & {
69
- onPress?: Animation
70
- onPressIn?: Animation
71
- onPressOut?: Animation
72
- onLongPress?: Animation
73
- onFocus?: Animation
74
- onBlur?: Animation
69
+ onPress?: AnimationOrGetter
70
+ onPressIn?: AnimationOrGetter
71
+ onPressOut?: AnimationOrGetter
72
+ onLongPress?: AnimationOrGetter
73
+ onFocus?: AnimationOrGetter
74
+ onBlur?: AnimationOrGetter
75
75
  }
76
76
  }
77
77
 
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
6
6
  import type { Data, DataLink } from '../data'
7
- import type { Animation, AnimationBasicEvents } from '../animation'
7
+ import type { Animation, AnimationBasicEvents, AnimationOrGetter } from '../animation'
8
8
  import type {
9
9
  Brick,
10
10
  EventAction,
@@ -92,14 +92,14 @@ Default property:
92
92
  brickFocusing?: () => Data<boolean>
93
93
  }
94
94
  animation?: AnimationBasicEvents & {
95
- onPress?: Animation
96
- onPressIn?: Animation
97
- onPressOut?: Animation
98
- onLongPress?: Animation
99
- onFocus?: Animation
100
- onBlur?: Animation
101
- onLoad?: Animation
102
- onError?: Animation
95
+ onPress?: AnimationOrGetter
96
+ onPressIn?: AnimationOrGetter
97
+ onPressOut?: AnimationOrGetter
98
+ onLongPress?: AnimationOrGetter
99
+ onFocus?: AnimationOrGetter
100
+ onBlur?: AnimationOrGetter
101
+ onLoad?: AnimationOrGetter
102
+ onError?: AnimationOrGetter
103
103
  }
104
104
  }
105
105
 
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
6
6
  import type { Data, DataLink } from '../data'
7
- import type { Animation, AnimationBasicEvents } from '../animation'
7
+ import type { Animation, AnimationBasicEvents, AnimationOrGetter } from '../animation'
8
8
  import type {
9
9
  Brick,
10
10
  EventAction,
@@ -438,12 +438,12 @@ Default property:
438
438
  pageIsOutOfBound?: () => Data<boolean>
439
439
  }
440
440
  animation?: AnimationBasicEvents & {
441
- onPageRender?: Animation
442
- onPageChange?: Animation
443
- onPageOutOfBound?: Animation
444
- onIntoDetailMode?: Animation
445
- onIntoListMode?: Animation
446
- onError?: Animation
441
+ onPageRender?: AnimationOrGetter
442
+ onPageChange?: AnimationOrGetter
443
+ onPageOutOfBound?: AnimationOrGetter
444
+ onIntoDetailMode?: AnimationOrGetter
445
+ onIntoListMode?: AnimationOrGetter
446
+ onError?: AnimationOrGetter
447
447
  }
448
448
  }
449
449
 
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
6
6
  import type { Data, DataLink } from '../data'
7
- import type { Animation, AnimationBasicEvents } from '../animation'
7
+ import type { Animation, AnimationBasicEvents, AnimationOrGetter } from '../animation'
8
8
  import type {
9
9
  Brick,
10
10
  EventAction,
@@ -133,15 +133,15 @@ Default property:
133
133
  brickFocusing?: () => Data<boolean>
134
134
  }
135
135
  animation?: AnimationBasicEvents & {
136
- onPress?: Animation
137
- onPressIn?: Animation
138
- onPressOut?: Animation
139
- onLongPress?: Animation
140
- onFocus?: Animation
141
- onBlur?: Animation
142
- onAnimationFinish?: Animation
143
- onAnimationFailure?: Animation
144
- onAnimationLoop?: Animation
136
+ onPress?: AnimationOrGetter
137
+ onPressIn?: AnimationOrGetter
138
+ onPressOut?: AnimationOrGetter
139
+ onLongPress?: AnimationOrGetter
140
+ onFocus?: AnimationOrGetter
141
+ onBlur?: AnimationOrGetter
142
+ onAnimationFinish?: AnimationOrGetter
143
+ onAnimationFailure?: AnimationOrGetter
144
+ onAnimationLoop?: AnimationOrGetter
145
145
  }
146
146
  }
147
147
 
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
6
6
  import type { Data, DataLink } from '../data'
7
- import type { Animation, AnimationBasicEvents } from '../animation'
7
+ import type { Animation, AnimationBasicEvents, AnimationOrGetter } from '../animation'
8
8
  import type {
9
9
  Brick,
10
10
  EventAction,
@@ -226,16 +226,16 @@ Default property:
226
226
  brickFocusing?: () => Data<boolean>
227
227
  }
228
228
  animation?: AnimationBasicEvents & {
229
- onPress?: Animation
230
- onPressIn?: Animation
231
- onPressOut?: Animation
232
- onLongPress?: Animation
233
- onFocus?: Animation
234
- onBlur?: Animation
235
- onMarkerPress?: Animation
236
- onMapPress?: Animation
237
- onRegionChange?: Animation
238
- onReady?: Animation
229
+ onPress?: AnimationOrGetter
230
+ onPressIn?: AnimationOrGetter
231
+ onPressOut?: AnimationOrGetter
232
+ onLongPress?: AnimationOrGetter
233
+ onFocus?: AnimationOrGetter
234
+ onBlur?: AnimationOrGetter
235
+ onMarkerPress?: AnimationOrGetter
236
+ onMapPress?: AnimationOrGetter
237
+ onRegionChange?: AnimationOrGetter
238
+ onReady?: AnimationOrGetter
239
239
  }
240
240
  }
241
241
 
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
6
6
  import type { Data, DataLink } from '../data'
7
- import type { Animation, AnimationBasicEvents } from '../animation'
7
+ import type { Animation, AnimationBasicEvents, AnimationOrGetter } from '../animation'
8
8
  import type {
9
9
  Brick,
10
10
  EventAction,
@@ -85,12 +85,12 @@ Default property:
85
85
  brickFocusing?: () => Data<boolean>
86
86
  }
87
87
  animation?: AnimationBasicEvents & {
88
- onPress?: Animation
89
- onPressIn?: Animation
90
- onPressOut?: Animation
91
- onLongPress?: Animation
92
- onFocus?: Animation
93
- onBlur?: Animation
88
+ onPress?: AnimationOrGetter
89
+ onPressIn?: AnimationOrGetter
90
+ onPressOut?: AnimationOrGetter
91
+ onLongPress?: AnimationOrGetter
92
+ onFocus?: AnimationOrGetter
93
+ onBlur?: AnimationOrGetter
94
94
  }
95
95
  }
96
96
 
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
6
6
  import type { Data, DataLink } from '../data'
7
- import type { Animation, AnimationBasicEvents } from '../animation'
7
+ import type { Animation, AnimationBasicEvents, AnimationOrGetter } from '../animation'
8
8
  import type {
9
9
  Brick,
10
10
  EventAction,
@@ -118,12 +118,12 @@ Default property:
118
118
  brickFocusing?: () => Data<boolean>
119
119
  }
120
120
  animation?: AnimationBasicEvents & {
121
- onPress?: Animation
122
- onPressIn?: Animation
123
- onPressOut?: Animation
124
- onLongPress?: Animation
125
- onFocus?: Animation
126
- onBlur?: Animation
121
+ onPress?: AnimationOrGetter
122
+ onPressIn?: AnimationOrGetter
123
+ onPressOut?: AnimationOrGetter
124
+ onLongPress?: AnimationOrGetter
125
+ onFocus?: AnimationOrGetter
126
+ onBlur?: AnimationOrGetter
127
127
  }
128
128
  }
129
129
 
@@ -1,10 +1,10 @@
1
1
  /* Auto generated by build script
2
2
  *
3
- * Rich text with HTML content rendering, multiple fonts, colors, heading levels (h1-h6), and inline images
3
+ * Rich text with HTML or Markdown content rendering, multiple fonts, colors, heading levels (h1-h6), and inline images
4
4
  */
5
5
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
6
6
  import type { Data, DataLink } from '../data'
7
- import type { Animation, AnimationBasicEvents } from '../animation'
7
+ import type { Animation, AnimationBasicEvents, AnimationOrGetter } from '../animation'
8
8
  import type {
9
9
  Brick,
10
10
  EventAction,
@@ -23,6 +23,7 @@ Default property:
23
23
  {
24
24
  "content": "",
25
25
  "renderImage": false,
26
+ "renderMarkdown": false,
26
27
  "color": "#000",
27
28
  "fontWeight": "normal",
28
29
  "fontStyle": "normal",
@@ -42,6 +43,8 @@ Default property:
42
43
  content?: string | DataLink
43
44
  /* Render Image */
44
45
  renderImage?: boolean | DataLink
46
+ /* Treat content as Markdown (converted to HTML before rendering) */
47
+ renderMarkdown?: boolean | DataLink
45
48
  /* The text color */
46
49
  color?: string | DataLink
47
50
  /* Specifies font weight. The values 'normal' and are supported for most fonts. Not all fonts have a variant for each of the numeric values, in that case the closest one is chosen. */
@@ -96,16 +99,16 @@ Default property:
96
99
  brickFocusing?: () => Data<boolean>
97
100
  }
98
101
  animation?: AnimationBasicEvents & {
99
- onPress?: Animation
100
- onPressIn?: Animation
101
- onPressOut?: Animation
102
- onLongPress?: Animation
103
- onFocus?: Animation
104
- onBlur?: Animation
102
+ onPress?: AnimationOrGetter
103
+ onPressIn?: AnimationOrGetter
104
+ onPressOut?: AnimationOrGetter
105
+ onLongPress?: AnimationOrGetter
106
+ onFocus?: AnimationOrGetter
107
+ onBlur?: AnimationOrGetter
105
108
  }
106
109
  }
107
110
 
108
- /* Rich text with HTML content rendering, multiple fonts, colors, heading levels (h1-h6), and inline images */
111
+ /* Rich text with HTML or Markdown content rendering, multiple fonts, colors, heading levels (h1-h6), and inline images */
109
112
  export type BrickRichText = Brick &
110
113
  BrickRichTextDef & {
111
114
  templateKey: 'BRICK_RICH_TEXT'
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
6
6
  import type { Data, DataLink } from '../data'
7
- import type { Animation, AnimationBasicEvents } from '../animation'
7
+ import type { Animation, AnimationBasicEvents, AnimationOrGetter } from '../animation'
8
8
  import type {
9
9
  Brick,
10
10
  EventAction,
@@ -186,14 +186,14 @@ Default property:
186
186
  >
187
187
  }
188
188
  animation?: AnimationBasicEvents & {
189
- onPlay?: Animation
190
- onPause?: Animation
191
- onStop?: Animation
192
- onLoopEnd?: Animation
193
- onStateChanged?: Animation
194
- onError?: Animation
195
- onRiveGeneralEvent?: Animation
196
- onRiveOpenUrlEvent?: Animation
189
+ onPlay?: AnimationOrGetter
190
+ onPause?: AnimationOrGetter
191
+ onStop?: AnimationOrGetter
192
+ onLoopEnd?: AnimationOrGetter
193
+ onStateChanged?: AnimationOrGetter
194
+ onError?: AnimationOrGetter
195
+ onRiveGeneralEvent?: AnimationOrGetter
196
+ onRiveOpenUrlEvent?: AnimationOrGetter
197
197
  }
198
198
  }
199
199